From f61652fc242ec185833abe36f0a22a5e78a3dd8f Mon Sep 17 00:00:00 2001 From: Christoph Holtermann Date: Fri, 7 Dec 2018 10:32:25 +0100 Subject: [PATCH] revert 630f5ba2a693d0a6a9b3ebced645dfd4c5046c98 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Error about conflicting types for ‘gnc_plugin_page_init’. --- gnucash/gnome-utils/gnc-plugin-page.c | 33 ++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/gnucash/gnome-utils/gnc-plugin-page.c b/gnucash/gnome-utils/gnc-plugin-page.c index 7857d57c68..8d5529cf5c 100644 --- a/gnucash/gnome-utils/gnc-plugin-page.c +++ b/gnucash/gnome-utils/gnc-plugin-page.c @@ -107,6 +107,36 @@ typedef struct _GncPluginPagePrivate #define GNC_PLUGIN_PAGE_GET_PRIVATE(o) \ (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_PAGE, GncPluginPagePrivate)) +GType +gnc_plugin_page_get_type (void) +{ + static GType gnc_plugin_page_type = 0; + + if (gnc_plugin_page_type == 0) + { + static const GTypeInfo our_info = + { + + sizeof (GncPluginPageClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gnc_plugin_page_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GncPluginPage), + 0, /* n_preallocs */ + (GInstanceInitFunc) gnc_plugin_page_init, + }; + + gnc_plugin_page_type = g_type_register_static (G_TYPE_OBJECT, + "GncPluginPage", + &our_info, 0); + } + + return gnc_plugin_page_type; +} + + /* Create the display widget that corresponds to this plugin. This * function will be called by the main/embedded window manipulation * code to create a widget that they can display. The returned @@ -349,7 +379,6 @@ gnc_plugin_page_unselected (GncPluginPage *plugin_page) g_signal_emit (G_OBJECT (plugin_page), signals[UNSELECTED], 0); } -G_DEFINE_TYPE_WITH_PRIVATE(GncPluginPage, gnc_plugin_page, G_TYPE_OBJECT) /** Initialize the class for a new generic plugin page. This will set * up any function pointers that override functions in the parent @@ -371,6 +400,8 @@ gnc_plugin_page_class_init (GncPluginPageClass *klass) klass->tab_icon = NULL; klass->plugin_name = NULL; + g_type_class_add_private(klass, sizeof(GncPluginPagePrivate)); + g_object_class_install_property (gobject_class, PROP_PAGE_NAME,