File r906260.diff of Package kdepim4

Subject: kalarm: Fix invalid alarm remaining in calendar on failure
From: wstephenson@suse.de
Bug: 
Patch-upstream: 906260
--- kalarm/Changelog	(revision 906259)
+++ kalarm/Changelog	(revision 906260)
@@ -1,6 +1,6 @@
 KAlarm Change Log
 
-=== Version 2.0.7 --- 27 December 2008 ===
+=== Version 2.0.7 --- 5 January 2009 ===
 - Distinguish disabled from enabled alarm colour when highlighted in alarm list.
 - Ensure alarm windows show on top of full-screen windows.
 - Fix crash if KAlarm is activated again while restoring from previous session.
@@ -9,6 +9,8 @@ KAlarm Change Log
 - Fix click on system tray icon not showing main window if 'Show in system tray'
   configuration setting deselected.
 - Fix toolbar configuration being lost after quitting KAlarm.
+- Fix invalid alarm remaining in calendar when pre-alarm action failure message
+  is acknowledged before the alarm is deferred.
 
 === Version 2.0.6 (KDE 4.1.3) --- 22 October 2008 ===
 - Fix alarms not triggering correctly after laptop wakes from hibernation.
--- kalarm/messagewin.cpp	(revision 906259)
+++ kalarm/messagewin.cpp	(revision 906260)
@@ -1,7 +1,7 @@
 /*
  *  messagewin.cpp  -  displays an alarm message
  *  Program:  kalarm
- *  Copyright © 2001-2008 by David Jarvie <djarvie@kde.org>
+ *  Copyright © 2001-2009 by David Jarvie <djarvie@kde.org>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1468,7 +1468,7 @@ void MessageWin::resizeEvent(QResizeEven
 void MessageWin::closeEvent(QCloseEvent* ce)
 {
 	// Don't prompt or delete the alarm from the display calendar if the session is closing
-	if (!theApp()->sessionClosingDown())
+	if (!mErrorWindow  &&  !theApp()->sessionClosingDown())
 	{
 		if (mConfirmAck  &&  !mNoCloseConfirm)
 		{
Index: kalarm/Changelog
===================================================================
Index: kalarm/messagewin.cpp
===================================================================
openSUSE Build Service is sponsored by