[Xfce4-commits] <xfce4-indicator-plugin:master> Ignore empty icons set by indicators.
Alistair Buxton
noreply at xfce.org
Fri Nov 8 00:08:03 CET 2013
Updating branch refs/heads/master
to 35c269797ba07decf7ba8a3a096a2f40663b56d4 (commit)
from b7a42ad057feb1707611aa931f6bd8dbd532d169 (commit)
commit 35c269797ba07decf7ba8a3a096a2f40663b56d4
Author: Alistair Buxton <a.j.buxton at gmail.com>
Date: Thu Nov 7 23:06:17 2013 +0000
Ignore empty icons set by indicators.
Indicators with no icon now send a GTK_ICON_EMPTY icon. This makes
the box sizing functions allocate the minimum sized icon when there
is nothing to fill it with, leaving an empty space in some indicators
such as datetime. Ignore these types of icons.
panel-plugin/indicator-button-box.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/panel-plugin/indicator-button-box.c b/panel-plugin/indicator-button-box.c
index 38ead57..1174260 100644
--- a/panel-plugin/indicator-button-box.c
+++ b/panel-plugin/indicator-button-box.c
@@ -283,6 +283,13 @@ indicator_button_box_set_image (IndicatorButtonBox *box,
gtk_container_remove (GTK_CONTAINER (box), box->icon);
g_object_unref (G_OBJECT (box->icon));
}
+
+ if(gtk_image_get_storage_type(image) == GTK_IMAGE_EMPTY)
+ {
+ box->icon = NULL;
+ return;
+ }
+
box->icon = GTK_WIDGET (image);
g_object_ref (G_OBJECT (box->icon));
g_signal_connect(G_OBJECT(box->icon), "notify::pixbuf",
More information about the Xfce4-commits
mailing list