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/gtkradioaction.c | |
parent | 33cddd12d78abb2efe6facba9c859017f8df9819 (diff) | |
download | gtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz |
Boilerplate reduction
Diffstat (limited to 'gtk/gtkradioaction.c')
-rw-r--r-- | gtk/gtkradioaction.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/gtk/gtkradioaction.c b/gtk/gtkradioaction.c index 8d243f163c..ab3cadf7fb 100644 --- a/gtk/gtkradioaction.c +++ b/gtk/gtkradioaction.c @@ -60,8 +60,6 @@ enum PROP_CURRENT_VALUE }; -static void gtk_radio_action_init (GtkRadioAction *action); -static void gtk_radio_action_class_init (GtkRadioActionClass *class); static void gtk_radio_action_finalize (GObject *object); static void gtk_radio_action_set_property (GObject *object, guint prop_id, @@ -75,35 +73,8 @@ static void gtk_radio_action_activate (GtkAction *action); static GtkWidget *create_menu_item (GtkAction *action); -GType -gtk_radio_action_get_type (void) -{ - static GtkType type = 0; - - if (!type) - { - static const GTypeInfo type_info = - { - sizeof (GtkRadioActionClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) gtk_radio_action_class_init, - (GClassFinalizeFunc) NULL, - NULL, - - sizeof (GtkRadioAction), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_radio_action_init, - }; - - type = g_type_register_static (GTK_TYPE_TOGGLE_ACTION, - I_("GtkRadioAction"), - &type_info, 0); - } - return type; -} +G_DEFINE_TYPE (GtkRadioAction, gtk_radio_action, GTK_TYPE_TOGGLE_ACTION); -static GObjectClass *parent_class = NULL; static guint radio_action_signals[LAST_SIGNAL] = { 0 }; static void @@ -112,7 +83,6 @@ gtk_radio_action_class_init (GtkRadioActionClass *klass) GObjectClass *gobject_class; GtkActionClass *action_class; - parent_class = g_type_class_peek_parent (klass); gobject_class = G_OBJECT_CLASS (klass); action_class = GTK_ACTION_CLASS (klass); @@ -265,7 +235,7 @@ gtk_radio_action_finalize (GObject *object) tmp_action->private_data->group = action->private_data->group; } - (* parent_class->finalize) (object); + G_OBJECT_CLASS (gtk_radio_action_parent_class)->finalize (object); } static void |