Skip to content

Commit

Permalink
Fix: using child_get_property in weird way for Gtk<=3.10. Fixes #201
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed Sep 27, 2015
1 parent dd12533 commit 78db67d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions syncthing_gtk/infobox.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,16 @@ def set_dark_color(self, r, g, b, a):
for key in self.value_widgets:
for w in self.value_widgets[key]:
if isinstance(w, Gtk.Image):
la = self.grid.child_get_property(w, "left-attach", None)
ta = self.grid.child_get_property(w, "top-attach", None)
if (Gtk.get_major_version(), Gtk.get_minor_version()) <= (3, 10):
# Mint....
v1 = GObject.Value(int, 0)
v2 = GObject.Value(int, 0)
self.grid.child_get_property(w, "left-attach", v1)
self.grid.child_get_property(w, "top-attach", v2)
la, ta = v1.get_int(), v2.get_int()
else:
la = self.grid.child_get_property(w, "left-attach")
ta = self.grid.child_get_property(w, "top-attach")
vis = not w.get_no_show_all()
wIcon = self._prepare_icon(self.icons[key])
w.get_parent().remove(w)
Expand Down

0 comments on commit 78db67d

Please sign in to comment.