[Xfce4-commits] <thunar:master> thunar-tpa: fix libxfce4panel version checking macros

Andrzej noreply at xfce.org
Sat Dec 28 00:12:01 CET 2013


Updating branch refs/heads/master
         to fc4a4b61e4f1777944fea298f8a7413a06b5093d (commit)
       from 92d1e47fd0230efc1e8dd9796c794e6756a275f5 (commit)

commit fc4a4b61e4f1777944fea298f8a7413a06b5093d
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Fri Dec 27 23:10:59 2013 +0000

    thunar-tpa: fix libxfce4panel version checking macros

 plugins/thunar-tpa/thunar-tpa.c |   20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/plugins/thunar-tpa/thunar-tpa.c b/plugins/thunar-tpa/thunar-tpa.c
index afb02c1..63c60d9 100644
--- a/plugins/thunar-tpa/thunar-tpa.c
+++ b/plugins/thunar-tpa/thunar-tpa.c
@@ -35,7 +35,11 @@
 
 #include <thunar-tpa/thunar-tpa-bindings.h>
 
-
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
 
 typedef struct _ThunarTpaClass ThunarTpaClass;
 typedef struct _ThunarTpa      ThunarTpa;
@@ -56,7 +60,7 @@ void            thunar_tpa_register_type       (XfcePanelTypeModule *type_module
 static void     thunar_tpa_finalize            (GObject             *object);
 static void     thunar_tpa_construct           (XfcePanelPlugin     *panel_plugin);
 
-#if defined (LIBXFCE4PANEL_CHECK_VERSION) && LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#ifdef HAS_PANEL_49
 static gboolean thunar_tpa_size_changed        (XfcePanelPlugin     *panel_plugin,
                                                 gint                 size);
 #endif
@@ -154,11 +158,9 @@ thunar_tpa_class_init (ThunarTpaClass *klass)
   plugin_class = XFCE_PANEL_PLUGIN_CLASS (klass);
   plugin_class->construct = thunar_tpa_construct;
 
-#ifdef LIBXFCE4PANEL_CHECK_VERSION
-#if LIBXFCE4PANEL_CHECK_VERSION (4, 9, 0)
+#ifdef HAS_PANEL_49
   plugin_class->size_changed = thunar_tpa_size_changed;
 #endif
-#endif
 }
 
 
@@ -244,12 +246,10 @@ thunar_tpa_construct (XfcePanelPlugin *panel_plugin)
 {
   ThunarTpa *plugin = THUNAR_TPA (panel_plugin);
 
-#ifdef LIBXFCE4PANEL_CHECK_VERSION
-#if LIBXFCE4PANEL_CHECK_VERSION (4, 9, 0)
+#ifdef HAS_PANEL_49
   /* make the plugin fit a single row */
   xfce_panel_plugin_set_small (panel_plugin, TRUE);
 #endif
-#endif
 
   /* add the "Empty Trash" menu item */
   xfce_panel_plugin_menu_insert_item (panel_plugin, GTK_MENU_ITEM (plugin->mi));
@@ -260,8 +260,7 @@ thunar_tpa_construct (XfcePanelPlugin *panel_plugin)
 
 
 
-#ifdef LIBXFCE4PANEL_CHECK_VERSION
-#if LIBXFCE4PANEL_CHECK_VERSION (4, 9, 0)
+#ifdef HAS_PANEL_49
 static gboolean
 thunar_tpa_size_changed (XfcePanelPlugin *panel_plugin,
                          gint             size)
@@ -275,7 +274,6 @@ thunar_tpa_size_changed (XfcePanelPlugin *panel_plugin,
   return TRUE;
 }
 #endif
-#endif
 
 
 


More information about the Xfce4-commits mailing list