From 2c71feac2da7abc2cd178b1ff30e0f217c3b6d86 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 4 Jun 2006 08:02:44 +0000 Subject: [PATCH] Unlimited the number of variables that the GUI can cope with. Yet more i18n issues. --- po/de.po | 83 ++++++++++++++++------------------ po/pspp.pot | 64 +++++++++++++------------- src/ui/gui/ChangeLog | 8 +++- src/ui/gui/psppire-var-store.c | 74 +++++++++++++++++++++++++++--- src/ui/gui/psppire.c | 12 +++-- src/ui/gui/psppire.glade | 2 +- src/ui/gui/var-sheet.c | 18 +++++--- 7 files changed, 166 insertions(+), 95 deletions(-) diff --git a/po/de.po b/po/de.po index 57500f29..719716e3 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.2\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2006-06-03 10:37+0800\n" +"POT-Creation-Date: 2006-06-04 13:53+0800\n" "PO-Revision-Date: 2006-05-26 17:49+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -390,13 +390,13 @@ msgstr "" #: src/data/format.c:197 src/data/por-file-reader.c:481 #: src/data/sys-file-reader.c:1265 src/data/sys-file-reader.c:1274 -#: src/ui/gui/psppire.glade:764 src/ui/gui/psppire-var-store.c:432 +#: src/ui/gui/psppire.glade:764 src/ui/gui/psppire-var-store.c:448 msgid "String" msgstr "Zeichenkette" #: src/data/format.c:197 src/data/por-file-reader.c:481 #: src/data/sys-file-reader.c:1265 src/data/sys-file-reader.c:1274 -#: src/ui/gui/psppire.glade:625 src/ui/gui/psppire-var-store.c:425 +#: src/ui/gui/psppire.glade:625 src/ui/gui/psppire-var-store.c:441 msgid "Numeric" msgstr "Nummer" @@ -958,7 +958,7 @@ msgstr "Ein Variablename darf nicht eines leeres Kette sein." #: src/data/variable.c:199 #, c-format msgid "Variable name %s exceeds %d-character limit." -msgstr "" +msgstr "Der Variabelname %s ist große als %d Buchstaben." #: src/data/variable.c:207 #, c-format @@ -1225,7 +1225,7 @@ msgid "Record" msgstr "" #: src/language/data-io/data-list.c:768 src/language/data-io/print.c:804 -#: src/ui/gui/var-sheet.c:77 +#: src/ui/gui/var-sheet.c:78 msgid "Columns" msgstr "Spalten" @@ -1937,7 +1937,7 @@ msgstr "" #: src/language/dictionary/split-file.c:85 #: src/language/dictionary/sys-file-info.c:384 -#: src/language/dictionary/sys-file-info.c:523 src/ui/gui/var-sheet.c:74 +#: src/language/dictionary/sys-file-info.c:523 src/ui/gui/var-sheet.c:75 msgid "Label" msgstr "Kennsatz" @@ -2654,7 +2654,7 @@ msgstr "" #: src/language/stats/crosstabs.q:818 src/language/stats/examine.q:869 #: src/language/stats/frequencies.q:1215 src/language/stats/frequencies.q:1521 -#: src/ui/gui/var-sheet.c:76 +#: src/ui/gui/var-sheet.c:77 msgid "Missing" msgstr "Löse" @@ -2782,7 +2782,7 @@ msgstr "" msgid "Directional measures." msgstr "" -#: src/language/stats/crosstabs.q:1181 src/ui/gui/var-sheet.c:71 +#: src/language/stats/crosstabs.q:1181 src/ui/gui/var-sheet.c:72 msgid "Type" msgstr "Typ" @@ -4313,7 +4313,7 @@ msgstr "Unpassend Wert für Variable" msgid "Incorrect range specification" msgstr "Falshe Spannweitebeschreibung" -#: src/ui/gui/psppire.c:72 +#: src/ui/gui/psppire.c:70 msgid "Sorry. The help system hasn't yet been implemented." msgstr "Es gibt noch nicht kein Helpsysteme. Schade!" @@ -4339,7 +4339,7 @@ msgstr "_Ansicht" #: src/ui/gui/psppire.glade:167 msgid "Status Bar" -msgstr "" +msgstr "Statusleiste" #: src/ui/gui/psppire.glade:176 msgid "Toolbars" @@ -4375,9 +4375,8 @@ msgid "_About" msgstr "_Info" #: src/ui/gui/psppire.glade:310 -#, fuzzy msgid "Save" -msgstr "Name" +msgstr "Speichen" #: src/ui/gui/psppire.glade:328 msgid "Print" @@ -4413,19 +4412,15 @@ msgid "" " 02110-1301, USA.\n" msgstr "" -#: src/ui/gui/psppire.glade:587 -msgid "translator-credits" -msgstr "Überseztenangaben" - #: src/ui/gui/psppire.glade:593 msgid "Variable Type" msgstr "Variableansicht" -#: src/ui/gui/psppire.glade:644 src/ui/gui/psppire-var-store.c:426 +#: src/ui/gui/psppire.glade:644 src/ui/gui/psppire-var-store.c:442 msgid "Comma" msgstr "Komma" -#: src/ui/gui/psppire.glade:664 src/ui/gui/psppire-var-store.c:427 +#: src/ui/gui/psppire.glade:664 src/ui/gui/psppire-var-store.c:443 msgid "Dot" msgstr "Punkt" @@ -4433,11 +4428,11 @@ msgstr "Punkt" msgid "Scientific notation" msgstr "Wissenschaftlichnotation" -#: src/ui/gui/psppire.glade:704 src/ui/gui/psppire-var-store.c:429 +#: src/ui/gui/psppire.glade:704 src/ui/gui/psppire-var-store.c:445 msgid "Date" msgstr "Datum" -#: src/ui/gui/psppire.glade:724 src/ui/gui/psppire-var-store.c:430 +#: src/ui/gui/psppire.glade:724 src/ui/gui/psppire-var-store.c:446 msgid "Dollar" msgstr "Euro" @@ -4454,14 +4449,12 @@ msgid "negative" msgstr "negativ" #: src/ui/gui/psppire.glade:943 -#, fuzzy msgid "Sample" -msgstr "Name" +msgstr "Muster" #: src/ui/gui/psppire.glade:1021 -#, fuzzy msgid "Decimal Places:" -msgstr "Detzimalen" +msgstr "Dezimalstellen:" #: src/ui/gui/psppire.glade:1098 msgid "Width:" @@ -4472,7 +4465,6 @@ msgid "Value:" msgstr "Werte:" #: src/ui/gui/psppire.glade:1344 -#, fuzzy msgid "Value Label:" msgstr "Kennsatz:" @@ -4485,9 +4477,8 @@ msgid "_No missing values" msgstr "_Kein Lösewerten" #: src/ui/gui/psppire.glade:1670 -#, fuzzy msgid "_Discrete missing values" -msgstr "_Kein Lösewerten" +msgstr "_Diskret Lösewerten" #: src/ui/gui/psppire.glade:1799 msgid "_Range plus one optional discrete missing value" @@ -4505,63 +4496,69 @@ msgstr "_Hoch:" msgid "Di_screte value:" msgstr "Di_skretwerte" -#: src/ui/gui/psppire-var-store.c:421 +#: src/ui/gui/psppire-var-store.c:437 msgid "None" msgstr "Keine" -#: src/ui/gui/psppire-var-store.c:428 +#: src/ui/gui/psppire-var-store.c:444 msgid "Scientific" msgstr "Wissenschäflich" -#: src/ui/gui/psppire-var-store.c:431 +#: src/ui/gui/psppire-var-store.c:447 msgid "Custom" msgstr "Spezial" -#: src/ui/gui/var-sheet.c:70 +#: src/ui/gui/psppire-var-store.c:515 src/ui/gui/psppire-var-store.c:525 +#: src/ui/gui/psppire-var-store.c:535 src/ui/gui/psppire-var-store.c:706 +#, c-format +msgid "%d" +msgstr "" + +#: src/ui/gui/var-sheet.c:71 msgid "Name" msgstr "Name" -#: src/ui/gui/var-sheet.c:72 +#: src/ui/gui/var-sheet.c:73 msgid "Width" msgstr "Große" -#: src/ui/gui/var-sheet.c:73 +#: src/ui/gui/var-sheet.c:74 msgid "Decimals" -msgstr "Detzimalen" +msgstr "Dezimalstellen" -#: src/ui/gui/var-sheet.c:75 +#: src/ui/gui/var-sheet.c:76 msgid "Values" msgstr "Werten" -#: src/ui/gui/var-sheet.c:78 +#: src/ui/gui/var-sheet.c:79 msgid "Align" msgstr "Einstellung" -#: src/ui/gui/var-sheet.c:79 +#: src/ui/gui/var-sheet.c:80 msgid "Measure" msgstr "Messe" -#: src/ui/gui/var-sheet.c:102 +#: src/ui/gui/var-sheet.c:103 msgid "Left" msgstr "Links" -#: src/ui/gui/var-sheet.c:103 +#: src/ui/gui/var-sheet.c:104 msgid "Right" msgstr "Rechts" -#: src/ui/gui/var-sheet.c:104 +#: src/ui/gui/var-sheet.c:105 msgid "Centre" msgstr "Mittel" -#: src/ui/gui/var-sheet.c:109 +#: src/ui/gui/var-sheet.c:110 msgid "Nominal" msgstr "Nominalwert" -#: src/ui/gui/var-sheet.c:110 +#: src/ui/gui/var-sheet.c:111 msgid "Ordinal" msgstr "Ordinalwert" -#: src/ui/gui/var-sheet.c:111 +#: src/ui/gui/var-sheet.c:112 msgid "Scale" msgstr "Skalwert" diff --git a/po/pspp.pot b/po/pspp.pot index cfcac569..6990ea0d 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2006-06-03 10:37+0800\n" +"POT-Creation-Date: 2006-06-04 13:53+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -389,13 +389,13 @@ msgstr "" #: src/data/format.c:197 src/data/por-file-reader.c:481 #: src/data/sys-file-reader.c:1265 src/data/sys-file-reader.c:1274 -#: src/ui/gui/psppire.glade:764 src/ui/gui/psppire-var-store.c:432 +#: src/ui/gui/psppire.glade:764 src/ui/gui/psppire-var-store.c:448 msgid "String" msgstr "" #: src/data/format.c:197 src/data/por-file-reader.c:481 #: src/data/sys-file-reader.c:1265 src/data/sys-file-reader.c:1274 -#: src/ui/gui/psppire.glade:625 src/ui/gui/psppire-var-store.c:425 +#: src/ui/gui/psppire.glade:625 src/ui/gui/psppire-var-store.c:441 msgid "Numeric" msgstr "" @@ -1224,7 +1224,7 @@ msgid "Record" msgstr "" #: src/language/data-io/data-list.c:768 src/language/data-io/print.c:804 -#: src/ui/gui/var-sheet.c:77 +#: src/ui/gui/var-sheet.c:78 msgid "Columns" msgstr "" @@ -1936,7 +1936,7 @@ msgstr "" #: src/language/dictionary/split-file.c:85 #: src/language/dictionary/sys-file-info.c:384 -#: src/language/dictionary/sys-file-info.c:523 src/ui/gui/var-sheet.c:74 +#: src/language/dictionary/sys-file-info.c:523 src/ui/gui/var-sheet.c:75 msgid "Label" msgstr "" @@ -2653,7 +2653,7 @@ msgstr "" #: src/language/stats/crosstabs.q:818 src/language/stats/examine.q:869 #: src/language/stats/frequencies.q:1215 src/language/stats/frequencies.q:1521 -#: src/ui/gui/var-sheet.c:76 +#: src/ui/gui/var-sheet.c:77 msgid "Missing" msgstr "" @@ -2781,7 +2781,7 @@ msgstr "" msgid "Directional measures." msgstr "" -#: src/language/stats/crosstabs.q:1181 src/ui/gui/var-sheet.c:71 +#: src/language/stats/crosstabs.q:1181 src/ui/gui/var-sheet.c:72 msgid "Type" msgstr "" @@ -4312,7 +4312,7 @@ msgstr "" msgid "Incorrect range specification" msgstr "" -#: src/ui/gui/psppire.c:72 +#: src/ui/gui/psppire.c:70 msgid "Sorry. The help system hasn't yet been implemented." msgstr "" @@ -4411,19 +4411,15 @@ msgid "" " 02110-1301, USA.\n" msgstr "" -#: src/ui/gui/psppire.glade:587 -msgid "translator-credits" -msgstr "" - #: src/ui/gui/psppire.glade:593 msgid "Variable Type" msgstr "" -#: src/ui/gui/psppire.glade:644 src/ui/gui/psppire-var-store.c:426 +#: src/ui/gui/psppire.glade:644 src/ui/gui/psppire-var-store.c:442 msgid "Comma" msgstr "" -#: src/ui/gui/psppire.glade:664 src/ui/gui/psppire-var-store.c:427 +#: src/ui/gui/psppire.glade:664 src/ui/gui/psppire-var-store.c:443 msgid "Dot" msgstr "" @@ -4431,11 +4427,11 @@ msgstr "" msgid "Scientific notation" msgstr "" -#: src/ui/gui/psppire.glade:704 src/ui/gui/psppire-var-store.c:429 +#: src/ui/gui/psppire.glade:704 src/ui/gui/psppire-var-store.c:445 msgid "Date" msgstr "" -#: src/ui/gui/psppire.glade:724 src/ui/gui/psppire-var-store.c:430 +#: src/ui/gui/psppire.glade:724 src/ui/gui/psppire-var-store.c:446 msgid "Dollar" msgstr "" @@ -4499,63 +4495,69 @@ msgstr "" msgid "Di_screte value:" msgstr "" -#: src/ui/gui/psppire-var-store.c:421 +#: src/ui/gui/psppire-var-store.c:437 msgid "None" msgstr "" -#: src/ui/gui/psppire-var-store.c:428 +#: src/ui/gui/psppire-var-store.c:444 msgid "Scientific" msgstr "" -#: src/ui/gui/psppire-var-store.c:431 +#: src/ui/gui/psppire-var-store.c:447 msgid "Custom" msgstr "" -#: src/ui/gui/var-sheet.c:70 +#: src/ui/gui/psppire-var-store.c:515 src/ui/gui/psppire-var-store.c:525 +#: src/ui/gui/psppire-var-store.c:535 src/ui/gui/psppire-var-store.c:706 +#, c-format +msgid "%d" +msgstr "" + +#: src/ui/gui/var-sheet.c:71 msgid "Name" msgstr "" -#: src/ui/gui/var-sheet.c:72 +#: src/ui/gui/var-sheet.c:73 msgid "Width" msgstr "" -#: src/ui/gui/var-sheet.c:73 +#: src/ui/gui/var-sheet.c:74 msgid "Decimals" msgstr "" -#: src/ui/gui/var-sheet.c:75 +#: src/ui/gui/var-sheet.c:76 msgid "Values" msgstr "" -#: src/ui/gui/var-sheet.c:78 +#: src/ui/gui/var-sheet.c:79 msgid "Align" msgstr "" -#: src/ui/gui/var-sheet.c:79 +#: src/ui/gui/var-sheet.c:80 msgid "Measure" msgstr "" -#: src/ui/gui/var-sheet.c:102 +#: src/ui/gui/var-sheet.c:103 msgid "Left" msgstr "" -#: src/ui/gui/var-sheet.c:103 +#: src/ui/gui/var-sheet.c:104 msgid "Right" msgstr "" -#: src/ui/gui/var-sheet.c:104 +#: src/ui/gui/var-sheet.c:105 msgid "Centre" msgstr "" -#: src/ui/gui/var-sheet.c:109 +#: src/ui/gui/var-sheet.c:110 msgid "Nominal" msgstr "" -#: src/ui/gui/var-sheet.c:110 +#: src/ui/gui/var-sheet.c:111 msgid "Ordinal" msgstr "" -#: src/ui/gui/var-sheet.c:111 +#: src/ui/gui/var-sheet.c:112 msgid "Scale" msgstr "" diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index d4e34e39..9cf8b0ed 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,5 +1,9 @@ - -Tue May 30 19:53:35 WST 2006 John Darringotn +Sun Jun 4 15:50:28 WST 2006 John Darrington + + * psppire-var-store.c, psppire.c, var-sheet.c : Unlimited the number of + variables that can be displayed. Minor i18n issues. + +Tue May 30 19:53:35 WST 2006 John Darrington * menu-actions.c menu-actions.h psppire.c: Fixed up load/new interactions with startup. diff --git a/src/ui/gui/psppire-var-store.c b/src/ui/gui/psppire-var-store.c index 4cdc2958..1435a4a2 100644 --- a/src/ui/gui/psppire-var-store.c +++ b/src/ui/gui/psppire-var-store.c @@ -64,6 +64,10 @@ static gboolean psppire_var_store_set_string(GSheetModel *model, static gchar *text_for_column(const struct PsppireVariable *pv, gint c, GError **err); +static void psppire_var_store_sheet_row_init (GSheetRowIface *iface); + + + static GObjectClass *parent_class = NULL; GType @@ -93,12 +97,24 @@ psppire_var_store_get_type (void) NULL }; - var_store_type = g_type_register_static (G_TYPE_OBJECT, "PsppireVarStore", - &var_store_info, 0); + static const GInterfaceInfo sheet_row_info = + { + (GInterfaceInitFunc) psppire_var_store_sheet_row_init, + NULL, + NULL + }; + + var_store_type = g_type_register_static (G_TYPE_OBJECT, "PsppireVarStore", &var_store_info, 0); g_type_add_interface_static (var_store_type, G_TYPE_SHEET_MODEL, &sheet_model_info); + + g_type_add_interface_static (var_store_type, + G_TYPE_SHEET_ROW, + &sheet_row_info); + + } return var_store_type; @@ -496,7 +512,7 @@ text_for_column(const struct PsppireVariable *pv, gint c, GError **err) { gchar *s; GString *gstr = g_string_sized_new(10); - g_string_printf(gstr, "%d", write_spec->w); + g_string_printf(gstr, _("%d"), write_spec->w); s = g_locale_to_utf8(gstr->str, gstr->len, 0, 0, err); g_string_free(gstr, TRUE); return s; @@ -506,7 +522,7 @@ text_for_column(const struct PsppireVariable *pv, gint c, GError **err) { gchar *s; GString *gstr = g_string_sized_new(10); - g_string_printf(gstr, "%d", write_spec->d); + g_string_printf(gstr, _("%d"), write_spec->d); s = g_locale_to_utf8(gstr->str, gstr->len, 0, 0, err); g_string_free(gstr, TRUE); return s; @@ -516,7 +532,7 @@ text_for_column(const struct PsppireVariable *pv, gint c, GError **err) { gchar *s; GString *gstr = g_string_sized_new(10); - g_string_printf(gstr, "%d", psppire_variable_get_columns(pv)); + g_string_printf(gstr, _("%d"), psppire_variable_get_columns(pv)); s = g_locale_to_utf8(gstr->str, gstr->len, 0, 0, err); g_string_free(gstr, TRUE); return s; @@ -621,7 +637,7 @@ text_for_column(const struct PsppireVariable *pv, gint c, GError **err) const gint align = psppire_variable_get_alignment(pv); g_assert(align < n_ALIGNMENTS); - return g_locale_to_utf8(gettext(alignments[align]),-1, -0, 0, err); + return g_locale_to_utf8(gettext(alignments[align]), -1, 0, 0, err); } break; case COL_MEASURE: @@ -629,7 +645,7 @@ text_for_column(const struct PsppireVariable *pv, gint c, GError **err) const gint measure = psppire_variable_get_measure(pv); g_assert(measure < n_MEASURES); - return g_locale_to_utf8(gettext(measures[measure]), -1, -0, 0, err); + return g_locale_to_utf8(gettext(measures[measure]), -1, 0, 0, err); } break; } @@ -659,4 +675,48 @@ psppire_var_store_set_font(PsppireVarStore *store, const PangoFontDescription *f +/* Row related funcs */ + +static gint +geometry_get_row_count(const GSheetRow *geom) +{ + PsppireVarStore *vs = PSPPIRE_VAR_STORE(geom); + return psppire_dict_get_var_cnt(vs->dict)+ 40; +} + + +static gint +geometry_get_height(const GSheetRow *geom) +{ + return 25; +} + + +static +gboolean always_true() +{ + return TRUE; +} + + +static const gchar * +geometry_get_button_label(const GSheetRow *geom, gint unit) +{ + gchar *label = g_strdup_printf(_("%d"), unit); + + return label; +} + + +static void +psppire_var_store_sheet_row_init (GSheetRowIface *iface) +{ + iface->get_row_count = geometry_get_row_count; + iface->get_height = geometry_get_height; + iface->set_height = 0; + iface->get_visibility = always_true; + iface->get_sensitivity = always_true; + + iface->get_button_label = geometry_get_button_label; +} diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index ae962e66..9a341ec4 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -18,7 +18,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - #include #include @@ -34,7 +33,6 @@ #include "psppire-dict.h" #include "psppire-var-store.h" #include "psppire-data-store.h" - #include "helper.h" #include "data-sheet.h" #include "var-sheet.h" @@ -74,10 +72,12 @@ give_help(void) popup_message(&m); } +PsppireVarStore *var_store = 0; + int main(int argc, char *argv[]) { - PsppireVarStore *var_store ; + GtkWidget *data_editor ; GtkSheet *var_sheet ; GtkSheet *data_sheet ; @@ -92,6 +92,7 @@ main(int argc, char *argv[]) setlocale (LC_NUMERIC, "C"); bindtextdomain (PACKAGE, locale_dir); + textdomain (PACKAGE); if ( ! parse_command_line(&argc, &argv, &filename, &err) ) @@ -100,13 +101,12 @@ main(int argc, char *argv[]) return 1; } + glade_init(); settings_init(); - - /* set_pspp_locale("da_DK"); */ @@ -115,6 +115,8 @@ main(int argc, char *argv[]) the_dictionary = psppire_dict_new(); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + /* Create the model for the var_sheet */ var_store = psppire_var_store_new(the_dictionary); diff --git a/src/ui/gui/psppire.glade b/src/ui/gui/psppire.glade index 179cc587..e6f25b3b 100644 --- a/src/ui/gui/psppire.glade +++ b/src/ui/gui/psppire.glade @@ -584,7 +584,7 @@ http://www.gnu.org/software/pspp John Darrington Patrick Brunier - translator-credits + translator-credits pspplogo.png diff --git a/src/ui/gui/var-sheet.c b/src/ui/gui/var-sheet.c index 5dcbf2f6..4358c783 100644 --- a/src/ui/gui/var-sheet.c +++ b/src/ui/gui/var-sheet.c @@ -34,6 +34,7 @@ #include #include +#include #include @@ -409,6 +410,8 @@ var_sheet_cell_change_entry (GtkSheet * sheet, gint row, gint column, } +extern PsppireVarStore *var_store; + /* Create the var sheet */ GtkWidget* @@ -417,15 +420,13 @@ psppire_variable_sheet_create (gchar *widget_name, gchar *string2, gint int1, gint int2) { + gchar *codeset; gint i; GtkWidget *sheet; GObject *geo = g_sheet_hetero_column_new(75, n_COLS); - GObject *row_geometry = g_sheet_uniform_row_new(25, n_initial_rows); - - - sheet = gtk_sheet_new(G_SHEET_ROW(row_geometry), + sheet = gtk_sheet_new(G_SHEET_ROW(var_store), G_SHEET_COLUMN(geo), "variable sheet", 0); @@ -445,14 +446,19 @@ psppire_variable_sheet_create (gchar *widget_name, GTK_SIGNAL_FUNC (click2row), sheet); + /* Since this happens inside glade_xml_new, we must prevent strings from + * being re-encoded twice */ + codeset = bind_textdomain_codeset(PACKAGE, 0); + bind_textdomain_codeset(PACKAGE, nl_langinfo(CODESET)); for (i = 0 ; i < n_COLS ; ++i ) { g_sheet_hetero_column_set_button_label(G_SHEET_HETERO_COLUMN(geo), i, - gettext(column_def[i].label)); - + gettext(column_def[i].label)); + g_sheet_hetero_column_set_width(G_SHEET_HETERO_COLUMN(geo), i, column_def[i].width); } + bind_textdomain_codeset(PACKAGE, codeset); gtk_widget_show(sheet); -- 2.30.2