diff --git a/libgnucash/gnc-module/example/gnc-plugin.example.c b/libgnucash/gnc-module/example/gnc-plugin.example.c index 6a739866f30..c80047dfca6 100644 --- a/libgnucash/gnc-module/example/gnc-plugin.example.c +++ b/libgnucash/gnc-module/example/gnc-plugin.example.c @@ -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) { } diff --git a/libgnucash/gnc-module/example/gnc-plugin.example.h b/libgnucash/gnc-module/example/gnc-plugin.example.h index f3c8400a188..5b8d6072313 100644 --- a/libgnucash/gnc-module/example/gnc-plugin.example.h +++ b/libgnucash/gnc-module/example/gnc-plugin.example.h @@ -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