[gnome-panel] libgnome-panel: rename GpModuleVTable to GpAppletVTable



commit 68c8e9613605b9473dac4dae56f8d3ac94101f2e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Mon Jul 31 18:09:04 2017 +0300

    libgnome-panel: rename GpModuleVTable to GpAppletVTable

 gnome-panel/libpanel-applet-private/gp-module.c |   26 +++++++++++-----------
 libgnome-panel/gp-module.h                      |   22 +++++++++---------
 modules/clock/clock-module.c                    |    4 +-
 modules/fish/fish-module.c                      |    4 +-
 modules/notification-area/na-module.c           |    4 +-
 modules/separator/separator-module.c            |    4 +-
 modules/status-notifier/sn-module.c             |    4 +-
 modules/wncklet/wncklet-module.c                |    4 +-
 8 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/gnome-panel/libpanel-applet-private/gp-module.c b/gnome-panel/libpanel-applet-private/gp-module.c
index 564d1da..054eb8f 100644
--- a/gnome-panel/libpanel-applet-private/gp-module.c
+++ b/gnome-panel/libpanel-applet-private/gp-module.c
@@ -31,9 +31,9 @@
 #include "libgnome-panel/gp-applet-info-private.h"
 #include "libgnome-panel/gp-module-info-private.h"
 
-typedef guint32        (* GetAbiVersionFunc) (void);
-typedef GpModuleInfo * (* GetModuleInfoFunc) (void);
-typedef void           (* GetVTableFunc)     (GpModuleVTable *vtable);
+typedef guint32        (* GetAbiVersionFunc)   (void);
+typedef GpModuleInfo * (* GetModuleInfoFunc)   (void);
+typedef void           (* GetAppletVTableFunc) (GpAppletVTable *vtable);
 
 struct _GpModule
 {
@@ -44,7 +44,7 @@ struct _GpModule
 
   GpModuleInfo   *info;
 
-  GpModuleVTable  vtable;
+  GpAppletVTable  applet_vtable;
   GHashTable     *applets;
 };
 
@@ -144,7 +144,7 @@ get_applet_info (GpModule     *module,
   if (info != NULL)
     return info;
 
-  info = module->vtable.get_applet_info (applet);
+  info = module->applet_vtable.get_applet_info (applet);
 
   if (info == NULL)
     {
@@ -222,7 +222,7 @@ gp_module_new_from_path (const gchar *path)
   const gchar *symbol;
   GetAbiVersionFunc abi_version_func;
   GetModuleInfoFunc module_info_func;
-  GetVTableFunc vtable_func;
+  GetAppletVTableFunc applet_vtable_func;
 
   g_return_val_if_fail (path != NULL && *path != '\0', NULL);
 
@@ -304,8 +304,8 @@ gp_module_new_from_path (const gchar *path)
       return NULL;
     }
 
-  symbol = "gp_module_get_vtable";
-  if (!g_module_symbol (module->library, symbol, (gpointer) &vtable_func))
+  symbol = "gp_module_get_applet_vtable";
+  if (!g_module_symbol (module->library, symbol, (gpointer) &applet_vtable_func))
     {
       g_warning ("Failed to get '%s' for module '%s': %s",
                  symbol, path, g_module_error ());
@@ -314,7 +314,7 @@ gp_module_new_from_path (const gchar *path)
       return NULL;
     }
 
-  if (vtable_func == NULL)
+  if (applet_vtable_func == NULL)
     {
       g_warning ("Invalid '%s' in module '%s'", symbol, path);
 
@@ -322,7 +322,7 @@ gp_module_new_from_path (const gchar *path)
       return NULL;
     }
 
-  vtable_func (&module->vtable);
+  applet_vtable_func (&module->applet_vtable);
 
   return module;
 }
@@ -367,10 +367,10 @@ const gchar *
 gp_module_get_applet_from_iid (GpModule    *module,
                                const gchar *old_iid)
 {
-  if (module->vtable.get_applet_from_iid == NULL)
+  if (module->applet_vtable.get_applet_from_iid == NULL)
     return NULL;
 
-  return module->vtable.get_applet_from_iid (old_iid);
+  return module->applet_vtable.get_applet_from_iid (old_iid);
 }
 
 /**
@@ -417,7 +417,7 @@ gp_module_applet_new (GpModule         *module,
       return NULL;
     }
 
-  type = module->vtable.get_applet_type (applet);
+  type = module->applet_vtable.get_applet_type (applet);
   if (type == G_TYPE_NONE)
     {
       g_set_error (error, GP_MODULE_ERROR, GP_MODULE_ERROR_MISSING_APPLET_INFO,
diff --git a/libgnome-panel/gp-module.h b/libgnome-panel/gp-module.h
index d7f0376..50a7b62 100644
--- a/libgnome-panel/gp-module.h
+++ b/libgnome-panel/gp-module.h
@@ -129,9 +129,9 @@ G_BEGIN_DECLS
  * }
  *
  * void
- * gp_module_get_vtable (GpModuleVTable *vtable)
+ * gp_module_get_applet_vtable (GpAppletVTable *vtable)
  * {
- *   *vtable = (GpModuleVTable) {
+ *   *vtable = (GpAppletVTable) {
  *     example_get_applet_info,
  *     example_get_applet_type,
  *     example_get_applet_from_iid, // or NULL if not needed
@@ -149,16 +149,16 @@ G_BEGIN_DECLS
 #define GP_MODULE_ABI_VERSION 0x0001
 
 /**
- * GpModuleVTable:
+ * GpAppletVTable:
  * @get_applet_info: (transfer full): returns a #GpAppletInfo.
  * @get_applet_type: returns a #GType.
  * @get_applet_from_iid: Compatibility function.
  * @setup_about: Function for setting up about dialog.
  *
- * The #GpModuleVTable provides the functions required by the #GpModule.
+ * The #GpAppletVTable provides the functions required by the #GpModule.
  */
