8. The dialog box structure itself ought to be a GtkWindow and
abstracted better.
*/
-
#include <config.h>
#include "sort-cases-dialog.h"
#include "psppire-dict.h"
#include <math/sort.h>
-#include "psppire-variable.h"
#include <gettext.h>
#define _(msgid) gettext (msgid)
GtkTreeIter new_iter;
gint index;
gint dir;
- struct PsppireVariable *variable;
+ struct variable *variable;
struct sort_cases_dialog *dialog = (struct sort_cases_dialog*) data;
/* Get the variable from the dictionary */
DICT_TVM_COL_VAR, &variable,
-1);
- index = psppire_variable_get_index(variable);
+ index = var_get_dict_index (variable);
dir = gtk_toggle_button_get_active (dialog->ascending_button) ?
SRT_ASCEND:SRT_DESCEND;
gpointer data)
{
gint var_index;
- struct PsppireVariable *variable ;
+ struct variable *variable ;
gint direction;
gchar *buf;
gchar *varname;
variable = psppire_dict_get_variable(dict, var_index);
- varname = pspp_locale_to_utf8(psppire_variable_get_name(variable),
+ varname = pspp_locale_to_utf8 (var_get_name(variable),
-1, 0);
if ( direction == SRT_ASCEND)
valid;
valid = gtk_tree_model_iter_next(model, &iter))
{
- struct PsppireVariable *variable;
+ struct variable *variable;
gint index;
struct sort_criterion *scn = &criteria->crits[n];
g_assert ( n < criteria->crit_cnt);
variable = psppire_dict_get_variable(dict, index);
- scn->fv = psppire_variable_get_fv(variable);
- scn->width = psppire_variable_get_width(variable);
+ scn->fv = var_get_case_index (variable);
+ scn->width = var_get_width(variable);
}
}