aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-13 03:50:59 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-13 03:50:59 +0800
commitd1a65232c9db32b85f693ffa51d86c0b2bc23e17 (patch)
tree275099554517e2caa59d42d14e84b4e0db686777
parent459023a2b9238500e0a2c05d72480fe90fea221d (diff)
downloadgsoc2013-evolution-d1a65232c9db32b85f693ffa51d86c0b2bc23e17.tar
gsoc2013-evolution-d1a65232c9db32b85f693ffa51d86c0b2bc23e17.tar.gz
gsoc2013-evolution-d1a65232c9db32b85f693ffa51d86c0b2bc23e17.tar.bz2
gsoc2013-evolution-d1a65232c9db32b85f693ffa51d86c0b2bc23e17.tar.lz
gsoc2013-evolution-d1a65232c9db32b85f693ffa51d86c0b2bc23e17.tar.xz
gsoc2013-evolution-d1a65232c9db32b85f693ffa51d86c0b2bc23e17.tar.zst
gsoc2013-evolution-d1a65232c9db32b85f693ffa51d86c0b2bc23e17.zip
Force-hide all deleted messages before expunging. (expunged_folder):
2001-07-12 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (expunge_folder): Force-hide all deleted messages before expunging. (expunged_folder): Restore the user's "hide deleted messages" preference. svn path=/trunk/; revision=11056
-rw-r--r--mail/ChangeLog40
-rw-r--r--mail/mail-callbacks.c35
2 files changed, 50 insertions, 25 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d738f076bd..a4118fd31d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-12 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-callbacks.c (expunge_folder): Force-hide all deleted
+ messages before expunging.
+ (expunged_folder): Restore the user's "hide deleted messages"
+ preference.
+
2001-07-12 Jason Leach <jleach@ximian.com>
* mail-callbacks.c (expunge_folder): Only blank the mail display
@@ -18,9 +25,9 @@
2001-07-10 Federico Mena Quintero <federico@ximian.com>
- * mail-display.c (link_copy_location): Set the CLIPBOARD
- selection as well as the primary selection so that Edit/Paste will
- work in other programs (e.g. Netscape).
+ * mail-display.c (link_copy_location): Set the CLIPBOARD selection
+ as well as the primary selection so that Edit/Paste will work in
+ other programs (e.g. Netscape).
(mail_display_new): Add the target for the CLIPBOARD selection.
2001-07-10 Jason Leach <jleach@ximian.com>
@@ -48,20 +55,23 @@
2001-07-10 Peter Williams <peterw@ximian.com>
- * mail-format.c (attachment_header): Took the logic of whether or not
- to make the attachment header out of the actual function.
- (mail_part_is_displayed_inline): Return if the part is being displayed
- inline (regardless of whether it is actually inline).
- (mail_part_toggle_displayed): Toggle whether it's displayed inline or not.
- (get_inline_flags): Determine whether the part is displayed inline and whether
- it is actually inline.
- (mail_format_mime_message): Initialize the attachment_status hash table.
-
- * mail-display.c (inline_cb): Instead of modifying the CamelMimePart,
- use mail_part_toggle_displayed
+ * mail-format.c (attachment_header): Took the logic of whether or
+ not to make the attachment header out of the actual function.
+ (mail_part_is_displayed_inline): Return if the part is being
+ displayed inline (regardless of whether it is actually inline).
+ (mail_part_toggle_displayed): Toggle whether it's displayed inline
+ or not.
+ (get_inline_flags): Determine whether the part is displayed inline
+ and whether it is actually inline.
+ (mail_format_mime_message): Initialize the attachment_status hash
+ table.
+
+ * mail-display.c (inline_cb): Instead of modifying the
+ CamelMimePart, use mail_part_toggle_displayed
(button_press): As above.
(pixmap_press): Use mail_part_is_displayed_inline instead of
- mail_part_is_inline. Get the MailDisplay from the popup to do this.
+ mail_part_is_inline. Get the MailDisplay from the popup to do
+ this.
* mail.h: Add prototypes.
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index f67f1a08a1..0800886a7f 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1618,32 +1618,47 @@ previous_flagged_msg (GtkWidget *button, gpointer user_data)
CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED);
}
+struct _expunged_folder_data {
+ FolderBrowser *fb;
+ gboolean hidedeleted;
+};
+
static void
expunged_folder (CamelFolder *f, void *data)
{
- FolderBrowser *fb = data;
-
+ FolderBrowser *fb = ((struct _expunged_folder_data *) data)->fb;
+ gboolean hidedeleted = ((struct _expunged_folder_data *) data)->hidedeleted;
+
fb->expunging = NULL;
+ message_list_set_hidedeleted (fb->message_list, hidedeleted);
+
+ g_free (data);
}
void
expunge_folder (BonoboUIComponent *uih, void *user_data, const char *path)
{
- FolderBrowser *fb = FOLDER_BROWSER(user_data);
-
- if (fb->folder
- && (fb->expunging == NULL
- || fb->folder != fb->expunging)) {
+ FolderBrowser *fb = FOLDER_BROWSER (user_data);
+
+ if (fb->folder && (fb->expunging == NULL || fb->folder != fb->expunging)) {
+ struct _expunged_folder_data *data;
CamelMessageInfo *info;
-
+
+ data = g_malloc (sizeof (*data));
+ data->fb = fb;
+ data->hidedeleted = fb->message_list->hidedeleted;
+
+ /* hide the deleted messages so user can't click on them while we expunge */
+ message_list_set_hidedeleted (fb->message_list, TRUE);
+
/* Only blank the mail display if the message being
viewed is one of those to be expunged */
info = camel_folder_get_message_info (fb->folder, fb->loaded_uid);
if (info->flags & CAMEL_MESSAGE_DELETED)
mail_display_set_message (fb->mail_display, NULL);
-
+
fb->expunging = fb->folder;
- mail_expunge_folder(fb->folder, expunged_folder, fb);
+ mail_expunge_folder (fb->folder, expunged_folder, data);
}
}