Commit graph

454 commits

Author SHA1 Message Date
Ivailo Monev
0c762b6333 kcontrol: do not show options with placeholder from keyboard KCM
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-12 00:52:48 +03:00
Ivailo Monev
300beddd4e kcontrol: set flag as the icon for the layout column in keyboard KCM
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 19:38:30 +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
3c48401883 kcontrol: warn about keyboard layout options in keyboard KCM
I've tested only the grp:alt_space_toggle option, don't even want to know
what kind of issues the other option will cause. feel free to file issues
to X11 tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 05:56:19 +03:00
Ivailo Monev
f68fd1b58d kcontrol: set the tooltip and "what is this?" for the model box of keyboard KCM
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 05:05:53 +03:00
Ivailo Monev
18073517bb kcontrol: disable moving of tree columns in keyboard KCM
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 04:27:45 +03:00
Ivailo Monev
8b3b954d85 kcontrol: implement keyboard layout options
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 04:09:57 +03:00
Ivailo Monev
ec442d8ad1 kcontrol: stub keyboard KCM keyboard layout options
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 02:38:02 +03:00
Ivailo Monev
e7a2d4f45b kcontrol: use automatic initial size for KCMKeyboardDialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-08 02:13:42 +03:00
Ivailo Monev
7065198d98 kcontrol: add solid action files for mouse, keyboard and joystick devices
try plugging a mouse, keyboard or joystick - see what happens!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-07 22:20:37 +03:00
Ivailo Monev
52a83a7bad kcontrol: disallow adding duplicate layouts from keyboard KCM
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 05:16:23 +03:00
Ivailo Monev
c402bff997 kcontrol: remove redundant KCMKeyboard destructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 04:02:42 +03:00
Ivailo Monev
cc7fd6b174 kcontrol: remove declaration of non-existing KCMKeyboardDialog::save() signal
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 04:01:34 +03:00
Ivailo Monev
343749034c kcontrol: remove declaration of non-existing KCMKeyboardDialog::updateWidgets() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-06 04:00:21 +03:00
Ivailo Monev
e74152d243 kcontrol: fix keyboard KCM edit action initial variant selection and up/down buttons state
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 21:33:17 +03:00
Ivailo Monev
6d76faf469 kcontrol: implement add and edit actions for keyboard KCM
TODO: store the descriptions in KKeyboardLayout such that when adding items
to, say, QComboBox the items will be pre-sorted

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 20:54:51 +03:00
Ivailo Monev
5f2c455590 kcontrol: set layouts before key repeat settings on startup
in case any XKB-related function fails (such as XkbAllocKeyboard())

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-05 19:41:16 +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
29aac779a2 kcontrol: drop browser support of componentchooser
see 387bdaa93fd6adb0cd8a930454e3be578fa5fdc0 in the kdelibs repo, how a
link will be opened depends on a few things now - the MIME type and what
method is used for opening the URL. if KRun is used the MIME type will
be detetermined and the prefered service for it will be launched, if
KToolInvocation is used first the preferred service for "text/html" will
be attempted with fallback to kde-open and xdg-open which solidifies the
behaviour of "mimetype-determination-in-calling-application" (see
kdelibs/kdecore/sycoca/kprotocolinfo.cpp)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-31 21:31:09 +03:00
Ivailo Monev
d2181fd762 kcontrol: update key schemes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-30 17:42:17 +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
5800089d10 kcontrol: queue the randr KCM tray actions
so that events can be processed and the modal dialog about accepting the
changes does not block the event queue

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-28 18:11:31 +03:00
Ivailo Monev
fe7f483647 generic: replace globs with MIME types in KFileDialog method calls
see the previous commit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-27 00:40:03 +03:00
Ivailo Monev
1fb3e430d4 kcontrol: add *.ogg and *.oga to the access KCM pattern
no idea what "artsd" is but figuring out in what format standard sounds are
is easy - just look into /usr/share/sounds. also, the sound files shipped
by Katana are in OGG format

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-26 06:50:12 +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
10e08246ca kcontrol: keep reference to the QByteArray object in ThemePage::applyTheme()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 05:57:52 +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
42cf4cacf8 kcontrol: fallback to KDE_DEFAULT_CURSOR_THEME in the cursor setup function, ignore X11 defaults
as is done by krdb for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 12:16:19 +07:00
Ivailo Monev
d62ee58181 kcontrol: required the theme argument of kapplymousetheme to be non-empty
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 12:14:02 +07:00
Ivailo Monev
7189f4783e kcontrol: keep reference to the QByteArray object in KeySymHelper::getKeySymbol()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-22 09:21:12 +07:00
Ivailo Monev
e4dfd5c4a5 generic: apply effect settings from the platform plugin instead of writing to the Katie config
the idea being to not write anything into the Katie config and possibly
even drop support for overriding Katie settings from config.

