Move plugin init code
[gnumeric.git] / src / widgets / gnm-radiobutton.c
blob5ecd67da247dd682d6a646a5fe876c2a73c53abd
1 /*
2 * gnm-radiobutton.c: Implements a special radiobutton
4 * Copyright (c) 2009 Morten Welinder <terra@gnome.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
18 **/
20 #include <gnumeric-config.h>
21 #include <widgets/gnm-radiobutton.h>
22 #include <gsf/gsf-impl-utils.h>
24 typedef GtkRadioButtonClass GnmRadioButtonClass;
26 static void
27 gnm_radiobutton_class_init (GnmRadioButtonClass *class)
29 GtkButtonClass *button_class = GTK_BUTTON_CLASS (class);
31 if (gdk_screen_get_default ()) {
32 GtkWidget *tb = gtk_toggle_button_new ();
34 button_class->clicked = GTK_BUTTON_GET_CLASS(tb)->clicked;
36 g_object_ref_sink (tb);
37 gtk_widget_destroy (tb);
38 g_object_unref (tb);
39 } else {
40 // Introspection
44 GSF_CLASS (GnmRadioButton, gnm_radiobutton,
45 gnm_radiobutton_class_init, NULL, GTK_TYPE_RADIO_BUTTON)