2006-09-02 [colin] 2.4.0cvs133
authorColin Leroy <colin@colino.net>
Sat, 2 Sep 2006 15:22:45 +0000 (15:22 +0000)
committerColin Leroy <colin@colino.net>
Sat, 2 Sep 2006 15:22:45 +0000 (15:22 +0000)
* src/messageview.c
Display a special return-receipt message
if the message is from the user
* src/summaryview.c
Fix missing freeze of the list when marking
all read and unthreading for exec. Thanks
to Stephan Sachse.

ChangeLog
PATCHSETS
configure.ac
src/messageview.c
src/summaryview.c

index 17962219501a5c638b75a64f557e6f6aa1843f40..3e0c3811d761ba03588e32a96064ffb5d8b529e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-09-02 [colin]     2.4.0cvs133
+
+       * src/messageview.c
+               Display a special return-receipt message
+               if the message is from the user
+       * src/summaryview.c
+               Fix missing freeze of the list when marking
+               all read and unthreading for exec. Thanks
+               to Stephan Sachse.
+
 2006-09-02 [paul]      2.4.0cvs132
 
        * src/mainwindow.c
index 6b50232adbc29111f2f46ddb96d85072258477d2..619f6431868020df0cd0ea197c95bb034ce16abd 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.4.19 -r 1.1.4.20 src/gtk/logwindow.c;  cvs diff -u -r 1.1.4.6 -r 1.1.4.7 src/gtk/logwindow.h;  ) > 2.4.0cvs130.patchset
 ( cvs diff -u -r 1.59.2.40 -r 1.59.2.41 src/prefs_filtering.c;  ) > 2.4.0cvs131.patchset
 ( cvs diff -u -r 1.274.2.145 -r 1.274.2.146 src/mainwindow.c;  cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/prefs_message.c;  cvs diff -u -r 1.395.2.239 -r 1.395.2.240 src/summaryview.c;  ) > 2.4.0cvs132.patchset
+( cvs diff -u -r 1.94.2.100 -r 1.94.2.101 src/messageview.c;  cvs diff -u -r 1.395.2.240 -r 1.395.2.241 src/summaryview.c;  ) > 2.4.0cvs133.patchset
index 2300fa6cc70e4424fd4e5d78b21c8b7d3566f166..f4db7d46e3f597fd6568a6ce5c3fbe90cf3a4266 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=132
+EXTRA_VERSION=133
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 7ad2720644fe55c05a203d0002457ab48929b896..e7ec190328e3b977a4018c5e91ef006bb59d68ec 100644 (file)
@@ -1207,16 +1207,33 @@ void messageview_toggle_view_real(MessageView *messageview)
 
 static void return_receipt_show(NoticeView *noticeview, MsgInfo *msginfo)
 {
+       gchar *addr = NULL;
+       gboolean from_me = FALSE;
        if (msginfo->folder 
                && (folder_has_parent_of_type(msginfo->folder, F_QUEUE)
                 || folder_has_parent_of_type(msginfo->folder, F_DRAFT)))
                return;
 
-       noticeview_set_text(noticeview, _("This message asks for a return receipt."));
-       noticeview_set_button_text(noticeview, _("Send receipt"));
-       noticeview_set_button_press_callback(noticeview,
-                                            G_CALLBACK(return_receipt_send_clicked),
-                                            (gpointer) msginfo);
+       addr = g_strdup(msginfo->from);
+       if (addr) {
+               extract_address(addr);
+               if (account_find_from_address(addr)) {
+                       from_me = TRUE;
+               }
+               g_free(addr);
+       }
+
+       if (from_me) {
+               noticeview_set_text(noticeview, _("You asked for a return receipt in this message."));
+               noticeview_set_button_text(noticeview, NULL);
+               noticeview_set_button_press_callback(noticeview, NULL, NULL);
+       } else {
+               noticeview_set_text(noticeview, _("This message asks for a return receipt."));
+               noticeview_set_button_text(noticeview, _("Send receipt"));
+               noticeview_set_button_press_callback(noticeview,
+                                                    G_CALLBACK(return_receipt_send_clicked),
+                                                    (gpointer) msginfo);
+       }
        noticeview_show(noticeview);
 }
 
index 45f55235610a7dc0c3985153612dd8e12ce98e95..a3b972d50bd461ad1831e522382847a39e26cfee 100644 (file)
@@ -494,10 +494,10 @@ static const gchar *const col_label[N_SUMMARY_COLS] = {
        "",             /* S_COL_LOCKED  */
 };
 
-#define START_LONG_OPERATION(summaryview) {                    \
+#define START_LONG_OPERATION(summaryview,force_freeze) {       \
        summary_lock(summaryview);                              \
        main_window_cursor_wait(summaryview->mainwin);          \
