[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim] kalarm: Prevent showing multiple email success messages after clicking Try
From:       David Jarvie <djarvie () kde ! org>
Date:       2012-03-10 17:26:02
Message-ID: 20120310172602.2F95EA60A9 () git ! kde ! org
[Download RAW message or body]

Git commit efa303cd44a88d0c7693c3f36babf4a2a129a862 by David Jarvie.
Committed on 10/03/2012 at 18:25.
Pushed by djarvie into branch 'master'.

Prevent showing multiple email success messages after clicking Try

Previously, each time Try was clicked in the same Edit Alarm
dialogue, the number of email success messages displayed incremented,
due to multiple connect() calls.

M  +3    -0    kalarm/editdlgtypes.cpp

http://commits.kde.org/kdepim/efa303cd44a88d0c7693c3f36babf4a2a129a862

diff --git a/kalarm/editdlgtypes.cpp b/kalarm/editdlgtypes.cpp
index b31b98c..e1f03d3 100644
--- a/kalarm/editdlgtypes.cpp
+++ b/kalarm/editdlgtypes.cpp
@@ -1380,6 +1380,8 @@ bool EditEmailAlarmDlg::type_validate(bool trial)
 */
 void EditEmailAlarmDlg::type_aboutToTry()
 {
+    // Disconnect any previous connections, to prevent multiple messages being output
+    disconnect(theApp(), SIGNAL(execAlarmSuccess()), this, SLOT(slotTrySuccess()));
     connect(theApp(), SIGNAL(execAlarmSuccess()), SLOT(slotTrySuccess()));
 }
 
@@ -1388,6 +1390,7 @@ void EditEmailAlarmDlg::type_aboutToTry()
 */
 void EditEmailAlarmDlg::slotTrySuccess()
 {
+    disconnect(theApp(), SIGNAL(execAlarmSuccess()), this, SLOT(slotTrySuccess()));
     QString msg;
     QString to = KAEvent::joinEmailAddresses(mEmailAddresses, "<nl/>");
     to.replace('<', "&lt;");
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic