X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog-action-sort.c;h=363ef08b03d48a70f9e80ff0085e593b7b2907ca;hb=df11254fddfd186f3d947c9891ab85eca20739ab;hp=2a80a6e7dc5471ba5830135e6b614de43979cdaf;hpb=24ab436df2f3f115c1cb949dbf0a932cda7667b2;p=pspp diff --git a/src/ui/gui/psppire-dialog-action-sort.c b/src/ui/gui/psppire-dialog-action-sort.c index 2a80a6e7dc..363ef08b03 100644 --- a/src/ui/gui/psppire-dialog-action-sort.c +++ b/src/ui/gui/psppire-dialog-action-sort.c @@ -36,7 +36,8 @@ generate_syntax (PsppireDialogAction *act) gchar *text; GString *string = g_string_new ("SORT CASES BY "); - gint n_vars = psppire_var_view_append_names (scd->variables, 0, string); + PsppireVarView *var_view = PSPPIRE_VAR_VIEW (scd->variables); + gint n_vars = psppire_var_view_append_names (var_view, 0, string); if ( n_vars == 0 ) { @@ -45,7 +46,8 @@ generate_syntax (PsppireDialogAction *act) else { const char up_down = - gtk_toggle_button_get_active (scd->ascending) ? 'A' : 'D'; + (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (scd->ascending)) + ? 'A' : 'D'); g_string_append_printf (string, "(%c)", up_down); g_string_append (string, "."); } @@ -66,14 +68,14 @@ reset (PsppireDialogAction *act) gtk_list_store_clear (GTK_LIST_STORE (liststore)); - gtk_toggle_button_set_active (scd->ascending, TRUE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (scd->ascending), TRUE); } static gboolean -dialog_state_valid (PsppireDialogAction *act) +dialog_state_valid (gpointer act) { PsppireDialogActionSort *scd = PSPPIRE_DIALOG_ACTION_SORT (act); GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (scd->variables)); @@ -107,6 +109,8 @@ psppire_dialog_action_sort_activate (GtkAction *a) if (PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_sort_parent_class)->activate) PSPPIRE_DIALOG_ACTION_CLASS (psppire_dialog_action_sort_parent_class)->activate (pda); + + g_object_unref (xml); } static void