projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lexer: Reimplement for better testability and internationalization.
[pspp-builds.git]
/
src
/
ui
/
gui
/
psppire-var-store.c
diff --git
a/src/ui/gui/psppire-var-store.c
b/src/ui/gui/psppire-var-store.c
index ece728127c142733b6986844146d22e06129b9fb..2a915afe149d6288a8af80c2ff201712ee63058a 100644
(file)
--- a/
src/ui/gui/psppire-var-store.c
+++ b/
src/ui/gui/psppire-var-store.c
@@
-1,5
+1,5
@@
/* PSPPIRE - a graphical user interface for PSPP.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2006, 2009 Free Software Foundation
+ Copyright (C) 2006, 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
@@
-279,7
+279,7
@@
static void
psppire_var_store_init (PsppireVarStore *var_store)
{
if ( ! gdk_color_parse (DISABLED_COLOR, &var_store->disabled))
psppire_var_store_init (PsppireVarStore *var_store)
{
if ( ! gdk_color_parse (DISABLED_COLOR, &var_store->disabled))
- g_critical ("Could not parse color
\"%s\"
", DISABLED_COLOR);
+ g_critical ("Could not parse color
`%s'
", DISABLED_COLOR);
var_store->dictionary = NULL;
var_store->format_type = PSPPIRE_VAR_STORE_OUTPUT_FORMATS;
var_store->dictionary = NULL;
var_store->format_type = PSPPIRE_VAR_STORE_OUTPUT_FORMATS;
@@
-489,7
+489,7
@@
psppire_var_store_clear (PsppireSheetModel *model, glong row, glong col)
switch (col)
{
case PSPPIRE_VAR_STORE_COL_LABEL:
switch (col)
{
case PSPPIRE_VAR_STORE_COL_LABEL:
- var_
set_label (pv, NULL
);
+ var_
clear_label (pv
);
return TRUE;
break;
}
return TRUE;
break;
}
@@
-588,7
+588,8
@@
psppire_var_store_set_string (PsppireSheetModel *model,
break;
case PSPPIRE_VAR_STORE_COL_LABEL:
{
break;
case PSPPIRE_VAR_STORE_COL_LABEL:
{
- var_set_label (pv, text);
+ var_set_label (pv, text,
+ psppire_dict_encoding (var_store->dictionary), true);
return TRUE;
}
break;
return TRUE;
}
break;
@@
-643,16
+644,16
@@
text_for_column (PsppireVarStore *vs,
switch ( write_spec->type )
{
case FMT_F:
switch ( write_spec->type )
{
case FMT_F:
- return
g_locale_to_utf8 (gettext (type_label[VT_NUMERIC]), -1, 0, 0, err
);
+ return
xstrdup (gettext (type_label[VT_NUMERIC])
);
break;
case FMT_COMMA:
break;
case FMT_COMMA:
- return
g_locale_to_utf8 (gettext (type_label[VT_COMMA]), -1, 0, 0, err
);
+ return
xstrdup (gettext (type_label[VT_COMMA])
);
break;
case FMT_DOT:
break;
case FMT_DOT:
- return
g_locale_to_utf8 (gettext (type_label[VT_DOT]), -1, 0, 0, err
);
+ return
xstrdup (gettext (type_label[VT_DOT])
);
break;
case FMT_E:
break;
case FMT_E:
- return
g_locale_to_utf8 (gettext (type_label[VT_SCIENTIFIC]), -1, 0, 0, err
);
+ return
xstrdup (gettext (type_label[VT_SCIENTIFIC])
);
break;
case FMT_DATE:
case FMT_EDATE:
break;
case FMT_DATE:
case FMT_EDATE:
@@
-667,25
+668,25
@@
text_for_column (PsppireVarStore *vs,
case FMT_DTIME:
case FMT_WKDAY:
case FMT_MONTH:
case FMT_DTIME:
case FMT_WKDAY:
case FMT_MONTH:
- return
g_locale_to_utf8 (type_label[VT_DATE], -1, 0, 0, err
);
+ return
xstrdup (gettext (type_label[VT_DATE])
);
break;
case FMT_DOLLAR:
break;
case FMT_DOLLAR:
- return
g_locale_to_utf8 (type_label[VT_DOLLAR], -1, 0, 0, err
);
+ return
xstrdup (gettext (type_label[VT_DOLLAR])
);
break;
case FMT_CCA:
case FMT_CCB:
case FMT_CCC:
case FMT_CCD:
case FMT_CCE:
break;
case FMT_CCA:
case FMT_CCB:
case FMT_CCC:
case FMT_CCD:
case FMT_CCE:
- return
g_locale_to_utf8 (gettext (type_label[VT_CUSTOM]), -1, 0, 0, err
);
+ return
xstrdup (gettext (type_label[VT_CUSTOM])
);
break;
case FMT_A:
break;
case FMT_A:
- return
g_locale_to_utf8 (gettext (type_label[VT_STRING]), -1, 0, 0, err
);
+ return
xstrdup (gettext (type_label[VT_STRING])
);
break;
default:
{
char str[FMT_STRING_LEN_MAX + 1];
break;
default:
{
char str[FMT_STRING_LEN_MAX + 1];
- g_warning ("Unknown format:
\"%s\"
\n",
+ g_warning ("Unknown format:
`%s'
\n",
fmt_to_string (write_spec, str));
}
break;
fmt_to_string (write_spec, str));
}
break;
@@
-739,7
+740,7
@@
text_for_column (PsppireVarStore *vs,
case PSPPIRE_VAR_STORE_COL_VALUES:
{
if ( ! var_has_value_labels (pv))
case PSPPIRE_VAR_STORE_COL_VALUES:
{
if ( ! var_has_value_labels (pv))
- return
g_locale_to_utf8 (gettext (none), -1, 0, 0, err
);
+ return
xstrdup (gettext (none)
);
else
{
const struct val_labs *vls = var_get_value_labels (pv);
else
{
const struct val_labs *vls = var_get_value_labels (pv);
@@
-752,7
+753,7
@@
text_for_column (PsppireVarStore *vs,
{
gchar *const vstr = value_to_text (vl->value, dict, *write_spec);
{
gchar *const vstr = value_to_text (vl->value, dict, *write_spec);
- return g_strdup_printf (
"{%s,\"%s\"}_"
, vstr, val_lab_get_label (vl));
+ return g_strdup_printf (
_("{%s,`%s'}_")
, vstr, val_lab_get_label (vl));
}
}
}
}
}
}
@@
-762,12
+763,12
@@
text_for_column (PsppireVarStore *vs,
const gint align = var_get_alignment (pv);
g_assert (align < n_ALIGNMENTS);
const gint align = var_get_alignment (pv);
g_assert (align < n_ALIGNMENTS);
- return
g_locale_to_utf8 (gettext (alignments[align]), -1, 0, 0, err
);
+ return
xstrdup (gettext (alignments[align])
);
}
break;
case PSPPIRE_VAR_STORE_COL_MEASURE:
{
}
break;
case PSPPIRE_VAR_STORE_COL_MEASURE:
{
- return
measure_to_string (pv, err
);
+ return
xstrdup (measure_to_string (pv, err)
);
}
break;
}
}
break;
}