Typically we have properties on top, then functions, then signal
handlers, then child items, then the onCompleted: block. The Battery
Monitor didn't conform to that, so this commit makes it do so. There are
no actual code changes; stuff is simply moved around for greater clarity
and style standardization.
f9e39815d ("applets/batterymonitor: Improve for desktop systems") changed the
plasmoid to use a plain icon instead of the CompactRepresentation if there are
no batteries.
While 471cc3745 ("applets/batterymonitor: fix CompactRepresentation") brought
the use of the CompactRepresentation back, the plain icon is still used.
For the case that there are no batteries and brightness controls available,
it fell back to "battery", which has no symbolic variant. Change that to use
the symbolic "video-display-brightness" as well.
BUG: 448520
In other places both properties are being set unconditionally, so this
patch just aligns it to other code. Also, possibly fixing scenario
where the Sources property might de-synchronize because the code
conditionally skipped updating it.
This way we no longer crash in kcmutils, because a space is an invalid character for the
DBus registration. While it is fixed in kcmutils 397763b0189f8a61c340e30959391f169ecfa0d, this commit
has not landed in the latest frameworks release.
The only issue is that the plugin would be re-enabled in case it was disabled by the user, because the plugin id is different.
However this runner is not aggressive in the amount of matches it displays, I do not consider this a big issue.
The new plugin Id gets derived from the filename.
BUG: 448156
When you unmount a device using the UI, the device shows a message
saying, "Removing..." This message remains visible as long as the device
is still processing file move or copy operations due to the use of async
file IO. The device is not yet safe to unplug as long as the message is
visible, but this is not obvious from the UI. As a result, it is
possible for people to think it's stuck and unplug it anyway, causing
data loss.
This commit attempts to address that by showing a different message when
the unmount takes more than one second, which tells the user what is
actually happening and explicitly asks them not to unplug it yet.
This reverts commit 354f7da871.
Somehow it prevents inhibitions from being visible in the UI. Since the
reason is not yet understood, let's revert for now to prevent releasing
a regression while we investigate.
CCMAIL: me@ratijas.tk
In the process, the onWheel handler is moved up to the main file so that
it gains write access to the screenBrightness property. This is how
other scrollable applets handle the same situation.
By setting the deprecation version for KRunner to 5.91,
the negated deprecation wrapper will evaulate to true and
we get compatibility typedefs.
This way we do not need to add the typedefs manually or
add `using namespace Plasma` to the plugins.
Task: https://phabricator.kde.org/T15140
This has been opt-in for several releases and on by default in one major
distro. Minor issues were found, but they have all been resolved.
There are still checks that the user has systemd available and with a
version new enough for autostart.
The Plasma 5.24 wallpaper changed to a JPEG but this change had to be
reflected in the SDDM config file, which calls out the wallpaper by its
exact file path. This commit does that.
Despite our best effors we currently do not match Gedit windows to their desktop file. It manages to evade all of our heuristics.
There is a reliable way to map it and other GTK apps though, the _GTK_APPLICATION_ID window property, which is more or less the same as our desktopFileName property
In the CompactRepresentation, we can use existing top-level properties
instead of defining and redefining a bunch of new properties at
various levels, which makes the code harder to read and more indirect.
Otherwise we do not start the process, which will cause a timeout in KRunner.
The goal of the condition was to prevent the process from starting up
unnecessarily, but having a timeout in KRunner in that case is far from ideal.
With https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/796 the runner
will get disabled when one disables baloo indexing.
Consequently the runner will not get called from DBus.
In Wayland session data sources for modifier keys might be unavailable,
in which case the whole `source.data.Alt` is undefined. Standard
JavaScript try-catch didn't help much, because short-circuiting
operator && simply returns left-hand-side `undefined` value which is
falsy. It used to spam error messages to a console at a rate
proportional to the number of top-level menu items:
file:///usr/share/plasma/plasmoids/org.kde.plasma.appmenu/contents/ui/main.qml:112:17:
Unable to assign [undefined] to bool
Amends 156415f377
f9e39815dc introduced a few regressions by
blowing away the custom CompactRepresentation when there are no
batteries. This introduced a race condition that sometimes set the icon
incorrectly and also broke scrolling on the applet to change the volume.
This commit fixes those issues by using the existing infrastructure for
the CompactPepresentation, but simply swapping out its custom battery
icon for normal icon when there are no batteries.