[Xfce4-commits] <xfce4-panel:devel> Add an XfcePanelTypeModule type for easier future expansion.

Nick Schermer noreply at xfce.org
Mon Sep 28 15:58:03 CEST 2009


Updating branch refs/heads/devel
         to 741a69c403b2c6556536eb700f567951713eb99f (commit)
       from a89592ce7080a678e6aa3114508e3b7b21036e51 (commit)

commit 741a69c403b2c6556536eb700f567951713eb99f
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Sep 28 15:56:26 2009 +0200

    Add an XfcePanelTypeModule type for easier future expansion.

 libxfce4panel/libxfce4panel.h     |    6 +++-
 plugins/actions/actions.h         |    2 +-
 plugins/clock/clock-analog.h      |    2 +-
 plugins/clock/clock-binary.h      |    2 +-
 plugins/clock/clock-digital.h     |    2 +-
 plugins/clock/clock-fuzzy.h       |    2 +-
 plugins/clock/clock-lcd.h         |    2 +-
 plugins/clock/clock.h             |   22 +++++++++---------
 plugins/launcher/launcher.h       |    4 +-
 plugins/pager/pager.h             |    2 +-
 plugins/separator/separator.h     |    2 +-
 plugins/showdesktop/showdesktop.h |    2 +-
 plugins/systray/systray-box.h     |   42 ++++++++++++++++++------------------
 plugins/systray/systray-manager.h |   18 ++++++++--------
 plugins/systray/systray.h         |    2 +-
 plugins/tasklist/tasklist.c       |    2 +-
 plugins/windowmenu/windowmenu.h   |    2 +-
 17 files changed, 59 insertions(+), 57 deletions(-)

diff --git a/libxfce4panel/libxfce4panel.h b/libxfce4panel/libxfce4panel.h
index 057d764..c0715c4 100644
--- a/libxfce4panel/libxfce4panel.h
+++ b/libxfce4panel/libxfce4panel.h
@@ -61,7 +61,7 @@ G_BEGIN_DECLS
   } \
   \
   void \
-  type_name##_register_type (GTypeModule *type_module) \
+  type_name##_register_type (XfcePanelTypeModule *type_module) \
   { \
     GType plugin_define_type_id; \
     static const GTypeInfo plugin_define_type_info = \
@@ -79,7 +79,7 @@ G_BEGIN_DECLS
     }; \
     \
     plugin_define_type_id = \
