[metacity] prefs: update theme when gtk-theme-name changes
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] prefs: update theme when gtk-theme-name changes
- Date: Thu, 31 Mar 2016 15:47:35 +0000 (UTC)
commit cf0348e4d556f518b616045d755a345227e1ca19
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Mar 31 18:40:00 2016 +0300
prefs: update theme when gtk-theme-name changes
src/core/prefs.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/core/prefs.c b/src/core/prefs.c
index 04d6595..d5be1de 100644
--- a/src/core/prefs.c
+++ b/src/core/prefs.c
@@ -838,6 +838,25 @@ init_gtk_decoration_layout (void)
gtk_decoration_layout_changed (settings, NULL, NULL);
}
+static void
+gtk_theme_name_changed (GtkSettings *settings,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+ queue_changed (META_PREF_THEME_NAME);
+}
+
+static void
+init_gtk_theme_name (void)
+{
+ GtkSettings *settings;
+
+ settings = gtk_settings_get_default ();
+
+ g_signal_connect (settings, "notify::gtk-theme-name",
+ G_CALLBACK (gtk_theme_name_changed), NULL);
+}
+
/****************************************************************************/
/* Initialisation. */
/****************************************************************************/
@@ -884,6 +903,7 @@ meta_prefs_init (void)
init_workspace_names ();
init_gtk_decoration_layout ();
+ init_gtk_theme_name ();
}
/****************************************************************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]