[Sugar-devel] [PATCH sugar] Journal, no-hippo: set white background for no-matching-entry message, SL #3808

Simon Schampijer simon at schampijer.de
Thu Aug 16 06:33:39 EDT 2012


The 'no-matching-entry' message in the Journal listview is
grey after the hippo removal.

Add a gtk.EventBox because the gtk.VBox doesn't have a
gtk.gdk.Window associated with it and the background
can't be set otherwise. See d9fbf9d for the same resolution
of the issue.

Signed-off-by: Simon Schampijer <simon at laptop.org>
---
 src/jarabe/journal/listview.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index f6a867f..e3f8745 100644
--- a/src/jarabe/journal/listview.py
+++ b/src/jarabe/journal/listview.py
@@ -371,11 +371,18 @@ class BaseListView(gtk.Bin):
         self._progress_bar = None
 
     def _show_message(self, message, show_clear_query=False):
-        box = gtk.VBox()
         self.remove(self.child)
 
+        background_box = gtk.EventBox()
+        background_box.modify_bg(gtk.STATE_NORMAL,
+                                 style.COLOR_WHITE.get_gdk_color())
+        self.add(background_box)
+
         alignment = gtk.Alignment(0.5, 0.5, 0.1, 0.1)
-        self.add(alignment)
+        background_box.add(alignment)
+
+        box = gtk.VBox()
+        alignment.add(box)
 
         icon = EventIcon(pixel_size=style.LARGE_ICON_SIZE,
                          icon_name='activity-journal',
@@ -396,8 +403,7 @@ class BaseListView(gtk.Bin):
                                       icon_size=gtk.ICON_SIZE_BUTTON)
             box.pack_start(button, expand=True, fill=False)
 
-        alignment.add(box)
-        alignment.show_all()
+        background_box.show_all()
 
     def __clear_button_clicked_cb(self, button):
         self.emit('clear-clicked')
-- 
1.7.11.4



More information about the Sugar-devel mailing list