projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added tooltip for statistics in dialogs
[pspp]
/
src
/
ui
/
gui
/
psppire.c
diff --git
a/src/ui/gui/psppire.c
b/src/ui/gui/psppire.c
index af61eeefc188f70cb79507a55e3972fd9cbdb371..9181d7e571b963575c2aea5ec00e4a6bf9beb2a6 100644
(file)
--- a/
src/ui/gui/psppire.c
+++ b/
src/ui/gui/psppire.c
@@
-17,7
+17,6
@@
#include <config.h>
#include <config.h>
-#include <assert.h>
#include <gsl/gsl_errno.h>
#include <gtk/gtk.h>
#include <libintl.h>
#include <gsl/gsl_errno.h>
#include <gtk/gtk.h>
#include <libintl.h>
@@
-39,6
+38,7
@@
#include "output/driver.h"
#include "output/journal.h"
#include "output/message-item.h"
#include "output/driver.h"
#include "output/journal.h"
#include "output/message-item.h"
+#include "output/spv/spv.h"
#include "ui/gui/dict-display.h"
#include "ui/gui/executor.h"
#include "ui/gui/dict-display.h"
#include "ui/gui/executor.h"
@@
-105,7
+105,7
@@
initialize (const struct init_source *is)
bind_textdomain_codeset (PACKAGE, "UTF-8");
break;
case 8:
bind_textdomain_codeset (PACKAGE, "UTF-8");
break;
case 8:
- if (
! gtk_parse_args (is->argc, is->argv)
)
+ if (
! gtk_parse_args (is->argc, is->argv)
)
{
perror ("Error parsing arguments");
exit (1);
{
perror ("Error parsing arguments");
exit (1);
@@
-160,8
+160,11
@@
handle_msg (const struct msg *m_, void *lexer_)
m.first_column = lex_get_first_column (lexer, 0);
m.last_column = lex_get_last_column (lexer, 0);
}
m.first_column = lex_get_first_column (lexer, 0);
m.last_column = lex_get_last_column (lexer, 0);
}
+ m.command_name = output_get_command_name ();
message_item_submit (message_item_create (&m));
message_item_submit (message_item_create (&m));
+
+ free (m.command_name);
}
void
}
void
@@
-172,7
+175,7
@@
psppire_set_lexer (struct lexer *lexer)
GtkWindow *
GtkWindow *
-psppire_preload_file (const gchar *file)
+psppire_preload_file (const gchar *file
, GtkWindow *victim
)
{
const gchar *local_encoding = "UTF-8";
{
const gchar *local_encoding = "UTF-8";
@@
-188,11
+191,18
@@
psppire_preload_file (const gchar *file)
/* Check to see if the file is a .sav or a .por file. If not
assume that it is a syntax file */
if (retval == 1)
/* Check to see if the file is a .sav or a .por file. If not
assume that it is a syntax file */
if (retval == 1)
- w = open_data_window (
NULL
, filename, NULL, NULL);
+ w = open_data_window (
PSPPIRE_WINDOW (victim)
, filename, NULL, NULL);
else if (retval == 0)
{
else if (retval == 0)
{
- create_data_window ();
- w = open_syntax_window (filename, NULL);
+ char *error = spv_detect (filename);
+ if (!error)
+ read_spv_file (filename);
+ else
+ {
+ free (error);
+ create_data_window ();
+ open_syntax_window (filename, NULL);
+ }
}
fh_unref (fh);
}
fh_unref (fh);