[hamster-applet] check if parent is a widget before looking for toplevel
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] check if parent is a widget before looking for toplevel
- Date: Fri, 16 Jul 2010 14:45:54 +0000 (UTC)
commit 25423e114e3edb84d6fb0d82b0c2b9ccd474c9dc
Author: Toms Bauģis <toms baugis gmail com>
Date: Fri Jul 16 15:30:07 2010 +0100
check if parent is a widget before looking for toplevel
src/hamster/configuration.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/hamster/configuration.py b/src/hamster/configuration.py
index a623081..b217184 100644
--- a/src/hamster/configuration.py
+++ b/src/hamster/configuration.py
@@ -110,7 +110,9 @@ class OneWindow(object):
else:
if parent:
dialog = self.get_dialog_class()(parent, **kwargs)
- dialog.window.set_transient_for(parent.get_toplevel())
+
+ if isinstance(parent, gtk.Widget):
+ dialog.window.set_transient_for(parent.get_toplevel())
# to make things simple, we hope that the target has defined self.window
dialog.window.connect("destroy",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]