/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2005, 2009 Free Software Foundation
+ Copyright (C) 2005, 2009, 2010, 2011 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
#include "psppire-var-store.h"
#include <libpspp/i18n.h>
+#include <gettext.h>
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
struct val_labs_dialog
{
GtkWidget *window;
val_labs_destroy (dialog->labs);
- dialog->labs = 0;
+ dialog->labs = NULL;
gtk_widget_hide (dialog->window);
{
val_labs_destroy (dialog->labs);
- dialog->labs = 0;
+ dialog->labs = NULL;
gtk_widget_hide (dialog->window);
}
if (valuep != NULL)
*valuep = value;
if (label != NULL)
- *label = val_labs_find (dialog->labs, &value);
+ {
+ struct val_lab *vl = val_labs_lookup (dialog->labs, &value);
+ if (vl != NULL)
+ *label = val_lab_get_escaped_label (vl);
+ }
}
struct val_labs_dialog *dialog = data;
union value value;
- const struct val_lab *vl;
+ struct val_lab *vl;
get_selected_tuple (dialog, &value, NULL);
vl = val_labs_lookup (dialog->labs, &value);
struct val_labs_dialog *dialog = g_malloc (sizeof (*dialog));
dialog->var_store = var_store;
- g_object_get (var_store, "model", &dialog->dict, NULL);
+ g_object_get (var_store, "dictionary", &dialog->dict, NULL);
dialog->window = get_widget_assert (xml,"val_labs_dialog");
dialog->value_entry = get_widget_assert (xml,"value_entry");
dialog->label_entry = get_widget_assert (xml,"label_entry");
g_signal_connect (dialog->add_button, "clicked",
G_CALLBACK (on_add), dialog);
- dialog->labs = 0;
+ dialog->labs = NULL;
g_object_unref (xml);
value_to_text (vl->value, dialog->dict,
*var_get_write_format (dialog->pv));
- gchar *const text = g_strdup_printf ("%s = \"%s\"",
- vstr, val_lab_get_label (vl));
+ gchar *const text = g_strdup_printf (_("%s = `%s'"), vstr,
+ val_lab_get_escaped_label (vl));
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,