Remove some unnecessary casts
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 6 Mar 2009 12:37:49 +0000 (21:37 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 6 Mar 2009 12:37:49 +0000 (21:37 +0900)
src/ui/gui/checkbox-treeview.c
src/ui/gui/helper.c
src/ui/gui/missing-val-dialog.c
src/ui/gui/psppire-data-window.c
src/ui/gui/psppire-var-sheet.c
src/ui/gui/select-cases-dialog.c
src/ui/gui/text-data-import-dialog.c

index cf639e285b84950cfa6d3ba0611b0129429f2bd1..837fcc789550e13b0463dc28987ca5c34c967985 100644 (file)
@@ -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 ();
index a65764f4487d239c8b3bb76694be16a4e3795ab9..6294e886f694983fb506572e03a2f422008ae402 100644 (file)
@@ -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);
            }
        }
     }
index 52e7a037c22a83b259645c01c1fe96719fea2bed..c80362da6bc3cefae99f6ae2297e85b83d076f41 100644 (file)
@@ -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;
index 16db8131a16c4970efa7380cda16c1de2b557181..7565dbb4b7ca223c434e6527701a762b5c14af7c 100644 (file)
@@ -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);
 
index e02e81087b72385d0aaecc4eb1871adac70c4553..cfcce14c2a2fc52675c66d738d91c18437458fe1 100644 (file)
@@ -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;
index d953308a09fbe8b27c92c84ff54c045e8eac4e27..e4d599edc8124480e2b51afb45ef1a25e44e7ca4 100644 (file)
@@ -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);
index 44b6603d06fab78bc095bfdababf9c5453616dee..2cecd548756879c8c45cbf4963439a893626cd3d 100644 (file)
@@ -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);