diff options
Diffstat (limited to 'gtk/gtkhpaned.c')
-rw-r--r-- | gtk/gtkhpaned.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c index 34eb3c0711..103a70aadd 100644 --- a/gtk/gtkhpaned.c +++ b/gtk/gtkhpaned.c @@ -29,49 +29,18 @@ #include "gtkintl.h" #include "gtkalias.h" -static void gtk_hpaned_class_init (GtkHPanedClass *klass); -static void gtk_hpaned_init (GtkHPaned *hpaned); static void gtk_hpaned_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_hpaned_size_allocate (GtkWidget *widget, GtkAllocation *allocation); -static gpointer parent_class; - -GType -gtk_hpaned_get_type (void) -{ - static GType hpaned_type = 0; - - if (!hpaned_type) - { - static const GTypeInfo hpaned_info = - { - sizeof (GtkHPanedClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_hpaned_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkHPaned), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_hpaned_init, - }; - - hpaned_type = g_type_register_static (GTK_TYPE_PANED, I_("GtkHPaned"), - &hpaned_info, 0); - } - - return hpaned_type; -} +G_DEFINE_TYPE (GtkHPaned, gtk_hpaned, GTK_TYPE_PANED); static void gtk_hpaned_class_init (GtkHPanedClass *class) { GtkWidgetClass *widget_class; - parent_class = g_type_class_peek_parent (class); - widget_class = (GtkWidgetClass *) class; widget_class->size_request = gtk_hpaned_size_request; |