Remove "Critical always on top" notification option

There is no conceivable use case for turning this off, and the UI is
being removed in https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/447.

So let's remove the backend code too, or else anyone who for some reason
had turned it off would be left without a GUI method of turning it back
on again.
wilder-5.22
Nate Graham 5 years ago
parent 7b335cd697
commit fcad37a604
  1. 2
      applets/notifications/package/contents/ui/global/Globals.qml
  2. 3
      libnotificationmanager/kcfg/notificationsettings.kcfg
  3. 14
      libnotificationmanager/settings.cpp
  4. 7
      libnotificationmanager/settings.h

@ -456,7 +456,7 @@ QtObject {
readonly property var notificationId: model.notificationId
popupWidth: globals.popupWidth
type: (model.urgency === NotificationManager.Notifications.CriticalUrgency && notificationSettings.keepCriticalAlwaysOnTop)
type: model.urgency === NotificationManager.Notifications.CriticalUrgency
|| (model.urgency === NotificationManager.Notifications.NormalUrgency && notificationSettings.keepNormalAlwaysOnTop)
? PlasmaCore.Dialog.CriticalNotification : PlasmaCore.Dialog.Notification

@ -9,9 +9,6 @@
<entry name="CriticalInDndMode" type="Bool">
<default>true</default>
</entry>
<entry name="CriticalAlwaysOnTop" type="Bool">
<default>true</default>
</entry>
<entry name="NormalAlwaysOnTop" type="Bool">
<default>false</default>
</entry>

@ -347,20 +347,6 @@ bool Settings::dirty() const
return d->dirty;
}
bool Settings::keepCriticalAlwaysOnTop() const
{
return d->notificationSettings.criticalAlwaysOnTop();
}
void Settings::setKeepCriticalAlwaysOnTop(bool enable)
{
if (this->keepCriticalAlwaysOnTop() == enable) {
return;
}
d->notificationSettings.setCriticalAlwaysOnTop(enable);
d->setDirty(true);
}
bool Settings::criticalPopupsInDoNotDisturbMode() const
{
return d->notificationSettings.criticalInDndMode();

@ -51,10 +51,6 @@ class NOTIFICATIONMANAGER_EXPORT Settings : public QObject
* Whether to show critical notification popups in do not disturb mode.
*/
Q_PROPERTY(bool criticalPopupsInDoNotDisturbMode READ criticalPopupsInDoNotDisturbMode WRITE setCriticalPopupsInDoNotDisturbMode NOTIFY settingsChanged)
/**
* Whether to keep critical notifications always on top.
*/
Q_PROPERTY(bool keepCriticalAlwaysOnTop READ keepCriticalAlwaysOnTop WRITE setKeepCriticalAlwaysOnTop NOTIFY settingsChanged)
/**
* Whether to keep normal notifications always on top.
*/
@ -268,9 +264,6 @@ public:
bool criticalPopupsInDoNotDisturbMode() const;
void setCriticalPopupsInDoNotDisturbMode(bool enable);
bool keepCriticalAlwaysOnTop() const;
void setKeepCriticalAlwaysOnTop(bool enable);
bool keepNormalAlwaysOnTop() const;
void setKeepNormalAlwaysOnTop(bool enable);

Loading…
Cancel
Save