This avoids showing paths like /tmp/somefile as "500 GiB Internal
Hard Drive/tmp/somefile", or "Root/tmp/somefile".
It's more sensible to show the actual path in this case.
This is for jobs, such as "Loading archive" or "Examining..."
which are purely informational and provide no meaningful
action once finished. When this property is set, a job will
not show a "Finished" notification when finished successfully.
Normally you wouldn't see this because a copy job has a `destUrl`
(which is why I didn't notice) but when removing the filename to "go up"
we need to strip the trailing slash, too.
This ensures that the first `update()` call with the summary will be shown
atomically to the user rather than show an empty job popup briefly.
Also handle the delay on a per-job basis, previously there was a common
timer, which made no sense.
It's dest*url* after all. Makes it easier to debug why it's not displaying correctly.
According to Qt `/foo/bar` is a child of `stfp://foo`, which completely throws
off `KFilePlacesModel`...
Ensures that a file or destination named `<h1>foo.txt` doesn't break the layout.
It still goes through the normal HTML text filter, so remote file access isn't
possible, merely screwing up the layout.
This ensures that an error message the app might have sent in response to the
cancel request is still shown.
Also, while at it deduplicate code by calling into `terminate` from the
service watcher.
This got removed in d82513ce88 as I thought a user would
always have a "Root" entry, leading to "Root/foo" paths.
However, if you hide a place, it will naturally not be considered for `closestItem`
resulting in the final `QUrl::toDisplayString` being hit, giving us a not so
nice `file:///` URL.
This changes the displayed destination of a file operation in the summary
to be relative to the closest user's place, similar to how the KUrlNavigator
(address bar) does it in Dolphin, for example:
* /tmp: Root/tmp
* /home/user/Documents: Documents
* /home/user/Documents/foo/bar: Documents/foo/bar
* ftp://example.com/var/www/clients/user/blog/uploads: My Blog/uploads
* sftp://192.168.0.123/home/user/stuff/kf5/plasma-workspace: Build Server/stuff/kf5/plasma-workspace
Especially for remote locations the user has bookmarked this can tremendously
clean up the displayed address, showing a nice name rather than the full URL.
The other logic about showing local paths and replacement of $HOME by tilde has been
removed as both Root and Home are default places that are likely to be present.
This unit is neutral, it doesn't distinguish between e.g. file and dirs,
just counting items. Useful in e.g. notifications of batch rename jobs.
CCBUG: 422098
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
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
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
- 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
* 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. :)
- 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
- 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
- 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