From fc4a4b61e4f1777944fea298f8a7413a06b5093d Mon Sep 17 00:00:00 2001
From: Andrzej <ndrwrdck@gmail.com>
Date: Fri, 27 Dec 2013 23:10:59 +0000
Subject: [PATCH] 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 afb02c1ee..63c60d90d 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,11 +246,9 @@ 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 */
@@ -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
 
 
 
-- 
GitLab