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_business_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
This commit is contained in:
parent
eab5753aa6
commit
ce27afb892
@ -344,34 +344,6 @@ typedef struct GncPluginBusinessPrivate
|
|||||||
|
|
||||||
static GObjectClass *parent_class = NULL;
|
static GObjectClass *parent_class = NULL;
|
||||||
|
|
||||||
GType
|
|
||||||
gnc_plugin_business_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gnc_plugin_business_type = 0;
|
|
||||||
|
|
||||||
if (gnc_plugin_business_type == 0)
|
|
||||||
{
|
|
||||||
static const GTypeInfo our_info =
|
|
||||||
{
|
|
||||||
sizeof (GncPluginBusinessClass),
|
|
||||||
NULL, /* base_init */
|
|
||||||
NULL, /* base_finalize */
|
|
||||||
(GClassInitFunc) gnc_plugin_business_class_init,
|
|
||||||
NULL, /* class_finalize */
|
|
||||||
NULL, /* class_data */
|
|
||||||
sizeof (GncPluginBusiness),
|
|
||||||
0, /* n_preallocs */
|
|
||||||
(GInstanceInitFunc) gnc_plugin_business_init
|
|
||||||
};
|
|
||||||
|
|
||||||
gnc_plugin_business_type = g_type_register_static (GNC_TYPE_PLUGIN,
|
|
||||||
"GncPluginBusiness",
|
|
||||||
&our_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gnc_plugin_business_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
GncPlugin *
|
GncPlugin *
|
||||||
gnc_plugin_business_new (void)
|
gnc_plugin_business_new (void)
|
||||||
{
|
{
|
||||||
@ -388,6 +360,8 @@ gnc_plugin_business_new (void)
|
|||||||
return GNC_PLUGIN (plugin);
|
return GNC_PLUGIN (plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_PRIVATE(GncPluginBusiness, gnc_plugin_business, GNC_TYPE_PLUGIN)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_plugin_business_class_init (GncPluginBusinessClass *klass)
|
gnc_plugin_business_class_init (GncPluginBusinessClass *klass)
|
||||||
{
|
{
|
||||||
@ -409,8 +383,6 @@ gnc_plugin_business_class_init (GncPluginBusinessClass *klass)
|
|||||||
plugin_class->actions = gnc_plugin_actions;
|
plugin_class->actions = gnc_plugin_actions;
|
||||||
plugin_class->n_actions = gnc_plugin_n_actions;
|
plugin_class->n_actions = gnc_plugin_n_actions;
|
||||||
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
plugin_class->ui_filename = PLUGIN_UI_FILENAME;
|
||||||
|
|
||||||
g_type_class_add_private(klass, sizeof(GncPluginBusinessPrivate));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user