evolution r37211 - trunk/plugins/email-custom-header
- From: fujiwarat svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r37211 - trunk/plugins/email-custom-header
- Date: Tue, 3 Feb 2009 01:33:01 +0000 (UTC)
Author: fujiwarat
Date: Tue Feb 3 01:33:00 2009
New Revision: 37211
URL: http://svn.gnome.org/viewvc/evolution?rev=37211&view=rev
Log:
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.
Modified:
trunk/plugins/email-custom-header/ChangeLog
trunk/plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in
trunk/plugins/email-custom-header/email-custom-header.c
Modified: trunk/plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in
==============================================================================
--- trunk/plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in (original)
+++ trunk/plugins/email-custom-header/apps_evolution_email_custom_header.schemas.in Tue Feb 3 01:33:00 2009
@@ -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>
Modified: trunk/plugins/email-custom-header/email-custom-header.c
==============================================================================
--- trunk/plugins/email-custom-header/email-custom-header.c (original)
+++ trunk/plugins/email-custom-header/email-custom-header.c Tue Feb 3 01:33:00 2009
@@ -329,6 +329,20 @@
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 @@
// 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 @@
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"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]