diff options
author | Simon Schampijer <simon@laptop.org> | 2012-08-30 09:11:36 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-08-30 09:11:36 (GMT) |
commit | 29791a56cf5aa40c0ec14d42610a215a3be999be (patch) | |
tree | 39d9ddd6965f15bd7b29344e633657e32dd8a499 | |
parent | 221562afd834080521bb31d69c9d8635115eaa2f (diff) |
Journal: workaround for foreach
Using gtk_container_foreach or gtk_container_forall [1] does expect the
callback data to be passed in Python, it does work in a subclassed
container due to Carlos fix in the GtkCallback annotations [2].
Apply workaround for the issue.
[1] http://developer.gnome.org/gtk3/3.4/GtkContainer.html#gtk-container-foreach
[2] http://git.gnome.org/browse/gtk+/commit/?id=db569cbee7e3842d802c5f1d53e28d0dde98ffeb
-rw-r--r-- | src/jarabe/journal/expandedentry.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py index a5a40aa..f1ad35a 100644 --- a/src/jarabe/journal/expandedentry.py +++ b/src/jarabe/journal/expandedentry.py @@ -135,7 +135,9 @@ class ExpandedEntry(Gtk.EventBox): self._keep_icon.set_active(int(metadata.get('keep', 0)) == 1) self._icon = self._create_icon() - self._icon_box.foreach(self._icon_box.remove) + for child in self._icon_box.get_children(): + self._icon_box.remove(child) + #FIXME: self._icon_box.foreach(self._icon_box.remove) self._icon_box.pack_start(self._icon, False, False, 0) self._date.set_text(misc.get_date(metadata)) @@ -146,11 +148,15 @@ class ExpandedEntry(Gtk.EventBox): self._preview_box.remove(self._preview_box.get_child()) self._preview_box.add(self._create_preview()) - self._technical_box.foreach(self._technical_box.remove) + for child in self._technical_box.get_children(): + self._technical_box.remove(child) + #FIXME: self._technical_box.foreach(self._technical_box.remove) self._technical_box.pack_start(self._create_technical(), False, False, style.DEFAULT_SPACING) - self._buddy_list.foreach(self._buddy_list.remove) + for child in self._buddy_list.get_children(): + self._buddy_list.remove(child) + #FIXME: self._buddy_list.foreach(self._buddy_list.remove) self._buddy_list.pack_start(self._create_buddy_list(), False, False, style.DEFAULT_SPACING) |