aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-10 07:58:52 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-10 07:58:52 +0800
commit91cc2f264eca81563176b2a7e21c87e82dacbb8c (patch)
treeab9c3209a248bc552462409ba787dd88169f0dbd /mail
parent3e4aed06dbb3c38fbbb0e9f0dd94fd52e27df19b (diff)
downloadgsoc2013-evolution-91cc2f264eca81563176b2a7e21c87e82dacbb8c.tar.gz
gsoc2013-evolution-91cc2f264eca81563176b2a7e21c87e82dacbb8c.tar.zst
gsoc2013-evolution-91cc2f264eca81563176b2a7e21c87e82dacbb8c.zip
Added a g_assert_not_reached() - I'm hoping this will help us track down
2001-08-09 Jeffrey Stedfast <fejj@ximian.com> * message-list.c (mlfe_callback): Added a g_assert_not_reached() - I'm hoping this will help us track down the "can't delete message sometimes" (ie bug #6637 and friends) bugs that users have been reporting. If herein lies the problem, then we can expect some crashes and some good backtraces, hopefully. svn path=/trunk/; revision=11854
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/mail-callbacks.c12
-rw-r--r--mail/message-list.c28
3 files changed, 32 insertions, 20 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 7be07110ed..18816239d5 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
+
+ * message-list.c (mlfe_callback): Added a g_assert_not_reached() -
+ I'm hoping this will help us track down the "can't delete message
+ sometimes" (ie bug #6637 and friends) bugs that users have been
+ reporting. If herein lies the problem, then we can expect some
+ crashes and some good backtraces, hopefully.
+
2001-08-09 Peter Williams <peterw@ximian.com>
* folder-browser.c (on_key_press): The bonobo menu items now
@@ -9,8 +17,8 @@
Fixes bug #6918
- * folder-browser.c: Changed the "Store search as vFolder"
- menu item to "Create vFolder from Search".
+ * folder-browser.c: Changed the "Store search as vFolder" menu
+ item to "Create vFolder from Search".
2001-08-09 Jeffrey Stedfast <fejj@ximian.com>
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index fd4b47e8ed..99d7444c94 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -1199,7 +1199,7 @@ invert_selection (BonoboUIComponent *uih, void *user_data, const char *path)
/* flag all selected messages. Return number flagged */
static int
-flag_messages(FolderBrowser *fb, guint32 mask, guint32 set)
+flag_messages (FolderBrowser *fb, guint32 mask, guint32 set)
{
MessageList *ml = fb->message_list;
GPtrArray *uids;
@@ -1219,7 +1219,7 @@ flag_messages(FolderBrowser *fb, guint32 mask, guint32 set)
camel_folder_thaw (ml->folder);
g_ptr_array_free (uids, TRUE);
-
+
return i;
}
@@ -1547,15 +1547,15 @@ delete_msg (GtkWidget *button, gpointer user_data)
{
FolderBrowser *fb = FOLDER_BROWSER (user_data);
int deleted, row;
-
+
deleted = flag_messages (fb, CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN,
CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_SEEN);
-
+
/* Select the next message if we are only deleting one message */
- if (deleted == 1) {
+ if (deleted) {
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))
diff --git a/mail/message-list.c b/mail/message-list.c
index ac5595d063..c9bbcf2980 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2016,23 +2016,23 @@ on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, Mess
flag = CAMEL_MESSAGE_FLAGGED;
else
return FALSE;
-
- info = get_message_info(list, path);
+
+ info = get_message_info (list, path);
if (info == NULL) {
return FALSE;
}
-
+
/* If a message was marked as deleted and the user flags it as important, undelete it */
if (col == COL_FLAGGED && (info->flags & CAMEL_MESSAGE_DELETED))
flag |= CAMEL_MESSAGE_DELETED;
-
- camel_folder_set_message_flags(list->folder, camel_message_info_uid(info), flag, ~info->flags);
-
+
+ camel_folder_set_message_flags (list->folder, camel_message_info_uid (info), flag, ~info->flags);
+
if (flag == CAMEL_MESSAGE_SEEN && list->seen_id) {
gtk_timeout_remove (list->seen_id);
list->seen_id = 0;
}
-
+
return TRUE;
}
@@ -2047,12 +2047,16 @@ mlfe_callback (int row, gpointer user_data)
{
struct message_list_foreach_data *mlfe_data = user_data;
const char *uid;
-
- uid = get_message_uid (mlfe_data->message_list, e_tree_node_at_row(mlfe_data->message_list->tree, row));
+
+ uid = get_message_uid (mlfe_data->message_list,
+ e_tree_node_at_row (mlfe_data->message_list->tree, row));
if (uid) {
- mlfe_data->callback (mlfe_data->message_list,
- uid,
+ mlfe_data->callback (mlfe_data->message_list, uid,
mlfe_data->user_data);
+ } else {
+ /* FIXME: could this the cause of bug #6637 and friends? */
+ g_warning ("I wonder if this could be the cause of bug #6637 and friends?");
+ g_assert_not_reached ();
}
}
@@ -2062,7 +2066,7 @@ message_list_foreach (MessageList *message_list,
gpointer user_data)
{
struct message_list_foreach_data mlfe_data;
-
+
mlfe_data.message_list = message_list;
mlfe_data.callback = callback;
mlfe_data.user_data = user_data;