In the past, this applet naively passed the URL to KRun when clicked on
or something was dragged on top of it. However during porting away from
KRun, it was ported to KIO::ApplicationLauncherJob, which only handles
applications, not other types of URLs.
This commit fixes that by making it use KIO::OpenURLJob (which can
handle applications as well as arbitrary URLs) when it's clicked on. We
also short-circuit the application-specific logic when something is
dragged on it and it's not an application, which allows the
non-application logic to be reached.
BUG: 427797
FIXED-IN: 5.20.3
Test Plan:
Open the Application Launcher, right click any app -> Add to Panel (Widget),
then click the icon on the panel, it should launch.
Reviewers: #plasma, broulik, dfaure
Reviewed By: dfaure
Subscribers: dfaure, ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29687
Summary: And use KNotificationJobUiDelegate in case of errors
Test Plan: Untested other than compilation
Reviewers: broulik, davidedmundson
Reviewed By: broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D29124
Creating a KFileItemList with a KFileItem with a URL that doesn't have a scheme triggers an assert in KFileItemListProperties.
It doesn't really make sense to have anyway.
Differential Revision: https://phabricator.kde.org/D26516
Summary: KFileUtils::suggestName() is a drop-in replacement, just moved to another library
Test Plan: builds
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D23996
Doing this on startup can easily add up to 20ms startup time for every icon pointing to a file.
It is not an issue with application links that don't have open with actions fortunately.
Differential Revision: https://phabricator.kde.org/D18925
We used to always delete the backing .desktop file if we changed a property in a Link (to
a document) hoping that setUrl would call populate. However, it won't do that if the URL
didn't change, so if you only changed the icon, the .desktop file was removed and never
re-created, breaking the applet.
BUG: 380922
FIXED-IN: 5.10.2
Differential Revision: https://phabricator.kde.org/D6148
Summary:
applets that acces their config in C++ needs to implement
configChanged() in order to still work correctly in the scripting
console
Test Plan: correct icon when created from scripting console and config written from there
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4461
Summary:
applets that acces their config in C++ needs to implement
configChanged() in order to still work correctly in the scripting
console
Test Plan: correct icon when created from scripting console and config written from there
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D4461
Files in desktop:/ are local files but QUrl doesn't know this.
Also allows us to determin mime type and icon for files on a network share.
While at it, improve default naming logic.
BUG: 375103
FIXED-IN: 5.9.0
Differential Revision: https://phabricator.kde.org/D4157
This adds the "Open With..." option known from Dolphin to the icon applet when it points to a file.
Also adds a "Open Containing Folder".
While at it, moves the action logic for jump list actions to C++ side
Differential Revision: https://phabricator.kde.org/D3905
When applying KPropertiesDialog of a Link desktop file, the URL might have changed.
In this case nuke the local file and start afresh.
Differential Revision: https://phabricator.kde.org/D3906
For local files, the base name is used, for http(s):// URLs the host name
is used and only if that fails we'll fallback to fileName (which still can be empty)
When this restriction is enabled, KIO will refuse to run desktop files outside system-known locations
essentially breaking the icon widgetin this case. Since we still want to be able to have shortcuts
in locked-down setups, let's just use the source desktop file in this case and rather lose the ability
to customize it (which isn't really possible with this restrition anyway)
plasmoid.configuration.url where the applet stored its URL ends up in [Configuration][General]
whereas config() from C++ side ends up in [Configuration] so the new applet doesn't find the
old URLs and breaks.
This brings back the properties dialog allowing to manipulate the icon and label of a widget.
CHANGELOG: Icon widget properties, such as name, icon, working directory, etc can now be edited
Differential Revision: https://phabricator.kde.org/D2687