mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Refactor: DECLARE_FINAL GncPluginExample < GncPlugin
- Fix the name
This commit is contained in:
parent
c5d4f2bf30
commit
2e59bda951
@ -55,16 +55,16 @@ static guint gnc_plugin_n_actions = G_N_ELEMENTS(gnc_plugin_actions);
|
||||
* Object Implementation *
|
||||
************************************************************/
|
||||
|
||||
G_DEFINE_TYPE(GncPluginexample, gnc_plugin_example, GNC_TYPE_PLUGIN)
|
||||
G_DEFINE_TYPE(GncPluginExample, gnc_plugin_example, GNC_TYPE_PLUGIN)
|
||||
|
||||
GncPlugin *
|
||||
gnc_plugin_example_new (void)
|
||||
{
|
||||
return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_example, (gchar*) NULL));
|
||||
return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_EXAMPLE, (gchar*) NULL));
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_plugin_example_class_init (GncPluginexampleClass *klass)
|
||||
gnc_plugin_example_class_init (GncPluginExampleClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS(klass);
|
||||
GncPluginClass *plugin_class = GNC_PLUGIN_CLASS(klass);
|
||||
@ -82,7 +82,7 @@ gnc_plugin_example_class_init (GncPluginexampleClass *klass)
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_plugin_example_init (GncPluginexample *plugin)
|
||||
gnc_plugin_example_init (GncPluginExample *plugin)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -38,28 +38,17 @@ G_BEGIN_DECLS
|
||||
|
||||
/* type macros */
|
||||
#define GNC_TYPE_PLUGIN_example (gnc_plugin_example_get_type())
|
||||
#define GNC_PLUGIN_example(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNC_TYPE_PLUGIN_example, GncPluginexample))
|
||||
#define GNC_PLUGIN_example_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNC_TYPE_PLUGIN_example, GncPluginexampleClass))
|
||||
#define GNC_IS_PLUGIN_example(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNC_TYPE_PLUGIN_example))
|
||||
#define GNC_IS_PLUGIN_example_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNC_TYPE_PLUGIN_example))
|
||||
#define GNC_PLUGIN_example_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNC_TYPE_PLUGIN_example, GncPluginexampleClass))
|
||||
G_DECLARE_FINAL_TYPE (GncPluginExample, gnc_plugin_example, GNC, PLUGIN_EXAMPLE)
|
||||
|
||||
#define GNC_PLUGIN_example_NAME "gnc-plugin-example"
|
||||
#define GNC_PLUGIN_EXAMPLE_NAME "gnc-plugin-example"
|
||||
|
||||
/* typedefs & structures */
|
||||
typedef struct {
|
||||
struct _GncPluginExample
|
||||
{
|
||||
GncPlugin gnc_plugin;
|
||||
} GncPluginexample;
|
||||
|
||||
typedef struct {
|
||||
GncPluginClass gnc_plugin;
|
||||
} GncPluginexampleClass;
|
||||
};
|
||||
|
||||
/* function prototypes */
|
||||
/**
|
||||
* @return The glib runtime type of an example plugin page
|
||||
**/
|
||||
GType gnc_plugin_example_get_type (void);
|
||||
|
||||
/**
|
||||
* @return A new GncPluginexample object
|
||||
|
Loading…
Reference in New Issue
Block a user