diff options
author | Santiago Collazo <scollazo@activitycentral.com> | 2012-12-26 10:40:20 (GMT) |
---|---|---|
committer | Santiago Collazo <scollazo@activitycentral.com> | 2012-12-26 10:40:20 (GMT) |
commit | aaa49067a56f12ca0443ca3cff60f9f87507dc48 (patch) | |
tree | c5afcac3490dbacb7a0478b4805b103e20255dfa | |
parent | 07b72560c7c9b4947ab709b1cae62b4f781f7f88 (diff) | |
parent | db124b3869b404c41a267ac24b8a0c9f3413354b (diff) |
Merge remote-tracking branch 'ajay/0.97.7-as-base' into devel
-rwxr-xr-x | bin/sugar-session | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/bin/sugar-session b/bin/sugar-session index 638218f..a8836d2 100755 --- a/bin/sugar-session +++ b/bin/sugar-session @@ -279,9 +279,28 @@ def set_fonts(): def set_theme(): settings = Gtk.Settings.get_default() sugar_theme = 'sugar-72' + + """ + Fetch the theme from Gconf. + """ + client = GConf.Client.get_default() + theme = client.get_string('/desktop/sugar/interface/gtk_theme') + + """ + See if 'SUGAR_SCALING' is set. + """ + scaling_set = False if 'SUGAR_SCALING' in os.environ: if os.environ['SUGAR_SCALING'] == '100': - sugar_theme = 'sugar-100' + scaling_set = True + + if (theme == 'sugar-contrast') and (scaling_set): + sugar_theme = 'sugar-100-contrast' + elif (theme == 'sugar-contrast') and (not scaling_set): + sugar_theme = 'sugar-72-contrast' + elif scaling_set: + sugar_theme = 'sugar-100' + settings.set_property('gtk-theme-name', sugar_theme) settings.set_property('gtk-icon-theme-name', 'sugar') |