diff options
-rw-r--r-- | data/org.ArcticaProject.arctica-greeter.gschema.xml | 8 | ||||
-rw-r--r-- | src/arctica-greeter.vala | 21 | ||||
-rw-r--r-- | src/settings.vala | 2 |
3 files changed, 28 insertions, 3 deletions
diff --git a/data/org.ArcticaProject.arctica-greeter.gschema.xml b/data/org.ArcticaProject.arctica-greeter.gschema.xml index b0069c2..a264432 100644 --- a/data/org.ArcticaProject.arctica-greeter.gschema.xml +++ b/data/org.ArcticaProject.arctica-greeter.gschema.xml @@ -45,6 +45,14 @@ <default>'Adwaita'</default> <summary>Icon theme to use</summary> </key> + <key name="cursor-theme-name" type="s"> + <default>'default'</default> + <summary>Cursor theme to use</summary> + </key> + <key name="cursor-theme-size" type="i"> + <default>0</default> + <summary>Size to use for cursors - 0 is default size</summary> + </key> <key name="font-name" type="s"> <default>'Sans 11'</default> <summary>Font to use</summary> diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 3f119c4..89d52b8 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -910,14 +910,29 @@ public class ArcticaGreeter : Object debug ("Setting GTK+ settings"); var settings = Gtk.Settings.get_default (); var value = AGSettings.get_string (AGSettings.KEY_THEME_NAME); - if (value != "") + if (value != ""){ + debug ("Setting GTK theme: %s", value); settings.set ("gtk-theme-name", value, null); + } value = AGSettings.get_string (AGSettings.KEY_ICON_THEME_NAME); - if (value != "") + if (value != ""){ + debug ("Setting icon theme: %s", value); settings.set ("gtk-icon-theme-name", value, null); + } + value = AGSettings.get_string (AGSettings.KEY_CURSOR_THEME_NAME); + if (value != "") { + debug ("Setting cursor theme: %s", value); + settings.set ("gtk-cursor-theme-name", value, null); + } + var int_value = AGSettings.get_integer (AGSettings.KEY_CURSOR_THEME_SIZE); + if (int_value != 0) { + debug ("Settings cursor theme size: %d", int_value); + settings.set ("gtk-cursor-theme-size", int_value, null); + } value = AGSettings.get_string (AGSettings.KEY_FONT_NAME); - if (value != "") + if (value != ""){ settings.set ("gtk-font-name", value, null); + } var double_value = AGSettings.get_double (AGSettings.KEY_XFT_DPI); if (double_value != 0.0) settings.set ("gtk-xft-dpi", (int) (1024 * double_value), null); diff --git a/src/settings.vala b/src/settings.vala index af753ce..05f54fe 100644 --- a/src/settings.vala +++ b/src/settings.vala @@ -33,6 +33,8 @@ public class AGSettings : Object public const string KEY_THEME_NAME = "theme-name"; public const string KEY_HIGH_CONTRAST_THEME_NAME = "high-contrast-theme-name"; public const string KEY_ICON_THEME_NAME = "icon-theme-name"; + public const string KEY_CURSOR_THEME_NAME = "cursor-theme-name"; + public const string KEY_CURSOR_THEME_SIZE = "cursor-theme-size"; public const string KEY_FONT_NAME = "font-name"; public const string KEY_XFT_ANTIALIAS = "xft-antialias"; public const string KEY_XFT_DPI = "xft-dpi"; |