Commit graph

649 commits

Author SHA1 Message Date
Ivailo Monev
a7052ff980 plasma: remove unused KListConfirmationDialo and CheckBox classes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-12 00:40:42 +03:00
Ivailo Monev
09afd4b317 plasma: drop kpart
unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-11 23:53:48 +03:00
Ivailo Monev
15ee6e9c3d plasma: remove unused ConditionalLoader
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-11 11:11:45 +03:00
Ivailo Monev
b54eec7ab5 libs: Plasma::WidgetExplorer reimplementation
am really starting to hate Plasma::ScrollWidget - that widget is
resizing on timer so to not cause resizing to minimum and then expanding
manual widget resizing has to be done (see
Plasma::WidgetExplorerPrivate::filterApplets())

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-11 03:52:52 +03:00
Ivailo Monev
12aad02e77 plasma: remove unused and redundant qml items
CheckBox, RadioButon and Slider are actually registed by graphicswidgets
(there are Plasma::CheckBox, Plasma::RadioButton and Plasma::Slider
classes for such widgets), Switch is simply unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-10 03:24:30 +03:00
Ivailo Monev
a2d7294243 plasma: remove unused graphicslayouts import
"This file is part of the QtDeclarative module of the Qt Toolkit" -
yeah, sure

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-10 01:44:05 +03:00
Ivailo Monev
df8e4fd521 plasma: remove reference to gone applications slave
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-10 01:16:38 +03:00
Ivailo Monev
bd503009b5 plasma: remove unused and private InternalToolBox members
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-10 00:50:11 +03:00
Ivailo Monev
dca542fd6c plasma: register Plasma::CalendarWidget as type from graphicswidgets import
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 22:16:08 +03:00
Ivailo Monev
5f1935561f plasma: remove unused dirmodel import
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 22:10:13 +03:00
Ivailo Monev
2b48360cd9 plasma: remove unused variable in Hdd::init()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 19:52:22 +03:00
Ivailo Monev
470b52d29c soliduiserver: implement mountpoint cleaner
lots of references have to be kept and passed around because once the
device is removed Solid::Device is just an UDI - anything else is
obtained dynamically and will return invalid results (even casts will
not work)

