/*
PSPPIRE --- A Graphical User Interface for PSPP
Copyright (C) 2005 Free Software Foundation
- Written by John Darrington
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
#include "helper.h"
#include "val-labs-dialog.h"
#include <data/value-labels.h>
-#include "psppire-variable.h"
/* This callback occurs when the text in the label entry box
is changed */
text = gtk_entry_get_text(GTK_ENTRY(dialog->value_entry));
text_to_value(text, &v,
- *psppire_variable_get_write_spec(dialog->pv));
+ *var_get_write_format (dialog->pv));
if ( val_labs_find (dialog->labs, v) )
union value v;
text_to_value(text, &v,
- *psppire_variable_get_write_spec(dialog->pv));
+ *var_get_write_format (dialog->pv));
g_signal_handler_block(GTK_ENTRY(dialog->label_entry),
{
struct val_labs_dialog *dialog = data;
- psppire_variable_set_value_labels(dialog->pv, dialog->labs);
+ var_set_value_labels (dialog->pv, dialog->labs);
val_labs_destroy (dialog->labs);
+
dialog->labs = 0;
return FALSE;
union value v;
text_to_value(val_text, &v,
- *psppire_variable_get_write_spec(dialog->pv));
+ *var_get_write_format (dialog->pv));
val_labs_replace (dialog->labs, v,
- gtk_entry_get_text(GTK_ENTRY(dialog->label_entry)));
+ gtk_entry_get_text (GTK_ENTRY(dialog->label_entry)));
- gtk_widget_set_sensitive(dialog->change_button, FALSE);
+ gtk_widget_set_sensitive (dialog->change_button, FALSE);
repopulate_dialog(dialog);
const gchar *text = gtk_entry_get_text(GTK_ENTRY(dialog->value_entry));
text_to_value(text, &v,
- *psppire_variable_get_write_spec(dialog->pv));
+ *var_get_write_format (dialog->pv));
if ( ! val_labs_add (dialog->labs, v,
- gtk_entry_get_text(GTK_ENTRY(dialog->label_entry)) ) )
+ gtk_entry_get_text
+ ( GTK_ENTRY (dialog->label_entry)) ) )
return FALSE;
-
gtk_widget_set_sensitive(dialog->add_button, FALSE);
repopulate_dialog(dialog);
struct val_lab * vl = get_selected_tuple(dialog);
gchar *const text = value_to_text(vl->value,
- *psppire_variable_get_write_spec(dialog->pv));
+ *var_get_write_format (dialog->pv));
g_signal_handler_block(GTK_ENTRY(dialog->value_entry),
dialog->value_handler_id);
gchar *const vstr =
value_to_text(vl->value,
- *psppire_variable_get_write_spec(dialog->pv));
+ *var_get_write_format (dialog->pv));
gchar *labeltext =
pspp_locale_to_utf8(vl->label, -1, 0);
g_assert(!dialog->labs);
- value_labels = psppire_variable_get_value_labels (dialog->pv);
+ value_labels = var_get_value_labels (dialog->pv);
if (value_labels)
dialog->labs = val_labs_copy ( value_labels );
else
- dialog->labs = val_labs_create ( psppire_variable_get_width (dialog->pv));
-
+ dialog->labs = val_labs_create ( var_get_width (dialog->pv));
+
gtk_widget_set_sensitive(dialog->remove_button, FALSE);
gtk_widget_set_sensitive(dialog->change_button, FALSE);
gtk_widget_set_sensitive(dialog->add_button, FALSE);