KNotifications merge requestshttps://invent.kde.org/frameworks/knotifications/-/merge_requests2021-06-12T06:56:30Zhttps://invent.kde.org/frameworks/knotifications/-/merge_requests/28Add KNotificationReplyAction for using inline-reply Notification API2021-06-12T06:56:30ZKai Uwe BroulikAdd KNotificationReplyAction for using inline-reply Notification API![Screenshot_20210113_222655](/uploads/da2f1e79664d4b217d6fe2c45f715fdb/Screenshot_20210113_222655.png)
Example use
```
KNotification *notification = new KNotification(QStringLiteral("notification"));
notification->setComponentName(QStr...![Screenshot_20210113_222655](/uploads/da2f1e79664d4b217d6fe2c45f715fdb/Screenshot_20210113_222655.png)
Example use
```
KNotification *notification = new KNotification(QStringLiteral("notification"));
notification->setComponentName(QStringLiteral("plasma_workspace"));
notification->setTitle(i18nc("@title:window", "Annoying chat group"));
notification->setText("<Max> What's up?");
auto replyAction = std::make_unique<KNotificationReplyAction>(i18nc("@action:button", "Reply"));
replyAction->setPlaceholderText(i18nc("@info:placeholder", "Reply to annoying chat group..."));
QObject::connect(replyAction.get(), &KNotificationReplyAction::replied, [](const QString &text) {
qDebug() << "you replied with" << text;
});
notification->setReplyAction(std::move(replyAction));
notification->sendEvent();
```
Not entirely sure about this API with the `unique_ptr`. I definitely want to have it a separate object as to not add a dozen new setters and getters to the main `KNotification` class. But I also don't like Qt's usual approach of "`setFoo` (Note: Transfers ownership)" that you have to know, especially since `KNotification` already has a track-record of awful memory management with its self-deleting-class-that-isnt-a-job approach :)
I was considering a generic `KNotificationAction` class but whenever I touch this I end up rewriting everything and then never getting anywhere … so I'd rather not touch the existing action stuff *at all*.
* TODO a way to influence which order the button will be when combined with regular actions? Currently it's always the first (so in Plasma the right-most one :D)
please also check some of the TODO/FIXME comments in the code for comment
@davidedmundson @dfaure @vonreth @piyushaggarwal @carlschwan @bshah @nicolasfellahttps://invent.kde.org/frameworks/knotifications/-/merge_requests/120Allow to globally disable notification sounds2023-11-06T21:09:05ZIsmael AsensioAllow to globally disable notification soundsRead the global option `Enable` from group `Sounds` and
do not play the corresponding sound when it's set to false.
Default option is still to have sounds enabled.
Related MRs on the task https://invent.kde.org/plasma/plasma-workspace/...Read the global option `Enable` from group `Sounds` and
do not play the corresponding sound when it's set to false.
Default option is still to have sounds enabled.
Related MRs on the task https://invent.kde.org/plasma/plasma-workspace/-/issues/84.KF6Ismael AsensioIsmael Asensiohttps://invent.kde.org/frameworks/knotifications/-/merge_requests/127Make Ocean the default sound theme2023-10-11T14:59:19ZIsmael AsensioMake Ocean the default sound themeNow that the new 'Ocean' theme is in the plasma repos, we can select is as default for Plasma6 / KF6 apps
Related task https://invent.kde.org/plasma/plasma-workspace/-/issues/47Now that the new 'Ocean' theme is in the plasma repos, we can select is as default for Plasma6 / KF6 apps
Related task https://invent.kde.org/plasma/plasma-workspace/-/issues/47KF6Ismael AsensioIsmael Asensio