mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
GUI: Work around GtkBuilder name property API break (gtk+ 2.20)
This commit is contained in:
parent
3ea9839542
commit
1d009ac3c5
1 changed files with 6 additions and 2 deletions
|
@ -78,8 +78,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):
|
||||
|
||||
|
|
Loading…
Reference in a new issue