2006-09-12 [wwp] 2.4.0cvs176
authorTristan Chabredier <wwp@claws-mail.org>
Tue, 12 Sep 2006 12:19:32 +0000 (12:19 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Tue, 12 Sep 2006 12:19:32 +0000 (12:19 +0000)
* src/prefs_matcher.c
don't store translated string elements in matcher expressions.
Also fixed a misused of Q_().

ChangeLog
PATCHSETS
configure.ac
src/prefs_matcher.c

index d156a00b6ff62ec7c9801a665771f5c00f4d9405..40f8ce2e809dcedf2f0321b3cfa29243590a7f1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-12 [wwp]       2.4.0cvs176
+
+       * src/prefs_matcher.c
+               don't store translated string elements in matcher expressions.
+               Also fixed a misused of Q_().
+
 2006-09-11 [wwp]       2.4.0cvs175
 
        * src/plugins//bogofilter/bogofilter.c
index 2a0f955c0ddf955d31d3b580a7b1ee27079981e9..87b8a3e81dc4d9229598f597704f069b29b5da57 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.4.49 -r 1.1.4.50 src/etpan/imap-thread.c;  ) > 2.4.0cvs173.patchset
 ( cvs diff -u -r 1.17.2.27 -r 1.17.2.28 src/alertpanel.c;  ) > 2.4.0cvs174.patchset
 ( cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/plugins//bogofilter/bogofilter.c;  cvs diff -u -r 1.13.2.23 -r 1.13.2.24 src/plugins//clamav/clamav_plugin.c;  cvs diff -u -r 1.13.2.8 -r 1.13.2.9 src/plugins//demo/demo.c;  cvs diff -u -r 1.12.2.14 -r 1.12.2.15 src/plugins//dillo_viewer/dillo_viewer.c;  cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/plugins//pgpcore/plugin.c;  cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/plugins//pgpinline/plugin.c;  cvs diff -u -r 1.1.2.19 -r 1.1.2.20 src/plugins//pgpmime/plugin.c;  cvs diff -u -r 1.18.2.40 -r 1.18.2.41 src/plugins//spamassassin/spamassassin.c;  ) > 2.4.0cvs175.patchset
+( cvs diff -u -r 1.43.2.45 -r 1.43.2.46 src/prefs_matcher.c;  ) > 2.4.0cvs176.patchset
index 58b336c532ec7b36e22e2a737cf6859d229267b6..b3cd32dff4a0abd0900effa05b4f52d86ebe45f5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=175
+EXTRA_VERSION=176
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index c79d6ba908b8c91cf5b34d7d5179db9a7a244402..84cc20f449fc127199d22b831562df3a093d08af 100644 (file)
@@ -1329,7 +1329,7 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
                        if (strcasecmp(header, Q_("Filtering Matcher Menu|All")) == 0)
                                tmp = g_strdup(_("all addresses in all headers"));
                        else
-                       if (strcasecmp(header, Q_("Filtering Matcher Menu|Any")) == 0)
+                       if (strcasecmp(header, _("Any")) == 0)
                                tmp = g_strdup(_("any address in any header"));
                        else
                                tmp = g_strdup_printf(_("the address(es) in header '%s'"), header);
@@ -1342,6 +1342,14 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
                        g_free(tmp);
                    return NULL;
                }
+               /* don't store translated "Any"/"All" in matcher expressions */
+               if (strcasecmp(header, Q_("Filtering Matcher Menu|All")) == 0)
+                       header = "All";
+               else
+                       if (strcasecmp(header, _("Any")) == 0)
+                               header = "Any";
+               if (strcasecmp(expr, _("Any")) == 0)
+                       expr = "Any";
                break;
        }
 
@@ -2081,9 +2089,28 @@ static gboolean prefs_matcher_selected(GtkTreeSelection *selector,
 
        case MATCHCRITERIA_FOUND_IN_ADDRESSBOOK:
        case MATCHCRITERIA_NOT_FOUND_IN_ADDRESSBOOK:
-               gtk_entry_set_text(GTK_ENTRY(matcher.header_addr_entry), prop->header);
-               gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(matcher.addressbook_folder_combo)->entry), prop->expr);
+       {
+               gchar *header;
+               gchar *expr;
+
+               /* matcher expressions contain UNtranslated "Any"/"All",
+                 select the relevant translated combo item */
+               if (strcasecmp(prop->header, "All") == 0)
+                       header = Q_("Filtering Matcher Menu|All");
+               else
+                       if (strcasecmp(prop->header, "Any") == 0)
+                               header = _("Any");
+                       else
+                               header = prop->header;
+               if (strcasecmp(prop->expr, "Any") == 0)
+                       expr = _("Any");
+               else
+                       expr = prop->expr;
+
+               gtk_entry_set_text(GTK_ENTRY(matcher.header_addr_entry), header);
+               gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(matcher.addressbook_folder_combo)->entry), expr);
                break;
+       }
 
        case MATCHCRITERIA_AGE_GREATER:
        case MATCHCRITERIA_AGE_LOWER: