diff options
author | Christian Persch <chpe@gnome.org> | 2010-04-27 13:31:23 +0200 |
---|---|---|
committer | Christian Persch <chpe@gnome.org> | 2010-08-18 15:34:47 +0200 |
commit | ffa07ee21eac827d79e58fa565b2faf3ba662c46 (patch) | |
tree | 7244904942279a792e3ee199d6ee6559897711bb /gtk/gtktreemodel.c | |
parent | f730af8360b8785317f5ff5ad75961928c155157 (diff) | |
download | gtk+-ffa07ee21eac827d79e58fa565b2faf3ba662c46.tar.gz |
Use G_DEFINE_BOXED_TYPE
Bug #627214.
Diffstat (limited to 'gtk/gtktreemodel.c')
-rw-r--r-- | gtk/gtktreemodel.c | 46 |
1 files changed, 9 insertions, 37 deletions
diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index 8782c631a3..15b978f363 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -684,18 +684,9 @@ gtk_tree_path_copy (const GtkTreePath *path) return retval; } -GType -gtk_tree_path_get_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static (I_("GtkTreePath"), - (GBoxedCopyFunc) gtk_tree_path_copy, - (GBoxedFreeFunc) gtk_tree_path_free); - - return our_type; -} +G_DEFINE_BOXED_TYPE (GtkTreePath, gtk_tree_path, + gtk_tree_path_copy, + gtk_tree_path_free) /** * gtk_tree_path_compare: @@ -913,18 +904,9 @@ gtk_tree_iter_free (GtkTreeIter *iter) g_slice_free (GtkTreeIter, iter); } -GType -gtk_tree_iter_get_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static (I_("GtkTreeIter"), - (GBoxedCopyFunc) gtk_tree_iter_copy, - (GBoxedFreeFunc) gtk_tree_iter_free); - - return our_type; -} +G_DEFINE_BOXED_TYPE (GtkTreeIter, gtk_tree_iter, + gtk_tree_iter_copy, + gtk_tree_iter_free) /** * gtk_tree_model_get_flags: @@ -1666,19 +1648,9 @@ static void gtk_tree_row_reference_unref_path (GtkTreePath *path, gint depth); -GType -gtk_tree_row_reference_get_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static (I_("GtkTreeRowReference"), - (GBoxedCopyFunc) gtk_tree_row_reference_copy, - (GBoxedFreeFunc) gtk_tree_row_reference_free); - - return our_type; -} - +G_DEFINE_BOXED_TYPE (GtkTreeRowReference, gtk_tree_row_reference, + gtk_tree_row_reference_copy, + gtk_tree_row_reference_free) struct _GtkTreeRowReference { |