X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-selector.c;h=165d1faadcbd231d0c31ffae9ed5704291d5a08d;hb=ceaed4a17cb3b0a14c89f10b72a636f94af97e7a;hp=fbc88f1aa8f41fc21f064c809da5d0ffe20d4ecc;hpb=98d158505dc201eea0df60c5d9703107aa4a6a29;p=pspp diff --git a/src/ui/gui/psppire-selector.c b/src/ui/gui/psppire-selector.c index fbc88f1aa8..165d1faadc 100644 --- a/src/ui/gui/psppire-selector.c +++ b/src/ui/gui/psppire-selector.c @@ -67,9 +67,7 @@ #include "psppire-selector.h" -static void psppire_selector_class_init (PsppireSelectorClass *class); -static void psppire_selector_init (PsppireSelector *selector); - +G_DEFINE_TYPE (PsppireSelector, psppire_selector, GTK_TYPE_BUTTON) static void set_direction (PsppireSelector *, enum psppire_selector_dir); @@ -100,39 +98,8 @@ on_row_inserted (PsppireSelector *selector) g_signal_emit (selector, signals [DE_SELECTED], 0); } - -GType -psppire_selector_get_type (void) -{ - static GType psppire_selector_type = 0; - - if (!psppire_selector_type) - { - static const GTypeInfo psppire_selector_info = - { - sizeof (PsppireSelectorClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc)psppire_selector_class_init, - (GClassFinalizeFunc) NULL, - NULL, - sizeof (PsppireSelector), - 0, - (GInstanceInitFunc) psppire_selector_init, - }; - - psppire_selector_type = - g_type_register_static (GTK_TYPE_BUTTON, "PsppireSelector", - &psppire_selector_info, 0); - } - - return psppire_selector_type; -} - static GObjectClass * parent_class = NULL; - - static void dump_hash_entry (gpointer key, gpointer value, gpointer obj) { @@ -607,7 +574,7 @@ de_select_tree_model (GtkTreeSelection *selection, GtkTreeModel *model) } /* Delete list of RowRefs and its contents */ - g_list_foreach (selected_rows, (GFunc) gtk_tree_row_reference_free, NULL); + g_list_foreach (selected_rows, (GFunc) (void (*)(void)) gtk_tree_row_reference_free, NULL); g_list_free (selected_rows); } @@ -694,7 +661,7 @@ select_selection (PsppireSelector *selector) ); } - g_list_foreach (selected_rows, (GFunc) gtk_tree_path_free, NULL); + g_list_foreach (selected_rows, (GFunc) (void (*)(void)) gtk_tree_path_free, NULL); g_list_free (selected_rows); refilter (selector);