[Xfce4-commits] <xfce4-panel:devel> Avoid shadowing global declarations in the plugin construct functions.

Nick Schermer nick at xfce.org
Tue Aug 11 20:32:26 CEST 2009


Updating branch refs/heads/devel
         to 9994c27ee2ee352e3ee38517ae040a8056f17c5e (commit)
       from ed60321cedef6952b2a2a667138091109d190d67 (commit)

commit 9994c27ee2ee352e3ee38517ae040a8056f17c5e
Author: Nick Schermer <nick at xfce.org>
Date:   Sat May 23 18:35:30 2009 +0200

    Avoid shadowing global declarations in the plugin construct functions.

 libxfce4panel/libxfce4panel.h |   56 ++++++++++++++++++++--------------------
 1 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/libxfce4panel/libxfce4panel.h b/libxfce4panel/libxfce4panel.h
index 0b7cd2e..60f7c49 100644
--- a/libxfce4panel/libxfce4panel.h
+++ b/libxfce4panel/libxfce4panel.h
@@ -113,52 +113,52 @@ G_BEGIN_DECLS
   XFCE_PANEL_PLUGIN_REGISTER_EXTENDED (init_func, {})
 
 #define XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK(construct_func, check_func) \
-  XFCE_PANEL_PLUGIN_REGISTER_EXTENDED (construct_func, if (G_LIKELY ((*check_func) (screen) == TRUE)))
+  XFCE_PANEL_PLUGIN_REGISTER_EXTENDED (construct_func, if (G_LIKELY ((*check_func) (xpp_screen) == TRUE)))
 
 #define XFCE_PANEL_PLUGIN_REGISTER_EXTENDED(construct_func, CODE) \
   static void \
-  __xpp_realize (XfcePanelPlugin *plugin) \
+  __xpp_realize (XfcePanelPlugin *xpp) \
   { \
-    panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (plugin)); \
+    panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (xpp)); \
     \
-    g_signal_handlers_disconnect_by_func (G_OBJECT (plugin), G_CALLBACK (__xpp_realize), NULL); \
+    g_signal_handlers_disconnect_by_func (G_OBJECT (xpp), G_CALLBACK (__xpp_realize), NULL); \
     \
-    (*construct_func) (plugin); \
+    (*construct_func) (xpp); \
   } \
   \
   PANEL_SYMBOL_EXPORT G_MODULE_EXPORT XfcePanelPlugin * \
-  __xpp_construct (const gchar  *name, \
-                   gint          unique_id, \
-                   const gchar  *display_name, \
-                   const gchar  *comment, \
-                   gchar       **arguments, \
-                   GdkScreen    *screen); \
+  __xpp_construct (const gchar  *xpp_name, \
+                   gint          xpp_unique_id, \
+                   const gchar  *xpp_display_name, \
+                   const gchar  *xpp_comment, \
+                   gchar       **xpp_arguments, \
+                   GdkScreen    *xpp_screen); \
   PANEL_SYMBOL_EXPORT G_MODULE_EXPORT XfcePanelPlugin * \
-  __xpp_construct (const gchar  *name, \
-                   gint          unique_id, \
-                   const gchar  *display_name, \
-                   const gchar  *comment, \
-                   gchar       **arguments, \
-                   GdkScreen    *screen) \
+  __xpp_construct (const gchar  *xpp_name, \
+                   gint          xpp_unique_id, \
+                   const gchar  *xpp_display_name, \
+                   const gchar  *xpp_comment, \
+                   gchar       **xpp_arguments, \
+                   GdkScreen    *xpp_screen) \
   { \
-    XfcePanelPlugin *plugin = NULL; \
+    XfcePanelPlugin *xpp = NULL; \
     \
-    panel_return_val_if_fail (GDK_IS_SCREEN (screen), NULL); \
-    panel_return_val_if_fail (name != NULL && unique_id != -1, NULL); \
+    panel_return_val_if_fail (GDK_IS_SCREEN (xpp_screen), NULL); \
+    panel_return_val_if_fail (xpp_name != NULL && xpp_unique_id != -1, NULL); \
     \
     CODE \
       { \
-        plugin = g_object_new (XFCE_TYPE_PANEL_PLUGIN, \
-                               "name", name, \
-                               "unique-id", unique_id, \
-                               "display-name", display_name, \
-                               "comment", comment, \
-                               "arguments", arguments, NULL); \
+        xpp = g_object_new (XFCE_TYPE_PANEL_PLUGIN, \
+                            "name", xpp_name, \
+                            "unique-id", xpp_unique_id, \
+                            "display-name", xpp_display_name, \
+                            "comment", xpp_comment, \
+                            "arguments", xpp_arguments, NULL); \
         \
-        g_signal_connect_after (G_OBJECT (plugin), "realize", G_CALLBACK (__xpp_realize), NULL); \
+        g_signal_connect_after (G_OBJECT (xpp), "realize", G_CALLBACK (__xpp_realize), NULL); \
       } \
     \
-    return plugin; \
+    return xpp; \
   }
 
 G_END_DECLS



More information about the Xfce4-commits mailing list