From 92cf0195de07748cd4fbf0d5d67005a4754a03e1 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Tue, 3 Feb 2009 01:33:00 +0000 Subject: Reviewed by Srinivasa Ragavan 2009-02-02 Takao Fujiwara Reviewed by Srinivasa Ragavan ** Fix for bug #567568 * apps_evolution_email_custom_header.schemas.in: Remove translatable tag. * email-custom-header.c (epech_setup_widgets): Added gettext for the default custom header. svn path=/trunk/; revision=37211 --- plugins/email-custom-header/email-custom-header.c | 29 +++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'plugins/email-custom-header/email-custom-header.c') diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c index 0305dd2c25..69bae1143f 100644 --- a/plugins/email-custom-header/email-custom-header.c +++ b/plugins/email-custom-header/email-custom-header.c @@ -329,6 +329,20 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch) HeaderValueComboBox *sub_combo_box_ptr; gint sub_index,row_combo,column_combo; gint header_section_id,sub_type_index,row,column,label_row; + gint i; + gchar *str; + static gchar *security_field = N_("Security:"); + static struct _security_values { + char *value, *str; + } security_values[] = { + { "Personal", N_("Personal") } , + { "Unclassified", N_("Unclassified") }, + { "Protected", N_("Protected") }, + { "InConfidence", N_("Confidential") }, + { "Secret", N_("Secret") }, + { "Topsecret", N_("Top secret") }, + { NULL, NULL } + }; priv = mch->priv; priv->combo_box_header_value = g_array_new (TRUE, FALSE, sizeof (HeaderValueComboBox)); @@ -339,7 +353,11 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch) // To create an empty label widget. Text will be added dynamically. priv->header_type_name_label = gtk_label_new (""); temp_header_ptr = &g_array_index(priv->email_custom_header_details, EmailCustomHeaderDetails,header_section_id); - gtk_label_set_markup (GTK_LABEL (priv->header_type_name_label),(temp_header_ptr->header_type_value)->str); + str = (temp_header_ptr->header_type_value)->str; + if (strcmp (str, security_field) == 0) { + str = _(security_field); + } + gtk_label_set_markup (GTK_LABEL (priv->header_type_name_label), str); gtk_table_attach (GTK_TABLE (priv->header_table), priv->header_type_name_label, 0, 1, row, column, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), @@ -363,8 +381,15 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch) for (sub_type_index = 0; sub_type_index < temp->number_of_subtype_header; sub_type_index++) { temp_header_value_ptr = &g_array_index(temp->sub_header_type_value, CustomSubHeader,sub_type_index); + str = (temp_header_value_ptr->sub_header_string_value)->str; + for (i = 0; security_values[i].value != NULL; i++) { + if (strcmp (str, security_values[i].value) == 0) { + str = _(security_values[i].str); + break; + } + } gtk_combo_box_append_text (GTK_COMBO_BOX (sub_combo_box_ptr->header_value_combo_box), - (temp_header_value_ptr->sub_header_string_value)->str); + str); } gtk_combo_box_append_text (GTK_COMBO_BOX (sub_combo_box_ptr->header_value_combo_box), _("None")); -- cgit