[gtk+] Generalize the previous commit
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Generalize the previous commit
- Date: Thu, 5 May 2016 18:13:39 +0000 (UTC)
commit 6b64c31f6df45af6d6e670b3ba698746cc0efdd1
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 5 14:13:03 2016 -0400
Generalize the previous commit
Update all xsettings when we get a screen, to prevent similar
problems from occurring in the future.
gtk/gtksettings.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 897ee99..39c45b0 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -252,13 +252,13 @@ static void settings_update_cursor_theme (GtkSettings *setting
static void settings_update_resolution (GtkSettings *settings);
static void settings_update_font_options (GtkSettings *settings);
static void settings_update_font_values (GtkSettings *settings);
-static void settings_update_font_name (GtkSettings *settings);
static gboolean settings_update_fontconfig (GtkSettings *settings);
static void settings_update_theme (GtkSettings *settings);
static void settings_update_key_theme (GtkSettings *settings);
static gboolean settings_update_xsetting (GtkSettings *settings,
GParamSpec *pspec,
gboolean force);
+static void settings_update_xsettings (GtkSettings *settings);
static void gtk_settings_load_from_key_file (GtkSettings *settings,
const gchar *path,
@@ -1916,12 +1916,12 @@ gtk_settings_get_for_screen (GdkScreen *screen)
g_object_unref);
settings_init_style (settings);
+ settings_update_xsettings (settings);
settings_update_modules (settings);
settings_update_double_click (settings);
settings_update_cursor_theme (settings);
settings_update_resolution (settings);
settings_update_font_options (settings);
- settings_update_font_name (settings);
}
return settings;
@@ -3452,6 +3452,18 @@ settings_update_xsetting (GtkSettings *settings,
}
static void
+settings_update_xsettings (GtkSettings *settings)
+{
+ GParamSpec **pspecs;
+ gint i;
+
+ pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (settings), NULL);
+ for (i = 0; pspecs[i]; i++)
+ settings_update_xsetting (settings, pspecs[i], FALSE);
+ g_free (pspecs);
+}
+
+static void
gtk_settings_get_property (GObject *object,
guint property_id,
GValue *value,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]