Commit 02ccc337 authored by David Jarvie's avatar David Jarvie
Browse files

Make user settings changes take effect immediately

Fixes regression introduced in version 2.10.11 by commit
parent 3ef411b1
KAlarm Change Log
=== Version 2.12.8 (KDE Applications 19.08.3) --- 15 October 2019 ===
=== Version 2.12.8 (KDE Applications 19.08.3) --- 16 October 2019 ===
+ Fix error on redo of an active alarm deletion.
+ Archive repeat-at-login alarms if previously triggered, when they are deleted.
+ Fix layout of defer alarm dialogue.
+ Make user settings changes take effect immediately (fixes regression introduced in 2.10.11).
=== Version 2.12.7 (KDE Applications 19.08.2) --- 7 October 2019 ===
+ Show correct read-only status of an alarm in its context menu.
......@@ -73,7 +73,6 @@ bool AlarmCalendar::initialiseCalendars()
QString displayCal = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + displayCalendarName;
mResourcesCalendar = new AlarmCalendar();
......@@ -134,7 +133,6 @@ AlarmCalendar::AlarmCalendar()
connect(model, &AkonadiModel::eventChanged, this, &AlarmCalendar::slotEventChanged);
connect(model, &AkonadiModel::collectionStatusChanged, this, &AlarmCalendar::slotCollectionStatusChanged);
connect(model, &AkonadiModel::collectionsPopulated, this, &AlarmCalendar::slotCollectionsPopulated);
Preferences::connect(SIGNAL(askResourceChanged(bool)), this, SLOT(setAskResource(bool)));
......@@ -405,16 +403,6 @@ void AlarmCalendar::close()
removeKAEvents(mResourceMap.begin().key(), true, CalEvent::ACTIVE | CalEvent::ARCHIVED | CalEvent::TEMPLATE | CalEvent::DISPLAYING);
* Update whether to prompt for the resource to store new alarms in.
void AlarmCalendar::setAskResource(bool ask)
void AlarmCalendar::updateDisplayKAEvents()
if (mCalType == RESOURCES)
......@@ -97,7 +97,6 @@ class AlarmCalendar : public QObject
void calendarSaved(AlarmCalendar*);
private Q_SLOTS:
void setAskResource(bool ask);
void slotCollectionStatusChanged(const Akonadi::Collection&, AkonadiModel::Change,
const QVariant& value, bool inserted);
void slotCollectionsPopulated();
......@@ -671,7 +671,6 @@ bool CollectionView::viewportEvent(QEvent* e)
CollectionControlModel* CollectionControlModel::mInstance = nullptr;
bool CollectionControlModel::mAskDestination = false;
QHash<QString, CollectionControlModel::ResourceCol> CollectionControlModel::mAgentPaths;
static QRegularExpression matchMimeType(QStringLiteral("^application/x-vnd\\.kde\\.alarm.*"),
......@@ -1231,7 +1230,8 @@ Collection CollectionControlModel::destination(CalEvent::Type type, QWidget* pro
standard = getStandard(type);
// Archived alarms are always saved in the default resource,
// else only prompt if necessary.
if (type == CalEvent::ARCHIVED || noPrompt || (!mAskDestination && standard.isValid()))
if (type == CalEvent::ARCHIVED || noPrompt
|| (!Preferences::askResource() && standard.isValid()))
return standard;
// Prompt for which collection to use
......@@ -242,13 +242,6 @@ class CollectionControlModel : public Akonadi::FavoriteCollectionsModel
static void setStandard(Akonadi::Collection&, CalEvent::Types);
/** Set whether the user should be prompted for the destination collection
* to add alarms to.
* @param ask true = prompt for which collection to add to;
* false = add to standard collection.
static void setAskDestinationPolicy(bool ask) { mAskDestination = ask; }
/** Find the collection to be used to store an event of a given type.
* This will be the standard collection for the type, but if this is not valid,
* the user will be prompted to select a collection.
......@@ -321,7 +314,6 @@ class CollectionControlModel : public Akonadi::FavoriteCollectionsModel
: resourceId(r), collectionId(c) {}
static QHash<QString, ResourceCol> mAgentPaths; // path, (resource identifier, collection ID) pairs
static bool mAskDestination;
QEventLoop* mPopulatedCheckLoop;
......@@ -20,9 +20,6 @@
<signal name="autoHideSystemTrayChanged">
<argument type="Int">Base_AutoHideSystemTray</argument>
<signal name="askResourceChanged">
<argument type="Bool">AskResource</argument>
<signal name="base_TimeZoneChanged">
<argument type="String">Base_TimeZone</argument>
......@@ -70,12 +67,12 @@
<entry name="Base_TimeZone" key="TimeZone" type="String">
<label context="@label">Time zone</label>
<whatsthis context="@info:whatsthis">Select the time zone which KAlarm should use as its default for displaying and entering dates and times.</whatsthis>
<!-- <emit signal="base_TimeZoneChanged"/> -->
<emit signal="base_TimeZoneChanged"/>
<entry name="Base_HolidayRegion" key="HolidayRegion" type="String">
<label context="@label">Holiday region</label>
<whatsthis context="@info:whatsthis">Select the holiday region to use.</whatsthis>
<!-- <emit signal="base_HolidayRegionChanged"/> -->
<emit signal="base_HolidayRegionChanged"/>
<entry name="DefaultFgColour" key="MessageForegroundColour" type="Color">
<label context="@label">Foreground color</label>
......@@ -91,19 +88,19 @@
<label context="@label">Message font</label>
<whatsthis context="@info:whatsthis">Default font for displaying alarm messages.</whatsthis>
<default code="true">QFont(QFontDatabase::systemFont(QFontDatabase::GeneralFont).family(), 16, QFont::Bold)</default>
<!-- <emit signal="messageFontChanged"/> -->
<emit signal="messageFontChanged"/>
<entry name="ShowInSystemTray" type="Bool">
<label context="@label">Show in system tray</label>
<whatsthis context="@info:whatsthis">&lt;p>Check to show KAlarm's icon in the system tray. Showing it in the system tray provides easy access and a status indication.&lt;/p></whatsthis>
<!-- <emit signal="showInSystemTrayChanged"/>-->
<emit signal="showInSystemTrayChanged"/>-->
<entry name="Base_AutoHideSystemTray" key="AutoHideSystemTray" type="Int">
<label context="@label">Auto-hide in system tray if no alarms due within period</label>
<whatsthis context="@info:whatsthis">&lt;p>Enter -1 to auto-hide KAlarm's icon in the system tray when there are no active alarms.&lt;/p>&lt;p>To auto-hide the system tray icon when there are no alarms due within a set period of time, enter the time period in minutes.&lt;/p>&lt;p>Enter 0 to always show the system tray icon.&lt;/p></whatsthis>
<!-- <emit signal="autoHideSystemTrayChanged"/> -->
<emit signal="autoHideSystemTrayChanged"/>
<entry name="NoAutoHideSystemTrayDesktops" type="StringList" hidden="true">
<label context="@label">Desktops without auto-hide in system tray</label>
......@@ -128,7 +125,6 @@
<label context="@label">Prompt for which calendar to store in</label>
<whatsthis context="@info:whatsthis">&lt;p>When saving a new alarm or alarm template, prompt for which calendar to store it in, if there is more than one active calendar.&lt;/p>&lt;p>Note that archived alarms are always stored in the default archived alarm calendar.&lt;/p></whatsthis>
<!-- <emit signal="askResourceChanged"/> -->
<entry name="ModalMessages" type="Bool">
<label context="@label">Message windows have a title bar and take keyboard focus</label>
......@@ -154,26 +150,26 @@
&lt;li>>0 to set a limit.&lt;/li>&lt;/ul>&lt;/p>
<!-- <emit signal="tooltipPreferencesChanged"/> -->
<!-- <min>-1</min> Can't use 'min' with signal!! -->
<emit signal="tooltipPreferencesChanged"/>
<entry name="ShowTooltipAlarmTime" type="Bool">
<label context="@label">Show alarm times in system tray tooltip</label>
<whatsthis context="@info:whatsthis">Specify whether to show in the system tray tooltip, the time at which each alarm is due.</whatsthis>
<!-- <emit signal="tooltipPreferencesChanged"/> -->
<emit signal="tooltipPreferencesChanged"/>
<entry name="ShowTooltipTimeToAlarm" type="Bool">
<label context="@label">Show time to alarms in system tray tooltip</label>
<whatsthis context="@info:whatsthis">Specify whether to show in the system tray tooltip, how long until each alarm is due.</whatsthis>
<!-- <emit signal="tooltipPreferencesChanged"/> -->
<emit signal="tooltipPreferencesChanged"/>
<entry name="TooltipTimeToPrefix" type="String">
<label context="@label">Time-to-alarm prefix in system tray tooltip</label>
<whatsthis context="@info:whatsthis">Enter the text to be displayed in front of the time until the alarm, in the system tray tooltip.</whatsthis>
<default code="true">QLatin1String("+")</default>
<!-- <emit signal="tooltipPreferencesChanged"/> -->
<emit signal="tooltipPreferencesChanged"/>
<entry name="EmailClient" key="EmailClient" type="Enum">
<label context="@label">Email client</label>
......@@ -207,37 +203,37 @@
<label context="@label">Start of day for date-only alarms</label>
<whatsthis context="@info:whatsthis">The earliest time of day at which a date-only alarm will be triggered.</whatsthis>
<!-- <emit signal="base_StartOfDayChanged"/> -->
<emit signal="base_StartOfDayChanged"/>
<entry name="Base_WorkDayStart" key="WorkDayStart" type="DateTime">
<label context="@label">Start time of working day</label>
<whatsthis context="@info:whatsthis">The start time of the working day.</whatsthis>
<!-- <emit signal="base_WorkTimeChanged"/> -->
<emit signal="base_WorkTimeChanged"/>
<entry name="Base_WorkDayEnd" key="WorkDayEnd" type="DateTime">
<label context="@label">End time of working day</label>
<whatsthis context="@info:whatsthis">The end time of the working day.</whatsthis>
<!-- <emit signal="base_WorkTimeChanged"/> -->
<emit signal="base_WorkTimeChanged"/>
<entry name="Base_WorkDays" key="WorkDays" type="UInt">
<label context="@label">Working days</label>
<whatsthis context="@info:whatsthis">OR'ed bits indicating which days of the week are work days, 1 = Monday ... 64 = Sunday.</whatsthis>
<default code="true">KAlarm::defaultWorkDays()</default>
<!-- <emit signal="base_WorkTimeChanged"/> -->
<emit signal="base_WorkTimeChanged"/>
<entry name="DisabledColour" type="Color">
<label context="@label">Disabled alarm color</label>
<whatsthis context="@info:whatsthis">Choose the text color in the alarm list for disabled alarms.</whatsthis>
<default code="true">KColorScheme(QPalette::Disabled).foreground(KColorScheme::InactiveText).color()</default>
<!-- <emit signal="disabledColourChanged"/> -->
<emit signal="disabledColourChanged"/>
<entry name="ArchivedColour" key="ExpiredColour" type="Color">
<label context="@label">Archived alarm color</label>
<whatsthis context="@info:whatsthis">Choose the text color in the alarm list for archived alarms.</whatsthis>
<default code="true">KColorScheme(QPalette::Active).foreground(KColorScheme::VisitedText).color()</default>
<!-- <emit signal="archivedColourChanged"/> -->
<emit signal="archivedColourChanged"/>
<entry name="ArchivedKeepDays" key="ExpiredKeepDays" type="Int">
<label context="@label">Days to keep expired alarms</label>
......@@ -247,8 +243,8 @@
&lt;li>>0 number of days to keep.&lt;/li>&lt;/ul>&lt;/p>
<!-- <emit signal="archivedKeepDaysChanged"/> -->
<!-- <min>-1</min> Can't use 'min' with signal!! -->
<emit signal="archivedKeepDaysChanged"/>
<entry name="KOrgEventDuration" type="Int">
<label context="@label">KOrganizer event duration</label>
......@@ -357,7 +353,7 @@
<choice name="None"><label context="@option">Do not repeat</label></choice>
<!-- <emit signal="feb29TypeChanged"/> -->
<emit signal="feb29TypeChanged"/>
<entry name="DefaultReminderUnits" key="RemindUnits" type="Enum">
<label context="@label">Reminder units</label>
......@@ -6,7 +6,7 @@ Mutators=true
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