Commit graph

377 commits

Author SHA1 Message Date
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
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
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
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
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
Ivailo Monev
63bd660c21 plasma: validate the active battery when restoring it in batterymonitor applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 05:04:43 +03:00
Ivailo Monev
1c9ce16bb2 plasma: save and restore the active battery of batterymonitor applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 03:06:13 +03:00
Ivailo Monev
b2ae704740 plasma: delay initial batterymonitor applet layout setup
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 02:17:33 +03:00
Ivailo Monev
148a3f836a plasma: set the batterymonitor applet preferred widget icon size to one suitable for panel
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 22:49:45 +03:00
Ivailo Monev
ae8f7c65eb plasma: mark the batterymonitor applet as requiring attention when the battery is low and discharging
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 22:27:43 +03:00
Ivailo Monev
689e15e40b plasma: reimplement battery applet
now with separate options for screen and sleep power management
suppression as well as being able to select which battery to show
information (including icon) for in the tray:
https://ibb.co/DDC01rh

the battery icon is questionably bigger than it should be, have to test
it with battery that is recognizable still (PS3 controller battery
provides only capacity and status info)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 22:18:05 +03:00
Ivailo Monev
3187c6f825 plasma: query for batteries via solid directly from systemtray applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 17:38:42 +03:00
Ivailo Monev
2bdaf882c2 plasma: add the group manager configuration interface to the tasks applet configuration interface
done by the icontasks applet but was not done by the tasks applet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-01 23:47:38 +03:00
Ivailo Monev
9e65f09172 plasma: call KWindowListMenu constructor in WindowList::init()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 18:24:48 +03:00
Ivailo Monev
0dc8347c49 generic: adjust to kparts changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 04:10:49 +03:00
Ivailo Monev
d53f503cad plasma: remove non-operational kickoff applet bits
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 03:02:55 +03:00
Ivailo Monev
07c018707e plasma: CalendarApplet::paintIcon() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 04:05:21 +03:00
Ivailo Monev
0121acd1ab klipper: set global shortctut for the "Open Klipper at Mouse Position" action
if it is not full Katana session neither plasma-desktop nor its systemtray
applet will setup the shortcut so its better done by klipper itself

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 03:53:02 +03:00
Ivailo Monev
5606f97af8 plasma: minor SystemTray::DBusSystemTrayProtocol::initRegisteredServices() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 04:35:31 +03:00
Ivailo Monev
5ce06c488b plasma: X11EmbedContainer::setBackgroundPixmap() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 21:29:11 +03:00
Ivailo Monev
f47177f876 generic: adjust to KNotification changes
some notification files, such as the style KCM one, were not even used

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-25 08:07:58 +03:00
Ivailo Monev
69f7efcce1 plasma: adjust batterymonitor applet to solid changes
there were solid enum changes and then some in this repo, see the
following commit in the kdelibs repo:
2e1544537da02c8e89bc08c59fd3d6e1d146ef8c

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-23 21:12:39 +03:00
Ivailo Monev
4584fab20b libs: remove non-operational TaskManager::GroupManager::TaskSortingStrategy::ActivitySorting enum
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 23:57:15 +03:00
Ivailo Monev
186a7702e8 generic: adjust to KGlobalSettings changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 04:29:13 +03:00
Ivailo Monev
bd84219d6a plasma: default to manual sorting in tasks applet
like the icontasks applet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 08:43:33 +03:00
Ivailo Monev
efe25546a1 plasma: remove unused battermonitor applet import
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 17:55:15 +03:00
Ivailo Monev
09744d81a3 generic: adjust to KDateTime removal
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 22:55:43 +03:00
Ivailo Monev
c68613d00b plasma: remove reference to non-existing source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 20:42:00 +03:00
Ivailo Monev
197af45155 plasma: use KImageIO::isSupported() to check if dropped URL can be set as wallpaper in folderview applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-14 16:49:15 +03:00
Ivailo Monev
dffe7d406d plasma: setup the system-monitor Kelvin limit based on the Celsius and Fahrenheit limits
the upper limit (384) is the Celsius upper limit (110) converted to Kelvin,
the lower limit is chosen such that it is twice the Fahrenheit lower
limit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 21:38:44 +03:00
Ivailo Monev
e661a0c257 plasma: implement configuration interface for the system-monitor applet temperature unit
includes support for Kelvin unit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 21:00:12 +03:00
Ivailo Monev
dd9b34f470 plasma: initialize SM::Plotter::m_showAnalogValue member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-12 19:52:32 +03:00
Ivailo Monev
742415a699 plasma: avoid temporaries in ToolTipProxy::updateToolTip()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 19:36:44 +03:00
Ivailo Monev
ce92bf96ed plasma: remove unused imports in tasks qml files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 19:32:43 +03:00
Ivailo Monev
cf6a2620c6 generic: remove dead and irrelevant links references
consider the mail references just as dead

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 15:44:43 +03:00
Ivailo Monev
f254c44f7d Revert "plasma: use QColor::name() in Pager::updatePagerStyle()"
This reverts commit 3bb3d55a72.
2023-08-07 22:29:20 +03:00
Ivailo Monev
3bb3d55a72 plasma: use QColor::name() in Pager::updatePagerStyle()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 22:13:19 +03:00
Ivailo Monev
44970b29d8 plasma: partially revert f058709ed6
the systemtray applet automatically adds the applets that have
configuration entry in plasma-desktoprc but the applets configuration is
not saved by the systemtray applet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-05 19:11:18 +03:00
Ivailo Monev
6bff25a7b0 plasma: adjust notifications applet to KLocale changes
KLocale::formatDuration() does pretty much the same as what
KLocale::prettyFormatDuration() used to do

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-05 17:08:29 +03:00
Ivailo Monev
75f49a2b11 plasma: remove references to gone runners
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 22:12:38 +03:00
Ivailo Monev
7819796c55 plasma: replace the seconds option with time format
this essentially extends the digital clock options to 3 formats which are
also configurable instead of using a hardcoded format (the old
implementation), that ofcourse means an update has to be done every
second (or even milisecond) because the format is unknown to the digital
clock applet

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 00:11:11 +03:00
Ivailo Monev
c380602abf generic: adjust to KLocale changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-26 23:35:19 +03:00
Ivailo Monev
7b77d41a52 plasma: do not set the minimum size of Plasma::Calendar
already done by Plasma::Calendar itself

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-24 09:18:20 +03:00
Ivailo Monev
1c58ec3f25 libs: port to the new calendar widget classes
slick:
https://ibb.co/Vg1TyM2

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 11:38:08 +03:00