2006-05-16 [wwp] 2.2.0cvs20
[claws.git] / src / matcher.c
index 85dd55351b7a465f329115c2207f61c8dcc6d831..1c38987195c52e1eb459675fb4ae4ef5775c713c 100644 (file)
@@ -390,7 +390,7 @@ static gboolean matcherprop_string_decode_match(MatcherProp *prop, const gchar *
                res = matcherprop_string_match(prop, tmp);
        }
        
-       if (res == FALSE && strchr(prop->expr, '=')) {
+       if (res == FALSE && (strchr(prop->expr, '=') || strchr(prop->expr, '_')) ) {
                /* if searching for something with an equal char, maybe 
                 * we should try to match the non-decoded string. 
                 * In case it was not qp-encoded. */
@@ -1438,7 +1438,19 @@ static void prefs_filtering_write(FILE *fp, GSList *prefs_filtering)
                
                if (NULL == (filtering_str = filteringprop_to_string(prop)))
                        continue;
-                               
+
+               if (prop->enabled) {
+                       if (fputs("enabled ", fp) == EOF) {
+                               FILE_OP_ERROR("filtering config", "fputs || fputc");
+                               return;
+                       }
+               } else {
+                       if (fputs("disabled ", fp) == EOF) {
+                               FILE_OP_ERROR("filtering config", "fputs || fputc");
+                               return;
+                       }
+               }
+
                if (fputs("rulename \"", fp) == EOF) {
                        FILE_OP_ERROR("filtering config", "fputs || fputc");
                        g_free(filtering_str);