Skip to content

Commit

Permalink
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
Browse files Browse the repository at this point in the history
gnc_tree_view_split_reg_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
  • Loading branch information
c-holtermann committed Jan 26, 2019
1 parent b0fc078 commit a7e5ac8
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions gnucash/gnome-utils/gnc-tree-view-split-reg.c
Expand Up @@ -305,33 +305,7 @@ struct GncTreeViewSplitRegPrivate

static GObjectClass *parent_class = NULL;

GType
gnc_tree_view_split_reg_get_type(void)
{
static GType gnc_tree_view_split_reg_type = 0;

if (gnc_tree_view_split_reg_type == 0)
{
static const GTypeInfo our_info =
{
sizeof (GncTreeViewSplitRegClass),
NULL,
NULL,
(GClassInitFunc) gnc_tree_view_split_reg_class_init,
NULL,
NULL,
sizeof (GncTreeViewSplitReg),
0,
(GInstanceInitFunc) gnc_tree_view_split_reg_init
};

gnc_tree_view_split_reg_type = g_type_register_static (GNC_TYPE_TREE_VIEW,
"GncTreeViewSplitReg",
&our_info, 0);
}
return gnc_tree_view_split_reg_type;
}

G_DEFINE_TYPE_WITH_PRIVATE(GncTreeViewSplitReg, gnc_tree_view_split_reg, GNC_TYPE_TREE_VIEW)

static void
gnc_tree_view_split_reg_class_init (GncTreeViewSplitRegClass *klass)
Expand All @@ -345,8 +319,6 @@ gnc_tree_view_split_reg_class_init (GncTreeViewSplitRegClass *klass)
o_class->dispose = gnc_tree_view_split_reg_dispose;
o_class->finalize = gnc_tree_view_split_reg_finalize;

g_type_class_add_private (klass, sizeof(GncTreeViewSplitRegPrivate));

gnc_tree_view_split_reg_signals[UPDATE_SIGNAL] =
g_signal_new("update_signal",
G_TYPE_FROM_CLASS (o_class),
Expand Down

0 comments on commit a7e5ac8

Please sign in to comment.