+2006-05-18 [colin] 2.2.0cvs33
+
+ * src/imap.c
+ Warning fix
+ * src/compose.c
+ * src/mainwindow.c
+ * src/summaryview.c
+ * src/toolbar.c
+ Allow replying to multiple emails
+ in multiple windows
+ * src/mimeview.c
+ * src/etpan/imap-thread.c
+ Leak fixes
+
2006-05-18 [paul] 2.2.0cvs32
* src/summaryview.c
( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 manual/handling.xml; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 manual/fr/handling.xml; ) > 2.2.0cvs30.patchset
( cvs diff -u -r 1.1.2.15 -r 1.1.2.16 manual/advanced.xml; cvs diff -u -r 1.1.2.8 -r 1.1.2.9 manual/faq.xml; cvs diff -u -r 1.1.2.8 -r 1.1.2.9 manual/glossary.xml; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 manual/handling.xml; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 manual/intro.xml; cvs diff -u -r 1.1.2.11 -r 1.1.2.12 manual/plugins.xml; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 manual/sylpheed-claws-manual.xml; cvs diff -u -r 1.1.2.30 -r 1.1.2.31 src/wizard.c; cvs diff -u -r 1.9.2.24 -r 1.9.2.25 src/common/defs.h; cvs diff -u -r 1.4.2.32 -r 1.4.2.33 src/gtk/about.c; cvs diff -u -r 1.2 -r 1.3 src/plugins/dillo_viewer/README; ) > 2.2.0cvs31.patchset
( cvs diff -u -r 1.395.2.200 -r 1.395.2.201 src/summaryview.c; ) > 2.2.0cvs32.patchset
+( cvs diff -u -r 1.382.2.272 -r 1.382.2.273 src/compose.c; cvs diff -u -r 1.179.2.113 -r 1.179.2.114 src/imap.c; cvs diff -u -r 1.274.2.115 -r 1.274.2.116 src/mainwindow.c; cvs diff -u -r 1.83.2.69 -r 1.83.2.70 src/mimeview.c; cvs diff -u -r 1.395.2.201 -r 1.395.2.202 src/summaryview.c; cvs diff -u -r 1.43.2.44 -r 1.43.2.45 src/toolbar.c; cvs diff -u -r 1.1.4.36 -r 1.1.4.37 src/etpan/imap-thread.c; ) > 2.2.0cvs33.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=32
+EXTRA_VERSION=33
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
}
#endif
+static gboolean compose_force_window_origin = TRUE;
static Compose *compose_create(PrefsAccount *account, ComposeMode mode,
gboolean batch)
{
}
gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL,
&geometry, GDK_HINT_MIN_SIZE);
- gtk_widget_set_uposition(window, prefs_common.compose_x,
+
+ if (compose_force_window_origin)
+ gtk_widget_set_uposition(window, prefs_common.compose_x,
prefs_common.compose_y);
g_signal_connect(G_OBJECT(window), "delete_event",
}
}
-void compose_reply_from_messageview(MessageView *msgview, GSList *msginfo_list,
- guint action)
+static void compose_reply_from_messageview_real(MessageView *msgview, GSList *msginfo_list,
+ guint action, gboolean opening_multiple)
{
- gchar *body;
+ gchar *body = NULL;
GSList *new_msglist = NULL;
MsgInfo *tmp_msginfo = NULL;
gboolean originally_enc = FALSE;
g_return_if_fail(msginfo_list != NULL);
- if (g_slist_length(msginfo_list) == 1) {
+ if (g_slist_length(msginfo_list) == 1 && !opening_multiple) {
MimeInfo *mimeinfo = messageview_get_selected_mime_part(msgview);
MsgInfo *orig_msginfo = (MsgInfo *)msginfo_list->data;
}
}
- body = messageview_get_selection(msgview);
+ if (!opening_multiple)
+ body = messageview_get_selection(msgview);
if (new_msglist) {
compose = compose_reply_mode((ComposeMode)action, new_msglist, body);
g_free(body);
}
+void compose_reply_from_messageview(MessageView *msgview, GSList *msginfo_list,
+ guint action)
+{
+ if ((!prefs_common.forward_as_attachment || action != COMPOSE_FORWARD)
+ && action != COMPOSE_FORWARD_AS_ATTACH && g_slist_length(msginfo_list) > 1) {
+ GSList *cur = msginfo_list;
+ gchar *msg = g_strdup_printf(_("You are about to reply to %d "
+ "messages. Opening the windows "
+ "could take some time. Do you "
+ "want to continue?"),
+ g_slist_length(msginfo_list));
+ if (g_slist_length(msginfo_list) > 9
+ && alertpanel(_("Warning"), msg, GTK_STOCK_CANCEL, "+" GTK_STOCK_YES, NULL)
+ != G_ALERTALTERNATE) {
+ g_free(msg);
+ return;
+ }
+ g_free(msg);
+ /* We'll open multiple compose windows */
+ /* let the WM place the next windows */
+ compose_force_window_origin = FALSE;
+ for (; cur; cur = cur->next) {
+ GSList tmplist;
+ tmplist.data = cur->data;
+ tmplist.next = NULL;
+ compose_reply_from_messageview_real(msgview, &tmplist, action, TRUE);
+ }
+ compose_force_window_origin = TRUE;
+ } else {
+ /* forwarding multiple mails as attachments is done via a
+ * single compose window */
+ compose_reply_from_messageview_real(msgview, msginfo_list, action, FALSE);
+ }
+}
+
void compose_set_position(Compose *compose, gint pos)
{
GtkTextView *text = GTK_TEXT_VIEW(compose->text);
clist * search_result;
};
+static struct mailimap_set_item *sc_mailimap_set_item_copy(struct mailimap_set_item *orig)
+{
+ return mailimap_set_item_new(orig->set_first, orig->set_last);
+}
+
+static struct mailimap_set *sc_mailimap_set_copy(struct mailimap_set *orig)
+{
+ clist *list = orig ? orig->set_list : NULL;
+ clist *newlist = clist_new();
+ clistiter *cur;
+
+ if (!orig)
+ return NULL;
+ for (cur = clist_begin(list); cur; cur = clist_next(cur))
+ clist_append(newlist,
+ sc_mailimap_set_item_copy(
+ (struct mailimap_set_item *)clist_content(cur)));
+ return mailimap_set_new(newlist);
+}
+
static void search_run(struct etpan_thread_op * op)
{
struct search_param * param;
param = op->param;
- uid_key = mailimap_search_key_new_uid(param->set);
+ /* we copy the mailimap_set because freeing the key is recursive */
+ uid_key = mailimap_search_key_new_uid(sc_mailimap_set_copy(param->set));
search_type_key = NULL;
switch (param->type) {
r = mailimap_uid_search(param->imap, NULL, key, &search_result);
+ /* free the key (with the imapset) */
+ mailimap_search_key_free(key);
+
result = op->result;
result->error = r;
result->search_result = search_result;
{
IMAPNameSpace *namespace;
gchar separator = '/';
- Session *session = imap_session_get(folder);
+ IMAPSession *session = imap_session_get(FOLDER(folder));
g_return_val_if_fail(session != NULL, '/');
if (folder->last_seen_separator == 0) {
, M_INC_ACTIVE},
{"/Message/Compose a news message", M_HAVE_NEWS_ACCOUNT},
- {"/Message/Reply" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Message/Reply to" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Message/Follow-up and reply to", M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST|M_NEWS},
+ {"/Message/Reply" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+ {"/Message/Reply to" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+ {"/Message/Follow-up and reply to", M_HAVE_ACCOUNT|M_TARGET_EXIST|M_NEWS},
{"/Message/Forward" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Message/Forward as attachment" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
- {"/Message/Redirect" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
+ {"/Message/Redirect" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Message/Move..." , M_TARGET_EXIST|M_ALLOW_DELETE},
{"/Message/Copy..." , M_TARGET_EXIST|M_EXEC},
{"/Message/Move to trash" , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
for (; child != NULL; child = g_list_next(child)) {
gtkut_container_remove(GTK_CONTAINER(mimeview->icon_vbox),
GTK_WIDGET(child->data));
+ gtk_widget_destroy(GTK_WIDGET(child->data));
}
mimeview->icon_count = 0;
adj = gtk_layout_get_vadjustment(GTK_LAYOUT(mimeview->icon_scroll));
gchar *const entry;
SensitiveCond cond;
} entry[] = {
- {"/Reply" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Reply to" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Reply to/all" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Reply to/sender" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Reply to/mailing list" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
+ {"/Reply" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+ {"/Reply to" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+ {"/Reply to/all" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+ {"/Reply to/sender" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
+ {"/Reply to/mailing list" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Forward" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Forward as attachment" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
- {"/Redirect" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
+ {"/Redirect" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Move..." , M_TARGET_EXIST|M_ALLOW_DELETE|M_NOT_NEWS},
{"/Copy..." , M_TARGET_EXIST|M_EXEC},
M_HAVE_ACCOUNT);
SET_WIDGET_COND(toolbar->compose_news_btn, M_HAVE_ACCOUNT);
SET_WIDGET_COND(toolbar->reply_btn,
- M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ M_HAVE_ACCOUNT|M_TARGET_EXIST);
if (toolbar->reply_btn)
SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->reply_combo),
- M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
- SET_WIDGET_COND(toolbar->replyall_btn,
- M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ M_HAVE_ACCOUNT|M_TARGET_EXIST);
+ if (toolbar->replyall_btn)
+ SET_WIDGET_COND(toolbar->replyall_btn,
+ M_HAVE_ACCOUNT|M_TARGET_EXIST);
if (toolbar->replyall_btn)
SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->replyall_combo),
- M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ M_HAVE_ACCOUNT|M_TARGET_EXIST);
SET_WIDGET_COND(toolbar->replylist_btn,
- M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ M_HAVE_ACCOUNT|M_TARGET_EXIST);
if (toolbar->replylist_btn)
SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->replylist_combo),
- M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ M_HAVE_ACCOUNT|M_TARGET_EXIST);
SET_WIDGET_COND(toolbar->replysender_btn,
- M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ M_HAVE_ACCOUNT|M_TARGET_EXIST);
if (toolbar->replysender_btn)
SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->replysender_combo),
- M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ M_HAVE_ACCOUNT|M_TARGET_EXIST);
SET_WIDGET_COND(toolbar->fwd_btn, M_HAVE_ACCOUNT|M_TARGET_EXIST);
if (toolbar->fwd_btn)
SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->fwd_combo),
M_HAVE_ACCOUNT|M_TARGET_EXIST);
if (toolbar->fwd_combo) {
GtkWidget *submenu = gtk_item_factory_get_widget(toolbar->fwd_combo->factory, "/Redirect");
- SET_WIDGET_COND(submenu, M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
+ SET_WIDGET_COND(submenu, M_HAVE_ACCOUNT|M_TARGET_EXIST);
}
if (prefs_common.next_unread_msg_dialog == NEXTUNREADMSGDIALOG_ASSUME_NO) {