change implementation of return-receipt-request so it uses a permanently stored flag.
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 27 Jan 2002 00:44:09 +0000 (00:44 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 27 Jan 2002 00:44:09 +0000 (00:44 +0000)
ChangeLog.claws
configure.in
src/messageview.c
src/procheader.c
src/procmsg.h

index 9f41ebcbcf69080c082a692b829ba8511743702b..c490a8d08caaf62a4a00840fef6e29561875d47e 100644 (file)
@@ -1,3 +1,13 @@
+2002-01-27 [alfons]    0.7.0claws32
+
+       * src/procmsg.h
+       * src/procheader.c
+       * src/messageview.c
+               fix return receipt / disposition notification again. this
+               stuff seems to break on _every_ major summary UI change, so
+               it's now implemented using a flag which is saved in the
+               marks cache
+               
 2002-01-26 [alfons]    0.7.0claws31
 
        * src/import.c
index 36555b4adf89d7ef7226940d59352bc94028fef7..45412b7e6a9d792ea3ad2e3fb21329d0705ea7e3 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws31
+EXTRA_VERSION=claws32
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 1a54113025dfc3d0f8523176e6cdd9486cf7e699..0a898188a5f424eadd2f67b4265981ab6b1d0517 100644 (file)
@@ -440,7 +440,7 @@ void messageview_show(MessageView *messageview, MsgInfo *msginfo)
        if (prefs_common.return_receipt
            && (tmpmsginfo->dispositionnotificationto
                || tmpmsginfo->returnreceiptto)
-           && (MSG_IS_UNREAD(msginfo->flags))) {
+           && (MSG_IS_RETRCPT_PENDING(msginfo->flags))) {
                gint ok;
                
                if (alertpanel(_("Return Receipt"), _("Send return receipt ?"),
@@ -448,6 +448,8 @@ void messageview_show(MessageView *messageview, MsgInfo *msginfo)
                        ok = disposition_notification_send(tmpmsginfo);
                        if (ok < 0)
                                alertpanel_error(_("Error occurred while sending notification."));
+                       else
+                               MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_RETRCPT_PENDING);      
                }
        }
 
index 4e450a2b66316ac9206ccf7ee818477998260212..55abfaa2c022aeca0c58c174387e72fea4d7d00e 100644 (file)
@@ -629,10 +629,12 @@ MsgInfo *procheader_file_parse(FILE * fp, MsgFlags flags,
                case H_DISPOSITION_NOTIFICATION_TO:
                        if (msginfo->dispositionnotificationto) break;
                        msginfo->dispositionnotificationto = g_strdup(hp);
+                       MSG_SET_PERM_FLAGS(msginfo->flags, MSG_RETRCPT_PENDING);        
                        break;
                case H_RETURN_RECEIPT_TO:
                        if (msginfo->returnreceiptto) break;
                        msginfo->returnreceiptto = g_strdup(hp);
+                       MSG_SET_PERM_FLAGS(msginfo->flags, MSG_RETRCPT_PENDING);        
                        break;
 #ifdef ALLOW_HEADER_HINT                       
                case H_STATUS:
index 5b92d89c49a67a8f7a6ca54b25975ef45a83aa54..760d6bc1e5cb8851768e4e5335c3443f4224f7db 100644 (file)
@@ -66,6 +66,7 @@ typedef enum
 
        MSG_IGNORE_THREAD   = 1 << 10,   /* ignore threads */
        MSG_LOCKED          = 1 << 11,   /* msg is locked  */
+       MSG_RETRCPT_PENDING = 1 << 12,   /* return receipt pending */
 
        /* RESERVED */
        MSG_RESERVED_CLAWS  = 1 << 30,  /* for sylpheed-claws */
@@ -130,6 +131,7 @@ typedef enum
 /* Claws related flags */
 #define MSG_IS_REALLY_DELETED(msg)     (((msg).perm_flags & MSG_REALLY_DELETED) != 0)
 #define MSG_IS_IGNORE_THREAD(msg)      (((msg).perm_flags & MSG_IGNORE_THREAD) != 0)
+#define MSG_IS_RETRCPT_PENDING(msg)    (((msg).perm_flags & MSG_RETRCPT_PENDING) != 0)
 
 
 #define WRITE_CACHE_DATA_INT(n, fp) \