From f26aad1916445d25c99878138dfc384de67a2060 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 2 May 2006 23:56:43 +0000 Subject: Boilerplate reduction --- gtk/gtkhscrollbar.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'gtk/gtkhscrollbar.c') 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) -- cgit v1.2.1