+2006-02-19 [colin] 2.0.0cvs62
+
+ * src/compose.c
+ * src/imap.c
+ * src/etpan/imap-thread.c
+ * src/etpan/imap-thread.h
+ (Future) IMAP speed improvement on sending
+ Will require a libetpan update
+ * src/summaryview.c
+ * src/gtk/quicksearch.c
+ Make quicksearch clearable while running.
+
2006-02-17 [colin] 2.0.0cvs61
* src/imap.c
( cvs diff -u -r 1.115.2.75 -r 1.115.2.76 src/main.c; cvs diff -u -r 1.13.2.16 -r 1.13.2.17 src/common/plugin.c; cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/common/plugin.h; cvs diff -u -r 1.5.2.26 -r 1.5.2.27 src/gtk/pluginwindow.c; ) > 2.0.0cvs59.patchset
( cvs diff -u -r 1.94.2.76 -r 1.94.2.77 src/messageview.c; cvs diff -u -r 1.204.2.76 -r 1.204.2.77 src/prefs_common.c; cvs diff -u -r 1.103.2.41 -r 1.103.2.42 src/prefs_common.h; cvs diff -u -r 1.1.2.11 -r 1.1.2.12 src/prefs_message.c; ) > 2.0.0cvs60.patchset
( cvs diff -u -r 1.179.2.92 -r 1.179.2.93 src/imap.c; cvs diff -u -r 1.1.4.28 -r 1.1.4.29 src/etpan/imap-thread.c; cvs diff -u -r 1.1.4.7 -r 1.1.4.8 src/etpan/imap-thread.h; ) > 2.0.0cvs61.patchset
+( cvs diff -u -r 1.382.2.242 -r 1.382.2.243 src/compose.c; cvs diff -u -r 1.179.2.93 -r 1.179.2.94 src/imap.c; cvs diff -u -r 1.395.2.170 -r 1.395.2.171 src/summaryview.c; cvs diff -u -r 1.1.4.29 -r 1.1.4.30 src/etpan/imap-thread.c; cvs diff -u -r 1.1.4.8 -r 1.1.4.9 src/etpan/imap-thread.h; cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/gtk/quicksearch.c; ) > 2.0.0cvs62.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=61
+EXTRA_VERSION=62
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
void compose_remove_draft (Compose *compose);
static gint compose_queue (Compose *compose,
gint *msgnum,
- FolderItem **item);
+ FolderItem **item,
+ gchar **msgpath);
static gint compose_queue_sub (Compose *compose,
gint *msgnum,
FolderItem **item,
+ gchar **msgpath,
gboolean check_subject);
static void compose_add_attachments (Compose *compose,
MimeInfo *parent);
gint msgnum;
FolderItem *folder;
gint val = -1;
- gchar *msgpath;
+ gchar *msgpath = NULL;
compose_allow_user_actions (compose, FALSE);
compose->sending = TRUE;
if (compose_check_entries(compose, TRUE) == FALSE)
goto bail;
- val = compose_queue(compose, &msgnum, &folder);
+ val = compose_queue(compose, &msgnum, &folder, &msgpath);
if (val) {
if (val == -4) {
return 0;
}
- msgpath = folder_item_fetch_msg(folder, msgnum);
- val = procmsg_send_message_queue(msgpath);
- g_free(msgpath);
-
+ if (msgpath == NULL) {
+ msgpath = folder_item_fetch_msg(folder, msgnum);
+ val = procmsg_send_message_queue(msgpath);
+ g_free(msgpath);
+ } else {
+ val = procmsg_send_message_queue(msgpath);
+ g_unlink(msgpath);
+ g_free(msgpath);
+ }
if (prefs_common.send_dialog_mode == SEND_DIALOG_ALWAYS) {
compose->sending = FALSE;
compose_allow_user_actions (compose, TRUE);
}
-static gint compose_queue(Compose *compose, gint *msgnum, FolderItem **item)
+static gint compose_queue(Compose *compose, gint *msgnum, FolderItem **item, gchar **msgpath)
{
- return compose_queue_sub (compose, msgnum, item, FALSE);
+ return compose_queue_sub (compose, msgnum, item, msgpath, FALSE);
}
-static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item, gboolean check_subject)
+static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item, gchar **msgpath, gboolean check_subject)
{
FolderItem *queue;
gchar *tmp;
return -1;
}
folder_item_scan(queue);
- if ((num = folder_item_add_msg(queue, tmp, NULL, TRUE)) < 0) {
+ if ((num = folder_item_add_msg(queue, tmp, NULL, FALSE)) < 0) {
g_warning("can't queue the message\n");
g_unlink(tmp);
g_free(tmp);
return -1;
}
- g_unlink(tmp);
- g_free(tmp);
+
+ if (msgpath == NULL) {
+ g_unlink(tmp);
+ g_free(tmp);
+ } else
+ *msgpath = tmp;
if (compose->mode == COMPOSE_REEDIT) {
compose_remove_reedit_target(compose, FALSE);
Compose *compose = (Compose *)data;
gint val;
- val = compose_queue_sub(compose, NULL, NULL, TRUE);
+ val = compose_queue_sub(compose, NULL, NULL, NULL, TRUE);
if (!val)
compose_close(compose);
else if (val == -2) {
struct append_result {
int error;
+ int uid;
};
static void append_run(struct etpan_thread_op * op)
char * data;
size_t size;
struct stat stat_buf;
- int fd;
+ int fd, uid = 0;
param = op->param;
result = op->result;
r = mailimap_append(param->imap, param->mailbox,
param->flag_list, NULL,
- data, size);
+ data, size/*, &uid */);
munmap(data, size);
close(fd);
result->error = r;
-
- debug_print("imap append run - end %i\n", r);
+ result->uid = uid;
+ debug_print("imap append run - end %i uid %d\n", r, uid);
}
int imap_threaded_append(Folder * folder, const char * mailbox,
const char * filename,
- struct mailimap_flag_list * flag_list)
+ struct mailimap_flag_list * flag_list,
+ int *uid)
{
struct append_param param;
struct append_result result;
return result.error;
debug_print("imap append - end\n");
-
+ if (uid != NULL)
+ *uid = result.uid;
+
return result.error;
}
int imap_threaded_append(Folder * folder, const char * mailbox,
const char * filename,
- struct mailimap_flag_list * flag_list);
+ struct mailimap_flag_list * flag_list,
+ int *uid);
int imap_threaded_expunge(Folder * folder);
break;
}
procmsg_msginfo_free(msg);
+ GTK_EVENTS_FLUSH();
+ if (!quicksearch_is_active(quicksearch))
+ break;
}
g_slist_free(msglist);
cur);
}
quicksearch->root_folder_item = folder_item;
+ if (!quicksearch_is_active(quicksearch))
+ quicksearch_reset_cur_folder_item(quicksearch);
}
static void quicksearch_reset_folder_items(QuickSearch *quicksearch,
procmsg_msginfo_free(msginfo);
file_strip_crs(filename);
return filename;
+ } else if (!cached) {
+ debug_print("message not cached, considering file complete\n");
+ procmsg_msginfo_free(msginfo);
+ file_strip_crs(filename);
+ return filename;
} else {
procmsg_msginfo_free(cached);
procmsg_msginfo_free(msginfo);
flag_list = imap_flag_to_lep(flags);
r = imap_threaded_append(session->folder, destfolder,
- file, flag_list);
+ file, flag_list, new_uid);
mailimap_flag_list_free(flag_list);
- if (new_uid != NULL)
- *new_uid = 0;
if (r != MAILIMAP_NO_ERROR) {
debug_print("append err %d\n", r);
if (quicksearch_is_active(summaryview->quicksearch)) {
GSList *not_killed;
-
+ int n = 0;
not_killed = NULL;
for (cur = mlist ; cur != NULL && cur->data != NULL ; cur = g_slist_next(cur)) {
MsgInfo * msginfo = (MsgInfo *) cur->data;
not_killed = g_slist_prepend(not_killed, msginfo);
else
procmsg_msginfo_free(msginfo);
+ GTK_EVENTS_FLUSH();
+ if (!quicksearch_is_active(summaryview->quicksearch)) {
+ break;
+ }
}
hidden_removed = TRUE;
if (quicksearch_is_running(summaryview->quicksearch)) {
summaryview->folder_item);
main_window_cursor_normal(summaryview->mainwin);
}
-
+
+ if (!quicksearch_is_active(summaryview->quicksearch)) {
+ debug_print("search cancelled!\n");
+ gtk_clist_thaw(GTK_CLIST(ctree));
+ STATUSBAR_POP(summaryview->mainwin);
+ main_window_cursor_normal(summaryview->mainwin);
+ summary_unlock(summaryview);
+ inc_unlock();
+ summary_show(summaryview, summaryview->folder_item);
+ return FALSE;
+ }
g_slist_free(mlist);
mlist = not_killed;
}
toolbar_main_set_sensitive(summaryview->mainwin);
gtk_clist_thaw(GTK_CLIST(ctree));
-
debug_print("\n");
STATUSBAR_PUSH(summaryview->mainwin, _("Done."));
STATUSBAR_POP(summaryview->mainwin);