diff options
author | Takao Fujiwara <takao.fujiwara@sun.com> | 2009-02-03 09:33:00 +0800 |
---|---|---|
committer | Takao Fujiwara <fujiwarat@src.gnome.org> | 2009-02-03 09:33:00 +0800 |
commit | 92cf0195de07748cd4fbf0d5d67005a4754a03e1 (patch) | |
tree | 10a7c7963e3803d3dda51acc60cb389af37f0277 /plugins | |
parent | 9ecc34dd3cbb757e4754cbf8bed94016e8054c8b (diff) | |
download | gsoc2013-evolution-92cf0195de07748cd4fbf0d5d67005a4754a03e1.tar.gz gsoc2013-evolution-92cf0195de07748cd4fbf0d5d67005a4754a03e1.tar.zst gsoc2013-evolution-92cf0195de07748cd4fbf0d5d67005a4754a03e1.zip |
Reviewed by Srinivasa Ragavan <sragavan@novell.com>
2009-02-02 Takao Fujiwara <takao.fujiwara@sun.com>
Reviewed by Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #567568
* apps_evolution_email_custom_header.schemas.in:
Remove translatable <default> tag.
* email-custom-header.c (epech_setup_widgets):
Added gettext for the default custom header.
svn path=/trunk/; revision=37211
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/email-custom-header/ChangeLog | 11 | ||||
-rw-r--r-- | plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in | 1 | ||||
-rw-r--r-- | plugins/email-custom-header/email-custom-header.c | 29 |
3 files changed, 38 insertions, 3 deletions
diff --git a/plugins/email-custom-header/ChangeLog b/plugins/email-custom-header/ChangeLog index 20b2a9b3a4..e03816e2cd 100644 --- a/plugins/email-custom-header/ChangeLog +++ b/plugins/email-custom-header/ChangeLog @@ -1,3 +1,14 @@ +2009-02-02 Takao Fujiwara <takao.fujiwara@sun.com> + + Reviewed by Srinivasa Ragavan <sragavan@novell.com> + + ** Fix for bug #567568 + + * apps_evolution_email_custom_header.schemas.in: + Remove translatable <default> tag. + * email-custom-header.c (epech_setup_widgets): + Added gettext for the default custom header. + 2009-01-09 Takao Fujiwara <takao.fujiwara@sun.com> Reviewed by Matthew Barnes <mbarnes@redhat.com> diff --git a/plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in b/plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in index 1648026d54..cb3bd97ce8 100644 --- a/plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in +++ b/plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in @@ -8,7 +8,6 @@ <list_type>string</list_type> <default>[Security=Personal;Unclassified;Protected;InConfidence;Secret;Topsecret]</default> <locale name="C"> - <default><!-- Translators: '=' and ';' should not be changed but ASCII -->[Security=Personal;Unclassified;Protected;InConfidence;Secret;Topsecret]</default> <short>List of Custom Headers</short> <long>The key specifies the list of custom headers that you can add to an outgoing message. The format for specifying a Header and Header value is: Name of the custom header followed by "=" and the values separated by ";"</long> </locale> 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")); |