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:
This patch uses the new units.iconSizeHints.panel API to limit the
icon size to what the user sets for panel icons in System Settings,
avoiding them taking up too much space, particularly in wide vertical
panels.
See D5592 and D4550 for similar changes.
Depends on D5593.
CCBUG:378443
Reviewers: #plasma, mart, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5594
Take into account the label's height for minimum size. When we resize the applet super tiny,
it's likely text wraps onto two lines, so use a two line text as minimum (it already does that for preferredHeight anyway).
Differential Revision: https://phabricator.kde.org/D4477
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
The label is typically wider than the icon, so allow for 1.5x icon width as default
and also assume the label will be two lines of text which is the more common case imho.
This keeps a newly created icon applet from being cramped and tiny
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
This avoids picking a black and white icon like it would for KMail.
Neither Task Manager nor Kickoff use plasma theme icons for applications.
Differential Revision: https://phabricator.kde.org/D1745
Dragging an app link .desktop file from Folder View showing desktop:/
from Folder View (but not Dolphin) to desktop/panel, spawning an Icon,
was broken because:
- KDirModel::metaData adds the UDS_LOCAL_PATH (local file) url as
text/uri-list to the drag MIME data, but also the original desktop:/
URL as a second special MIME format for KDE URLs, using KUrlMimeData
- Dolphin only does the first part, using a partial code copy from
KDirModel
- ContainmentInterface::processMimeData uses KUrlMimeData with default
options to decode the drag MIME data - the default option is
PreferKdeURLs, so it retrieves the desktop:/ URL from the FV drag
but not the Dolphin drag (since it lacks it)
- Thus the Icon applet is handed a desktop:/ URL in the FV case, which
the code - not using KIO - isn't written to handle
This patch adds an async KIO::StatJob to the Icon code when
QURL::isLocalFile is fast to try and resolve an URL to a more local
one the rest of the code can handle.
Rewriting more of the Icon code to use KIO /would/ have been nice,
however it ultimately ends up using KDesktopFile which can't handle
non-local files, so at some point resolving to the proxied-for path
would happen anyway.
BUG:356548
Dragging an app link .desktop file from Folder View showing desktop:/
from Folder View (but not Dolphin) to desktop/panel, spawning an Icon,
was broken because:
- KDirModel::metaData adds the UDS_LOCAL_PATH (local file) url as
text/uri-list to the drag MIME data, but also the original desktop:/
URL as a second special MIME format for KDE URLs, using KUrlMimeData
- Dolphin only does the first part, using a partial code copy from
KDirModel
- ContainmentInterface::processMimeData uses KUrlMimeData with default
options to decode the drag MIME data - the default option is
PreferKdeURLs, so it retrieves the desktop:/ URL from the FV drag
but not the Dolphin drag (since it lacks it)
- Thus the Icon applet is handed a desktop:/ URL in the FV case, which
the code - not using KIO - isn't written to handle
This patch adds an async KIO::StatJob to the Icon code when
QURL::isLocalFile is fast to try and resolve an URL to a more local
one the rest of the code can handle.
Rewriting more of the Icon code to use KIO /would/ have been nice,
however it ultimately ends up using KDesktopFile which can't handle
non-local files, so at some point resolving to the proxied-for path
would happen anyway.
BUG:356548
We need to check whether the stuff we *dropped* is supported by us, not whether
we support ourself :)
CHANGELOG: Fixed dropping files onto an icon widget linking to an application with restrictions on supported file types