[Xfce4-commits] <xfce4-wavelan-plugin:master> Panel 4.9 compatibility fix.
Landry Breuil
noreply at xfce.org
Tue Apr 3 19:10:02 CEST 2012
Updating branch refs/heads/master
to 37df4044947339570fe7b9e9b02a10fba008743d (commit)
from c9800f4cccddbcf4eddcd3d169b7edf094adceca (commit)
commit 37df4044947339570fe7b9e9b02a10fba008743d
Author: Andrzej <ndrwrdck at gmail.com>
Date: Wed Apr 4 01:23:03 2012 +0900
Panel 4.9 compatibility fix.
Signed-off-by: Landry Breuil <landry at xfce.org>
panel-plugin/wavelan.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index 6182fcb..e3b9566 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -39,6 +39,12 @@
#include <string.h>
#include <ctype.h>
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
+
#define BORDER 8
typedef struct
{
@@ -328,7 +334,11 @@ wavelan_new(XfcePanelPlugin *plugin)
}
wavelan->image = gtk_image_new();
+#ifdef HAS_PANEL_49
+ gtk_image_set_from_pixbuf(GTK_IMAGE(wavelan->image), gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), "network-wireless", wavelan->size/xfce_panel_plugin_get_nrows(wavelan->plugin)-6, 0, NULL));
+#else
gtk_image_set_from_pixbuf(GTK_IMAGE(wavelan->image), gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), "network-wireless", wavelan->size-6, 0, NULL));
+#endif
gtk_box_pack_start(GTK_BOX(wavelan->box), GTK_WIDGET(wavelan->image), FALSE, FALSE, 2);
gtk_box_pack_start(GTK_BOX(wavelan->box), GTK_WIDGET(wavelan->signal), FALSE, FALSE, 2);
@@ -421,7 +431,11 @@ static void
wavelan_set_size(t_wavelan *wavelan, int size)
{
wavelan->size = size;
+#ifdef HAS_PANEL_49
+ gtk_image_set_from_pixbuf(GTK_IMAGE(wavelan->image), gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), "network-wireless", wavelan->size/xfce_panel_plugin_get_nrows(wavelan->plugin)-6, 0, NULL));
+#else
gtk_image_set_from_pixbuf(GTK_IMAGE(wavelan->image), gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), "network-wireless", wavelan->size-6, 0, NULL));
+#endif
if (wavelan->orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_widget_set_size_request(wavelan->ebox, -1, wavelan->size);
else
More information about the Xfce4-commits
mailing list