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_tree_view_price_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
This commit is contained in:
parent
621e5213f5
commit
de0f40c112
@ -67,33 +67,7 @@ typedef struct GncTreeViewPricePrivate
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gnc_tree_view_price_get_type (void)
|
||||
{
|
||||
static GType gnc_tree_view_price_type = 0;
|
||||
|
||||
if (gnc_tree_view_price_type == 0)
|
||||
{
|
||||
static const GTypeInfo our_info =
|
||||
{
|
||||
sizeof (GncTreeViewPriceClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) gnc_tree_view_price_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GncTreeViewPrice),
|
||||
0,
|
||||
(GInstanceInitFunc) gnc_tree_view_price_init
|
||||
};
|
||||
|
||||
gnc_tree_view_price_type = g_type_register_static (GNC_TYPE_TREE_VIEW,
|
||||
"GncTreeViewPrice",
|
||||
&our_info, 0);
|
||||
}
|
||||
|
||||
return gnc_tree_view_price_type;
|
||||
}
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(GncTreeViewPrice, gnc_tree_view_price, GNC_TYPE_TREE_VIEW)
|
||||
|
||||
static void
|
||||
gnc_tree_view_price_class_init (GncTreeViewPriceClass *klass)
|
||||
@ -111,8 +85,6 @@ gnc_tree_view_price_class_init (GncTreeViewPriceClass *klass)
|
||||
|
||||
/* GtkWidget signals */
|
||||
widget_class->destroy = gnc_tree_view_price_destroy;
|
||||
|
||||
g_type_class_add_private(klass, sizeof(GncTreeViewPricePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user