X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fval-labs-dialog.c;h=605be36f7d608b991fcc0aeb5beef89e35f3e5f2;hb=1a24920c65ada574fceed15768f4b30553c77336;hp=14eacabfadddb5842e81f444855233b0e903ec03;hpb=3bbb4370239deb29ebbf813d258aef6249e2a431;p=pspp diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index 14eacabfad..605be36f7d 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2005, 2009 Free Software Foundation + Copyright (C) 2005, 2009, 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 @@ -30,6 +30,10 @@ #include "psppire-var-store.h" #include +#include +#define _(msgid) gettext (msgid) +#define N_(msgid) msgid + struct val_labs_dialog { GtkWidget *window; @@ -257,7 +261,11 @@ get_selected_tuple (struct val_labs_dialog *dialog, 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); + } } @@ -324,7 +332,7 @@ on_remove (GtkWidget *w, gpointer data) 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); @@ -508,8 +516,8 @@ repopulate_dialog (struct val_labs_dialog *dialog) 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,