[Xfce4-commits] <xfce4-mailwatch-plugin:master> Added support for multi-row/column panels in xfce4-panel > 4.9

Andrzej noreply at xfce.org
Sat Jan 4 13:44:01 CET 2014


Updating branch refs/heads/master
         to 07875cdfe5612a6d43e9d3eae79820d50b00024a (commit)
       from e32d86bd6ce6e4ce84af862015ce54cbd039e055 (commit)

commit 07875cdfe5612a6d43e9d3eae79820d50b00024a
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Fri Dec 27 23:20:30 2013 +0000

    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);


More information about the Xfce4-commits mailing list