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/gtkhbox.c | |
parent | 33cddd12d78abb2efe6facba9c859017f8df9819 (diff) | |
download | gtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz |
Boilerplate reduction
Diffstat (limited to 'gtk/gtkhbox.c')
-rw-r--r-- | gtk/gtkhbox.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/gtk/gtkhbox.c b/gtk/gtkhbox.c index 4c610bee2a..9b0a5e88fe 100644 --- a/gtk/gtkhbox.c +++ b/gtk/gtkhbox.c @@ -30,40 +30,13 @@ #include "gtkalias.h" -static void gtk_hbox_class_init (GtkHBoxClass *klass); -static void gtk_hbox_init (GtkHBox *box); static void gtk_hbox_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_hbox_size_allocate (GtkWidget *widget, GtkAllocation *allocation); -GType -gtk_hbox_get_type (void) -{ - static GType hbox_type = 0; - - if (!hbox_type) - { - static const GTypeInfo hbox_info = - { - sizeof (GtkHBoxClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_hbox_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkHBox), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_hbox_init, - }; - - hbox_type = g_type_register_static (GTK_TYPE_BOX, I_("GtkHBox"), - &hbox_info, 0); - } - - return hbox_type; -} +G_DEFINE_TYPE (GtkHBox, gtk_hbox, GTK_TYPE_BOX); static void gtk_hbox_class_init (GtkHBoxClass *class) |