[gtk+] GtkPathBar: Make recoloring symbolics work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkPathBar: Make recoloring symbolics work
- Date: Wed, 13 Aug 2014 13:30:18 +0000 (UTC)
commit 9ce968ffb248bc389f683867b996acd707decb83
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Aug 13 09:29:40 2014 -0400
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.
gtk/gtkpathbar.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index aa95a32..1a1c2b2 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]