projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FLIP: Convert tests to use Autotest.
[pspp]
/
src
/
ui
/
gui
/
split-file-dialog.c
diff --git
a/src/ui/gui/split-file-dialog.c
b/src/ui/gui/split-file-dialog.c
index 00f30c627080d53f96848d96c1c7ba4aca128ea7..9088046ec29b805c3bfca90158ed5302d747cc4a 100644
(file)
--- a/
src/ui/gui/split-file-dialog.c
+++ b/
src/ui/gui/split-file-dialog.c
@@
-19,13
+19,15
@@
#include "split-file-dialog.h"
#include "psppire-selector.h"
#include "psppire-dialog.h"
#include "split-file-dialog.h"
#include "psppire-selector.h"
#include "psppire-dialog.h"
-#include "
helpe
r.h"
-#include "
data-editor
.h"
+#include "
executo
r.h"
+#include "
psppire-data-window
.h"
#include "dict-display.h"
#include <language/syntax-string-source.h>
#include "dict-display.h"
#include <language/syntax-string-source.h>
-#include "
syntax-edito
r.h"
+#include "
helpe
r.h"
#include <data/dictionary.h>
#include <data/dictionary.h>
+#include "psppire-var-view.h"
+
#include <gtk/gtk.h>
#include <gtk/gtk.h>
@@
-68,8
+70,7
@@
generate_syntax (const struct split_file_dialog *sfd)
GString * varlist = g_string_sized_new (80);
GtkWidget *sort = get_widget_assert (sfd->xml, "split-radiobutton3");
GtkWidget *layered = get_widget_assert (sfd->xml, "split-radiobutton1");
GString * varlist = g_string_sized_new (80);
GtkWidget *sort = get_widget_assert (sfd->xml, "split-radiobutton3");
GtkWidget *layered = get_widget_assert (sfd->xml, "split-radiobutton1");
- gint n_vars = append_variable_names (varlist,
- sfd->dict, GTK_TREE_VIEW (vars), 0);
+ gint n_vars = psppire_var_view_append_names (PSPPIRE_VAR_VIEW (vars), 0, varlist);
if ( n_vars > 0 )
{
if ( n_vars > 0 )
{
@@
-163,10
+164,9
@@
refresh (PsppireDialog *dialog, struct split_file_dialog *d)
/* Pops up the Split File dialog box */
void
/* Pops up the Split File dialog box */
void
-split_file_dialog (
GObject *o, gpointer data
)
+split_file_dialog (
PsppireDataWindow *de
)
{
gint response;
{
gint response;
- struct data_editor *de = data;
struct split_file_dialog sfd;
PsppireVarStore *vs ;
struct split_file_dialog sfd;
PsppireVarStore *vs ;
@@
-186,31
+186,18
@@
split_file_dialog (GObject *o, gpointer data)
g_object_get (de->data_editor, "var-store", &vs, NULL);
g_object_get (de->data_editor, "var-store", &vs, NULL);
-
sfd.dict = vs->dict
;
+
g_object_get (vs, "dictionary", &sfd.dict, NULL)
;
sfd.tv = GTK_TREE_VIEW (dest);
sfd.selector = PSPPIRE_SELECTOR (
get_widget_assert (sfd.xml, "split-file-selector"));
sfd.tv = GTK_TREE_VIEW (dest);
sfd.selector = PSPPIRE_SELECTOR (
get_widget_assert (sfd.xml, "split-file-selector"));
- attach_dictionary_to_treeview (GTK_TREE_VIEW (source),
- vs->dict,
- GTK_SELECTION_MULTIPLE, NULL);
-
+ g_object_set (source, "model", sfd.dict, NULL);
g_signal_connect (on_off, "toggled", G_CALLBACK(on_off_toggled), sfd.xml);
g_signal_connect (on_off, "toggled", G_CALLBACK(on_off_toggled), sfd.xml);
-
- set_dest_model (GTK_TREE_VIEW (dest), vs->dict);
-
- psppire_selector_set_subjects (PSPPIRE_SELECTOR (selector),
- source,
- dest,
- insert_source_row_into_tree_view,
- NULL,
- NULL);
-
g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &sfd);
g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &sfd);
- gtk_window_set_transient_for (GTK_WINDOW (dialog),
de->parent.window
);
+ gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (de)
);
response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
response = psppire_dialog_run (PSPPIRE_DIALOG (dialog));
@@
-220,6
+207,7
@@
split_file_dialog (GObject *o, gpointer data)
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&sfd);
case GTK_RESPONSE_OK:
{
gchar *syntax = generate_syntax (&sfd);
+
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
struct getl_interface *sss = create_syntax_string_source (syntax);
execute_syntax (sss);
@@
-229,11
+217,7
@@
split_file_dialog (GObject *o, gpointer data)
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&sfd);
case PSPPIRE_RESPONSE_PASTE:
{
gchar *syntax = generate_syntax (&sfd);
-
- struct syntax_editor *se =
- (struct syntax_editor *) window_create (WINDOW_SYNTAX, NULL);
-
- gtk_text_buffer_insert_at_cursor (se->buffer, syntax, -1);
+ paste_syntax_to_window (syntax);
g_free (syntax);
}
g_free (syntax);
}