A job instance is created as soon as the job starts but it might not be shown to the user right away or at all.
JobPrivate::prettyDestUrl() already creates the KFilePlacesModel if needed, no need to do it in the constructor.
Differential Revision: https://phabricator.kde.org/D23983
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
Summary:
==1408== Conditional jump or move depends on uninitialised value(s)
==1408== at 0x1F0D8A6D:
NotificationManager::NotificationGroupCollapsingProxyModel::setLimit(int)
(src/kde/workspace/plasma-workspace/libnotificationmanager/notificationgroupcollapsingproxymodel.cpp:112)
==1408== by 0x1F0BA091:
NotificationManager::Notifications::Private::initProxyModels()
(src/kde/workspace/plasma-workspace/libnotificationmanager/notifications.cpp:227)
==1408== by 0x1F0BBC75:
NotificationManager::Notifications::setGroupMode(NotificationManager::Notifications::GroupMode)
(src/kde/workspace/plasma-workspace/libnotificationmanager/notifications.cpp:584)
==1408== by 0x1F09F7B2:
NotificationManager::Notifications::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**) (moc_notifications.cpp:668)
Practical impact is limited as every user has to call setLimit anyway
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23683
This makes it group notifications of different "origins" not group together,
e.g. FooApp notifications from phone A won't be grouped together with FooApp notifications from phone B.
Also, email notifications from different accounts wouldn't be grouped together.
Finally, show the origin in the grouped header.
Differential Revision: https://phabricator.kde.org/D23583
This implements a new JobViewV3 which uses extensible variant maps rather than individual function calls,
allowing for compression of calls and extensibility.
The new API uses infoMessage correctly as a state message, e.g. "Connecting to host" rather than mixing it with the "Copying..." heading.
It also supports an "immediate" flag that the caller can use to indicate progress should be immediately shown,
so in cases where the user is likely to want to use the file afterwards (e.g. download through p-b-i or receiving a file
through KDE Connect) a job popup is shown even for small/short transfers.
Differential Revision: https://phabricator.kde.org/D23293
Summary:
KSysGuard fetches everything you could possibly need from a process.
If we just need a name of a process, we can use the new KProcessList API
in KCoreAddons.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22327
When two screens overlap during e.g. a presentation, automatically enable do not disturb mode.
As per usual with automatic do not disturb, it can be overruled by unchecking the checkbox in the notification plasmoid
where it will be disabled until the screen configuration changes again and it still find a mirrored screen setup.
Differential Revision: https://phabricator.kde.org/D22856
This makes Klipper identify as org.kde.klipper to the notification service even when running inside of Plasma and installs a rule
to disable it from history by default.
BUG: 408989
FIXED-IN: 5.16.3
Differential Revision: https://phabricator.kde.org/D21963
When multiple identical notifications are sent in quick succession, discard the request and let it fail.
Previously it would always replace the last notification if identical, now it discards the request and only does so if it happened
within 1 second of the last notification to avoid discarding genuine identical notifications like when deleting two plasmoids of
the same type.
BUG: 409157
FIXED-IN: 5.16.3
Differential Revision: https://phabricator.kde.org/D22088
If a notification isn't configurable (e.g. because the application doesn't set a desktop-entry hint),
there's no way for the user to keep it out of the history if they so desire, causing excess history spam.
Differential Revision: https://phabricator.kde.org/D22048
Register notification and job tracker services with "allow replacement" flag if not plasmashell,
so when it eventually comes up, it can claim the service and then cling on to it.
BUG: 408250
FIXED-IN: 5.16.2
Differential Revision: https://phabricator.kde.org/D22017
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
Since the Notification Server knows nothing about what notifications were sent, it tells us a notification was replaced and
uses the ID supplied by the application. Only in the model we then realize it didn't exist.
This means we will potentially reuse the notification ID sent by the application as we just increment a counter.
However, in practice I haven't encountered this issue before (maybe we just never noticed?) but I think this is an
acceptable workaround.
BUG: 407881
FIXED-IN: 5.16.0
Differential Revision: https://phabricator.kde.org/D21474
Since there is timeout for when it is considered a separate notification and we don't even close the previous one properly.
Just remove that stopgap and if we need something like this again, do it properly.
Differential Revision: https://phabricator.kde.org/D21473
It checked the wrong one resulting in the setting not being written.
BUG: 407534
FIXED-IN: 5.16.0
Differential Revision: https://phabricator.kde.org/D21475
The specification says appName should be the display name of the application.
An application may not send a desktop name at which point we have no other way of identifying it
than the user-visible name it provides us.
Differential Revision: https://phabricator.kde.org/D21460
We watch the service owner so that when it dies without finishing the job we communicate an error to the user.
When the job is stopped, the job is "done" and we don't need to watch the service anymore.
Differential Revision: https://phabricator.kde.org/D21366
I just found that QUrl::fromLocalFile() actually calls QFileInfo::exists on the URL which is not something you want to be doing
constantly and especially not for remote locations.
Differential Revision: https://phabricator.kde.org/D21164
Should Plasma be too busy to process a request and the app that requested it quit before Plasma processed it,
we will get a defunct job view that cannot be canceled because the app that owned it isn't listening anymore.
Differential Revision: https://phabricator.kde.org/D21180
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
- Fix leak and crash when job goes away before being shown
- Some emit and signal fixes
- Always create services watchers
- Update unity job percentage in destructor, fixes the progress lingering around when disabling in settings
Also tell the world that we're merely proxying a job progress
- Don't hardcode KIO error codes
- Honor "show critical on top of full screen" setting
- Don't show generic "dialog-information" icon, it's pointlessly generic
* Use index(n, m, parent) instead of parent.child(n, m)
* Update unity count when job is closed without stopping it first
* Iterate whole dataChanged range [topLeft, bottomRight] when group is resolved
* Generate roleNames from meta object
* Use checkIndex()
* Increase default timeout for notifications with thumbnail
* Improved keyboard nav, support Home/End, let Return open thumbnail
* 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)
It is supposed to broadcast application job progress to multiple interested parties.
However, effectively it was just plasmashell. Cut the middleman, including its never finished and unused UI,
and talk to plasmashell directly.
The applicationjobs dataengine is adjusted to use the new infrastructure instead.
Since it works only in the same process now, Unity launcher API is used to at least broadcast basic
application progress information for use in e.g. Latte Dock.
Also, introduce JobViewServerV2 and JobViewV3 APIs which are using desktop entries for identification rather
than application names, and more importantly are extensible using a QVariantMap hints, so adding new
fields in the future should be significantly less painful with Frameworks, Applications, and Plasma all having
their own release schedule. :)
* 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...)
- Rename some of the classes:
NotificationServer -> Server (there's namespaces, you know)
NotificationModel -> NotificationsModel (so it's plural like JobsModel)
- Introduce NotificationGroupingCollapse
- Wire up PulseAudio-qt for eventual notification silence in dnd mode
- Touch up notification looks
- Add indentation and "line" for grouped plasmoids
- Rethink "show more" button to be at the end
- Fix buttons overlapping
- Remove NotificationDelegate item and do those few adjustments in FullRepresentation
- Cleanup job details, handle when processed > total
- Use States {} more
- Show low urgency popups by default but don't add them to history
- 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