mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Refactor: DECLARE_FINAL GncPluginCustomerImport < GncPlugin
- fix the camel-snake hybrid name - except the name of the action, which is already used externally
This commit is contained in:
parent
f47c9295bc
commit
08168bec26
@ -49,6 +49,8 @@ static void gnc_plugin_customer_import_cmd_test (GSimpleAction *simple, GVariant
|
||||
|
||||
static GActionEntry gnc_plugin_actions [] =
|
||||
{
|
||||
// should be "CustomerImportAction", but "customer_importAction"
|
||||
// is already used externally in accelerator maps
|
||||
{ "customer_importAction", gnc_plugin_customer_import_cmd_test, NULL, NULL, NULL },
|
||||
};
|
||||
/** The number of actions provided by this plugin. */
|
||||
@ -65,16 +67,16 @@ static const gchar *gnc_plugin_load_ui_items [] =
|
||||
* Object Implementation *
|
||||
************************************************************/
|
||||
|
||||
G_DEFINE_TYPE(GncPlugincustomer_import, gnc_plugin_customer_import, GNC_TYPE_PLUGIN)
|
||||
G_DEFINE_TYPE(GncPluginCustomerImport, gnc_plugin_customer_import, GNC_TYPE_PLUGIN)
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_customer_import_new (void)
|
||||
{
|
||||
return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_customer_import, (gchar*) NULL));
|
||||
return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_CUSTOMER_IMPORT, (gchar*) NULL));
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_plugin_customer_import_class_init (GncPlugincustomer_importClass *klass)
|
||||
gnc_plugin_customer_import_class_init (GncPluginCustomerImportClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GncPluginClass *plugin_class = GNC_PLUGIN_CLASS(klass);
|
||||
@ -82,7 +84,7 @@ gnc_plugin_customer_import_class_init (GncPlugincustomer_importClass *klass)
|
||||
object_class->finalize = gnc_plugin_customer_import_finalize;
|
||||
|
||||
/* plugin info */
|
||||
plugin_class->plugin_name = GNC_PLUGIN_customer_import_NAME;
|
||||
plugin_class->plugin_name = GNC_PLUGIN_CUSTOMER_IMPORT_NAME;
|
||||
|
||||
/* widget addition/removal */
|
||||
plugin_class->actions_name = PLUGIN_ACTIONS_NAME;
|
||||
@ -93,7 +95,7 @@ gnc_plugin_customer_import_class_init (GncPlugincustomer_importClass *klass)
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_plugin_customer_import_init (GncPlugincustomer_import *plugin)
|
||||
gnc_plugin_customer_import_init (GncPluginCustomerImport *plugin)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -37,31 +37,18 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* type macros */
|
||||
#define GNC_TYPE_PLUGIN_customer_import (gnc_plugin_customer_import_get_type())
|
||||
#define GNC_PLUGIN_customer_import(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNC_TYPE_PLUGIN_customer_import, GncPlugincustomer_import))
|
||||
#define GNC_PLUGIN_customer_import_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNC_TYPE_PLUGIN_customer_import, GncPlugincustomer_importClass))
|
||||
#define GNC_IS_PLUGIN_customer_import(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNC_TYPE_PLUGIN_customer_import))
|
||||
#define GNC_IS_PLUGIN_customer_import_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNC_TYPE_PLUGIN_customer_import))
|
||||
#define GNC_PLUGIN_customer_import_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNC_TYPE_PLUGIN_customer_import, GncPlugincustomer_importClass))
|
||||
#define GNC_TYPE_PLUGIN_CUSTOMER_IMPORT (gnc_plugin_customer_import_get_type())
|
||||
G_DECLARE_FINAL_TYPE (GncPluginCustomerImport, gnc_plugin_customer_import, GNC, PLUGIN_CUSTOMER_IMPORT, GncPlugin)
|
||||
|
||||
#define GNC_PLUGIN_customer_import_NAME "gnc-plugin-customer-import"
|
||||
#define GNC_PLUGIN_CUSTOMER_IMPORT_NAME "gnc-plugin-customer-import"
|
||||
|
||||
/* typedefs & structures */
|
||||
typedef struct
|
||||
struct _GncPluginCustomerImport
|
||||
{
|
||||
GncPlugin gnc_plugin;
|
||||
} GncPlugincustomer_import;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GncPluginClass gnc_plugin;
|
||||
} GncPlugincustomer_importClass;
|
||||
};
|
||||
|
||||
/* function prototypes */
|
||||
/**
|
||||
* @return The glib runtime type of an customer_import plugin page
|
||||
**/
|
||||
GType gnc_plugin_customer_import_get_type (void);
|
||||
|
||||
/**
|
||||
* @return A new GncPlugincustomer_import object
|
||||
|
Loading…
Reference in New Issue
Block a user