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 063f186263f77370da93d956f1e6f759fb7d762f..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 "
executo
r.h"
#include "psppire-data-window.h"
#include "dict-display.h"
#include <language/syntax-string-source.h>
#include "helper.h"
#include <data/dictionary.h>
#include "psppire-data-window.h"
#include "dict-display.h"
#include <language/syntax-string-source.h>
#include "helper.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;
- PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data);
struct split_file_dialog sfd;
PsppireVarStore *vs ;
struct split_file_dialog sfd;
PsppireVarStore *vs ;
@@
-186,27
+186,15
@@
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"));
- g_object_set (source, "dictionary",
- vs->dict, 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);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
g_signal_connect (dialog, "refresh", G_CALLBACK (refresh), &sfd);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (de));
@@
-229,7
+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);
- paste_syntax_
in_new
_window (syntax);
+ paste_syntax_
to
_window (syntax);
g_free (syntax);
}
g_free (syntax);
}