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_budget_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
This commit is contained in:
parent
07b797b996
commit
73cedd8a4b
@ -211,36 +211,6 @@ typedef struct GncPluginPageBudgetPrivate
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
|
||||
GType
|
||||
gnc_plugin_page_budget_get_type (void)
|
||||
{
|
||||
static GType gnc_plugin_page_budget_type = 0;
|
||||
|
||||
if (gnc_plugin_page_budget_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncPluginPageBudgetClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) gnc_plugin_page_budget_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GncPluginPageBudget),
|
||||
0,
|
||||
(GInstanceInitFunc) gnc_plugin_page_budget_init
|
||||
};
|
||||
|
||||
gnc_plugin_page_budget_type =
|
||||
g_type_register_static (GNC_TYPE_PLUGIN_PAGE,
|
||||
"GncPluginPageBudget", &our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_plugin_page_budget_type;
|
||||
}
|
||||
|
||||
|
||||
GncPluginPage *
|
||||
gnc_plugin_page_budget_new (GncBudget *budget)
|
||||
{
|
||||
@ -278,6 +248,7 @@ gnc_plugin_page_budget_new (GncBudget *budget)
|
||||
return GNC_PLUGIN_PAGE(plugin_page);
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginPageBudget, gnc_plugin_page_budget, GNC_TYPE_PLUGIN_PAGE)
|
||||
|
||||
static void
|
||||
gnc_plugin_page_budget_class_init (GncPluginPageBudgetClass *klass)
|
||||
@ -295,8 +266,6 @@ gnc_plugin_page_budget_class_init (GncPluginPageBudgetClass *klass)
|
||||
gnc_plugin_class->destroy_widget = gnc_plugin_page_budget_destroy_widget;
|
||||
gnc_plugin_class->save_page = gnc_plugin_page_budget_save_page;
|
||||
gnc_plugin_class->recreate_page = gnc_plugin_page_budget_recreate_page;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncPluginPageBudgetPrivate));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user