projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gui: Fix temporary filtering by a variable's value.
[pspp]
/
src
/
ui
/
gui
/
val-labs-dialog.c
diff --git
a/src/ui/gui/val-labs-dialog.c
b/src/ui/gui/val-labs-dialog.c
index 68d7070ca13495a0e996f92b9ce0c812740bc3ce..950a59e6b4ef860ee44ce1240920bda3e4d32c85 100644
(file)
--- 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.
/* 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
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 <libpspp/i18n.h>
#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;
struct val_labs_dialog
{
GtkWidget *window;
@@
-188,7
+192,7
@@
val_labs_ok (GtkWidget *w, gpointer data)
val_labs_destroy (dialog->labs);
val_labs_destroy (dialog->labs);
- dialog->labs =
0
;
+ dialog->labs =
NULL
;
gtk_widget_hide (dialog->window);
gtk_widget_hide (dialog->window);
@@
-202,7
+206,7
@@
val_labs_cancel (struct val_labs_dialog *dialog)
{
val_labs_destroy (dialog->labs);
{
val_labs_destroy (dialog->labs);
- dialog->labs =
0
;
+ dialog->labs =
NULL
;
gtk_widget_hide (dialog->window);
}
gtk_widget_hide (dialog->window);
}
@@
-257,7
+261,11
@@
get_selected_tuple (struct val_labs_dialog *dialog,
if (valuep != NULL)
*valuep = value;
if (label != NULL)
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);
+ }
}
}
@@
-453,7
+461,7
@@
val_labs_dialog_create (GtkWindow *toplevel, PsppireVarStore *var_store)
g_signal_connect (dialog->add_button, "clicked",
G_CALLBACK (on_add), dialog);
g_signal_connect (dialog->add_button, "clicked",
G_CALLBACK (on_add), dialog);
- dialog->labs =
0
;
+ dialog->labs =
NULL
;
g_object_unref (xml);
g_object_unref (xml);
@@
-508,8
+516,8
@@
repopulate_dialog (struct val_labs_dialog *dialog)
value_to_text (vl->value, dialog->dict,
*var_get_write_format (dialog->pv));
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,
gtk_list_store_append (list_store, &iter);
gtk_list_store_set (list_store, &iter,