[Sugar-devel] [PATCH sugar] Increment the insert offset in the activity palette menu - SL #3879

Manuel Quiñones manuq at laptop.org
Thu Sep 13 00:27:36 EDT 2012


This is to consider the added separator item below the palette header
to get the styling OK.

Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
 src/jarabe/desktop/favoritesview.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
index e44a750..125637a 100644
--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -511,7 +511,7 @@ class ActivityIcon(EventIcon):
 class FavoritePalette(ActivityPalette):
     __gtype_name__ = 'SugarFavoritePalette'
 
-    _PALETTE_LABEL_OFFSET = 1
+    _PALETTE_LABEL_OFFSET = 2
 
     __gsignals__ = {
         'entry-activate': (GObject.SignalFlags.RUN_FIRST,
@@ -553,7 +553,8 @@ class FavoritePalette(ActivityPalette):
                 separator.show()
 
             for i in range(0, len(menu_items)):
-                # the first menu_item is the label so we need the offset
+                # the first menu_item is the label and the second is a
+                # separator so we need the offset
                 self.menu.insert(menu_items[i], i + self._PALETTE_LABEL_OFFSET)
 
     def __resume_entry_cb(self, menu_item, entry):
-- 
1.7.11.4



More information about the Sugar-devel mailing list