-typedef struct _GpModuleVTable GpModuleVTable;
-struct _GpModuleVTable
+typedef struct _GpAppletVTable GpAppletVTable;
+struct _GpAppletVTable
 {
   GpAppletInfo * (* get_applet_info)     (const gchar    *applet);
 
@@ -178,7 +178,7 @@ struct _GpModuleVTable
  *
  * Returns: the module ABI version.
  */
-guint32       gp_module_get_abi_version (void);
+guint32       gp_module_get_abi_version   (void);
 
 /**
  * gp_module_get_module_info:
@@ -188,15 +188,15 @@ guint32       gp_module_get_abi_version (void);
  *
  * Returns: a #GpModuleInfo.
  */
-GpModuleInfo *gp_module_get_module_info (void);
+GpModuleInfo *gp_module_get_module_info   (void);
 
 /**
- * gp_module_get_vtable:
- * @vtable: (out caller-allocates): return location for the #GpModuleVTable
+ * gp_module_get_applet_vtable:
+ * @vtable: (out caller-allocates): return location for the #GpAppletVTable
  *
  * Required API for GNOME Panel modules to implement.
  */
-void          gp_module_get_vtable      (GpModuleVTable *vtable);
+void          gp_module_get_applet_vtable (GpAppletVTable *vtable);
 
 G_END_DECLS
 
diff --git a/modules/clock/clock-module.c b/modules/clock/clock-module.c
index f8883d4..248e6c7 100644
--- a/modules/clock/clock-module.c
+++ b/modules/clock/clock-module.c
@@ -75,9 +75,9 @@ gp_module_get_module_info (void)
 }
 
 void
-gp_module_get_vtable (GpModuleVTable *vtable)
+gp_module_get_applet_vtable (GpAppletVTable *vtable)
 {
-  *vtable = (GpModuleVTable) {
+  *vtable = (GpAppletVTable) {
     clock_get_applet_info,
     clock_get_applet_type,
     clock_get_applet_from_iid,
diff --git a/modules/fish/fish-module.c b/modules/fish/fish-module.c
index c04dcb3..cd4d6f0 100644
--- a/modules/fish/fish-module.c
+++ b/modules/fish/fish-module.c
@@ -75,9 +75,9 @@ gp_module_get_module_info (void)
 }
 
 void
-gp_module_get_vtable (GpModuleVTable *vtable)
+gp_module_get_applet_vtable (GpAppletVTable *vtable)
 {
-  *vtable = (GpModuleVTable) {
+  *vtable = (GpAppletVTable) {
     fish_get_applet_info,
     fish_get_applet_type,
     fish_get_applet_from_iid,
diff --git a/modules/notification-area/na-module.c b/modules/notification-area/na-module.c
index 66226eb..b03632f 100644
--- a/modules/notification-area/na-module.c
+++ b/modules/notification-area/na-module.c
@@ -75,9 +75,9 @@ gp_module_get_module_info (void)
 }
 
 void
-gp_module_get_vtable (GpModuleVTable *vtable)
+gp_module_get_applet_vtable (GpAppletVTable *vtable)
 {
-  *vtable = (GpModuleVTable) {
+  *vtable = (GpAppletVTable) {
     na_get_applet_info,
     na_get_applet_type,
     na_get_applet_from_iid,
diff --git a/modules/separator/separator-module.c b/modules/separator/separator-module.c
index e500455..f954b93 100644
--- a/modules/separator/separator-module.c
+++ b/modules/separator/separator-module.c
@@ -69,9 +69,9 @@ gp_module_get_module_info (void)
 }
 
 void
-gp_module_get_vtable (GpModuleVTable *vtable)
+gp_module_get_applet_vtable (GpAppletVTable *vtable)
 {
-  *vtable = (GpModuleVTable) {
+  *vtable = (GpAppletVTable) {
     separator_get_applet_info,
     separator_get_applet_type,
     separator_get_applet_from_iid,
diff --git a/modules/status-notifier/sn-module.c b/modules/status-notifier/sn-module.c
index cb5a65d..22f22b9 100644
--- a/modules/status-notifier/sn-module.c
+++ b/modules/status-notifier/sn-module.c
@@ -73,9 +73,9 @@ gp_module_get_module_info (void)
 }
 
 void
-gp_module_get_vtable (GpModuleVTable *vtable)
+gp_module_get_applet_vtable (GpAppletVTable *vtable)
 {
-  *vtable = (GpModuleVTable) {
+  *vtable = (GpAppletVTable) {
     sn_get_applet_info,
     sn_get_applet_type,
     sn_get_applet_from_iid,
diff --git a/modules/wncklet/wncklet-module.c b/modules/wncklet/wncklet-module.c
index 2593b6f..243c03e 100644
--- a/modules/wncklet/wncklet-module.c
+++ b/modules/wncklet/wncklet-module.c
@@ -141,9 +141,9 @@ gp_module_get_module_info (void)
 }
 
 void
-gp_module_get_vtable (GpModuleVTable *vtable)
+gp_module_get_applet_vtable (GpAppletVTable *vtable)
 {
-  *vtable = (GpModuleVTable) {
+  *vtable = (GpAppletVTable) {
     wncklet_get_applet_info,
     wncklet_get_applet_type,
     wncklet_get_applet_from_iid,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]