[Xfce4-commits] [panel-plugins/xfce4-statusnotifier-plugin] 01/01: Reload icons when theme changed

noreply at xfce.org noreply at xfce.org
Wed Aug 9 21:49:41 CEST 2017


This is an automated email from the git hooks/post-receive script.

n   i   n   e   t   l   s       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-statusnotifier-plugin.

commit 7b6f8899a57c7b004e71a1daf67ed71748c6bd91
Author: Viktor Odintsev <ninetls at xfce.org>
Date:   Tue Aug 8 05:10:43 2017 +0300

    Reload icons when theme changed
---
 panel-plugin/sn-icon-box.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/sn-icon-box.c b/panel-plugin/sn-icon-box.c
index 9dde545..a51ded0 100644
--- a/panel-plugin/sn-icon-box.c
+++ b/panel-plugin/sn-icon-box.c
@@ -170,7 +170,8 @@ GtkWidget *
 sn_icon_box_new (SnItem   *item,
                  SnConfig *config)
 {
-  SnIconBox *box = g_object_new (XFCE_TYPE_SN_ICON_BOX, NULL);
+  SnIconBox   *box = g_object_new (XFCE_TYPE_SN_ICON_BOX, NULL);
+  GtkSettings *settings;
 
   g_return_val_if_fail (XFCE_IS_SN_CONFIG (config), NULL);
 
@@ -185,12 +186,18 @@ sn_icon_box_new (SnItem   *item,
   gtk_widget_set_parent (box->overlay, GTK_WIDGET (box));
   gtk_widget_show (box->overlay);
 
+  settings = gtk_settings_get_default ();
+
   sn_signal_connect_weak_swapped (config, "notify::icon-size",
                                   G_CALLBACK (sn_icon_box_icon_changed), box);
   sn_signal_connect_weak_swapped (config, "notify::symbolic-icons",
                                   G_CALLBACK (sn_icon_box_icon_changed), box);
   sn_signal_connect_weak_swapped (item, "icon-changed",
                                   G_CALLBACK (sn_icon_box_icon_changed), box);
+  sn_signal_connect_weak_swapped (settings, "notify::gtk-theme-name",
+                                  G_CALLBACK (sn_icon_box_icon_changed), box);
+  sn_signal_connect_weak_swapped (settings, "notify::gtk-icon-theme-name",
+                                  G_CALLBACK (sn_icon_box_icon_changed), box);
   sn_icon_box_icon_changed (GTK_WIDGET (box));
 
   return GTK_WIDGET (box);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list