[Sugar-devel] [PATCH sugar] Get rid of the bootstrap function

Daniel Narvaez dwnarvaez at gmail.com
Mon Dec 10 19:37:50 EST 2012


From: Daniel Narvaez <dwnarvaez at gmail.com>

The name doesn't say anything about the kind of initialization it
should host, hard to say if part of this stuff should actually
be in main or the other way around.

Keeping it in the check_window_manager at least tells us when
these initializations are run.
---
 src/jarabe/main.py |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/jarabe/main.py b/src/jarabe/main.py
index 02e0011..4566dc2 100755
--- a/src/jarabe/main.py
+++ b/src/jarabe/main.py
@@ -89,11 +89,11 @@ def _window_manager_changed_cb(screen):
 
 def _check_for_window_manager(screen):
     wm_name = screen.get_window_manager_name()
-    if wm_name is not None:
-        screen.disconnect_by_func(_window_manager_changed_cb)
-        _bootstrap()
+    if wm_name is None:
+        return
+
+    screen.disconnect_by_func(_window_manager_changed_cb)
 
-def _bootstrap():
     _setup_window_manager()
 
     launcher.setup()
-- 
1.7.10.4



More information about the Sugar-devel mailing list