From 4e0edda549499db1cbe1035191c5467e11125a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Sep 2012 13:24:02 +0200 Subject: [PATCH] Replace Window.get_window_type by the property Window.get_window_type is only available since PyGTK 2.22 issue2743 review501008 --- tryton/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/common/common.py b/tryton/common/common.py index ececfd60f2..df9a007eac 100644 --- a/tryton/common/common.py +++ b/tryton/common/common.py @@ -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