From e1f208de7dfadbd84d2e5aa75204f04f60ad49e0 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 1 May 2002 23:26:42 +0000 Subject: Set the gettext-domain here. 2002-05-01 Christopher James Lahey * gal/e-text/e-completion-view.c (simple_spec), gal/widgets/e-categories-master-list-dialog.c (SPEC), gal/widgets/e-categories.c (INITIAL_SPEC): Set the gettext-domain here. * gal/util/e-i18n.h (E_I18N_DOMAIN): #define as makes sense in the different cases. From gal/e-table/ChangeLog: 2002-05-01 Christopher James Lahey * e-table-config.c, e-table-config.h, e-table-specification.c, e-table-specification.h, e-table-utils.c, e-table-utils.h, e-table.c, e-table.h: Made these pay attention to the gettext-domain in the etspec. * e-table-config.c: Set the gettext-domain in the etspec here. From gal/menus/ChangeLog: 2002-05-01 Christopher James Lahey * gal-define-views-dialog.c (SPEC), gal-view-instance-save-as-dialog.c (SPEC): Set the gettext-domain here. svn path=/trunk/; revision=16658 --- widgets/table/e-table-config.c | 46 +++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'widgets/table/e-table-config.c') diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index b9922a2d38..05e5b09ddf 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -74,9 +74,13 @@ config_destroy (GtkObject *object) gtk_object_unref (GTK_OBJECT (config->source_state)); gtk_object_unref (GTK_OBJECT (config->source_spec)); g_free (config->header); + config->header = NULL; g_slist_free (config->column_names); config->column_names = NULL; + + g_free (config->domain); + config->domain = NULL; GTK_OBJECT_CLASS (config_parent_class)->destroy (object); } @@ -132,6 +136,8 @@ config_class_init (GtkObjectClass *object_class) gtk_object_add_arg_type ("ETableConfig::state", E_TABLE_STATE_TYPE, GTK_ARG_READABLE, ARG_STATE); + + glade_gnome_init (); } static ETableColumnSpecification * @@ -222,7 +228,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort) continue; } - text = gettext (column->title); + text = dgettext (config->domain, column->title); /* * Update radio buttons @@ -278,7 +284,7 @@ config_sort_info_update (ETableConfig *config) continue; } - g_string_append (res, gettext ((column)->title)); + g_string_append (res, dgettext (config->domain, (column)->title)); g_string_append_c (res, ' '); g_string_append ( res, @@ -319,8 +325,8 @@ config_group_info_update (ETableConfig *config) g_warning ("Could not find model column in specification"); continue; } - - g_string_append (res, gettext ((column)->title)); + + g_string_append (res, dgettext (config->domain, (column)->title)); g_string_append_c (res, ' '); g_string_append ( res, @@ -368,8 +374,8 @@ config_fields_info_update (ETableConfig *config) if (config->state->columns [i] != (*column)->model_col) continue; - - g_string_append (res, gettext ((*column)->title)); + + g_string_append (res, dgettext (config->domain, (*column)->title)); if (column [1]) g_string_append (res, ", "); } @@ -496,12 +502,13 @@ create_global_store (ETableConfig *config) } } -char *spec = " \ - \ - \ - \ - \ - "; +char *spec = "" + "" + " " + "" + "" + ""; GtkWidget *e_table_proxy_etable_shown_new (void); @@ -680,9 +687,8 @@ configure_sort_dialog (ETableConfig *config, GladeXML *gui) char *label = l->data; for (i = 0; i < 4; i++){ - gtk_combo_text_add_item ( - config->sort [i].combo, - gettext (label), label); + gtk_combo_text_add_item (config->sort [i].combo, + dgettext (config->domain, label), label); } } @@ -792,7 +798,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui) for (i = 0; i < 4; i++){ gtk_combo_text_add_item ( config->group [i].combo, - gettext (label), label); + dgettext (config->domain, label), label); } } @@ -996,9 +1002,9 @@ setup_gui (ETableConfig *config) create_global_store (config); if (e_table_sort_info_get_can_group (config->state->sort_info)) { - gui = glade_xml_new_with_domain (ETABLE_GLADEDIR "/e-table-config.glade", NULL, PACKAGE); + gui = glade_xml_new_with_domain (ETABLE_GLADEDIR "/e-table-config.glade", NULL, E_I18N_DOMAIN); } else { - gui = glade_xml_new_with_domain (ETABLE_GLADEDIR "/e-table-config-no-group.glade", NULL, PACKAGE); + gui = glade_xml_new_with_domain (ETABLE_GLADEDIR "/e-table-config-no-group.glade", NULL, E_I18N_DOMAIN); } gtk_object_unref (GTK_OBJECT (global_store)); @@ -1052,7 +1058,7 @@ setup_gui (ETableConfig *config) static void config_init (ETableConfig *config) { - glade_gnome_init (); + config->domain = NULL; } ETableConfig * @@ -1077,6 +1083,8 @@ e_table_config_construct (ETableConfig *config, config->state = e_table_state_duplicate (state); + config->domain = g_strdup (spec->domain); + for (column = config->source_spec->columns; *column; column++){ char *label = (*column)->title; -- cgit v1.2.3