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/gtktoggletoolbutton.c | |
parent | 33cddd12d78abb2efe6facba9c859017f8df9819 (diff) | |
download | gtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz |
Boilerplate reduction
Diffstat (limited to 'gtk/gtktoggletoolbutton.c')
-rw-r--r-- | gtk/gtktoggletoolbutton.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/gtk/gtktoggletoolbutton.c b/gtk/gtktoggletoolbutton.c index 1144ba2430..4d956e3562 100644 --- a/gtk/gtktoggletoolbutton.c +++ b/gtk/gtktoggletoolbutton.c @@ -50,8 +50,6 @@ struct _GtkToggleToolButtonPrivate guint active : 1; }; -static void gtk_toggle_tool_button_init (GtkToggleToolButton *button); -static void gtk_toggle_tool_button_class_init (GtkToggleToolButtonClass *klass); static void gtk_toggle_tool_button_set_property (GObject *object, guint prop_id, @@ -69,35 +67,9 @@ static void button_toggled (GtkWidget *widget, static void menu_item_activated (GtkWidget *widget, GtkToggleToolButton *button); -static GObjectClass *parent_class = NULL; static guint toggle_signals[LAST_SIGNAL] = { 0 }; -GType -gtk_toggle_tool_button_get_type (void) -{ - static GType type = 0; - - if (!type) - { - static const GTypeInfo type_info = - { - sizeof (GtkToggleToolButtonClass), - (GBaseInitFunc) 0, - (GBaseFinalizeFunc) 0, - (GClassInitFunc) gtk_toggle_tool_button_class_init, - (GClassFinalizeFunc) 0, - NULL, - sizeof (GtkToggleToolButton), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_toggle_tool_button_init - }; - - type = g_type_register_static (GTK_TYPE_TOOL_BUTTON, - I_("GtkToggleToolButton"), &type_info, 0); - } - return type; -} - +G_DEFINE_TYPE (GtkToggleToolButton, gtk_toggle_tool_button, GTK_TYPE_TOOL_BUTTON); static void gtk_toggle_tool_button_class_init (GtkToggleToolButtonClass *klass) @@ -106,8 +78,6 @@ gtk_toggle_tool_button_class_init (GtkToggleToolButtonClass *klass) GtkToolItemClass *toolitem_class; GtkToolButtonClass *toolbutton_class; - parent_class = g_type_class_peek_parent (klass); - object_class = (GObjectClass *)klass; toolitem_class = (GtkToolItemClass *)klass; toolbutton_class = (GtkToolButtonClass *)klass; |