on a side note font and palette settings are wrapped via classes
(KGlobalSettings and KColorScheme) and hard-wired to configs rather than
being a runtime thing (e.g. getting the font to use for menus via
QApplication::font("QMenu") instead of KGlobalSettings::menuFont()) so lots
to do on that, as for how it will benefit Katana and Katie - less config
parsing possibly, QPalette objects are shared data for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 22:21:25 +03:00
Ivailo Monev
133a1e3e9b kcontrol: remove now unused applyQtColors() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 21:40:24 +03:00
Ivailo Monev
f298066b23 kcontrol: do not write palette to the Katie config from krdb
palette is to be set by the platform plugin

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-21 20:37:49 +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
b4498d8f43 kcontrol: ensure that the resolution numbers are not localized in OutputGraphicsItem::configUpdated()
otherwise it looks as if it is currency or something like that (e.g.
"1,920x1,080") and does not match the number that is shown in the combo box
with available resolutions

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-17 20:06:07 +03:00
Ivailo Monev
b634d6fd41 kcontrol: remove unused variable in ThemeDelegate::paint()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 16:31:44 +03:00
Ivailo Monev
144299f453 kcontrol: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 16:24:16 +03:00
Ivailo Monev
7497f771bc kcontrol: remove now unused kautostart header inclusions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 16:01:22 +03:00
Ivailo Monev
7b8bc6b8ef generic: use the new public KTimerDialog
see the following commit in kdelibs repo:
e0d476372cd6a39a01cb8b70f31192e4d2d540c8

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 15:42:35 +03:00
Ivailo Monev
27845ee910 kcontrol: simply override settings based on form factor from workspaceoptions KCM
it is done for the window placement and "borderless maximized windows"
options, the form factor feature shall be like a profile - instead of
overriding config options with fallback from this and that config it shall
override all relevant options from hardcoded values and even act as reset

on a side note what the form factor option does is setup other options
via single combo box, individual config options can be tuned from other
KCM (such as kwincompositing)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-16 14:42:26 +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
5d34b9cfcb generic: make use of the new KDE_DEFAULT_CURSOR_THEME definition
requires d278c3c63c26aa0b0f63d630d27c210213015f1a from kdelibs

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-15 02:43:30 +03:00
Ivailo Monev
f23a2f7a7b generic: remove useless AUTHORS files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-11 20:12:42 +03:00
Ivailo Monev
9a10c6c95e generic: adjust to KAboutData changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 17:48:01 +03:00
Ivailo Monev
ef33eaf427 kcontrol: remove bogus icons KCM bits
animating icons was never a KIconLoader thing, animated icons however (such
as "process-working", which is many icons packed into one) are supported.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 13:20:44 +03:00
Ivailo Monev
0f0e886656 kcontrol: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 13:07:37 +03:00
Ivailo Monev
dbfb4586ec generic: adjust to Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-07 01:33:34 +03:00
Ivailo Monev
f415017e21 kcontrol: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 07:54:24 +03:00
Ivailo Monev
332a0287b6 kcontrol: format and indent
there is a copy of the table and the function at:
kde-extraapps/kvkbd/src/keysymconvert.cpp

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 07:02:27 +03:00
Ivailo Monev
8930bbdf67 kcontrol: fix setup of primary display
regression since 609a72aa84, brought to my
attention via:
https://github.com/fluxer/katana/issues/41

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-05 14:54:43 +03:00