forked from AuroraMiddleware/gtk
gtk: Connect to GdkDisplay::setting-changed
We still handle the setting event, for now. That will be removed in a future commit.
This commit is contained in:
parent
8686526b4a
commit
a8aff6ef8f
@ -1192,6 +1192,23 @@ settings_init_style (GtkSettings *settings)
|
||||
settings_update_key_theme (settings);
|
||||
}
|
||||
|
||||
static void
|
||||
setting_changed (GdkDisplay *display,
|
||||
const char *name,
|
||||
gpointer data)
|
||||
{
|
||||
GtkSettings *settings = data;
|
||||
GParamSpec *pspec;
|
||||
|
||||
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (settings), name);
|
||||
|
||||
if (!pspec)
|
||||
return;
|
||||
|
||||
if (settings_update_xsetting (settings, pspec, TRUE))
|
||||
g_object_notify_by_pspec (G_OBJECT (settings), pspec);
|
||||
}
|
||||
|
||||
static GtkSettings *
|
||||
gtk_settings_create_for_display (GdkDisplay *display)
|
||||
{
|
||||
@ -1218,6 +1235,8 @@ gtk_settings_create_for_display (GdkDisplay *display)
|
||||
|
||||
settings->priv->screen = gdk_display_get_default_screen (display);
|
||||
|
||||
g_signal_connect_object (display, "setting-changed", G_CALLBACK (setting_changed), settings, 0);
|
||||
|
||||
v.display = display;
|
||||
v.settings = settings;
|
||||
g_array_append_val (display_settings, v);
|
||||
|
Loading…
Reference in New Issue
Block a user