aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-08-23 05:14:36 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-08-23 05:14:36 +0800
commitcbf3647544de3dc02853c1652cfdbbeb29ce93dd (patch)
tree75355fecf90a56c2cd7aeb053afccff1b98bdba6 /mail
parentbc43a79394e30a2d28984262ce37f74a12acec00 (diff)
downloadgsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.tar
gsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.tar.gz
gsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.tar.bz2
gsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.tar.lz
gsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.tar.xz
gsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.tar.zst
gsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.zip
translate the local time format.
2003-08-22 Not Zed <NotZed@Ximian.com> * mail-format.c (write_date): translate the local time format. 2003-08-20 David Woodhouse <dwmw2@infradead.org> * mail-format.c (write_date): Use e_utf8_strftime() to generate localised time; avoid gratuitous extra translation and array of day names, and the autoconf magic which made Not Zed dislike the inclusion of the timezone name. 2003-08-05 Not Zed <NotZed@Ximian.com> ** See bug #32732 * message-list.c (mail_regen_list): use thread_new. * mail-local.c (reconfigure_response): use thread_new. * mail-display.c (stream_write_or_redisplay_when_loaded): use thread_new. * mail-config.c (mail_config_check_service): use thread_new rather than queue. * mail-callbacks.c (view_msg): change to use mail_get_messages(), fixes FIXME. (do_view_messages): handle get_messages callback. (do_view_message): removed. * mail-ops.c (mail_get_folderinfo): Use a new thread thread semantic. (mail_save_part): " (mail_store_set_offline): " (mail_sync_folder): use queued_slow thread queue. (mail_expunge_folder): " (mail_empty_trash): " svn path=/trunk/; revision=22340
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog36
-rw-r--r--mail/mail-callbacks.c25
-rw-r--r--mail/mail-config.c2
-rw-r--r--mail/mail-format.c21
-rw-r--r--mail/mail-local.c2
-rw-r--r--mail/mail-ops.c12
-rw-r--r--mail/message-list.c2
7 files changed, 67 insertions, 33 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a4969527e6..abde61e489 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,14 @@
+2003-08-22 Not Zed <NotZed@Ximian.com>
+
+ * mail-format.c (write_date): translate the local time format.
+
+2003-08-20 David Woodhouse <dwmw2@infradead.org>
+
+ * mail-format.c (write_date): Use e_utf8_strftime() to generate
+ localised time; avoid gratuitous extra translation and array of
+ day names, and the autoconf magic which made Not Zed dislike the
+ inclusion of the timezone name.
+
2003-08-14 Jeffrey Stedfast <fejj@ximian.com>
* mail-ops.c (mail_send_message): Don't abort at the first failure
@@ -101,6 +112,31 @@
2003-08-05 Not Zed <NotZed@Ximian.com>
+ ** See bug #32732
+
+ * message-list.c (mail_regen_list): use thread_new.
+
+ * mail-local.c (reconfigure_response): use thread_new.
+
+ * mail-display.c (stream_write_or_redisplay_when_loaded): use
+ thread_new.
+
+ * mail-config.c (mail_config_check_service): use thread_new rather
+ than queue.
+
+ * mail-callbacks.c (view_msg): change to use mail_get_messages(),
+ fixes FIXME.
+ (do_view_messages): handle get_messages callback.
+ (do_view_message): removed.
+
+ * mail-ops.c (mail_get_folderinfo): Use a new thread thread
+ semantic.
+ (mail_save_part): "
+ (mail_store_set_offline): "
+ (mail_sync_folder): use queued_slow thread queue.
+ (mail_expunge_folder): "
+ (mail_empty_trash): "
+
** See bug #47224. Hook onto clicked rather than button_pressed,
so that dnd works.
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index d018febeb0..21690c55ce 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -3121,18 +3121,21 @@ configure_folder (BonoboUIComponent *uih, void *user_data, const char *path)
}
static void
-do_view_message (CamelFolder *folder, const char *uid, CamelMimeMessage *message, void *data)
+do_view_messages(CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *data)
{
- FolderBrowser *fb = FOLDER_BROWSER (data);
-
+ FolderBrowser *fb = data;
+ int i;
+
if (FOLDER_BROWSER_IS_DESTROYED (fb))
return;
-
- if (message && uid) {
+
+ for (i = 0; i < uids->len && i < msgs->len; i++) {
+ char *uid = uids->pdata[i];
+ CamelMimeMessage *msg = msgs->pdata[i];
GtkWidget *mb;
- camel_folder_set_message_flags (folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
- mb = message_browser_new (fb->shell, fb->uri, uid);
+ camel_folder_set_message_flags(folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+ mb = message_browser_new(fb->shell, fb->uri, uid);
gtk_widget_show (mb);
}
}
@@ -3142,7 +3145,6 @@ view_msg (GtkWidget *widget, gpointer user_data)
{
FolderBrowser *fb = FOLDER_BROWSER (user_data);
GPtrArray *uids;
- int i;
if (FOLDER_BROWSER_IS_DESTROYED (fb))
return;
@@ -3153,12 +3155,7 @@ view_msg (GtkWidget *widget, gpointer user_data)
if (uids->len > 10 && !are_you_sure (_("Are you sure you want to open all %d messages in separate windows?"), uids, fb))
return;
- /* FIXME: use mail_get_messages() */
- for (i = 0; i < uids->len; i++) {
- mail_get_message (fb->folder, uids->pdata [i], do_view_message, fb, mail_thread_queued);
- g_free (uids->pdata [i]);
- }
- g_ptr_array_free (uids, TRUE);
+ mail_get_messages(fb->folder, uids, do_view_messages, fb);
}
void
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 2881d7603e..a357f74498 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1153,7 +1153,7 @@ mail_config_check_service (const char *url, CamelProviderType type, GList **auth
m->success = &ret;
id = m->msg.seq;
- e_thread_put(mail_thread_queued, (EMsg *)m);
+ e_thread_put(mail_thread_new, (EMsg *)m);
dialog = gtk_dialog_new_with_buttons(_("Connecting to server..."), window,
GTK_DIALOG_DESTROY_WITH_PARENT,
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 85f91d0d80..92428af592 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -775,11 +775,6 @@ write_field_row_begin (MailDisplayStream *stream, const char *name, int flags)
}
}
-/* day of the week names shown for remote mail offsets */
-static char *tz_days [] = {
- N_("Sun"), N_("Mon"), N_("Tue"), N_("Wed"), N_("Thu"), N_("Fri"), N_("Sat")
-};
-
static void
write_date (MailDisplayStream *stream, CamelMimeMessage *message, int flags)
{
@@ -806,15 +801,21 @@ write_date (MailDisplayStream *stream, CamelMimeMessage *message, int flags)
if (msg_offset) {
/* Message timezone different from local. Show both */
- camel_stream_printf((CamelStream *)stream, "<I> (");
-
+ char buf[30];
+
msg_offset += (local.tm_hour * 60) + local.tm_min;
+
if (msg_offset >= (24 * 60) || msg_offset < 0) {
/* Timezone conversion crossed midnight. Show day */
- camel_stream_printf((CamelStream *)stream, "%s, ", _(tz_days[local.tm_wday]));
+ /* translators: strftime format for local time equivalent in Date header display */
+ e_utf8_strftime(buf, 29, _("<I> (%a, %R %Z)</I>"), &local);
+ } else {
+ e_utf8_strftime(buf, 29, _("<I> (%R %Z)</I>"), &local);
}
- /* translators: 'localtime' equivalent shown in date header for mails from other timezones */
- camel_stream_printf((CamelStream *)stream, "%02d:%02d %s)</I>", local.tm_hour, local.tm_min, _("localtime"));
+
+ /* I doubt any locales put '%' in time representation
+ but just in case... */
+ camel_stream_printf((CamelStream *)stream, "%s", buf);
}
camel_stream_printf ((CamelStream *) stream, "</td> </tr>");
diff --git a/mail/mail-local.c b/mail/mail-local.c
index 80950935a9..26de1dbc2a 100644
--- a/mail/mail-local.c
+++ b/mail/mail-local.c
@@ -1396,7 +1396,7 @@ reconfigure_response(GtkDialog *dialog, int button, struct _reconfigure_msg *m)
gtk_widget_set_sensitive (m->apply, FALSE);
gtk_widget_set_sensitive (m->cancel, FALSE);
- e_thread_put (mail_thread_queued, (EMsg *)m);
+ e_thread_put (mail_thread_new, (EMsg *)m);
break; }
case GTK_RESPONSE_CANCEL:
default:
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index fcfcdaba9f..489dda4402 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1208,7 +1208,7 @@ mail_get_folderinfo (CamelStore *store, CamelOperation *op, void (*done)(CamelSt
m->data = data;
id = m->msg.seq;
- e_thread_put(mail_thread_queued, (EMsg *)m);
+ e_thread_put(mail_thread_new, (EMsg *)m);
return id;
}
@@ -1582,7 +1582,7 @@ mail_sync_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void *d
m->data = data;
m->done = done;
- e_thread_put(mail_thread_queued, (EMsg *)m);
+ e_thread_put(mail_thread_queued_slow, (EMsg *)m);
}
/* ******************************************************************************** */
@@ -1654,7 +1654,7 @@ mail_expunge_folder(CamelFolder *folder, void (*done) (CamelFolder *folder, void
m->data = data;
m->done = done;
- e_thread_put(mail_thread_queued, (EMsg *)m);
+ e_thread_put(mail_thread_queued_slow, (EMsg *)m);
}
/* ******************************************************************************** */
@@ -1729,7 +1729,7 @@ mail_empty_trash(EAccount *account, void (*done) (EAccount *account, void *data)
m->data = data;
m->done = done;
- e_thread_put(mail_thread_queued, (EMsg *)m);
+ e_thread_put(mail_thread_queued_slow, (EMsg *)m);
}
/* ** GET MESSAGE(s) ***************************************************** */
@@ -2150,7 +2150,7 @@ mail_save_part (CamelMimePart *part, const char *path,
m->done = done;
id = m->msg.seq;
- e_thread_put (mail_thread_queued, (EMsg *)m);
+ e_thread_put (mail_thread_new, (EMsg *)m);
return id;
}
@@ -2325,7 +2325,7 @@ mail_store_set_offline (CamelStore *store, gboolean offline,
m->done = done;
id = m->msg.seq;
- e_thread_put(mail_thread_queued, (EMsg *)m);
+ e_thread_put(mail_thread_new, (EMsg *)m);
return id;
}
diff --git a/mail/message-list.c b/mail/message-list.c
index a23d7ccbeb..77e03b656e 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2913,5 +2913,5 @@ mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, Came
ml->regen = g_list_prepend(ml->regen, m);
- e_thread_put (mail_thread_queued, (EMsg *)m);
+ e_thread_put (mail_thread_new, (EMsg *)m);
}