Also keep `created()` with the original notification.
As per spec a notification must be replaced atomically with no visual cues.
Transfer over properties that might cause this, such as unread showing the bell again.
This allows a client to mark a notification as "resident" which means it will
not be closed by the sever when expired or an action is invoked, thus transferring
full control over notification life time to the client.
A notification popup still times out as normal (unless persistent, of course)
but the notification remains alive until the client revokes it or a user
explicitly closes it.
It is opt-in so that a client can expect the notification lifetime to be
indefinite and explicitly close it when an action is invoked on its end.
Summary: This allows one to subscribe to notifications from notification server.
Test Plan:
tested using very simple QML
```
import QtQuick 2.0
import org.kde.notificationmanager 1.1 as Notifications
...
Notifications.NotificationWatchedModel {
id: model
}
```
Reviewers: #plasma, broulik, davidedmundson
Reviewed By: #plasma, broulik
Subscribers: nicolasfella, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28509
Summary: Some applications, e.g. pamac, don't send an app_name, which is legal according to the fd.o spec. In this case try to read it from the desktop file before falling back to the process name.
Test Plan: I get a better appname for pamac notifications now
Reviewers: #plasma, broulik, mart
Reviewed By: #plasma, mart
Subscribers: crossi, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27786
This adds a quick reply feature with a text field inline in the notification popup.
An action named "inline-reply" will spawn the text field and a NotificationReplied signal is emitted then.
There's additional kde hints for changing the placeholder text (defaults to "Type a reply..."),
submit button text (defaults to "Send") and submit button icon name (defaults to "document-send",
that paper aeroplane icon).
This can be useful for notifications that confirm direct user interaction, such as successful Bluetooth pairing,
Screenshot creation, or plasmoid removal.
It only overrules filtering based on urgency, disabling notifications for that application altogether will still hide them.
Such a notification also won't increase the unread counter as it can be assumed when they do something, e.g. click on "Pair",
they will notice that the pairing progress dialog went away and a confirmation notification is shown.
Differential Revision: https://phabricator.kde.org/D25935
Currently, a notification is considered "unread" when it was created or updated after the last time the user opened the history.
To alleviate this, when the notification popup is hovered, e.g. because the user wanted to drag an image out, select some text,
or open the "More" menu, it is considered read. It will still end up in the history but will not needlessly show the "unread notification" bell icon.
Moreover, job finished notifications are always considered read, as they are either from long-standing jobs which the user is likely aware of,
or confirmation of short tasks the user doesn't need explicit confirmation about. For example, extracting an archive in Dolphin,
I get an "Extracting (Finished)" but I don't want to explicitly acknowledge that notification because I can just enter the folder that was just created in Dolphin.
This surely doesn't fix the underlying problem of notification expiration and history, and the user might just interact wiht some
tray icons or the clock and not actually deal with the notification popup but this is imho an acceptable stopgap until a proper
solution is found, which won't happen in time for Plasma 5.17 anyway.
Differential Revision: https://phabricator.kde.org/D23977
This is a similar situation we have with Flatpak when the desktop entry the application thinks it owns is actually different.
In Snap this environment variable is passed to the process. When no service was found, try reading it.
CHANGELOG: Improved notification identification for Snap applications
Differential Revision: https://phabricator.kde.org/D21881
When an application got renamed by flatpak-builder without knowing it, it will still send its original value as desktop-entry breaking the mapping and settings.
CHANGELOG: Improved notification identification for Flatpak applications
Differential Revision: https://phabricator.kde.org/D21779
This makes it a bit more generic. Advertise that this may also be used to indicate what email account a notification came from.
Differential Revision: https://phabricator.kde.org/D21137
* Make dataengines work fully standalone
* Fix panel icon sizing
There's still an issue with the popup size when resizing the vertical panel smaller so it collapses
* Implement keyboard navigation for the list with focus hacks...
Delete key closes notifications or groups, Arrow left/right expand/collapse groups, Enter invokes default action, if any
* Fix DND times that are supposed to be hidden showing
ModelContextMenu doesn't respect "visible" property
* Move "Notifications" header to ListView header so it scrolls away and leaves more room for the notifications in systray popup
* Fix finished jobs in history showing as failed when app is closed
* Don't remember apps that spawned jobs, only for notifications
* Use CriticalNotification window type (patches pending)
* Ship some more default rules in plasmanotifyrc
* Improved do not disturb menu (add "for 4 hours" and "until disabled")
* Expand unread notifications by default, overall improved expansion/collapse handling
* Show unread count in panel and reset when plasmoid is closed again
* Move notification sanitizer and its test from dataengine to lib
* Load pixmaps into model also for files and limit their physical size
* Enforce maximum limit for notifications (1000...)
- Rework compact representation animations a bit
For some reason they often got stuck
- Implement do not disturb mode for applications
- Add fallback timeout to ensure notifications eventually timeout
Otherwise when disabling dnd mode you will get spammed
and we would also keep apps running indefinitely waiting for the notification to close
- Install plasmanotifyrc with some sane defaults
So far only lets Spectacle show its screenshot notifications in dnd mode
- Introduce Closable role rather than hardcoding that behavior everywhere in the view
- Better app identification/grouping for jobs
- Be more lenient about app identification (firefox will match Firefox, too)
- Cleanups
- Add basic do not disturb mode
Can set a time until it enabled, persisted across reboots
Whitelist for apps missing right not
Inhibition API not wired up yet
- d-pointer JobDetails
- Use KFilePlacesModel for prettier destUrl reporting "Copying to Home"
- Expose default action in history as button
- Improved right-to-left language support
- Let NotificationServer just lurk (without registering a service)
- Catch when plasmoid is deleted and stick to another one
- Old dataengine is fully functional now
Except the inhibition stuff but I'm not sure if this is worth keeping the way it is
- "More" menu opens on press now and highlights
- Invoking any action closes the notification now
KNotification explicitly does that for us but e.g. GTK does not
- Add clear button for history
- Restore kbroadcastnotification support
- Allow forgetting seen application (for KCM)
- Let users "create" notifications by calling NotificationServer::add
- When no application name is provided look up the sender's process name as last resort
- Add kdebugsettings categories file
- Improve compact reprsentation
- Keep popup open during interaction (context menu, drag)
- Improve "ago" label (e.g. show "Last Sunday")
- Improve group visuals (still pretty much WIP)
- Hide popups when interacted (opened file, triggered file action, etc)
Closing when having invoked an action isn't implemented yet but is probably neccessary
- Make autohide job popup setting work
- Set critical AlwaysOnTop (requires KWin patch)
- Improve error handling in ThumbnailStrip
Show file icon if thumbnail generation failed instead of a blank space
- Add heuristic for popup placement and make custom setting work
- Add deviceName and displayApplicationName (for KDE Connect)
So it can show from which device and which app this notification originally came from
- Improved service discovery (and defaultComponent handling)
Quite a few notifications, e.g. DrKonqi crashes are in plasma_workspace.notifyrc
When we get an event like this, show the original app instead
- Make blacklist for popup and history work
- Add "lastRead" property for "unread" handling vs "expired" (latter likely to be dropped)
- Add sortMode so history is strictly sorted by date (it's grouped after all)
- Begin work on do not disturb UI in plasmoid
- Also moe the NotificationPopup item back to the root folder
- Implement tracking of unknown apps, ie. once an app shows a notificaton it will show up
in the KCM so it can be configured
- Make blacklisting of notification popups (via setting in KCM) work
- Start on inhibition stuff (DBus API proposal sent to XDG mailing list)
- Introduces a Settings item that can be used to query and write settings
Used from both the applet and the KCM and in the future Task Manager and others
- Wire up delegate to make FullRepresentation somewhat work
- Fix text selection in NotificationItem (workaround QQC1 ScrollView bug)
- Make model writable where it makes sense (rather than having a dedicated setter)
- Let JobsModel also notice jobs that were present at the time of its creation
- Cleanup, pimpl NotificationServer and Notification for export
- Wire the old dataengine up to use it for compat:
it shows notifications but is otherwise pretty broken right now
- Start writing kconfigxt and Settings code (no real code yet)
- Add a Inhibition DBus interface (no actual server-side code yet)
- Group notifications by application
Pretty much tasks grouping model from libtaskmanager slightly adjusted
- Let widget take full height when expanded in vertical panel "side bar usecase"
- Fix bugs here and there
- Support replacing notifications properly
- Now that we have nice models we can finally do the replacing in the way the spec
asks for "atomically (ie with no flicker or other visual cues)"
- Catch some more cases in notification details text (trash:/ stuff)
- Prefer notifyrc name over desktop entry name in case a service within another app sends
an event (e.g. Discover notifier in Plasma, KNotification automatically sends desktop-entry
of the parent app)
- Implement x-kde-urls thumbnailer with drag and drop and fancy blur
Originally intended to be able to show multiple files but in practise only used for
single pictures, so the code is significantly simplified for that usecase
- Add "Open" feature for finished job notification, offers a context menu as well with
all the KFileItemActions (component from the Thumbnailer)
- Copy description labels to clipboard
Once menu opens the update is paused so the text you copy is what you see
- Fixup sanitizer so we can properly collapse notifications without body text
... and more
- Notification action buttons
- Custom icon pixmaps in notifications
- Popup handling
- Notification urgency (low isn't shown as popup TBD, critical always no matter what)
- History stuff (only expired notifications end up there, none that were closed or revoked)
- Text selection and copy for body text
- Basic tray icon support
and many other things
Application jobs are shown as part of regular notifications:
- They show up as little popup that can be hidden in the history
- When finished progress popup turns into a notification
There's still some glitches and missing features, notably
- Screenshot thumbnails
- "Open" functionality for finished jobs
- History layout
- code cleanup
- and basically every configuration option
libnotificationmanager provides a proper notification model situation similar
to libtaskmanager. There is also a new notification applet implementing the
suggestions and VDG mockups in the wiki
NOTE: the notification dataengine is defunct in this branch, so while the applet
(for now) installs as "new notifications", the old applet will stop working when
you use this. The dataengine will eventually be restored (famous last words)
for compatibility but using the NotificationServer singleton introduced in
libnotificationmanager.
The applet can show notifications, they expire, can be closed, and their
default action invoked. Still heavily WIP and API subject to change.
[1] https://community.kde.org/Plasma/Notifications