diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/folder-browser.c | 2 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 20 |
3 files changed, 23 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index bc67dc4344..39ca322278 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2001-01-24 Not Zed <NotZed@Ximian.com> + + * folder-browser.c (search_string[]): Fix the subject match + expression, which was missing a closing ). + + * mail-send-recv.c (do_show_status): Escape any % signs in the + string before setting the format string. + 2001-01-24 Jeffrey Stedfast <fejj@ximian.com> * mail-config.glade: Added a 3rd page to the account editor to diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 700eda72f5..f7f77ffe31 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -252,7 +252,7 @@ static char *search_string[] = { "(match-all (header-contains \"from\" %s)", "(or (body-contains %s) (match-all (header-contains \"Subject\" %s)))", "(body-contains %s)", - "(match-all (header-contains \"Subject\" %s)", + "(match-all (header-contains \"Subject\" %s))", "(match-all (not (body-contains %s)))", "(match-all (not (header-contains \"Subject\" %s)))", }; diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 088339575f..56ee820c49 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -317,9 +317,19 @@ static void do_show_status(struct _mail_msg *mm) { struct _status_msg *m = (struct _status_msg *)mm; - + char *out, *p, *o, c; + + out = alloca(strlen(m->desc)*2+1); + o = out; + p = m->desc; + while ((c = *p++)) { + if (c=='%') + *o++ = '%'; + *o++ = c; + } + *o = 0; gtk_progress_set_percentage((GtkProgress *)m->info->bar, (gfloat)(m->pc/100.0)); - gtk_progress_set_format_string((GtkProgress *)m->info->bar, m->desc); + gtk_progress_set_format_string((GtkProgress *)m->info->bar, out); } static void @@ -440,9 +450,6 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep /* and we assume the newer one is the same, but unref the old one anyway */ g_mutex_lock(info->data->lock); - /* NotZed: I added this ref here, if I'm wrong feel free to remove it */ - camel_object_ref (CAMEL_OBJECT (folder)); - if (g_hash_table_lookup_extended(info->data->folders, uri, (void **)&oldkey, (void **)&oldinfo)) { camel_object_unref((CamelObject *)oldinfo->folder); oldinfo->folder = folder; @@ -453,7 +460,8 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep g_hash_table_insert(info->data->folders, oldinfo->uri, oldinfo); } g_mutex_unlock(info->data->lock); - + + camel_object_ref((CamelObject *)folder); return folder; } |