From f05e9cf831b3e9fd183ba73786a749558e3dc250 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Thu, 14 Feb 2013 10:46:05 +0100
Subject: [PATCH] ObjectChooser: make ObjectChooser transient for the parent
window
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There are two set-transient-for for methods: one that expects the
window and parent parameter to be of type GtkWindow [1] and one that
expects them to be of type GdkWindow [2].
The parent window we get for the object chooser is of type GdkWindow
as we use GdkX11.X11Window.foreign_new_for_display to construct it
from the xid passed from the toolkit.
This patch changes the code to use gdk_window_set_transient_for in
this case.
[1] http://developer.gnome.org/gtk3/3.4/GtkWindow.html#gtk-window-set-transient-for
[2] http://developer.gnome.org/gdk3/stable/gdk3-Windows.html#gdk-window-set-transient-for
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
---
src/jarabe/journal/objectchooser.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/jarabe/journal/objectchooser.py b/src/jarabe/journal/objectchooser.py
index e7da414..9315192 100644
a
|
b
|
class ObjectChooser(Gtk.Window): |
101 | 101 | self._toolbar.set_what_filter(what_filter) |
102 | 102 | |
103 | 103 | def __realize_cb(self, chooser, parent): |
104 | | self.set_transient_for(parent) |
| 104 | self.get_window().set_transient_for(parent) |
105 | 105 | # TODO: Should we disconnect the signal here? |
106 | 106 | |
107 | 107 | def __window_closed_cb(self, screen, window, parent): |