mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
gnc_plugin_page_register_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
This commit is contained in:
parent
73cedd8a4b
commit
f17d85dbd2
@ -597,34 +597,6 @@ static GObjectClass *parent_class = NULL;
|
||||
/* Implementation */
|
||||
/************************************************************/
|
||||
|
||||
GType
|
||||
gnc_plugin_page_register_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_page_register_type = 0;
|
||||
|
||||
if (gnc_plugin_page_register_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginPageRegisterClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) gnc_plugin_page_register_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GncPluginPageRegister),
|
||||
0,
|
||||
(GInstanceInitFunc) gnc_plugin_page_register_init
|
||||
};
|
||||
|
||||
gnc_plugin_page_register_type = g_type_register_static (GNC_TYPE_PLUGIN_PAGE,
|
||||
GNC_PLUGIN_PAGE_REGISTER_NAME,
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_page_register_type;
|
||||
}
|
||||
|
||||
static GncPluginPage *
|
||||
gnc_plugin_page_register_new_common (GNCLedgerDisplay *ledger)
|
||||
{
|
||||
@ -742,6 +714,8 @@ gnc_plugin_page_register_new_ledger (GNCLedgerDisplay *ledger)
|
||||
return gnc_plugin_page_register_new_common(ledger);
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginPageRegister, gnc_plugin_page_register, GNC_TYPE_PLUGIN_PAGE)
|
||||
|
||||
static void
|
||||
gnc_plugin_page_register_class_init (GncPluginPageRegisterClass *klass)
|
||||
{
|
||||
@ -762,8 +736,6 @@ gnc_plugin_page_register_class_init (GncPluginPageRegisterClass *klass)
|
||||
gnc_plugin_class->update_edit_menu_actions = gnc_plugin_page_register_update_edit_menu;
|
||||
gnc_plugin_class->finish_pending = gnc_plugin_page_register_finish_pending;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginPageRegisterPrivate));
|
||||
|
||||
gnc_ui_register_account_destroy_callback (gppr_account_destroy_cb);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user