aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-10-29 09:44:31 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-10-29 09:44:31 +0800
commit9367415dc36546a74f29fa26f89e907bdcf6175e (patch)
tree3ac53d76c6e7a8a719f762a1afd7081c9d794e9f /mail/mail-callbacks.c
parent777dc4018ac11b565eeacd9967670989bd28d297 (diff)
downloadgsoc2013-evolution-9367415dc36546a74f29fa26f89e907bdcf6175e.tar.gz
gsoc2013-evolution-9367415dc36546a74f29fa26f89e907bdcf6175e.tar.zst
gsoc2013-evolution-9367415dc36546a74f29fa26f89e907bdcf6175e.zip
Move the message-list cursor to the next message. (transfer_msg): If we
2001-10-28 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (transfer_msg_done): Move the message-list cursor to the next message. (transfer_msg): If we are moving messages, then pass transfer_msg_done() to mail_transfer_messages() so when it finishes it can move the cursor to the next undeleted message. svn path=/trunk/; revision=14313
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index a37f2dd7ea..195715b383 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1221,6 +1221,30 @@ forward (GtkWidget *widget, gpointer user_data)
}
static void
+transfer_msg_done (gboolean ok, void *data)
+{
+ FolderBrowser *fb = data;
+ int row;
+
+ if (ok && !FOLDER_BROWSER_IS_DESTROYED (fb)) {
+ row = e_tree_row_of_node (fb->message_list->tree,
+ e_tree_get_cursor (fb->message_list->tree));
+
+ /* If this is the last message and deleted messages
+ are hidden, select the previous */
+ if ((row + 1 == e_tree_row_count (fb->message_list->tree))
+ && mail_config_get_hide_deleted ())
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_PREVIOUS,
+ 0, CAMEL_MESSAGE_DELETED, FALSE);
+ else
+ message_list_select (fb->message_list, row, MESSAGE_LIST_SELECT_NEXT,
+ 0, 0, FALSE);
+ }
+
+ gtk_object_unref (GTK_OBJECT (fb));
+}
+
+static void
transfer_msg (FolderBrowser *fb, gboolean delete_from_source)
{
const char *allowed_types[] = { "mail", "vtrash", NULL };
@@ -1256,8 +1280,15 @@ transfer_msg (FolderBrowser *fb, gboolean delete_from_source)
uids = g_ptr_array_new ();
message_list_foreach (fb->message_list, enumerate_msg, uids);
- mail_transfer_messages (fb->folder, uids, delete_from_source,
- physical, 0, NULL, NULL);
+
+ if (delete_from_source) {
+ gtk_object_ref (GTK_OBJECT (fb));
+ mail_transfer_messages (fb->folder, uids, delete_from_source,
+ physical, 0, transfer_msg_done, fb);
+ } else {
+ mail_transfer_messages (fb->folder, uids, delete_from_source,
+ physical, 0, NULL, NULL);
+ }
}
void
t/www/aria?h=gstreamer0.10-removal&id=0400b2c7ffd8d495abfaff9f6419752b85e249fc'>Remove USE_GNOME=gnometarget from ports. It has been a empty keyword sincekwm2011-08-121-1/+1 * Remove WWW entries from unmaintained ports that return 404 or where the domainehaupt2011-08-031-2/+0 * - Get Rid MD5 supportmiwi2011-03-191-1/+0 * Bounce PORTREVISION for gettext-related ports. Have fun, ya'll.ade2010-05-311-1/+1 * - Reset some morepgollucci2010-04-291-1/+1 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-1/+1 * - Mark most of my ports MAKE_JOBS_SAFE=yespgollucci2009-05-161-0/+2 * Update my ports to my freebsd addresspgollucci2008-07-231-1/+1 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-1/+1 * - Make fetchablebeech2007-11-082-28/+29 * Fix build on 64bit platformsarved2007-08-021-2/+11 * - Welcome X.org 7.2 \o/.flz2007-05-201-1/+1 * Fix build with gcc41arved2006-12-211-0/+11 * Remove USE_REINPLACE from categories starting with Wedwin2006-05-131-1/+0 * Bump PORTREVISION on glib12/gtk12 consumer ports to ease the upgrade path.ade2006-03-071-1/+1 * Conversion to a single libtool environment.ade2006-02-231-1/+1 * Add missing USE_GETTEXTkris2006-01-261-0/+1 * - Add SHA256pav2005-11-261-0/+2 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-1/+1