-        g_type_module_register_type (type_module, TYPE_PARENT, \
+        g_type_module_register_type (G_TYPE_MODULE (type_module), TYPE_PARENT, \
                                      "Xfce" #TypeName, &plugin_define_type_info, 0); \
     \
     type_name##_type = plugin_define_type_id; \
@@ -115,6 +115,8 @@ typedef gboolean (*XfcePanelPluginPreInit) (gint argc, gchar **argv);
 
 typedef gboolean (*XfcePanelPluginCheck) (GdkScreen *screen);
 
+typedef GTypeModule XfcePanelTypeModule;
+
 /**
  * XFCE_PANEL_PLUGIN_REGISTER:
  * construct_func : name of the function that points to an
diff --git a/plugins/actions/actions.h b/plugins/actions/actions.h
index d4ba0f9..176629c 100644
--- a/plugins/actions/actions.h
+++ b/plugins/actions/actions.h
@@ -36,7 +36,7 @@ typedef struct _ActionsPlugin      ActionsPlugin;
 
 GType actions_plugin_get_type      (void) G_GNUC_CONST;
 
-void  actions_plugin_register_type (GTypeModule *type_module);
+void  actions_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/clock/clock-analog.h b/plugins/clock/clock-analog.h
index 2be5da4..70b72f1 100644
--- a/plugins/clock/clock-analog.h
+++ b/plugins/clock/clock-analog.h
@@ -34,7 +34,7 @@ typedef struct _XfceClockAnalog      XfceClockAnalog;
 
 GType      xfce_clock_analog_get_type      (void) G_GNUC_CONST;
 
-void       xfce_clock_analog_register_type (GTypeModule *type_module);
+void       xfce_clock_analog_register_type (XfcePanelTypeModule *type_module);
 
 GtkWidget *xfce_clock_analog_new           (void) G_GNUC_MALLOC;
 
diff --git a/plugins/clock/clock-binary.h b/plugins/clock/clock-binary.h
index 9aea508..9bfef74 100644
--- a/plugins/clock/clock-binary.h
+++ b/plugins/clock/clock-binary.h
@@ -34,7 +34,7 @@ typedef struct _XfceClockBinary      XfceClockBinary;
 
 GType      xfce_clock_binary_get_type      (void) G_GNUC_CONST;
 
-void       xfce_clock_binary_register_type (GTypeModule *type_module);
+void       xfce_clock_binary_register_type (XfcePanelTypeModule *type_module);
 
 GtkWidget *xfce_clock_binary_new           (void) G_GNUC_MALLOC;
 
diff --git a/plugins/clock/clock-digital.h b/plugins/clock/clock-digital.h
index 814f0f3..0f90039 100644
--- a/plugins/clock/clock-digital.h
+++ b/plugins/clock/clock-digital.h
@@ -34,7 +34,7 @@ typedef struct _XfceClockDigital      XfceClockDigital;
 
 GType      xfce_clock_digital_get_type      (void) G_GNUC_CONST;
 
-void       xfce_clock_digital_register_type (GTypeModule *type_module);
+void       xfce_clock_digital_register_type (XfcePanelTypeModule *type_module);
 
 GtkWidget *xfce_clock_digital_new           (void) G_GNUC_MALLOC;
 
diff --git a/plugins/clock/clock-fuzzy.h b/plugins/clock/clock-fuzzy.h
index 7c308e0..5bca767 100644
--- a/plugins/clock/clock-fuzzy.h
+++ b/plugins/clock/clock-fuzzy.h
@@ -34,7 +34,7 @@ typedef struct _XfceClockFuzzy      XfceClockFuzzy;
 
 GType      xfce_clock_fuzzy_get_type      (void) G_GNUC_CONST;
 
-void       xfce_clock_fuzzy_register_type (GTypeModule *type_module);
+void       xfce_clock_fuzzy_register_type (XfcePanelTypeModule *type_module);
 
 GtkWidget *xfce_clock_fuzzy_new           (void) G_GNUC_MALLOC;
 
diff --git a/plugins/clock/clock-lcd.h b/plugins/clock/clock-lcd.h
index 8a71f1f..4ca6403 100644
--- a/plugins/clock/clock-lcd.h
+++ b/plugins/clock/clock-lcd.h
@@ -34,7 +34,7 @@ typedef struct _XfceClockLcd      XfceClockLcd;
 
 GType      xfce_clock_lcd_get_type      (void) G_GNUC_CONST;
 
-void       xfce_clock_lcd_register_type (GTypeModule  *type_module);
+void       xfce_clock_lcd_register_type (XfcePanelTypeModule *type_module);
 
 GtkWidget *xfce_clock_lcd_new           (void) G_GNUC_MALLOC;
 
diff --git a/plugins/clock/clock.h b/plugins/clock/clock.h
index cb2c3d0..fb940f9 100644
--- a/plugins/clock/clock.h
+++ b/plugins/clock/clock.h
@@ -44,23 +44,23 @@ typedef struct _ClockPluginTimeout ClockPluginTimeout;
 
 GType               clock_plugin_get_type             (void) G_GNUC_CONST;
 
-void                clock_plugin_register_type        (GTypeModule        *type_module);
+void                clock_plugin_register_type        (XfcePanelTypeModule *type_module);
 
-ClockPluginTimeout *clock_plugin_timeout_new          (guint               interval,
-                                                       GSourceFunc         function,
-                                                       gpointer            data);
+ClockPluginTimeout *clock_plugin_timeout_new          (guint                interval,
+                                                       GSourceFunc          function,
+                                                       gpointer             data);
 
-void                clock_plugin_timeout_set_interval (ClockPluginTimeout *timeout,
-                                                       guint               interval);
+void                clock_plugin_timeout_set_interval (ClockPluginTimeout  *timeout,
+                                                       guint                interval);
 
-void                clock_plugin_timeout_free         (ClockPluginTimeout *timeout);
+void                clock_plugin_timeout_free         (ClockPluginTimeout  *timeout);
 
-void                clock_plugin_get_localtime        (struct tm          *tm);
+void                clock_plugin_get_localtime        (struct tm           *tm);
 
-gchar              *clock_plugin_strdup_strftime      (const gchar        *format,
-                                                       const struct tm    *tm);
+gchar              *clock_plugin_strdup_strftime      (const gchar         *format,
+                                                       const struct tm     *tm);
 
-guint               clock_plugin_interval_from_format (const gchar        *format);
+guint               clock_plugin_interval_from_format (const gchar         *format);
 
 G_END_DECLS
 
diff --git a/plugins/launcher/launcher.h b/plugins/launcher/launcher.h
index 27199a1..834a419 100644
--- a/plugins/launcher/launcher.h
+++ b/plugins/launcher/launcher.h
@@ -48,9 +48,9 @@ enum _LauncherArrowType
 
 GType   launcher_plugin_get_type      (void) G_GNUC_CONST;
 
-void    launcher_plugin_register_type (GTypeModule    *type_module);
+void    launcher_plugin_register_type (XfcePanelTypeModule *type_module);
 
-GSList *launcher_plugin_get_items     (LauncherPlugin *plugin);
+GSList *launcher_plugin_get_items     (LauncherPlugin      *plugin);
 
 G_END_DECLS
 
diff --git a/plugins/pager/pager.h b/plugins/pager/pager.h
index f90932a..8e2af9e 100644
--- a/plugins/pager/pager.h
+++ b/plugins/pager/pager.h
@@ -34,7 +34,7 @@ typedef struct _PagerPlugin      PagerPlugin;
 
 GType pager_plugin_get_type      (void) G_GNUC_CONST;
 
-void  pager_plugin_register_type (GTypeModule *type_module);
+void  pager_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/separator/separator.h b/plugins/separator/separator.h
index 78f4cdf..591a544 100644
--- a/plugins/separator/separator.h
+++ b/plugins/separator/separator.h
@@ -38,7 +38,7 @@ typedef enum   _SeparatorPluginStyle  SeparatorPluginStyle;
 
 GType separator_plugin_get_type      (void) G_GNUC_CONST;
 
-void  separator_plugin_register_type (GTypeModule *type_module);
+void  separator_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/showdesktop/showdesktop.h b/plugins/showdesktop/showdesktop.h
index a42e63b..608b9c7 100644
--- a/plugins/showdesktop/showdesktop.h
+++ b/plugins/showdesktop/showdesktop.h
@@ -36,7 +36,7 @@ typedef struct _ShowDesktopPlugin      ShowDesktopPlugin;
 
 GType show_desktop_plugin_get_type      (void) G_GNUC_CONST;
 
-void  show_desktop_plugin_register_type (GTypeModule *type_module);
+void  show_desktop_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/systray/systray-box.h b/plugins/systray/systray-box.h
index 4076bf1..5dc1e6a 100644
--- a/plugins/systray/systray-box.h
+++ b/plugins/systray/systray-box.h
@@ -32,38 +32,38 @@ typedef struct _SystrayBox      SystrayBox;
 
 GType      systray_box_get_type        (void) G_GNUC_CONST;
 
-void       systray_box_register_type   (GTypeModule  *module);
+void       systray_box_register_type   (XfcePanelTypeModule *module);
 
 GtkWidget *systray_box_new             (void) G_GNUC_MALLOC;
 
-void       systray_box_set_guess_size  (SystrayBox   *box,
-                                        gint          guess_size);
+void       systray_box_set_guess_size  (SystrayBox          *box,
+                                        gint                 guess_size);
 
-void       systray_box_set_arrow_type  (SystrayBox   *box,
-                                        GtkArrowType  arrow_type);
+void       systray_box_set_arrow_type  (SystrayBox          *box,
+                                        GtkArrowType         arrow_type);
 
-void       systray_box_set_rows        (SystrayBox   *box,
-                                        gint          rows);
+void       systray_box_set_rows        (SystrayBox          *box,
+                                        gint                 rows);
 
-gint       systray_box_get_rows        (SystrayBox   *box);
+gint       systray_box_get_rows        (SystrayBox          *box);
 
-void       systray_box_add_with_name   (SystrayBox   *box,
-                                        GtkWidget    *child,
-                                        const gchar  *name);
+void       systray_box_add_with_name   (SystrayBox          *box,
+                                        GtkWidget           *child,
+                                        const gchar         *name);
 
-void       systray_box_name_add        (SystrayBox   *box,
-                                        const gchar  *name,
-                                        gboolean      hidden);
+void       systray_box_name_add        (SystrayBox          *box,
+                                        const gchar         *name,
+                                        gboolean             hidden);
 
-void       systray_box_name_set_hidden (SystrayBox   *box,
-                                        const gchar  *name,
-                                        gboolean      hidden);
+void       systray_box_name_set_hidden (SystrayBox          *box,
+                                        const gchar         *name,
+                                        gboolean             hidden);
 
-gboolean   systray_box_name_get_hidden (SystrayBox   *box,
-                                        const gchar  *name);
+gboolean   systray_box_name_get_hidden (SystrayBox          *box,
+                                        const gchar         *name);
 
-GList     *systray_box_name_list       (SystrayBox   *box);
+GList     *systray_box_name_list       (SystrayBox          *box);
 
-void       systray_box_name_clear      (SystrayBox   *box);
+void       systray_box_name_clear      (SystrayBox          *box);
 
 #endif /* !__SYSTRAY_BOX_H__ */
diff --git a/plugins/systray/systray-manager.h b/plugins/systray/systray-manager.h
index aaec6b2..9712d42 100644
--- a/plugins/systray/systray-manager.h
+++ b/plugins/systray/systray-manager.h
@@ -49,24 +49,24 @@ enum
 
 GType           systray_manager_get_type             (void) G_GNUC_CONST;
 
-void            systray_manager_register_type        (GTypeModule     *type_module);
+void            systray_manager_register_type        (XfcePanelTypeModule *type_module);
 
 GQuark          systray_manager_error_quark          (void);
 
 SystrayManager *systray_manager_new                  (void) G_GNUC_MALLOC;
 
-gboolean        systray_manager_check_running        (GdkScreen       *screen);
+gboolean        systray_manager_check_running        (GdkScreen           *screen);
 
-gboolean        systray_manager_register             (SystrayManager  *manager,
-                                                      GdkScreen        *screen,
-                                                      GError          **error);
+gboolean        systray_manager_register             (SystrayManager      *manager,
+                                                      GdkScreen            *screen,
+                                                      GError              **error);
 
-void            systray_manager_unregister           (SystrayManager  *manager);
+void            systray_manager_unregister           (SystrayManager      *manager);
 
-void            systray_manager_set_orientation      (SystrayManager  *manager,
-                                                      GtkOrientation   orientation);
+void            systray_manager_set_orientation      (SystrayManager      *manager,
+                                                      GtkOrientation       orientation);
 
-gchar          *systray_manager_get_application_name (GtkWidget        *socket) G_GNUC_MALLOC;
+gchar          *systray_manager_get_application_name (GtkWidget            *socket) G_GNUC_MALLOC;
 
 
 #endif /* !__SYSTRAY_MANAGER_H__ */
diff --git a/plugins/systray/systray.h b/plugins/systray/systray.h
index e1cab1b..cc4f545 100644
--- a/plugins/systray/systray.h
+++ b/plugins/systray/systray.h
@@ -37,7 +37,7 @@ typedef enum   _SystrayChildState  SystrayChildState;
 
 GType systray_plugin_get_type      (void) G_GNUC_CONST;
 
-void  systray_plugin_register_type (GTypeModule *type_module);
+void  systray_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 
diff --git a/plugins/tasklist/tasklist.c b/plugins/tasklist/tasklist.c
index 125e8c2..4c25cdc 100644
--- a/plugins/tasklist/tasklist.c
+++ b/plugins/tasklist/tasklist.c
@@ -32,7 +32,7 @@
 
 /* TODO move to header */
 GType tasklist_plugin_get_type (void) G_GNUC_CONST;
-void tasklist_plugin_register_type (GTypeModule *type_module);
+void tasklist_plugin_register_type (XfcePanelTypeModule *type_module);
 #define XFCE_TYPE_TASKLIST_PLUGIN            (tasklist_plugin_get_type ())
 #define XFCE_TASKLIST_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_TASKLIST_PLUGIN, TasklistPlugin))
 #define XFCE_TASKLIST_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_TASKLIST_PLUGIN, TasklistPluginClass))
diff --git a/plugins/windowmenu/windowmenu.h b/plugins/windowmenu/windowmenu.h
index 64a5ce1..181d7af 100644
--- a/plugins/windowmenu/windowmenu.h
+++ b/plugins/windowmenu/windowmenu.h
@@ -36,7 +36,7 @@ typedef struct _WindowMenuPlugin      WindowMenuPlugin;
 
 GType window_menu_plugin_get_type      (void) G_GNUC_CONST;
 
-void  window_menu_plugin_register_type (GTypeModule *type_module);
+void  window_menu_plugin_register_type (XfcePanelTypeModule *type_module);
 
 G_END_DECLS
 



More information about the Xfce4-commits mailing list