projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert to utf8 in data_out function.
[pspp-builds.git]
/
src
/
ui
/
gui
/
dialog-common.c
diff --git
a/src/ui/gui/dialog-common.c
b/src/ui/gui/dialog-common.c
index fe2c7937ef45f539848783327f0332ca9a55dfd3..5d52204ce566ad89cdb1807adda7be338bf846e5 100644
(file)
--- a/
src/ui/gui/dialog-common.c
+++ b/
src/ui/gui/dialog-common.c
@@
-16,6
+16,7
@@
#include <config.h>
#include <config.h>
+#include <libpspp/i18n.h>
#include "dialog-common.h"
#include "psppire-var-ptr.h"
#include "dialog-common.h"
#include "psppire-var-ptr.h"
@@
-113,14
+114,9
@@
cell_var_name (GtkTreeViewColumn *tree_column,
gpointer data)
{
PsppireDict *dict = data;
gpointer data)
{
PsppireDict *dict = data;
- struct variable *var;
- gchar *name;
-
- var = get_selected_variable (tree_model, iter, dict);
+ const struct variable *var = get_selected_variable (tree_model, iter, dict);
- name = pspp_locale_to_utf8 (var_get_name (var), -1, NULL);
- g_object_set (cell, "text", name, NULL);
- g_free (name);
+ g_object_set (cell, "text", var_get_name (var), NULL);
}
}
@@
-193,16
+189,15
@@
homogeneous_types (GtkWidget *source, GtkWidget *dest)
for (l = list; l ; l = l->next)
{
GtkTreePath *path = l->data;
for (l = list; l ; l = l->next)
{
GtkTreePath *path = l->data;
- GtkTreePath *fpath;
- gint *idx;
- const struct variable *v;
+ GtkTreePath *fpath =
+ gtk_tree_model_filter_convert_path_to_child_path (GTK_TREE_MODEL_FILTER (model), path);
-
fpath = gtk_tree_model_filter_convert_path_to_child_path (GTK_TREE_MODEL_FILTER (model),
path);
+
gint *idx = gtk_tree_path_get_indices (f
path);
-
idx = gtk_tree_path_get_indices (fpath
);
+
const struct variable *v = psppire_dict_get_variable (dict, idx[0]
);
-
v = psppire_dict_get_variable (dict, idx[0]
);
+
gtk_tree_path_free (fpath
);
if ( type != -1 )
{
if ( type != -1 )
{
@@
-280,17
+275,14
@@
numeric_only (GtkWidget *source, GtkWidget *dest)
for (l = list; l ; l = l->next)
{
GtkTreePath *path = l->data;
for (l = list; l ; l = l->next)
{
GtkTreePath *path = l->data;
- GtkTreePath *fpath;
- gint *idx;
-
- const struct variable *v;
-
- fpath = gtk_tree_model_filter_convert_path_to_child_path
+ GtkTreePath *fpath = gtk_tree_model_filter_convert_path_to_child_path
(GTK_TREE_MODEL_FILTER (model), path);
(GTK_TREE_MODEL_FILTER (model), path);
- idx = gtk_tree_path_get_indices (fpath);
+ gint *idx = gtk_tree_path_get_indices (fpath);
+
+ const struct variable *v = psppire_dict_get_variable (dict, idx[0]);
-
v = psppire_dict_get_variable (dict, idx[0]
);
+
gtk_tree_path_free (fpath
);
if ( var_is_alpha (v))
{
if ( var_is_alpha (v))
{