summaryrefslogtreecommitdiff
path: root/gtk/gtktreeselection.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2006-05-02 23:56:43 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-05-02 23:56:43 +0000
commitf26aad1916445d25c99878138dfc384de67a2060 (patch)
treeb72263ecb326e82a49f1e8d1871ec4288b8aa299 /gtk/gtktreeselection.c
parent33cddd12d78abb2efe6facba9c859017f8df9819 (diff)
downloadgtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz
Boilerplate reduction
Diffstat (limited to 'gtk/gtktreeselection.c')
-rw-r--r--gtk/gtktreeselection.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/gtk/gtktreeselection.c b/gtk/gtktreeselection.c
index 1ced62de68..2fa67fa138 100644
--- a/gtk/gtktreeselection.c
+++ b/gtk/gtktreeselection.c
@@ -26,9 +26,6 @@
#include "gtkintl.h"
#include "gtkalias.h"
-static void gtk_tree_selection_init (GtkTreeSelection *selection);
-static void gtk_tree_selection_class_init (GtkTreeSelectionClass *class);
-
static void gtk_tree_selection_finalize (GObject *object);
static gint gtk_tree_selection_real_select_all (GtkTreeSelection *selection);
static gint gtk_tree_selection_real_unselect_all (GtkTreeSelection *selection);
@@ -43,36 +40,9 @@ enum
LAST_SIGNAL
};
-static GObjectClass *parent_class = NULL;
static guint tree_selection_signals [LAST_SIGNAL] = { 0 };
-GType
-gtk_tree_selection_get_type (void)
-{
- static GType selection_type = 0;
-
- if (!selection_type)
- {
- static const GTypeInfo selection_info =
- {
- sizeof (GtkTreeSelectionClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) gtk_tree_selection_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GtkTreeSelection),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gtk_tree_selection_init
- };
-
- selection_type =
- g_type_register_static (G_TYPE_OBJECT, I_("GtkTreeSelection"),
- &selection_info, 0);
- }
-
- return selection_type;
-}
+G_DEFINE_TYPE (GtkTreeSelection, gtk_tree_selection, G_TYPE_OBJECT);
static void
gtk_tree_selection_class_init (GtkTreeSelectionClass *class)
@@ -80,7 +50,6 @@ gtk_tree_selection_class_init (GtkTreeSelectionClass *class)
GObjectClass *object_class;
object_class = (GObjectClass*) class;
- parent_class = g_type_class_peek_parent (class);
object_class->finalize = gtk_tree_selection_finalize;
class->changed = NULL;
@@ -115,7 +84,7 @@ gtk_tree_selection_finalize (GObject *object)
}
/* chain parent_class' handler */
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (gtk_tree_selection_parent_class)->finalize (object);
}
/**