Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/journal/expandedentry.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2012-09-06 10:45:12 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-09-07 09:14:26 (GMT)
commit70ef45362a7ad0cb21c8f3a938b6952494009346 (patch)
tree99159e1333e09898d629588ce7b226cabe2616ec /src/jarabe/journal/expandedentry.py
parent17285f1faef2d10caaa65b1d269ed43ca62995bb (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 Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'src/jarabe/journal/expandedentry.py')
-rw-r--r--src/jarabe/journal/expandedentry.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/jarabe/journal/expandedentry.py b/src/jarabe/journal/expandedentry.py
index e200481..3a1bcef 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)