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/gtkhseparator.c | |
parent | 33cddd12d78abb2efe6facba9c859017f8df9819 (diff) | |
download | gtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz |
Boilerplate reduction
Diffstat (limited to 'gtk/gtkhseparator.c')
-rw-r--r-- | gtk/gtkhseparator.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/gtk/gtkhseparator.c b/gtk/gtkhseparator.c index cc6c4f8a1b..2b0f216d01 100644 --- a/gtk/gtkhseparator.c +++ b/gtk/gtkhseparator.c @@ -30,41 +30,12 @@ #include "gtkalias.h" -static void gtk_hseparator_class_init (GtkHSeparatorClass *klass); -static void gtk_hseparator_init (GtkHSeparator *hseparator); static void gtk_hseparator_size_request (GtkWidget *widget, GtkRequisition *requisition); static gint gtk_hseparator_expose (GtkWidget *widget, GdkEventExpose *event); - -GType -gtk_hseparator_get_type (void) -{ - static GType hseparator_type = 0; - - if (!hseparator_type) - { - static const GTypeInfo hseparator_info = - { - sizeof (GtkHSeparatorClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_hseparator_class_init, - NULL, /* class_finalize */ - NULL, /* class_init */ - sizeof (GtkHSeparator), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_hseparator_init, - }; - - hseparator_type = - g_type_register_static (GTK_TYPE_SEPARATOR, I_("GtkHSeparator"), - &hseparator_info, 0); - } - - return hseparator_type; -} +G_DEFINE_TYPE (GtkHSeparator, gtk_hseparator, GTK_TYPE_SEPARATOR); static void gtk_hseparator_class_init (GtkHSeparatorClass *class) |