From: John Darrington Date: Fri, 6 Mar 2009 12:37:49 +0000 (+0900) Subject: Remove some unnecessary casts X-Git-Tag: v0.7.3~250 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b2a87ad88df1fcbf19efaff1476b48711278917;p=pspp-builds.git Remove some unnecessary casts --- diff --git a/src/ui/gui/checkbox-treeview.c b/src/ui/gui/checkbox-treeview.c index cf639e28..837fcc78 100644 --- a/src/ui/gui/checkbox-treeview.c +++ b/src/ui/gui/checkbox-treeview.c @@ -85,9 +85,7 @@ treeview_checkbox_populate (GtkTreeView *treeview) gtk_tree_view_column_add_attribute (col, renderer, "active", CHECKBOX_COLUMN_SELECTED); - g_signal_connect (GTK_CELL_RENDERER_TOGGLE (renderer), - "toggled", G_CALLBACK (toggle), treeview); - + g_signal_connect (renderer, "toggled", G_CALLBACK (toggle), treeview); /* Label column. */ col = gtk_tree_view_column_new (); diff --git a/src/ui/gui/helper.c b/src/ui/gui/helper.c index a65764f4..6294e886 100644 --- a/src/ui/gui/helper.c +++ b/src/ui/gui/helper.c @@ -201,7 +201,7 @@ connect_help (GtkBuilder *xml) if ( 0 == strcmp ("help_button", s)) { - g_signal_connect (GTK_WIDGET (o), "clicked", give_help, 0); + g_signal_connect (o, "clicked", give_help, 0); } } } diff --git a/src/ui/gui/missing-val-dialog.c b/src/ui/gui/missing-val-dialog.c index 52e7a037..c80362da 100644 --- a/src/ui/gui/missing-val-dialog.c +++ b/src/ui/gui/missing-val-dialog.c @@ -259,10 +259,10 @@ missing_val_dialog_create (GtkBuilder *xml) GTK_TOGGLE_BUTTON (get_widget_assert (xml, "range_missing")); - g_signal_connect (G_OBJECT (dialog->button_discrete), "toggled", + g_signal_connect (dialog->button_discrete, "toggled", G_CALLBACK (discrete), dialog); - g_signal_connect (G_OBJECT (dialog->button_range), "toggled", + g_signal_connect (dialog->button_range, "toggled", G_CALLBACK (range), dialog); return dialog; diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 16db8131..7565dbb4 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -800,15 +800,15 @@ create_data_sheet_variable_popup_menu (PsppireDataWindow *de) gtk_menu_shell_append (GTK_MENU_SHELL (menu), sort_ascending); - g_signal_connect_swapped (G_OBJECT (sort_ascending), "activate", + g_signal_connect_swapped (sort_ascending, "activate", G_CALLBACK (psppire_data_editor_sort_ascending), de->data_editor); - g_signal_connect_swapped (G_OBJECT (sort_descending), "activate", + g_signal_connect_swapped (sort_descending, "activate", G_CALLBACK (psppire_data_editor_sort_descending), de->data_editor); - g_signal_connect_swapped (G_OBJECT (insert_variable), "activate", + g_signal_connect_swapped (insert_variable, "activate", G_CALLBACK (gtk_action_activate), de->insert_variable); @@ -839,7 +839,7 @@ create_data_sheet_cases_popup_menu (PsppireDataWindow *de) gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_case); - g_signal_connect_swapped (G_OBJECT (insert_case), "activate", + g_signal_connect_swapped (insert_case, "activate", G_CALLBACK (gtk_action_activate), de->insert_case); @@ -875,7 +875,7 @@ create_var_sheet_variable_popup_menu (PsppireDataWindow *de) gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_variable); - g_signal_connect_swapped (G_OBJECT (insert_variable), "activate", + g_signal_connect_swapped (insert_variable, "activate", G_CALLBACK (gtk_action_activate), de->insert_variable); @@ -1679,7 +1679,7 @@ psppire_data_window_init (PsppireDataWindow *de) de); - g_signal_connect (GTK_NOTEBOOK (de->data_editor), + g_signal_connect (de->data_editor, "switch-page", G_CALLBACK (on_switch_sheet), de); diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index e02e8108..cfcce14c 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -330,7 +330,7 @@ var_sheet_change_active_cell (PsppireVarSheet *vs, gtk_combo_box_entry_set_text_column (cbe, 0); - g_signal_connect (G_OBJECT (cbe),"changed", + g_signal_connect (cbe, "changed", G_CALLBACK (change_alignment), var); } break; @@ -348,7 +348,7 @@ var_sheet_change_active_cell (PsppireVarSheet *vs, gtk_combo_box_entry_set_text_column (cbe, 0); - g_signal_connect (G_OBJECT (cbe),"changed", + g_signal_connect (cbe, "changed", G_CALLBACK (change_measure), var); } break; diff --git a/src/ui/gui/select-cases-dialog.c b/src/ui/gui/select-cases-dialog.c index d953308a..e4d599ed 100644 --- a/src/ui/gui/select-cases-dialog.c +++ b/src/ui/gui/select-cases-dialog.c @@ -109,7 +109,7 @@ sample_subdialog (GtkButton *b, gpointer data) gtk_table_attach_defaults (GTK_TABLE (table), scd->hbox1, 1, 2, 0, 1); - g_signal_connect (G_OBJECT (percent), "toggled", + g_signal_connect (percent, "toggled", G_CALLBACK (set_sensitivity_from_toggle), scd->hbox1); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (percent), TRUE); @@ -133,7 +133,7 @@ sample_subdialog (GtkButton *b, gpointer data) gtk_table_attach_defaults (GTK_TABLE (table), scd->hbox2, 1, 2, 1, 2); - g_signal_connect (G_OBJECT (sample_n_cases), "toggled", + g_signal_connect (sample_n_cases, "toggled", G_CALLBACK (set_sensitivity_from_toggle), scd->hbox2); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sample_n_cases), FALSE); diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index 44b6603d..2cecd548 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -1041,11 +1041,11 @@ init_separators_page (struct import_assistant *ia) set_separators (ia); set_quote_list (GTK_COMBO_BOX_ENTRY (p->quote_combo)); p->fields_tree_view = GTK_TREE_VIEW (get_widget_assert (builder, "fields")); - g_signal_connect (GTK_COMBO_BOX (p->quote_combo), "changed", + g_signal_connect (p->quote_combo, "changed", G_CALLBACK (on_quote_combo_change), ia); g_signal_connect (p->quote_cb, "toggled", G_CALLBACK (on_quote_cb_toggle), ia); - g_signal_connect (GTK_ENTRY (p->custom_entry), "notify::text", + g_signal_connect (p->custom_entry, "notify::text", G_CALLBACK (on_separators_custom_entry_notify), ia); g_signal_connect (p->custom_cb, "toggled", G_CALLBACK (on_separators_custom_cb_toggle), ia);