diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-08-13 09:29:40 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-08-13 09:29:40 -0400 |
commit | 9ce968ffb248bc389f683867b996acd707decb83 (patch) | |
tree | 8a29ffec7361a63281de3941dc8aaaa8d20ff39e /gtk/gtkpathbar.c | |
parent | d47192179b1c445cc8a3a973ff322759a8de3b16 (diff) | |
download | gtk+-9ce968ffb248bc389f683867b996acd707decb83.tar.gz |
GtkPathBar: Make recoloring symbolics work
We were only recreating the icons the very first time the theme
changed, and not every time as was intended.
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r-- | gtk/gtkpathbar.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index aa95a32147..1a1c2b21f0 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -1277,6 +1277,7 @@ change_icon_theme (GtkPathBar *path_bar) reload_icons (path_bar); } + /* Callback used when a GtkSettings value changes */ static void settings_notify_cb (GObject *object, @@ -1294,13 +1295,14 @@ settings_notify_cb (GObject *object, static void gtk_path_bar_check_icon_theme (GtkPathBar *path_bar) { - GtkSettings *settings; - - if (path_bar->priv->settings_signal_id) - return; + if (path_bar->priv->settings_signal_id == 0) + { + GtkSettings *settings; - settings = gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (path_bar))); - path_bar->priv->settings_signal_id = g_signal_connect (settings, "notify", G_CALLBACK (settings_notify_cb), path_bar); + settings = gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (path_bar))); + path_bar->priv->settings_signal_id = g_signal_connect (settings, "notify", + G_CALLBACK (settings_notify_cb), path_bar); + } change_icon_theme (path_bar); } |