/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007 Free Software Foundation
+ Copyright (C) 2007, 2010 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
upon which the file should be split */
GtkTreeView *tv;
-
PsppireSelector *selector;
};
gchar *text;
GtkWidget *off = get_widget_assert (sfd->xml, "split-radiobutton0");
- GtkWidget *vars =
- get_widget_assert (sfd->xml, "split-file-grouping-vars");
-
GString *string = g_string_new ("SPLIT FILE OFF.");
if ( ! gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (off)))
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 = psppire_var_view_append_names (PSPPIRE_VAR_VIEW (vars), 0, varlist);
+ gint n_vars = psppire_var_view_append_names (PSPPIRE_VAR_VIEW (sfd->tv), 0, varlist);
if ( n_vars > 0 )
{
gint n_vars = dict_get_split_cnt (d->dict->dict);
-
gtk_list_store_clear (GTK_LIST_STORE (liststore));
if ( n_vars == 0 )
for (i = 0 ; i < n_vars; ++i )
{
- gint idx = var_get_dict_index (vars[i]);
-
gtk_list_store_append (GTK_LIST_STORE (liststore), &iter);
- gtk_list_store_set (GTK_LIST_STORE (liststore), &iter, 0, idx, -1);
+
+ gtk_list_store_set (GTK_LIST_STORE (liststore), &iter,
+ 0, vars[i],
+ -1);
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(on), TRUE);
GtkWidget *dialog ;
GtkWidget *source ;
- GtkWidget *dest ;
GtkWidget *selector ;
GtkWidget *on_off ;
dialog = get_widget_assert (sfd.xml, "split-file-dialog");
source = get_widget_assert (sfd.xml, "split-file-dict-treeview");
- dest = get_widget_assert (sfd.xml, "split-file-grouping-vars");
selector = get_widget_assert (sfd.xml, "split-file-selector");
on_off = get_widget_assert (sfd.xml, "split-radiobutton0");
+ sfd.tv = GTK_TREE_VIEW (get_widget_assert (sfd.xml, "split-file-grouping-vars"));
+
g_object_get (de->data_editor, "var-store", &vs, NULL);
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.selector = PSPPIRE_SELECTOR (get_widget_assert (sfd.xml, "split-file-selector"));
g_object_set (source, "model", sfd.dict, NULL);