[Xfce4-commits] <xfce4-mpc-plugin:master> Better panel version detection, cherrypicked from #8625

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


Updating branch refs/heads/master
         to c74937ed1a51d1ebb67be30108f84fcb86219d52 (commit)
       from 550e0b5177784b47500ccdfd6c9ccb84e7f103c4 (commit)

commit c74937ed1a51d1ebb67be30108f84fcb86219d52
Author: Landry Breuil <landry at xfce.org>
Date:   Tue Apr 3 15:08:40 2012 +0200

    Better panel version detection, cherrypicked from #8625

 panel-plugin/xfce4-mpc-plugin.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/xfce4-mpc-plugin.c b/panel-plugin/xfce4-mpc-plugin.c
index 75db1d3..4c4ea1a 100644
--- a/panel-plugin/xfce4-mpc-plugin.c
+++ b/panel-plugin/xfce4-mpc-plugin.c
@@ -32,6 +32,12 @@
 #define DEFAULT_MPD_PORT 6600
 #define DIALOG_ENTRY_WIDTH 20
 
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
+
 #include "xfce4-mpc-plugin.h"
 
 static void
@@ -43,7 +49,7 @@ mpc_free (XfcePanelPlugin * plugin, t_mpc * mpc)
    g_free (mpc);
 }
 
-#if defined (LIBXFCE4PANEL_CHECK_VERSION) && LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#ifdef HAS_PANEL_49
 static void
 mpc_set_mode (XfcePanelPlugin * plugin, XfcePanelPluginMode mode, t_mpc * mpc)
 {
@@ -70,7 +76,7 @@ mpc_set_orientation (XfcePanelPlugin * plugin, GtkOrientation orientation, t_mpc
 static gboolean
 mpc_set_size (XfcePanelPlugin * plugin, int size, t_mpc * mpc)
 {
-#if defined (LIBXFCE4PANEL_CHECK_VERSION) && LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#ifdef HAS_PANEL_49
     size /= xfce_panel_plugin_get_nrows (plugin);
 #endif
 
@@ -826,7 +832,7 @@ mpc_construct (XfcePanelPlugin * plugin)
    g_signal_connect (plugin, "free-data", G_CALLBACK (mpc_free), mpc);
    g_signal_connect (plugin, "save", G_CALLBACK (mpc_write_config), mpc);
    g_signal_connect (plugin, "size-changed", G_CALLBACK (mpc_set_size), mpc);
-#if defined (LIBXFCE4PANEL_CHECK_VERSION) && LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#ifdef HAS_PANEL_49
    g_signal_connect (plugin, "mode-changed", G_CALLBACK (mpc_set_mode), mpc);
 #else
    g_signal_connect (plugin, "orientation-changed", G_CALLBACK (mpc_set_orientation), mpc);


More information about the Xfce4-commits mailing list