diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-22 12:10:37 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2013-01-22 12:19:50 (GMT) |
commit | ea803cb709587d506434e09c37fe9f4dfd2128d8 (patch) | |
tree | 25e44dba0890e66d96fecf591c5cbe860abe148a | |
parent | 74b7e527d8152bd4658682fab6983b97056a307c (diff) |
Rework how we select the Xcursor theme
Metacity reads the default theme from gsettings and we were trying
to override it at lower level, causing race conditions. Now we are
just setting the cursor-theme gsetting, so that metacity setup the
Sugar theme for us.
Distributions which are shipping both GNOME and Sugar should make
sure to set XDG_CONFIG_HOME for either of the desktops to point
to a non default location, so that the settings are not conflicting.
It's necessary in this case if you don't want to get the Sugar
cursors in GNOME, but it seems like a sane approach in general. We
are sharing several components with GNOME which are (or might in
the future) use GNOME gsettings.
Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r-- | bin/sugar.in | 2 | ||||
-rwxr-xr-x | src/jarabe/main.py | 14 |
2 files changed, 4 insertions, 12 deletions
diff --git a/bin/sugar.in b/bin/sugar.in index 606057d..440e3b3 100644 --- a/bin/sugar.in +++ b/bin/sugar.in @@ -46,6 +46,4 @@ if [ -f ~/.sugar/debug ]; then . ~/.sugar/debug fi -echo Xcursor.theme: sugar | xrdb -merge - exec python -m jarabe.main diff --git a/src/jarabe/main.py b/src/jarabe/main.py index fc64439..66656f3 100755 --- a/src/jarabe/main.py +++ b/src/jarabe/main.py @@ -37,6 +37,7 @@ sys.setdefaultencoding('utf-8') import gettext +from gi.repository import Gio from gi.repository import GLib from gi.repository import GConf from gi.repository import Gtk @@ -153,6 +154,9 @@ def _check_for_window_manager(screen): def _start_window_manager(): global _metacity_process + settings = Gio.Settings.new('org.gnome.desktop.interface') + settings.set_string('cursor-theme', 'sugar') + _metacity_process = subprocess.Popen(['metacity', '--no-force-fullscreen']) screen = Wnck.Screen.get_default() @@ -238,11 +242,6 @@ def main(): _start_window_manager() setup_locale() - - client = GConf.Client.get_default() - client.set_string('/apps/metacity/general/mouse_button_modifier', - '<Super>') - setup_fonts() setup_theme() @@ -251,11 +250,6 @@ def main(): GObject.idle_add(unfreeze_dcon_cb) GObject.idle_add(setup_cursortracker_cb) - # 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() keyboard.setup() |