Refactor: DECLARE_FINAL GncPluginBiImport < GncPlugin

- fix the camel-snake hybrid name
  - except the name of the action, which is already used externally
This commit is contained in:
Richard Cohen 2023-06-12 19:09:13 +01:00
parent a0952e1e5a
commit 631d0e7755
2 changed files with 8 additions and 19 deletions

View File

@ -51,6 +51,8 @@ static void gnc_plugin_bi_import_cmd_test (GSimpleAction *simple, GVariant *para
static GActionEntry gnc_plugin_actions [] =
{
// should be "BiImportAction", but "bi_importAction" is already
// used externally in accelerator maps
{ "bi_importAction", gnc_plugin_bi_import_cmd_test, NULL, NULL, NULL },
};
/** The number of actions provided by this plugin. */
@ -67,7 +69,7 @@ static const gchar *gnc_plugin_load_ui_items [] =
* Object Implementation *
************************************************************/
G_DEFINE_TYPE(GncPluginbi_import, gnc_plugin_bi_import, GNC_TYPE_PLUGIN)
G_DEFINE_TYPE(GncPluginBiImport, gnc_plugin_bi_import, GNC_TYPE_PLUGIN)
GncPlugin *
gnc_plugin_bi_import_new (void)
@ -76,7 +78,7 @@ gnc_plugin_bi_import_new (void)
}
static void
gnc_plugin_bi_import_class_init (GncPluginbi_importClass *klass)
gnc_plugin_bi_import_class_init (GncPluginBiImportClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GncPluginClass *plugin_class = GNC_PLUGIN_CLASS(klass);
@ -95,7 +97,7 @@ gnc_plugin_bi_import_class_init (GncPluginbi_importClass *klass)
}
static void
gnc_plugin_bi_import_init (GncPluginbi_import *plugin)
gnc_plugin_bi_import_init (GncPluginBiImport *plugin)
{
}

View File

@ -38,30 +38,17 @@ G_BEGIN_DECLS
/* type macros */
#define GNC_TYPE_PLUGIN_BI_IMPORT (gnc_plugin_bi_import_get_type())
#define GNC_PLUGIN_BI_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNC_TYPE_PLUGIN_BI_IMPORT, GncPluginbi_import))
#define GNC_PLUGIN_BI_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNC_TYPE_PLUGIN_BI_IMPORT, GncPluginbi_importClass))
#define GNC_IS_PLUGIN_BI_IMPORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNC_TYPE_PLUGIN_BI_IMPORT))
#define GNC_IS_PLUGIN_BI_IMPORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNC_TYPE_PLUGIN_BI_IMPORT))
#define GNC_PLUGIN_BI_IMPORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNC_TYPE_PLUGIN_BI_IMPORT, GncPluginbi_importClass))
G_DECLARE_FINAL_TYPE (GncPluginBiImport, gnc_plugin_bi_import, GNC, PLUGIN_BI_IMPORT, GncPlugin)
#define GNC_PLUGIN_BI_IMPORT_NAME "gnc-plugin-bi-import"
/* typedefs & structures */
typedef struct
struct _GncPluginBiImport
{
GncPlugin gnc_plugin;
} GncPluginbi_import;
typedef struct
{
GncPluginClass gnc_plugin;
} GncPluginbi_importClass;
};
/* function prototypes */
/**
* @return The glib runtime type of an bi_import plugin page
**/
GType gnc_plugin_bi_import_get_type (void);
/**
* @return A new GncPluginbi_import object