diff options
author | René Stadler <mail@renestadler.de> | 2010-07-02 23:10:30 +0300 |
---|---|---|
committer | René Stadler <mail@renestadler.de> | 2010-07-02 23:10:30 +0300 |
commit | 05275d0f841336a0002f2e7bb07124a974347923 (patch) | |
tree | 1b2382f0ad5ac0b4ce849dd143e29c0d2c1c9ca2 | |
parent | 1e24ba320b66fa4ed8548a71cbaa036413a93ea6 (diff) |
GUI: Work around GtkBuilder name property API break (gtk+ 2.20)
-rw-r--r-- | GstInspector/GUI/utils.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/GstInspector/GUI/utils.py b/GstInspector/GUI/utils.py index e72a6ec..fcf6f22 100644 --- a/GstInspector/GUI/utils.py +++ b/GstInspector/GUI/utils.py @@ -109,8 +109,12 @@ class Widgets (dict): def __init__ (self, builder): widgets = (obj for obj in builder.get_objects () - if hasattr (obj, "name")) - dict.__init__ (self, ((w.name, w,) for w in widgets)) + if isinstance(obj, gtk.Buildable)) + # gtk.Widget.get_name() shadows out the GtkBuildable interface method + # of the same name, hence calling the unbound interface method here: + items = ((gtk.Buildable.get_name (w), w,) for w in widgets) + + dict.__init__ (self, items) def __getattr__ (self, name): |