aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-config.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-05-02 07:26:42 +0800
committerChris Lahey <clahey@src.gnome.org>2002-05-02 07:26:42 +0800
commite1f208de7dfadbd84d2e5aa75204f04f60ad49e0 (patch)
tree08088fc548e31986fc29b715d489eb6389fd77d4 /widgets/table/e-table-config.c
parent6be9006f3fa356bf1402067ec60aa278871562bb (diff)
downloadgsoc2013-evolution-e1f208de7dfadbd84d2e5aa75204f04f60ad49e0.tar
gsoc2013-evolution-e1f208de7dfadbd84d2e5aa75204f04f60ad49e0.tar.gz
gsoc2013-evolution-e1f208de7dfadbd84d2e5aa75204f04f60ad49e0.tar.bz2
gsoc2013-evolution-e1f208de7dfadbd84d2e5aa75204f04f60ad49e0.tar.lz
gsoc2013-evolution-e1f208de7dfadbd84d2e5aa75204f04f60ad49e0.tar.xz
gsoc2013-evolution-e1f208de7dfadbd84d2e5aa75204f04f60ad49e0.tar.zst
gsoc2013-evolution-e1f208de7dfadbd84d2e5aa75204f04f60ad49e0.zip
Set the gettext-domain here.
2002-05-01 Christopher James Lahey <clahey@ximian.com> * 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 <clahey@ximian.com> * 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 <clahey@ximian.com> * gal-define-views-dialog.c (SPEC), gal-view-instance-save-as-dialog.c (SPEC): Set the gettext-domain here. svn path=/trunk/; revision=16658
Diffstat (limited to 'widgets/table/e-table-config.c')
-rw-r--r--widgets/table/e-table-config.c46
1 files changed, 27 insertions, 19 deletions
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 = "<ETableSpecification no-headers=\"true\" cursor-mode=\"line\" draw-grid=\"false\" draw-focus=\"true\" selection-mode=\"browse\"> \
- <ETableColumn model_col= \"0\" _title=\"Name\" minimum_width=\"30\" resizable=\"true\" cell=\"string\" compare=\"string\"/> \
- <ETableState> <column source=\"0\"/> \
- <grouping/> \
- </ETableState> \
- </ETableSpecification>";
+char *spec = "<ETableSpecification gettext-domain=\"" E_I18N_DOMAIN "\" no-headers=\"true\" cursor-mode=\"line\" "
+ " draw-grid=\"false\" draw-focus=\"true\" selection-mode=\"browse\">"
+ "<ETableColumn model_col= \"0\" _title=\"Name\" minimum_width=\"30\" resizable=\"true\" cell=\"string\" compare=\"string\"/>"
+ "<ETableState> <column source=\"0\"/>"
+ "<grouping/>"
+ "</ETableState>"
+ "</ETableSpecification>";
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;