[Sugar-devel] [PATCH Sugar] Set favourites layout to RingLayout if it's not set in gconf SL #3652

Manuel Quiñones manuq at laptop.org
Tue May 29 14:10:09 EDT 2012


This prevent crashing jhbuild's sugar emulator startup if there is not
a gconf setting for '/desktop/sugar/desktop/favorites_layout'.

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

diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
index 654f400..c66d828 100644
--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -673,6 +673,8 @@ class FavoritesSetting(object):
     def __init__(self):
         client = gconf.client_get_default()
         self._layout = client.get_string(self._FAVORITES_KEY)
+        if self._layout is None:
+            self._layout = favoriteslayout.RingLayout.key
         logging.debug('FavoritesSetting layout %r', self._layout)
 
         self._mode = None
-- 
1.7.10.1



More information about the Sugar-devel mailing list