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/gtkhbbox.c | |
parent | 33cddd12d78abb2efe6facba9c859017f8df9819 (diff) | |
download | gtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz |
Boilerplate reduction
Diffstat (limited to 'gtk/gtkhbbox.c')
-rw-r--r-- | gtk/gtkhbbox.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/gtk/gtkhbbox.c b/gtk/gtkhbbox.c index 9fdf66516b..8f90ea3d2e 100644 --- a/gtk/gtkhbbox.c +++ b/gtk/gtkhbbox.c @@ -30,8 +30,6 @@ #include "gtkalias.h" -static void gtk_hbutton_box_class_init (GtkHButtonBoxClass *klass); -static void gtk_hbutton_box_init (GtkHButtonBox *box); static void gtk_hbutton_box_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_hbutton_box_size_allocate (GtkWidget *widget, @@ -40,33 +38,7 @@ static void gtk_hbutton_box_size_allocate (GtkWidget *widget, static gint default_spacing = 30; static gint default_layout_style = GTK_BUTTONBOX_EDGE; -GType -gtk_hbutton_box_get_type (void) -{ - static GType hbutton_box_type = 0; - - if (!hbutton_box_type) - { - static const GTypeInfo hbutton_box_info = - { - sizeof (GtkHButtonBoxClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_hbutton_box_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkHButtonBox), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_hbutton_box_init, - }; - - hbutton_box_type = - g_type_register_static (GTK_TYPE_BUTTON_BOX, I_("GtkHButtonBox"), - &hbutton_box_info, 0); - } - - return hbutton_box_type; -} +G_DEFINE_TYPE (GtkHButtonBox, gtk_hbutton_box, GTK_TYPE_BUTTON_BOX); static void gtk_hbutton_box_class_init (GtkHButtonBoxClass *class) @@ -82,7 +54,7 @@ gtk_hbutton_box_class_init (GtkHButtonBoxClass *class) static void gtk_hbutton_box_init (GtkHButtonBox *hbutton_box) { - /* button_box_init has done everything allready */ + /* button_box_init has done everything already */ } GtkWidget* |