X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-select.c;h=a524de63d933003697664c10b0ad51fbf7935eb4;hb=3dd0f6ae0d5eb73a2270a243e443c4ae03c2c16e;hp=567cd4a294ea755f1e3222e5809ea602ae449016;hpb=3b8ce44977f74e7e8f60912186335892b94d37ef;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-select.c b/src/ui/gui/psppire-dialog-action-select.c index 567cd4a294..a524de63d9 100644 --- a/src/ui/gui/psppire-dialog-action-select.c +++ b/src/ui/gui/psppire-dialog-action-select.c @@ -152,7 +152,7 @@ sample_subdialog (GtkButton *b, gpointer data) g_signal_connect (scd->spin_sample_size, "value-changed", G_CALLBACK (sample_consistent), scd); g_signal_connect (scd->spin_sample_limit, "value-changed", G_CALLBACK (sample_consistent), scd); - + gtk_widget_show (scd->hbox2); gtk_widget_set_sensitive (scd->hbox2, FALSE); @@ -272,10 +272,10 @@ psppire_dialog_action_select_activate (PsppireDialogAction *a) pda->dialog = get_widget_assert (xml, "select-cases-dialog"); pda->source = get_widget_assert (xml, "select-cases-treeview"); - g_object_set (pda->source, + g_object_set (pda->source, "selection-mode", GTK_SELECTION_SINGLE, NULL); - + act->entry = get_widget_assert (xml, "filter-variable-entry"); GtkWidget *selector = get_widget_assert (xml, "psppire-selector-filter"); @@ -360,13 +360,11 @@ psppire_dialog_action_select_activate (PsppireDialogAction *a) psppire_dialog_action_set_valid_predicate (pda, dialog_state_valid); - if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_select_parent_class)->activate) - PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_select_parent_class)->activate (pda); } static char * -generate_syntax_filter (PsppireDialogAction *a) +generate_syntax_filter (const PsppireDialogAction *a) { PsppireDialogActionSelect *scd = PSPPIRE_DIALOG_ACTION_SELECT (a); @@ -428,7 +426,7 @@ generate_syntax_filter (PsppireDialogAction *a) filter, ranvar); ds_put_cstr (&dss, "EXECUTE.\n"); - + ds_put_c_format (&dss, "COMPUTE %s = $CASENUM.\n", @@ -470,7 +468,7 @@ generate_syntax_filter (PsppireDialogAction *a) static gchar * -generate_syntax_delete (PsppireDialogAction *a) +generate_syntax_delete (const PsppireDialogAction *a) { PsppireDialogActionSelect *scd = PSPPIRE_DIALOG_ACTION_SELECT (a); gchar *text = NULL; @@ -488,7 +486,7 @@ generate_syntax_delete (PsppireDialogAction *a) (GTK_TOGGLE_BUTTON (scd->radiobutton_sample))) { ds_put_cstr (&dss, "SAMPLE "); - + if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->percent))) { const double percentage = @@ -501,10 +499,10 @@ generate_syntax_delete (PsppireDialogAction *a) gtk_spin_button_get_value (GTK_SPIN_BUTTON (scd->spin_sample_size)); const gint from_n_cases = gtk_spin_button_get_value (GTK_SPIN_BUTTON (scd->spin_sample_limit)); - + ds_put_c_format (&dss, "%d FROM %d .", n_cases, from_n_cases); } - + } else if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_range))) @@ -537,7 +535,7 @@ generate_syntax_delete (PsppireDialogAction *a) static gchar * -generate_syntax (PsppireDialogAction *a) +generate_syntax (const PsppireDialogAction *a) { PsppireDialogActionSelect *scd = PSPPIRE_DIALOG_ACTION_SELECT (a); @@ -546,7 +544,7 @@ generate_syntax (PsppireDialogAction *a) { return g_strdup ("FILTER OFF.\n"); } - + /* Are we filtering or deleting ? */ if ( gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->radiobutton_delete))) {