[Sugar-devel] [PATCH sugar 06/20] Move the various init method calls inside main

Daniel Narvaez dwnarvaez at gmail.com
Mon Dec 10 14:11:32 EST 2012


From: Daniel Narvaez <dwnarvaez at gmail.com>

Scattered around code is hard to find and doesn't really
improve readability.
---
 src/jarabe/main.py |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/jarabe/main.py b/src/jarabe/main.py
index fbf1f03..816e53d 100755
--- a/src/jarabe/main.py
+++ b/src/jarabe/main.py
@@ -43,12 +43,6 @@ from gi.repository import Gst
 import dbus.glib
 from gi.repository import Wnck
 
-GLib.threads_init()
-Gdk.threads_init()
-dbus.glib.threads_init()
-
-Gst.init(sys.argv)
-
 def start_ui_service():
     from jarabe.view.service import UIService
 
@@ -187,6 +181,11 @@ def cleanup_temporary_files():
         print 'temporary files cleanup failed: %s' % e
 
 def main():
+    GLib.threads_init()
+    Gdk.threads_init()
+    dbus.glib.threads_init()
+    Gst.init(sys.argv)
+
     cleanup_temporary_files()
 
     from sugar3 import logger
-- 
1.7.10.4



More information about the Sugar-devel mailing list