summaryrefslogtreecommitdiff
blob: e36e074e0b270c476a1816c6a1e0539113b23878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
From c54706e990bbd6498e7b1597ec7900bc809e8197 Mon Sep 17 00:00:00 2001
From: Montel Laurent <montel@kde.org>
Date: Fri, 2 Jun 2017 13:56:41 +0200
Subject: Make sure to sign/encrypt message when we send later

(cherry picked from commit 4048f5e46d0a7d62d93d74fd2861dd70fb2ad660)
---
 messagecomposer/composer/composerviewbase.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: kdepim-4.14.10/messagecomposer/composer/composerviewbase.cpp
===================================================================
--- kdepim-4.14.10.orig/messagecomposer/composer/composerviewbase.cpp
+++ kdepim-4.14.10/messagecomposer/composer/composerviewbase.cpp
@@ -435,7 +435,7 @@ void MessageComposer::ComposerViewBase::
     // if so, we create a composer per format
     // if we aren't signing or encrypting, this just returns a single empty message
     bool wasCanceled = false;
-    if( m_neverEncrypt && mSaveIn != MessageComposer::MessageSender::SaveInNone ) {
+    if( m_neverEncrypt && mSaveIn != MessageComposer::MessageSender::SaveInNone && !mSendLaterInfo) {
         MessageComposer::Composer* composer = new MessageComposer::Composer;
         composer->setNoCrypto( true );
         m_composers.append( composer );
From 78c5552be2f00a4ac25bd77ca39386522fca70a8 Mon Sep 17 00:00:00 2001
From: Montel Laurent <montel@kde.org>
Date: Fri, 2 Jun 2017 13:59:02 +0200
Subject: Make sure that we use plugin when we use sendlater feature

---
 src/editor/kmcomposewin.cpp | 9 +++++----
 src/editor/kmcomposewin.h   | 3 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)

Index: kdepim-4.14.10/kmail/editor/kmcomposewin.cpp
===================================================================
--- kdepim-4.14.10.orig/kmail/editor/kmcomposewin.cpp
+++ kdepim-4.14.10/kmail/editor/kmcomposewin.cpp
@@ -2533,7 +2533,7 @@ void KMComposeWin::printComposeResult( K
 
 
 void KMComposeWin::doSend( MessageComposer::MessageSender::SendMethod method,
-                           MessageComposer::MessageSender::SaveIn saveIn )
+                           MessageComposer::MessageSender::SaveIn saveIn, bool willSendItWithoutReediting )
 {
     if ( mStorageService->numProgressUpdateFile() > 0) {
         KMessageBox::sorry( this, i18np( "There is %1 file upload in progress.",
@@ -2549,7 +2549,7 @@ void KMComposeWin::doSend( MessageCompos
     }
 
 
-    if ( saveIn == MessageComposer::MessageSender::SaveInNone ) { // don't save as draft or template, send immediately
+    if ( saveIn == MessageComposer::MessageSender::SaveInNone || willSendItWithoutReediting ) { // don't save as draft or template, send immediately
         if ( KPIMUtils::firstEmailAddress( from() ).isEmpty() ) {
             if ( !( mShowHeaders & HDR_FROM ) ) {
                 mShowHeaders |= HDR_FROM;
@@ -2716,6 +2716,7 @@ void KMComposeWin::slotSendLater()
         return;
     if ( !checkRecipientNumber() )
         return;
+    mComposerBase->setSendLaterInfo(NULL);
     if ( mComposerBase->editor()->checkExternalEditorFinished() ) {
         const bool wasRegistered = (SendLater::SendLaterUtil::sentLaterAgentWasRegistered() && SendLater::SendLaterUtil::sentLaterAgentEnabled());
         if (wasRegistered) {
@@ -2739,9 +2740,9 @@ void KMComposeWin::slotSendLater()
                 {
                     mComposerBase->setSendLaterInfo(info);
                     if (info->isRecurrence()) {
-                        doSend( MessageComposer::MessageSender::SendLater, MessageComposer::MessageSender::SaveInTemplates );
+                        doSend( MessageComposer::MessageSender::SendLater, MessageComposer::MessageSender::SaveInTemplates, true );
                     } else {
-                        doSend( MessageComposer::MessageSender::SendLater, MessageComposer::MessageSender::SaveInDrafts );
+                        doSend( MessageComposer::MessageSender::SendLater, MessageComposer::MessageSender::SaveInDrafts, true );
                     }
                     break;
                 }
Index: kdepim-4.14.10/kmail/editor/kmcomposewin.h
===================================================================
--- kdepim-4.14.10.orig/kmail/editor/kmcomposewin.h
+++ kdepim-4.14.10/kmail/editor/kmcomposewin.h
@@ -549,7 +549,8 @@ private:
      * Send the message.
      */
     void doSend( MessageComposer::MessageSender::SendMethod method=MessageComposer::MessageSender::SendDefault,
-                 MessageComposer::MessageSender::SaveIn saveIn = MessageComposer::MessageSender::SaveInNone );
+                 MessageComposer::MessageSender::SaveIn saveIn = MessageComposer::MessageSender::SaveInNone,
+                 bool willSendItWithoutReediting = false);
 
     void doDelayedSend( MessageComposer::MessageSender::SendMethod method, MessageComposer::MessageSender::SaveIn saveIn );