[Xfce4-commits] <xfce4-mount-plugin:master> xfce4-panel 4.9+ compatibility fix

Landry Breuil noreply at xfce.org
Tue Apr 10 10:56:01 CEST 2012


Updating branch refs/heads/master
         to f53faa96cce001341dbdf80f8511e751b1c50eb2 (commit)
       from d15f3b61f842efd862b2cd2fd2ab9cfafffbcd78 (commit)

commit f53faa96cce001341dbdf80f8511e751b1c50eb2
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Tue Apr 3 21:13:09 2012 +0900

    xfce4-panel 4.9+ compatibility fix
    
    Signed-off-by: Landry Breuil <landry at xfce.org>

 panel-plugin/mount-plugin.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 72a9325..6105555 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -24,6 +24,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 #include "mount-plugin.h"
 
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
+
+
 static void
 on_message_dialog_response (GtkWidget *widget, gpointer *data)
 {
@@ -86,7 +93,10 @@ static void
 mounter_set_size (XfcePanelPlugin *plugin, int size, t_mounter *mt)
 {
    /* shrink the gtk button's image to new size -*/
-   gtk_widget_set_size_request (GTK_WIDGET(mt->button), size - 4, size - 4);
+#ifdef HAS_PANEL_49
+   size /= xfce_panel_plugin_get_nrows (plugin);
+#endif
+   gtk_widget_set_size_request (GTK_WIDGET(mt->button), size, size);
 
 }
 
@@ -1051,6 +1061,10 @@ mount_construct (XfcePanelPlugin *plugin)
        xfce_iconbutton_set_pixbuf (XFCE_ICONBUTTON(mounter->button),
                                    mounter->button_pb);
 
+#ifdef HAS_PANEL_49
+    xfce_panel_plugin_set_small (plugin, TRUE);
+#endif
+
     g_signal_connect (plugin, "free-data", G_CALLBACK (mounter_free), mounter);
 
     g_signal_connect (plugin, "save", G_CALLBACK (mounter_write_config),


More information about the Xfce4-commits mailing list