Replace Window.get_window_type by the property

Window.get_window_type is only available since PyGTK 2.22

issue2743
review501008
This commit is contained in:
Cédric Krier committed 2012-09-10 13:24:02 +02:00
1 parent 1628c14492
commit 4e0edda549
1 file changed
+1 -1
+1 -1
View File
@@ -292,7 +292,7 @@ def request_server(server_widget):
def get_toplevel_window():
windows = [x for x in gtk.window_list_toplevels()
if x.window and x.props.visible
and x.get_window_type() == gtk.WINDOW_TOPLEVEL]
and x.props.type == gtk.WINDOW_TOPLEVEL]
trans2windows = dict((x.get_transient_for(), x) for x in windows)
for window in set(windows) - set(trans2windows.iterkeys()):
return window