tree-sitter: update to 0.24.5
[oi-userland.git] / components / desktop / lightdm-gtk-greeter / patches / 01-branding.patch
blobb707204dffa8489285d2463b8cedd6ae4d82ff3e
1 1) Set default background, remove it in high contrast accessibility mode.
2 2) Set default user icon.
3 3) Use non-symbolic icons and nimbus icon theme.
4 4) Use nimbus theme.
5 --- lightdm-gtk-greeter-2.0.5/src/lightdm-gtk-greeter.c.~1~ 2018-03-15 03:23:15.000000000 +0000
6 +++ lightdm-gtk-greeter-2.0.5/src/lightdm-gtk-greeter.c 2018-10-11 18:22:16.322470324 +0000
7 @@ -100,7 +100,7 @@
8 static GtkImage *power_icon;
10 static const gchar *DEFAULT_LAYOUT[] = {"~spacer", "~spacer", "~host", "~spacer",
11 - "~session", "~a11y", "~clock", "~power", NULL};
12 + "~session", "~layout", "~a11y", "~clock", NULL};
14 static const gchar *POWER_WINDOW_DATA_LOOP = "power-window-loop"; /* <GMainLoop*> */
15 static const gchar *POWER_WINDOW_DATA_RESPONSE = "power-window-response"; /* <GtkResponseType> */
16 @@ -308,15 +308,14 @@
17 gpointer greeter_save_focus(GtkWidget* widget);
18 void greeter_restore_focus(const gpointer saved_data);
20 +static gchar *background = NULL;
22 static void
23 read_monitor_configuration (const gchar *group, const gchar *name)
25 - gchar *background;
27 g_debug ("[Configuration] Monitor configuration found: '%s'", name);
29 - background = config_get_string (group, CONFIG_KEY_BACKGROUND, NULL);
30 + background = config_get_string (group, CONFIG_KEY_BACKGROUND, "/usr/share/lightdm-gtk-greeter/bk.jpg");
31 greeter_background_set_monitor_config (greeter_background, name, background,
32 config_get_bool (group, CONFIG_KEY_USER_BACKGROUND, -1),
33 config_get_bool (group, CONFIG_KEY_LAPTOP, -1),
34 @@ -1061,7 +1060,7 @@
35 if (gtk_icon_theme_has_icon (icon_theme, icon_name))
36 gtk_image_set_from_icon_name (GTK_IMAGE (session_badge), icon_name, GTK_ICON_SIZE_MENU);
37 else
38 - gtk_image_set_from_icon_name (GTK_IMAGE (session_badge), "document-properties-symbolic", GTK_ICON_SIZE_MENU);
39 + gtk_image_set_from_icon_name (GTK_IMAGE (session_badge), "document-properties", GTK_ICON_SIZE_MENU);
40 g_free (icon_name);
41 break;
43 @@ -1868,11 +1867,13 @@
45 g_object_set (gtk_settings_get_default (), "gtk-theme-name", "HighContrast", NULL);
46 g_object_set (gtk_settings_get_default (), "gtk-icon-theme-name", "HighContrast", NULL);
47 + greeter_background_set_custom_background (greeter_background, "#default");
49 else
51 g_object_set (gtk_settings_get_default (), "gtk-theme-name", default_theme_name, NULL);
52 g_object_set (gtk_settings_get_default (), "gtk-icon-theme-name", default_icon_theme_name, NULL);
53 + greeter_background_set_custom_background (greeter_background, background);
57 @@ -1920,7 +1921,7 @@
58 void
59 restart_cb (GtkWidget *widget, LightDMGreeter *ldm)
61 - if (show_power_prompt ("restart", "view-refresh-symbolic",
62 + if (show_power_prompt ("restart", "view-refresh",
63 _("Restart"),
64 _("Are you sure you want to close all programs and restart the computer?")))
65 lightdm_restart (NULL);
66 @@ -1929,7 +1930,7 @@
67 void
68 shutdown_cb (GtkWidget *widget, LightDMGreeter *ldm)
70 - if (show_power_prompt ("shutdown", "system-shutdown-symbolic",
71 + if (show_power_prompt ("shutdown", "system-shutdown",
72 _("Shut Down"),
73 _("Are you sure you want to close all programs and shut down the computer?")))
74 lightdm_shutdown (NULL);
75 @@ -2838,7 +2839,7 @@
78 /* Set GTK+ settings */
79 - value = config_get_string (NULL, CONFIG_KEY_THEME, NULL);
80 + value = config_get_string (NULL, CONFIG_KEY_THEME, "nimbus");
81 if (value)
83 g_debug ("[Configuration] Changing GTK+ theme to '%s'", value);
84 @@ -2848,7 +2849,7 @@
85 g_object_get (gtk_settings_get_default (), "gtk-theme-name", &default_theme_name, NULL);
86 g_debug ("[Configuration] GTK+ theme: '%s'", default_theme_name);
88 - value = config_get_string (NULL, CONFIG_KEY_ICON_THEME, NULL);
89 + value = config_get_string (NULL, CONFIG_KEY_ICON_THEME, "nimbus");
90 if (value)
92 g_debug ("[Configuration] Changing icons theme to '%s'", value);
93 @@ -3006,7 +3007,7 @@
95 else
97 - value = config_get_string (NULL, CONFIG_KEY_DEFAULT_USER_IMAGE, NULL);
98 + value = config_get_string (NULL, CONFIG_KEY_DEFAULT_USER_IMAGE, "/usr/share/lightdm-gtk-greeter/oi-logo.png");
99 if (value)
101 if (value[0] == '#')
102 @@ -3034,8 +3035,8 @@
104 GSList *sessions = NULL;
106 - if (gtk_icon_theme_has_icon (icon_theme, "document-properties-symbolic"))
107 - session_badge = gtk_image_new_from_icon_name ("document-properties-symbolic", GTK_ICON_SIZE_MENU);
108 + if (gtk_icon_theme_has_icon (icon_theme, "document-properties"))
109 + session_badge = gtk_image_new_from_icon_name ("document-properties", GTK_ICON_SIZE_MENU);
110 else
111 session_badge = gtk_image_new_from_icon_name ("document-properties", GTK_ICON_SIZE_MENU);
112 gtk_widget_show (session_badge);
113 @@ -3098,8 +3099,8 @@
114 /* a11y menu */
115 if (gtk_widget_get_visible (a11y_menuitem))
117 - if (gtk_icon_theme_has_icon (icon_theme, "preferences-desktop-accessibility-symbolic"))
118 - image = gtk_image_new_from_icon_name ("preferences-desktop-accessibility-symbolic", GTK_ICON_SIZE_MENU);
119 + if (gtk_icon_theme_has_icon (icon_theme, "preferences-desktop-accessibility"))
120 + image = gtk_image_new_from_icon_name ("preferences-desktop-accessibility", GTK_ICON_SIZE_MENU);
121 else
122 image = gtk_image_new_from_icon_name ("preferences-desktop-accessibility", GTK_ICON_SIZE_MENU);
123 gtk_widget_show (image);
124 @@ -3127,8 +3128,8 @@
125 /* Power menu */
126 if (gtk_widget_get_visible (power_menuitem))
128 - if (gtk_icon_theme_has_icon (icon_theme, "system-shutdown-symbolic"))
129 - image = gtk_image_new_from_icon_name ("system-shutdown-symbolic", GTK_ICON_SIZE_MENU);
130 + if (gtk_icon_theme_has_icon (icon_theme, "system-shutdown"))
131 + image = gtk_image_new_from_icon_name ("system-shutdown", GTK_ICON_SIZE_MENU);
132 else
133 image = gtk_image_new_from_icon_name ("system-shutdown", GTK_ICON_SIZE_MENU);
134 gtk_widget_show (image);
135 @@ -3181,7 +3182,7 @@
137 gtk_menu_item_set_label (GTK_MENU_ITEM (clock_menuitem), "");
138 clock_label = gtk_bin_get_child (GTK_BIN (clock_menuitem));
139 - clock_format = config_get_string (NULL, CONFIG_KEY_CLOCK_FORMAT, "%a, %H:%M");
140 + clock_format = config_get_string (NULL, CONFIG_KEY_CLOCK_FORMAT, "%a %b %d, %H:%M");
141 clock_timeout_thread ();
142 gdk_threads_add_timeout (1000, (GSourceFunc) clock_timeout_thread, NULL);