X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fcorrelation-dialog.c;h=2e715039a9979783ea44426dcfe62b0dddc59d7e;hb=aafb6add9344c71c4fed343e52e9a67aa6efdf91;hp=3561170d74c83d5c62454a8dd17d39513ce56d41;hpb=64a18d9cb2657b541ebf39c9a064edc92101f2f3;p=pspp diff --git a/src/ui/gui/correlation-dialog.c b/src/ui/gui/correlation-dialog.c index 3561170d74..2e715039a9 100644 --- a/src/ui/gui/correlation-dialog.c +++ b/src/ui/gui/correlation-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2009 Free Software Foundation + Copyright (C) 2009, 2010, 2011 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,6 @@ #include #include "dialog-common.h" -#include #include #include @@ -74,7 +73,7 @@ dialog_state_valid (gpointer data) GtkTreeModel *liststore = gtk_tree_view_get_model (GTK_TREE_VIEW (corr->variables)); - if (gtk_tree_model_iter_n_children (liststore, NULL) >= 1) + if (gtk_tree_model_iter_n_children (liststore, NULL) > 1) return TRUE; return FALSE; @@ -118,22 +117,10 @@ correlation_dialog (PsppireDataWindow *de) switch (response) { case GTK_RESPONSE_OK: - { - gchar *syntax = generate_syntax (&rd); - - struct getl_interface *sss = create_syntax_string_source (syntax); - execute_syntax (sss); - - g_free (syntax); - } + g_free (execute_syntax_string (de, generate_syntax (&rd))); break; case PSPPIRE_RESPONSE_PASTE: - { - gchar *syntax = generate_syntax (&rd); - paste_syntax_in_new_window (syntax); - - g_free (syntax); - } + g_free (paste_syntax_to_window (generate_syntax (&rd))); break; default: break;