diff options
-rw-r--r-- | data/lightdm-gtk-greeter.conf | 2 | ||||
-rw-r--r-- | src/greeterconfiguration.h | 2 | ||||
-rw-r--r-- | src/lightdm-gtk-greeter.c | 18 |
3 files changed, 21 insertions, 1 deletions
diff --git a/data/lightdm-gtk-greeter.conf b/data/lightdm-gtk-greeter.conf index 601b729..c5c4e4e 100644 --- a/data/lightdm-gtk-greeter.conf +++ b/data/lightdm-gtk-greeter.conf @@ -4,6 +4,8 @@ # Appearance: # theme-name = GTK+ theme to use # icon-theme-name = Icon theme to use +# cursor-theme-name = Cursor theme to use +# cursor-theme-size = Cursor size to use # background = Background file to use, either an image path or a color (e.g. #772953) # user-background = false|true ("true" by default) Display user background (if available) # transition-duration = Length of time (in milliseconds) to transition between background images ("500" by default) diff --git a/src/greeterconfiguration.h b/src/greeterconfiguration.h index fee59f4..29e447a 100644 --- a/src/greeterconfiguration.h +++ b/src/greeterconfiguration.h @@ -11,6 +11,8 @@ #define CONFIG_KEY_SCREENSAVER_TIMEOUT "screensaver-timeout" #define CONFIG_KEY_THEME "theme-name" #define CONFIG_KEY_ICON_THEME "icon-theme-name" +#define CONFIG_KEY_CURSOR_THEME "cursor-theme-name" +#define CONFIG_KEY_CURSOR_THEME_SIZE "cursor-theme-size" #define CONFIG_KEY_FONT "font-name" #define CONFIG_KEY_DPI "xft-dpi" #define CONFIG_KEY_ANTIALIAS "xft-antialias" diff --git a/src/lightdm-gtk-greeter.c b/src/lightdm-gtk-greeter.c index 0a4626b..944f5ca 100644 --- a/src/lightdm-gtk-greeter.c +++ b/src/lightdm-gtk-greeter.c @@ -278,7 +278,8 @@ static GdkFilterReturn xkl_xevent_filter (GdkXEvent *xev, GdkEvent *event, gpoin /* a11y indicator */ static gchar *default_font_name, *default_theme_name, - *default_icon_theme_name; + *default_icon_theme_name, + *default_cursor_theme_name; void a11y_font_cb (GtkCheckMenuItem *item); void a11y_contrast_cb (GtkCheckMenuItem *item); void a11y_keyboard_cb (GtkCheckMenuItem *item, gpointer user_data); @@ -2852,6 +2853,21 @@ main (int argc, char **argv) g_object_get (gtk_settings_get_default (), "gtk-icon-theme-name", &default_icon_theme_name, NULL); g_debug ("[Configuration] Icons theme: '%s'", default_icon_theme_name); + value = config_get_string (NULL, CONFIG_KEY_CURSOR_THEME, NULL); + if (value) + { + g_debug ("[Configuration] Changing cursor theme to '%s'", value); + g_object_set (gtk_settings_get_default (), "gtk-cursor-theme-name", value, NULL); + g_free (value); + } + g_object_get (gtk_settings_get_default (), "gtk-cursor-theme-name", &default_cursor_theme_name, NULL); + g_debug ("[Configuration] Cursor theme: '%s'", default_cursor_theme_name); + + if (config_has_key(NULL, CONFIG_KEY_CURSOR_THEME_SIZE)) + { + g_object_set (gtk_settings_get_default (), "gtk-cursor-theme-size", config_get_int (NULL, CONFIG_KEY_CURSOR_THEME_SIZE, 16), NULL); + } + value = config_get_string (NULL, CONFIG_KEY_FONT, "Sans 10"); if (value) { |