diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2006-05-02 23:56:43 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-05-02 23:56:43 +0000 |
commit | f26aad1916445d25c99878138dfc384de67a2060 (patch) | |
tree | b72263ecb326e82a49f1e8d1871ec4288b8aa299 /gtk/gtkhpaned.c | |
parent | 33cddd12d78abb2efe6facba9c859017f8df9819 (diff) | |
download | gtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz |
Boilerplate reduction
Diffstat (limited to 'gtk/gtkhpaned.c')
-rw-r--r-- | gtk/gtkhpaned.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c index 34eb3c0711..103a70aadd 100644 --- a/gtk/gtkhpaned.c +++ b/gtk/gtkhpaned.c @@ -29,49 +29,18 @@ #include "gtkintl.h" #include "gtkalias.h" -static void gtk_hpaned_class_init (GtkHPanedClass *klass); -static void gtk_hpaned_init (GtkHPaned *hpaned); static void gtk_hpaned_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_hpaned_size_allocate (GtkWidget *widget, GtkAllocation *allocation); -static gpointer parent_class; - -GType -gtk_hpaned_get_type (void) -{ - static GType hpaned_type = 0; - - if (!hpaned_type) - { - static const GTypeInfo hpaned_info = - { - sizeof (GtkHPanedClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_hpaned_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkHPaned), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_hpaned_init, - }; - - hpaned_type = g_type_register_static (GTK_TYPE_PANED, I_("GtkHPaned"), - &hpaned_info, 0); - } - - return hpaned_type; -} +G_DEFINE_TYPE (GtkHPaned, gtk_hpaned, GTK_TYPE_PANED); static void gtk_hpaned_class_init (GtkHPanedClass *class) { GtkWidgetClass *widget_class; - parent_class = g_type_class_peek_parent (class); - widget_class = (GtkWidgetClass *) class; widget_class->size_request = gtk_hpaned_size_request; |