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/gtkhscrollbar.c | |
parent | 33cddd12d78abb2efe6facba9c859017f8df9819 (diff) | |
download | gtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz |
Boilerplate reduction
Diffstat (limited to 'gtk/gtkhscrollbar.c')
-rw-r--r-- | gtk/gtkhscrollbar.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/gtk/gtkhscrollbar.c b/gtk/gtkhscrollbar.c index d67f8ad3c6..60c273f86c 100644 --- a/gtk/gtkhscrollbar.c +++ b/gtk/gtkhscrollbar.c @@ -31,36 +31,7 @@ #include "gtkintl.h" #include "gtkalias.h" -static void gtk_hscrollbar_class_init (GtkHScrollbarClass *klass); -static void gtk_hscrollbar_init (GtkHScrollbar *hscrollbar); - -GType -gtk_hscrollbar_get_type (void) -{ - static GType hscrollbar_type = 0; - - if (!hscrollbar_type) - { - static const GTypeInfo hscrollbar_info = - { - sizeof (GtkHScrollbarClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_hscrollbar_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkHScrollbar), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_hscrollbar_init, - }; - - hscrollbar_type = - g_type_register_static (GTK_TYPE_SCROLLBAR, I_("GtkHScrollbar"), - &hscrollbar_info, 0); - } - - return hscrollbar_type; -} +G_DEFINE_TYPE (GtkHScrollbar, gtk_hscrollbar, GTK_TYPE_SCROLLBAR); static void gtk_hscrollbar_class_init (GtkHScrollbarClass *class) |