Commit graph

857 commits

Author SHA1 Message Date
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
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
671d3667d4 plasma: disconnect the powerSupplyStateChanged() and capacityChanged() signals on battery unmap in soliddevice data engine
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 16:39:10 +03:00
Ivailo Monev
1b6e45e3e0 plasma: sync soliddevice data engine battery charge state map
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 16:23:27 +03:00
Ivailo Monev
b2e2da7b08 plasma: map powerSupplyStateChanged() and capacityChanged() signals in soliddevice data engine
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 16:19:52 +03:00
Ivailo Monev
2e93ffd6a8 plasma: sync and update soliddevice data engine maps
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 04:59:17 +03:00
Ivailo Monev
cc1e651c49 plasma: implement battery capacity and power supply data
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 04:38:17 +03:00
Ivailo Monev
de914115ac plasma: correct and update soliddevice content type checks
incorrect since before the fork

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 04:21:20 +03:00
Ivailo Monev
ff06818144 plasma: set the hotplug data engine watcher poll interval to 5 seconds
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-02 04:09:14 +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
a5a07d46ca generic: drop bogus multihead support
note that it is independant of X11 multiscreen, as the comment in
KWin::Workspace::isOnCurrentHead() claims

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-01 16:41:30 +03:00
Ivailo Monev
ab85ad15c3 plasma: do not suspend startup for the wallpaper
plasma-desktop wallpaper does not affect other applications, not during
startup and not after startup is done

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-01 02:04:58 +03:00
Ivailo Monev
17b5ffc92c plasma: deal with TODO related to sessions runner
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 20:51:02 +03:00
Ivailo Monev
97fd36efbd plasma: remove unused interface and declaration of non-existing Image::suspendStartup() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 19:39:17 +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
e230b4cbc7 plasma: remove bogus opaque shutdowndialog image
whoever made that image from the source (see
plasma/desktoptheme/oxygen/dialogs/shutdowndialog.source.svgz
and plasma/desktoptheme/oxygen/dialogs/shutdowndialog.svgz) did not
remove everything but the moon and the moon picture object covers
the text in the shutdown dialog

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 19:58:28 +03:00
Ivailo Monev
66f6104da4 generic: replace QLabel with the new KPixmapWidget class
or how to optimize painting of pixmaps and icons

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 05:10:09 +03:00
Ivailo Monev
0d32557a65 plasma: QImageItem and QPixmapItem size getters optimizations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 04:07:24 +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
5949b572bc khotkeys: drop it
the only use case is to launch ksnapshot which can be done by
plasma-desktop, some of the actions code is borked (notably window
matching, global and menu actions were working) and I have no
intention to fix it. even if fixed when a window (and thus possibly
application) key is grabbed there is a chance the window (application)
may want to grab the grabbed key and fail (i.e. grab conflict) so it
shall be left to the application to set what keys shall be global
(grabbed) hence the bits to start ksnapshot are moved to plasma-desktop

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-29 23:04:14 +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
0104dd678a plasma: default to manual sorting in tasks applet
see:
bd84219d6a

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 23:51:30 +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
f00420a34a generic: preperations for kdelibs changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 19:47:34 +03:00
Ivailo Monev
ee10c1a6c3 plasma: add binding for KLocale::toLocale() method
requires e4a7b266fe5a266c76b00513314540b2172927d6 from kdelibs to function
properly

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 19:33:03 +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
f1f6ae7a3e generic: replace X-KDE-StartupNotify with StartupNotify
X-KDE-StartupNotify is for compatibility and used as fallback (in case
StartupNotify is not set)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-18 05:11:16 +03:00
Ivailo Monev
789d354b81 kcontrol: use BorderlessMaximizedWindows config key to decide the workspace form factor
disabling plasma-desktop should never be done for Katana session even tho
it can be done because it is started from XDG autostart file

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 14:21:07 +03:00
Ivailo Monev
340eaa77ef plasma: do not translate the wind directions from IonInterface::getWindDirectionIcon()
fixes weatherstation plasma applet not showing the wind image (wind_arrows)
when the locale is set to be one other than the default (C/en_US). note
that "N/A" is matched as untranslated string (e.g. in
kdeplasma-addons/applets/weather/weatherapplet.cpp) meaning more changes
may be required to fix other minor issues because "N/A" is translated in
several places

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 19:22:04 +03:00