From 703de9dbca8aaa11630780f89898c93c617e2b23 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Fri, 27 Dec 2013 23:20:30 +0000 Subject: [PATCH] Added support for multi-row/column panels in xfce4-panel > 4.9 --- panel-plugin/mailwatch-plugin.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/panel-plugin/mailwatch-plugin.c b/panel-plugin/mailwatch-plugin.c index 53c3b37..69e2063 100644 --- a/panel-plugin/mailwatch-plugin.c +++ b/panel-plugin/mailwatch-plugin.c @@ -75,6 +75,12 @@ #define MOUSE_BUTTON_LEFT 1 #define MOUSE_BUTTON_MIDDLE 2 +#ifdef LIBXFCE4PANEL_CHECK_VERSION +#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0) +#define HAS_PANEL_49 +#endif +#endif + typedef struct { XfcePanelPlugin *plugin; @@ -351,6 +357,10 @@ mailwatch_set_size(XfcePanelPlugin *plugin, GdkPixbuf *pb; GtkIconTheme *itheme; GtkIconInfo *info = NULL; + +#ifdef HAS_PANEL_49 + wsize /= xfce_panel_plugin_get_nrows (plugin); +#endif /* this is such lame lame voodoo magic. the x/ythickness stuff * shouldn't be needed, since i think the panel button convienence @@ -1290,6 +1300,10 @@ mailwatch_construct(XfcePanelPlugin *plugin) g_signal_connect(plugin, "size-changed", G_CALLBACK(mailwatch_set_size), mwp); +#ifdef HAS_PANEL_49 + xfce_panel_plugin_set_small (plugin, TRUE); +#endif + mi = gtk_image_menu_item_new_with_label(_("Update Now")); img = gtk_image_new_from_stock(GTK_STOCK_REFRESH, GTK_ICON_SIZE_MENU); gtk_widget_show(img); -- 1.8.3.2