what the mountpoint cleaner does? when a device is removed without
being unmounted (e.g. USB storage) the program will call `unmount`
essentially making sure the device node and the mount point can be used
when the device is inserted again, no other project does that as far as
I am aware

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 11:02:45 +03:00
Ivailo Monev
dd4b27b579 soliduiserver: pass the Solid::Device object instead of the UDI to kExecuteAction()
so that it does not have to be re-constructed and removed device can be
passed to it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 09:00:42 +03:00
Ivailo Monev
566830cdc6 plasma: remove unused places data engine
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-09 08:03:51 +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
63d9a63011 plasma: cache the keyboard layout string in keyboard applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 21:17:28 +03:00
Ivailo Monev
ed479c4346 plasma: optimize keyboard applet flag painting
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 21:12:10 +03:00
Ivailo Monev
7bc2872f69 plasma: set the keyboard applet minimum size, based on form factor
because it is painted as pixmap setting the minimum size is a must

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 21:01:52 +03:00
Ivailo Monev
04d081086c plasma: optimize keyboard applet painting
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 20:45:54 +03:00
Ivailo Monev
e4366d3493 soliduiserver: implement feature to execute actions under certain conditions
can implement condition for when device changes occurs too but I have no
plans to use it for something, not yet that is. the remove condition can
(and probably will be) used to start kvkbd when there is no keyboard
plugged in altough that will require program to check when to do that

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 19:26:41 +03:00
Ivailo Monev
e5fce03460 plasma: remove unused components
experimental, unfinished and unused - bye!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 10:58:14 +03:00
Ivailo Monev
0373b489c4 plasma: remove unused favicons and filebrowser data engines
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 10:11:20 +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
140e8a8113 plasma: adjust defaults to the devicenotifier applet changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 10:29:23 +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
Ivailo Monev
7c6d3bcb45 plasma: create batterymonitor applet widget and keyboard applet layout from constructors
Plasma::Applet::init() and Plasma::Applet::constraintsEvent() may be called
in order such that the members were not created yet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 22:17:22 +03:00
Ivailo Monev
388eeea355 plasma: handle generic device search in solid runner
side note: the places runner may also add matches for the removable devices
because the places implementation handles them as bookmarks (the devices
in the dolphin places panel are bookmarks!
see kdelibs/kfile/kfileplacesitem.cpp)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 20:15:50 +03:00
Ivailo Monev
e0985f16cf plasma: filter duplicates and fix listing of optical drives in solid runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 19:30:22 +03:00
Ivailo Monev
c4ef054ebd Revert "plasma: plug keyboard applet memory leak"
This reverts commit b77b83565f.
2023-09-06 19:10:05 +03:00
Ivailo Monev
d1874e4964 plasma: create Plasma::Svg on the heap in KeyboardApplet::paintInterface()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 18:59:07 +03:00
Ivailo Monev
ff2486c1bb plasma: translate solid runner comment to bg
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 05:32:10 +03:00
Ivailo Monev
ae6e4b8808 plasma: additional note about kSolidActionCommand() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 05:21:25 +03:00
Ivailo Monev
b77b83565f plasma: plug keyboard applet memory leak
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 03:51:50 +03:00
Ivailo Monev
6ca60e84b5 plasma: reimplement the solid runner
using solid directly and not depending on soliduiserver for the actions,
now the hotplug and devicenotifications data engines aswell as the
devicenotifier applet can be reimplemented too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 03:35:02 +03:00
Ivailo Monev
271ffadb7b plasma: remove unused SolidRunner member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 22:39:01 +03:00
Ivailo Monev
f0427c4a8e plasma: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 22:36:09 +03:00
Ivailo Monev
23222eff52 plasma: add the keyboard applet from the systemtray applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 19:03:29 +03:00
Ivailo Monev
39998c92dc plasma: set the keyboard applet status based on the number of keyboard layouts
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 19:03:05 +03:00
Ivailo Monev
b5b873c2b3 generic: keyboard layout applet and kayboard KCM reimplementation
lots of changes with this commit - on the plasma applet side:
 + the applet now handles mouse wheel events
 * the applet itself sets its global global shortcut key
 + the applet itself has configuration interface for the text and flag options
 * ported to the new KKeyboardLayout class
 - no per-window or per-application keyboard layout

on the overall keyboard configuration:
 * no KDED module required
 + keyboard layout descriptions (model, layout, variant, etc.) are actually translated
 - no keyboard configuration will be shown when a keyboard is plugged-in (see bellow)
 - keyboard layout options are not configurable, not via GUI interface anyway

the hotplug plasma data engine, device notifications and solid actions
have to be either reimplemented or extended to handle more device types
(currently the above mentioned handle only removable devices by default
such as cameras, not input devices such as keyboard)

overall - from reimplemented one thing to another and the keyboard
configuration is not done yet (adding and editing keyboard layout not
implemented yet) but in a working state

on a side note the changes here affect kvkbd as it uses D-Bus interface
for keyboard layout change that is no more and has to be ported or (most
likely) replaced with a handler for QEvent::RequestSoftwareInputPanel
event that shows a keyboard on demand

there is also the double-keyboard layout applet thing - applet for the
keyboard layout could be added and the daemon (KDED module) was showing
its own keyboard layout indicator automatically (by default)

the X11 keyboard bell options are next to useless btw - there is
KNotification::beep() for such things so the X11 bell options are
simply dropped

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 18:12:13 +03:00
Ivailo Monev
620a7a1136 generic: handle the new Solid::Input interface
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 20:26:24 +03:00
Ivailo Monev
937cbc813b plasma: validate the active battery when battery is added or removed in batterymonitor applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 16:25:07 +03:00
Ivailo Monev
3dd51351b8 plasma: keep references to the battery devices in batterymonitor applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 16:14:37 +03:00
Ivailo Monev
13490a1a02 plasma: use the theme battery icon in batterymonitor applet, if available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 06:43:55 +03:00