Commit graph

26 commits

Author SHA1 Message Date
Ivailo Monev
957da2bb43 generic: adjust to KRun changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 03:22:02 +03:00
Ivailo Monev
ebde34f06c plasma: call the base class init() method
Plasma::Applet::init() marks the applets as movable items for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-19 02:03:22 +03:00
Ivailo Monev
fac647ae78 plasma: deal with TODO about system-monitor configuration interface
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-02 15:37:06 +03:00
Ivailo Monev
4b1733f6cd plasma: use sunken frame shadow for the frames in devicenotifier and notifications applet
to match the shadow of Plasma::WidgetExplorer

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-18 11:16:10 +03:00
Ivailo Monev
fbf859fd21 plasma: devicenotifier applet optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-17 22:07:03 +03:00
Ivailo Monev
420136f6e4 plasma: change the devicenotifier free space poll interval based on Solid::PowerManagement::appShouldConserveResourcesChanged() signal
the only user of that signal, bubblemon applet uses
Plasma::Applet::shouldConserveResources() method tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-17 19:42:03 +03:00
Ivailo Monev
11af5c085c plasma: optimize devicenotifier applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-17 19:00:26 +03:00
Ivailo Monev
df437902d7 plasma: rename the devicenotifier m_title member and expand the widget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-16 07:38:11 +03:00
Ivailo Monev
24f740c7c4 plasma: use proper casing for the DeviceNotifierWidget message
might aswell correct it after the reimplementation

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-16 07:20:42 +03:00
Ivailo Monev
7fe699fb54 plasma: rename constant in devicenotifier source file
no longer used for preferred and minimum size

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-16 06:57:03 +03:00
Ivailo Monev
44acb0cbf9 plasma: do not even set preferred size for batterymonitor and devicenotifier applets
once set the hint has to be updated on form factor switch (e.g. when the
applet is moved from the desktop to panel or vice-versa)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-16 06:49:42 +03:00
Ivailo Monev
e76fb4ff91 plasma: ensure the scroll area of devicenotifier applet does not shrink bellow the preferred size
because when to show the popup icon instead of the widget and when not is
decided by the minimum of the widget and Plasma::ScrollWidget is adjustable
(shrinks if minimum size is not set)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-15 17:03:15 +03:00
Ivailo Monev
e695a67ae9 plasma: simplify batterymonitor and devicenotifier size hints management
by getting the preferred size hint from the actual applet widget and
returning the result of Plasma::PopupApplet::sizeHint() otherwise (both
Plasma::PopupApplet::sizeHint() and Plasma::applet::sizeHint() do hints
trickery based on form factor and such) a lot of assumptions other bits
make are fullfilled

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-15 13:22:15 +03:00
Ivailo Monev
fb077bf0d5 plasma: lock when checking the free space in devicenotifier applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-15 11:36:58 +03:00
Ivailo Monev
2dc2d685d3 plasma: set minimum and preferred devicenotifier applet sizes based on form factor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-15 06:50:46 +03:00
Ivailo Monev
1dc79c3ddf plasma: lock while updating devicenotifier applet layout
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-15 04:16:02 +03:00
Ivailo Monev
0466b3421e plasma: parent the internal devicenotifier widget to the scroll area, reduce the minimum size
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 23:05:10 +03:00
Ivailo Monev
9bf1356cfd plasma: remove TODO related to devicenotifier applet
done, see fcc96cd259

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 01:26:54 +03:00
Ivailo Monev
e278cad3ca plasma: update devicenotifier layout on Solid::DeviceNotifier::contentChanged() signal
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 21:31:10 +03:00
Ivailo Monev
6bcd2411b5 plasma: handle optical drives in devicenotifier applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 20:33:53 +03:00
Ivailo Monev
f5c76ec052 plasma: adjust the devicenotifier widget size after clear
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 11:12:08 +03:00
Ivailo Monev
fcc96cd259 plasma: implement configuration interface for devicenotifier applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 10:57:44 +03:00
Ivailo Monev
fb8433665b plasma: add interactive icon for unmounting from devicenotifier applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 10:23:32 +03:00
Ivailo Monev
33908835cf plasma: check device emblems based on Solid::StorageAccessaccessibilityChanged() signal in devicenotifier applet
side note: because there is no signal for free space change it is checked
on timer

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 09:51:30 +03:00
Ivailo Monev
5ab7fa5735 plasma: use scroll widget as base graphics widget for devicenotifier applet
because if non-removable devices are shown things may not fit on the screen

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 09:30:32 +03:00
Ivailo Monev
d477598c1d generic: device notification reimplementation
how does it look? something like this:
https://ibb.co/1zbDVpk

and because all the SolidUiServer bits are written by me now - copyright
it to me. the actions dialog was not operational btw (not for hotplug
events anyway).

the solidautoeject thing does not even make sense - when the eject
button is pressed it was calling Solid::OpticalDrive::eject() but if the
button is pressed the tray will eject anyway so what was it doing
actually?

solid-device-automounter can be replaced with solid actions but the
devices are mounted for solid actions anyway so dropping it

as for KCM for the solid actions - there can be none but to add features
such as non-interactive actions (e.g. launch the keyboard KCM when a
keyboard is plugged without poping dialog) or actions that do something
on device removal it has to be done anew

note that the action file for opening a file manager was named
"test-predicate-openinwindow" meaning it was a testing thing rather than
a finished thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 05:47:54 +03:00