2006-03-12 [paul] 2.0.0cvs135
authorPaul Mangan <paul@claws-mail.org>
Sun, 12 Mar 2006 10:36:15 +0000 (10:36 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 12 Mar 2006 10:36:15 +0000 (10:36 +0000)
* src/prefs_matcher.c
give a little more width to the combos
* src/prefs_display_header.c
* src/textview.c
translate headers if prefs_common.trans_hdr
is TRUE

Patches by Pawel Pekala

ChangeLog
PATCHSETS
configure.ac
src/prefs_display_header.c
src/prefs_matcher.c
src/textview.c

index 65038f1..0f5cf99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-03-12 [paul]      2.0.0cvs135
+
+       * src/prefs_matcher.c
+               give a little more width to the combos
+       * src/prefs_display_header.c
+       * src/textview.c
+               translate headers if prefs_common.trans_hdr
+               is TRUE
+
+       Patches by Pawel Pekala
+
 2006-03-12 [paul]      2.0.0cvs134
 
        * src/plugins/clamav/clamav_plugin.c
index d22d77a..e40eed9 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.180 -r 1.395.2.181 src/summaryview.c;  ) > 2.0.0cvs132.patchset
 ( cvs diff -u -r 1.382.2.249 -r 1.382.2.250 src/compose.c;  ) > 2.0.0cvs133.patchset
 ( cvs diff -u -r 1.13.2.21 -r 1.13.2.22 src/plugins/clamav/clamav_plugin.c;  cvs diff -u -r 1.12.2.11 -r 1.12.2.12 src/plugins/dillo_viewer/dillo_viewer.c;  cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/plugins/pgpcore/plugin.c;  cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/plugins/pgpinline/plugin.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/plugins/pgpmime/plugin.c;  cvs diff -u -r 1.18.2.31 -r 1.18.2.32 src/plugins/spamassassin/spamassassin.c;  cvs diff -u -r 1.23.2.25 -r 1.23.2.26 src/plugins/spamassassin/spamassassin_gtk.c;  ) > 2.0.0cvs134.patchset
