Commit 3ed8cf42 authored by David Jarvie's avatar David Jarvie

Bug 334334: Fix no Defer button in alarm windows restored after crash

parent c8e4293b
KAlarm Change Log
=== Version 2.10.8 --- 18 April 2014 ===
=== Version 2.10.9 --- 4 May 2014 ===
- [Akonadi] Fix no Defer button in alarm windows restored after crash [KDE Bug 334334]
=== Version 2.10.8 (KDE 4.12.5) --- 18 April 2014 ===
- [Akonadi] Fix wrong startup message about no writable active alarm calendar.
- [Akonadi] Fix setting Akonadi resource read-only making it unusable (requires kdepim-runtime 4.12.5) [KDE Bug 332889]
=== Version 2.10.7 (KDE 4.12.4) --- 21 March 2014 ===
=== Version 2.10.7 (KDE 4.12.4, 4.13.0) --- 21 March 2014 ===
- [Akonadi] Fix deletion of alarm copies from KOrganiser not working.
- Fix crash after session restoration has nothing to restore [KDE Bug 331719]
- Prevent data in birthday import dialogue being editable.
......
......@@ -28,7 +28,7 @@
#else
#define VERSION_SUFFIX "-res"
#endif
#define KALARM_VERSION "2.10.8" VERSION_SUFFIX
#define KALARM_VERSION "2.10.9" VERSION_SUFFIX
#define KALARM_NAME "KAlarm"
#define KALARM_DBUS_SERVICE "org.kde.kalarm" // D-Bus service name of KAlarm application
......
......@@ -112,6 +112,7 @@ QString KAlarmApp::mFatalMessage;
KAlarmApp::KAlarmApp()
: KUniqueApplication(),
mInitialised(false),
mRedisplayAlarms(false),
mQuitting(false),
mReadOnly(false),
mLoginAlarmsDone(false),
......@@ -574,7 +575,19 @@ int KAlarmApp::newInstance()
* to happen under the Xfce desktop.)
*/
if (AlarmCalendar::resources())
{
#ifdef USE_AKONADI
if (AkonadiModel::instance()->isCollectionTreeFetched())
{
mRedisplayAlarms = false;
MessageWin::redisplayAlarms();
}
else
mRedisplayAlarms = true;
#else
MessageWin::redisplayAlarms();
#endif
}
}
--mActiveCount;
......@@ -1151,7 +1164,13 @@ kDebug();
if (mReadOnly)
return; // don't need write access to calendars
#ifdef USE_AKONADI
if (!AkonadiModel::instance()->isCollectionTreeFetched()
bool treeFetched = AkonadiModel::instance()->isCollectionTreeFetched();
if (treeFetched && mRedisplayAlarms)
{
mRedisplayAlarms = false;
MessageWin::redisplayAlarms();
}
if (!treeFetched
|| !AkonadiModel::instance()->isMigrationCompleted())
return;
#endif
......
......@@ -232,6 +232,7 @@ class KAlarmApp : public KUniqueApplication
static int mFatalError; // a fatal error has occurred - just wait to exit
static QString mFatalMessage; // fatal error message to output
bool mInitialised; // initialisation complete: ready to process execution queue
bool mRedisplayAlarms; // need to redisplay alarms when collection tree fetched
bool mQuitting; // a forced quit is in progress
bool mReadOnly; // only read-only access to calendars is needed
bool mLoginAlarmsDone; // alarms repeated at login have been processed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment