diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-10 18:35:30 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-14 11:35:31 (GMT) |
commit | 2c40e59a677dc3f806208b7c07f0a1035bc92ae9 (patch) | |
tree | c8b03cf254e111234362326cc30f2f4c1c0cb12d | |
parent | 1f211ae9d2ddcf646b17a2cf34fba251b217cae6 (diff) |
Factor out setup_mouse from main
Finally main is getting down to something readable.
-rwxr-xr-x | src/jarabe/main.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/jarabe/main.py b/src/jarabe/main.py index f73b28e..a2d2c84 100755 --- a/src/jarabe/main.py +++ b/src/jarabe/main.py @@ -172,6 +172,17 @@ def _setup_locale(): if timezone is not None and timezone: os.environ['TZ'] = timezone +def _setup_mouse(): + client = GConf.Client.get_default() + client.set_string('/apps/metacity/general/mouse_button_modifier', + '<Super>') + + cursortracker.setup() + # make sure we have the correct cursor in the intro screen + # TODO #3204 + if subprocess.call(["xsetroot", "-cursor_name", "left_ptr"]): + logging.warning('Can not reset cursor') + def _main(): GLib.threads_init() Gdk.threads_init() @@ -181,11 +192,7 @@ def _main(): _cleanup_temporary_files() _setup_locale() - - client = GConf.Client.get_default() - client.set_string('/apps/metacity/general/mouse_button_modifier', - '<Super>') - + _setup_mouse() _setup_fonts() _setup_theme() @@ -193,12 +200,6 @@ def _main(): # even when we initially get blocked on the intro screen GObject.idle_add(_unfreeze_dcon_cb) - cursortracker.setup() - # make sure we have the correct cursor in the intro screen - # TODO #3204 - if subprocess.call(["xsetroot", "-cursor_name", "left_ptr"]): - logging.warning('Can not reset cursor') - sound.restore() sys.path.append(config.ext_path) |