+( cvs diff -u -r 1.16.2.18 -r 1.16.2.19 src/prefs_display_header.c;  cvs diff -u -r 1.43.2.35 -r 1.43.2.36 src/prefs_matcher.c;  cvs diff -u -r 1.96.2.100 -r 1.96.2.101 src/textview.c;  ) > 2.0.0cvs135.patchset
index 0191fa7..7e6a455 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=134
+EXTRA_VERSION=135
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a966815..0ffce12 100644 (file)
@@ -54,7 +54,6 @@ static struct DisplayHeader {
        GtkWidget *cancel_btn;
 
        GtkWidget *hdr_combo;
-       GtkWidget *hdr_entry;
        GtkWidget *key_check;
        GtkWidget *headers_list_view;
        GtkWidget *hidden_headers_list_view;
@@ -117,16 +116,16 @@ static gchar *defaults[] =
        "From",
        "To",
        "Cc",
+       "Subject",
+       "Date", 
        "Reply-To",
+       "Sender",
+       "User-Agent",
+       "X-Mailer",     
        "Newsgroups",
        "Followup-To",
-       "Subject",
-       "Date",
-       "Sender",
        "Organization",
-       "X-Mailer",
        "X-Newsreader",
-       "User-Agent",
        "-Received",
        "-Message-ID",
        "-In-Reply-To",
@@ -199,7 +198,8 @@ static void prefs_display_header_create(void)
        GtkWidget *hidden_headers_list_view;
 
        GtkWidget *checkbtn_other_headers;
-
+       gint i;
+       
        debug_print("Creating display header setting window...\n");
 
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -252,14 +252,14 @@ static void prefs_display_header_create(void)
        gtk_widget_show (hdr_label);
        gtk_box_pack_start (GTK_BOX (hbox1), hdr_label, FALSE, FALSE, 0);
 
-       hdr_combo = gtk_combo_new ();
+       hdr_combo = gtk_combo_box_new_text();
+       for(i=0; i < 9 ; i++)
+               gtk_combo_box_append_text(GTK_COMBO_BOX (hdr_combo),
+                       prefs_common.trans_hdr ? gettext(defaults[i]) : defaults[i]);
+       gtk_combo_box_set_active(GTK_COMBO_BOX(hdr_combo), 0);
        gtk_widget_show (hdr_combo);
        gtk_box_pack_start (GTK_BOX (hbox1), hdr_combo, TRUE, TRUE, 0);
        gtk_widget_set_size_request (hdr_combo, 150, -1);
-       gtkut_combo_set_items (GTK_COMBO (hdr_combo),
-                              "From", "To", "Cc", "Subject", "Date",
-                              "Reply-To", "Sender", "User-Agent", "X-Mailer",
-                              NULL);
 
        list_view_hbox = gtk_hbox_new (FALSE, 10);
        gtk_widget_show (list_view_hbox);
@@ -385,7 +385,6 @@ static void prefs_display_header_create(void)
        dispheader.cancel_btn    = cancel_btn;
 
        dispheader.hdr_combo     = hdr_combo;
-       dispheader.hdr_entry     = GTK_COMBO (hdr_combo)->entry;
 
        dispheader.headers_list_view        = headers_list_view;
        dispheader.hidden_headers_list_view = hidden_headers_list_view;
@@ -561,7 +560,8 @@ static void prefs_display_header_list_view_set_row(gboolean hidden)
        const gchar *entry_text;
        GtkTreeModel *model;
 
-       entry_text = gtk_entry_get_text(GTK_ENTRY(dispheader.hdr_entry));
+       entry_text = defaults[gtk_combo_box_get_active(
+                                               GTK_COMBO_BOX(dispheader.hdr_combo))];
        if (entry_text[0] == '\0') {
                alertpanel_error(_("Header name is not set."));
                return;
@@ -725,7 +725,8 @@ static void prefs_display_header_insert_header(GtkListStore *store,
        /* add new */
        gtk_list_store_append(store, &iter);
        gtk_list_store_set(store, &iter,
-                          PREFS_HDR_HEADER, name,
+                          PREFS_HDR_HEADER,
+                          prefs_common.trans_hdr ? gettext(name) : name,
                           PREFS_HDR_DATA, dp,
                           -1);
 }
index 2e77509..55cbbd1 100644 (file)
@@ -453,7 +453,7 @@ static void prefs_matcher_create(void)
 
        g_list_free(combo_items);
 
-       gtk_widget_set_size_request(criteria_combo, 120, -1);
+       gtk_widget_set_size_request(criteria_combo, 170, -1);
        gtk_table_attach(GTK_TABLE(criteria_table), criteria_combo, 0, 1, 1, 2,
                          0, 0, 0, 0);
        criteria_list = GTK_COMBO(criteria_combo)->list;
@@ -474,7 +474,7 @@ static void prefs_matcher_create(void)
 
        header_combo = gtk_combo_new();
        gtk_widget_show(header_combo);
-       gtk_widget_set_size_request(header_combo, 96, -1);
+       gtk_widget_set_size_request(header_combo, 120, -1);
        gtkut_combo_set_items(GTK_COMBO (header_combo),
                              "Subject", "From", "To", "Cc", "Reply-To",
                              "Sender", "X-ML-Name", "X-List", "X-Sequence",
index 5355eb4..5042251 100644 (file)
@@ -1382,9 +1382,20 @@ static void textview_show_header(TextView *textview, GPtrArray *headers)
                g_return_if_fail(header->name != NULL);
 
                gtk_text_buffer_get_end_iter (buffer, &iter);
-               gtk_text_buffer_insert_with_tags_by_name
-                       (buffer, &iter, header->name, -1,
-                        "header_title", "header", NULL);
+               if(prefs_common.trans_hdr == TRUE) {
+                       gchar *hdr = g_strndup(header->name, strlen(header->name) - 1);
+                       gchar *trans_hdr = gettext(hdr);
+                       gtk_text_buffer_insert_with_tags_by_name(buffer,
+                               &iter, trans_hdr, -1,
+                               "header_title", "header", NULL);
+                       gtk_text_buffer_insert_with_tags_by_name(buffer,
+                               &iter, ":", 1, "header_title", "header", NULL);
+                       g_free(hdr);
+               } else {
+                       gtk_text_buffer_insert_with_tags_by_name(buffer,
+                               &iter, header->name,
+                               -1, "header_title", "header", NULL);
+               }
                if (header->name[strlen(header->name) - 1] != ' ')
                gtk_text_buffer_insert_with_tags_by_name
                                (buffer, &iter, " ", 1,