-       if (sc_g_list_bigger(GTK_CLIST(summaryview->ctree)->selection, 1)) {\
+       if (force_freeze || sc_g_list_bigger(GTK_CLIST(summaryview->ctree)->selection, 1)) {\
                froze = TRUE;                                           \
                gtk_clist_freeze(GTK_CLIST(summaryview->ctree));        \
        }                                                       \
@@ -3211,7 +3211,7 @@ void summary_mark(SummaryView *summaryview)
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        folder_item_set_batch(summaryview->folder_item, TRUE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
                summary_mark_row(summaryview, GTK_CTREE_NODE(cur->data));
@@ -3246,7 +3246,7 @@ void summary_mark_as_read
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        folder_item_set_batch(summaryview->folder_item, TRUE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
                summary_mark_row_as_read(summaryview,
@@ -3263,7 +3263,7 @@ void summary_msgs_lock(SummaryView *summaryview)
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
                summary_lock_row(summaryview,
                                         GTK_CTREE_NODE(cur->data));
@@ -3278,7 +3278,7 @@ void summary_msgs_unlock(SummaryView *summaryview)
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
                summary_unlock_row(summaryview,
                                   GTK_CTREE_NODE(cur->data));
@@ -3306,7 +3306,7 @@ void summary_mark_all_read(SummaryView *summaryview)
                        prefs_common.ask_mark_all_read = FALSE;
        }
        
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, TRUE);
        folder_item_set_batch(summaryview->folder_item, TRUE);
        for (node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list); node != NULL;
             node = gtkut_ctree_node_next(ctree, node))
@@ -3334,7 +3334,7 @@ void summary_mark_as_spam(SummaryView *summaryview, guint action, GtkWidget *wid
 
        prefs_common.immediate_exec = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
 
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next) {
                GtkCTreeNode *row = GTK_CTREE_NODE(cur->data);
@@ -3411,7 +3411,7 @@ void summary_mark_as_unread(SummaryView *summaryview)
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        folder_item_set_batch(summaryview->folder_item, TRUE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; 
                cur = cur->next)
@@ -3567,7 +3567,7 @@ void summary_delete(SummaryView *summaryview)
 
        /* next code sets current row focus right. We need to find a row
         * that is not deleted. */
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        folder_item_set_batch(summaryview->folder_item, TRUE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next) {
                sel_last = GTK_CTREE_NODE(cur->data);
@@ -3644,7 +3644,7 @@ void summary_unmark(SummaryView *summaryview)
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        folder_item_set_batch(summaryview->folder_item, TRUE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
                summary_unmark_row(summaryview, GTK_CTREE_NODE(cur->data));
@@ -3706,7 +3706,7 @@ void summary_move_selected_to(SummaryView *summaryview, FolderItem *to_folder)
                return;
        }
 
-       START_LONG_OPERATION(summaryview); 
+       START_LONG_OPERATION(summaryview, FALSE); 
 
        for (cur = GTK_CLIST(summaryview->ctree)->selection;
             cur != NULL && cur->data != NULL; cur = cur->next) {
@@ -3797,7 +3797,7 @@ void summary_copy_selected_to(SummaryView *summaryview, FolderItem *to_folder)
                return;
        }
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
 
        for (cur = GTK_CLIST(summaryview->ctree)->selection;
             cur != NULL && cur->data != NULL; cur = cur->next)
@@ -4376,8 +4376,7 @@ static void summary_unthread_for_exec(SummaryView *summaryview)
 
        debug_print("Unthreading for execution...");
 
-       START_LONG_OPERATION(summaryview);
-
+       START_LONG_OPERATION(summaryview, TRUE);
        for (node = GTK_CTREE_NODE(GTK_CLIST(ctree)->row_list);
             node != NULL; node = GTK_CTREE_NODE_NEXT(node)) {
                summary_unthread_for_exec_func(ctree, node, summaryview);
@@ -4759,8 +4758,7 @@ void summary_set_colorlabel(SummaryView *summaryview, guint labelcolor,
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
-
+       START_LONG_OPERATION(summaryview, FALSE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
                summary_set_row_colorlabel(summaryview,
                                           GTK_CTREE_NODE(cur->data), labelcolor);
@@ -5860,7 +5858,7 @@ static void summary_ignore_thread(SummaryView *summaryview)
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
                gtk_ctree_pre_recursive(ctree, GTK_CTREE_NODE(cur->data), 
                                        GTK_CTREE_FUNC(summary_ignore_thread_func), 
@@ -5892,7 +5890,7 @@ static void summary_unignore_thread(SummaryView *summaryview)
        GList *cur;
        gboolean froze = FALSE;
 
-       START_LONG_OPERATION(summaryview);
+       START_LONG_OPERATION(summaryview, FALSE);
        for (cur = GTK_CLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
                gtk_ctree_pre_recursive(ctree, GTK_CTREE_NODE(cur->data), 
                                        GTK_CTREE_FUNC(summary_unignore_thread_func),