aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-01-25 10:05:34 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-01-25 10:05:34 +0800
commit811ce582d40634d1ece0198ed626523f51f8b73d (patch)
tree074a5d1eb6cbc468d1d8da2e0c972073024ecb34 /mail/mail-send-recv.c
parent1a403012d41b1619f4d946921184425b62b322a9 (diff)
downloadgsoc2013-evolution-811ce582d40634d1ece0198ed626523f51f8b73d.tar.gz
gsoc2013-evolution-811ce582d40634d1ece0198ed626523f51f8b73d.tar.zst
gsoc2013-evolution-811ce582d40634d1ece0198ed626523f51f8b73d.zip
Fix the subject match expression, which was missing a closing ).
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. svn path=/trunk/; revision=7797
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c20
1 files changed, 14 insertions, 6 deletions
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;
}