diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | libsylph/imap.c | 9 |
3 files changed, 19 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2005-09-05 + * src/imap.c: show progress when executing operations which takes long + time. + +2005-09-05 + * libsylph/account.[ch] libsylph/customheader.[ch] libsylph/enums.h diff --git a/ChangeLog.ja b/ChangeLog.ja index 86374c2a..51d9f75a 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2005-09-05 + * src/imap.c: 長時間かかる操作を実行しているときに進捗を表示する + ようにした。 + +2005-09-05 + * libsylph/account.[ch] libsylph/customheader.[ch] libsylph/enums.h diff --git a/libsylph/imap.c b/libsylph/imap.c index a179c23c..007c232c 100644 --- a/libsylph/imap.c +++ b/libsylph/imap.c @@ -1147,6 +1147,8 @@ static gint imap_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list, guint32 last_uid = 0; GSList *cur; MsgFileInfo *fileinfo; + gint count = 1; + gint total; gint ok; g_return_val_if_fail(folder != NULL, -1); @@ -1170,6 +1172,8 @@ static gint imap_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list, if (first) *first = uid_next; + total = g_slist_length(file_list); + for (cur = file_list; cur != NULL; cur = cur->next) { IMAPFlags iflags = 0; guint32 new_uid = 0; @@ -1191,6 +1195,8 @@ static gint imap_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list, dest->stype == F_TRASH) iflags |= IMAP_FLAG_SEEN; + print_status(_("appending message (%d / %d)"), count++, total); + ok = imap_cmd_append(session, destdir, fileinfo->file, iflags, &new_uid); @@ -2228,6 +2234,7 @@ static GSList *imap_get_uncached_messages(IMAPSession *session, GString *str; MsgInfo *msginfo; gchar seq_set[22]; + gint count = 1; g_return_val_if_fail(session != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); @@ -2248,6 +2255,8 @@ static GSList *imap_get_uncached_messages(IMAPSession *session, str = g_string_new(NULL); for (;;) { + print_status(_("getting headers of message %d"), count++); + if (sock_getline(SESSION(session)->sock, &tmp) < 0) { log_warning(_("error occurred while getting envelope.\n")); g_string_free(str, TRUE); |