Commit graph

55 commits

Author SHA1 Message Date
Alexander Lohnau
e170f15429 kcm/runners: Allow simpler installation of DBus runners
While the install.sh script that is part of the python templates worked
great, it still is visually annoying to have a terminal window open when we
just need to copy/generate two files.

With a krunner-plugininstallerrc file, consumers can provide instructions on
how to generate the dbus service and where to find the desktop file for
the runner.

This is intended for python runners, but can work with any other
language or even prebuild binaries.
In the future, we might want to add the possibility to add dependencies.
But for now, the current state should suffice.

Also, we could adjust the installation without having to edit the
KRunner template and lots of existing KRunner plugins that are already
published.

Since there are a few moving parts involved, an autotest was added to
ensure the files end up in the correct destination.
This also checks the dynamically generated content of the service and
tests the one given line of the desktop file
2023-07-12 18:12:10 +00:00
Laurent Montel
cb3aa63220 Remove qt check as we depend against qt6 now 2023-06-12 04:59:59 +00:00
Alexander Lohnau
0bc87238a6 kcms: Port to more target-centric cmake approach
This is what we do in modern CMake code to better structure it

This utilizes 90b8f4ae4e
2023-05-04 07:31:32 +00:00
Harald Sitter
867e5802af use KCountryFlagEmojiIconEngine to render keyboard layout flag
the old file based approach was relying on kdelibs4support and is no
longer supported in kf6
2023-05-03 21:41:04 +00:00
Dāvis Mosāns
400ed3dde7 Rename Qt5/KF5 to Qt6/KF6 2023-02-28 22:13:36 +01:00
Nicolas Fella
737d1b51b7 Build static libs with -fPIC 2022-10-25 18:37:04 +00:00
Laurent Montel
8ab562fa2e Install in kf<version> 2022-10-14 13:47:59 +02:00
Alexander Lohnau
d0095e1d72 Port to KCM desktop file generation method from kcmutils
This de-duplicates the translations needed for the KCMs.

Task: https://phabricator.kde.org/T15609
2022-07-30 10:08:33 +02:00
Volker Krause
72cf1167f5 Adapt to Qt6's removal of Qt::X11Extras 2022-04-02 08:03:12 +00:00
Volker Krause
d6c232f1af Initial build system changes to allow compilation against Qt6
With commenting out the three remaining KDELibs4Support references this is
good enough to pass CMake, which helps with identifying possible issues in
here.
2022-03-28 14:55:29 +00:00
Alexander Lohnau
c175c2c8d7 Install KCMs in new namespaces
This is where systemsettings will look for plugins when not going thourgh KServiceTypeTarder.

This also embeds json metadata in plugins that don't embed it already.

Task: https://phabricator.kde.org/T14517
2021-12-09 23:16:58 +00:00
Alexander Lohnau
4af9c5dfab Install KCM desktop files ad applications with NoDisplay=true
This way the task manager can still pin the KCM or they can be linked to the desktop.
Internally this requires a KService, which is provided with the installed desktop file.

Task: https://phabricator.kde.org/T14517
2021-12-09 23:16:58 +00:00
Alexander Lohnau
5dca52b88b kcms: Remove now unneeded kcoreaddons_desktop_to_json cmake function calls 2021-12-09 23:16:58 +00:00
Fushan Wen
88089b4bdb keyboardlayout: Remove duplicate Esperanto flag icon
Esperanto flag icon has been moved to KDE4 kdelibs.

CCBUG: 445077
2021-11-10 19:09:25 +08:00
Nicolas Fella
2ae001e714 Use FindUdev from ECM and its imported target 2021-10-29 14:38:27 +00:00
Cyril Rossi
dd5db629ed KCM Keyboard port to KConfigXT, highlight non default settings
Main goal is to port the KCM to KConfigXT and properly handle default/reset state, and eventually ease the port to QtQuick.
Like other KCMs dealing with shortcuts, they are now automatically applied when selected.
For technical reason, highlight for layouts and tree view keyboard options won't be implemented.

CCBUG: 434075
2021-10-01 18:00:06 +02:00
Nicolas Fella
454c4fdbc3 Use imported targets for X11 libs 2021-08-15 10:57:59 +00:00
Alexander Lohnau
06c5195cfb Use kcoreaddons_add_plugin to allow loading plugins from build dir
Task: https://phabricator.kde.org/T14528
2021-05-31 07:08:05 +00:00
Andrey Butirsky
a845e67aba [kcms/keyboard] Drop legacy keyboard indicator
A new applet was created that speaks DBus. Having the old settings is a
very confusing user experience. It is also a lot of now obsoleted code.

CCBUG: 430661
2021-05-11 19:05:32 +00:00
Nicolas Fella
8f2b38aeec Modernize X11-related cmake code
Use imported targets instead of variables
Use PkgConfig directly instead of wrapping calls in a find module
2021-03-08 15:01:54 +01:00
Jan Blackquill
b4f3a470e7 kcms/keyboard: handle botched 5.21.0 migration
Since we shipped a botched migration script for 5.21.0, we need to
ship a new migration script that un-botches the effects of the 5.21.0
script. We also change the ID of the plain kcminput_repeat migration so
that we can distinguish between the botched migration and the non-botched
migration, and only reverse migrations applied by the botched migration.

BUG: 431923
FIXED-IN: 5.21.2
2021-02-24 13:19:20 -05:00
Andrey Butirsky
86381afb24 feat: add option to disable OSD on keyboard layout change
Existing ability to disable OSD globally seems is not enough.
People see OSD on keyboard layout change especially annoying.
So provide the fine grained option.

Counterpart commit with the same title is in P-W

FEATURE: 426450
BUG: 376460
2021-02-01 13:55:42 +00:00
David Faure
67857ad336 Add missing calls to ecm_qt_install_logging_categories
(to make those debug areas visible in kdebugsettings)
2021-01-31 11:05:40 +01:00
Nicolas Fella
6b793789df Use versionless Qt cmake target
This makes it easier to build against both Qt5 and Qt6

GIT_SILENT
2021-01-29 13:58:35 +01:00
Andrey Butirsky
4475ab6a70 fix: keyboard layout applet: no flag if Display Name is set
Reworked for new DBus API and event-driven plugin interface to QML.

Essentially, we now get only one DBus signal with id when the layout
changes.
All the other info applet is capable to lookup locally via it's own data
- no need for additionally DBus calls any more.

This is possible because new API provides exhaustive info about all
layouts via updated getLayoutsList() call - now it returns a vector of
all layouts with all names for each. This info is stored on QML side in
Actions objects - which at the same time serve to fill context menu.
2021-01-20 16:53:10 +03:00
Andrey Butirsky
0676646ade fix: keyboard variants display incorrectly on upgrade
Earlier, keyboard variants were embedded in layouts in config.
It is displayed incorrectly with new QML Keyboard Layout applet.

Now we need to update the config to split variants into separate
configuration entry.

The code is still compatible with the old format, but should be
refactored in the future.

Config update script sample:
	- Input:
	LayoutList=us,us(intl),ru,gb(dvorak),gb

	- Output:
	LayoutList=us,us,ru,gb,gb
	VariantList=,intl,,dvorak
	# DELETE LayoutList

CCBUG: 390079
2020-12-31 12:20:35 +00:00
Nicolas Fella
419a312e0d [kcms/keyboard] Remove unused dependencies 2020-12-14 21:45:40 +00:00
Carson Black
13e576edbc [kcms/keyboard]: Adjust settings to reflect existence of key-held behaviour 2020-12-04 17:29:12 +00:00
Nicolas Fella
1335883529 [kcms/keyboard] Port away from KToolInvokation
Summary: kdeinit will most likely be dropped. Use QProcess to start it normally

Test Plan: Open KCM from SNI

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Maniphest Tasks: T12185

Differential Revision: https://phabricator.kde.org/D25549
2020-04-02 16:05:32 +02:00
Harald Sitter
c7a1f606ca replace bespoke xkb geometry parser with xkb
Summary:
the bespoke parser was a horrendous drain on the build time of
plasma-desktop due to recursive templates.
it's been replaced with a new standalone binary that previews any
model/layout/variant/options combination as requested and a qtquick UI
which simplifies the actual rendering substantially.

the new code is better in that it:
- builds in a fraction of the time with a fraction of the power use
- renders complex models (such as the tm2020 or the kinesis) correctly
- because it entirely relies on xkb to figure out keysyms belonging to
  a given key, it's layout representation is not only substantially more
  complete it also correctly obeys options like eurosign:2
- renders numlock and the like (not that this is in fact very useful ^^)
- is following the system palette for coloring
- the paint code should be easier to graps and more robust because xkb
  provides completely consistent geometry and layout data meaning we can
  model this verbatim in qtquick and then scale the entire
  keyboard to a useful size
- this is now a standalone application so potential input method KCMs
  can opt to use it (e.g. fcitx)

BUG: 362946

Test Plan: preview all the layouts and all the models

Reviewers: #plasma

Subscribers: davidre, ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25191
2019-11-29 08:53:13 +01:00
Friedrich W. H. Kossebau
2fc98d5eb8 Use non-deprecated KDEInstallDirs variables 2018-02-15 02:51:40 +01:00
David Edmundson
fe6ea35841 Set correct SERVICE_TYPES on keyboard kded module 2016-08-30 17:15:21 +01:00
David Edmundson
48db84cf1b Fix cmake warnings on KCM desktop_to_json 2016-08-25 15:51:32 +01:00
David Rosca
ca7618dd61 kcm_keyboard: Don't require libxcb-xinput
Copying the definition of xcb_input_device_presence_notify_event_t to
our code makes the new device detection code work also on systems
without libxcb-xinput (Debian/Ubuntu).

Differential Revision: https://phabricator.kde.org/D1804
2016-06-09 12:38:29 +02:00
David Rosca
ac02735d9d KCM Keyboard: Use ECM to generate debug category
REVIEW: 126840
2016-01-22 12:32:56 +01:00
David Rosca
daa54f5f9e kcm_keyboard: Use udev device notifier when xcb-xinput is not available
XCB-XInput is not available on some distributions, use udev device discovery
there instead to reapply settings when adding new keyboard / mouse.

BUG: 346336
FIXED-IN: 5.5.0
REVIEW: 125465
2015-11-18 22:46:23 +01:00
David Rosca
5bc30d0eba kcm_keyboard: Port away from KDELibs4Support
REVIEW: 125408
2015-09-26 22:10:31 +02:00
David Rosca
de49dce9c3 kcm_keyboard: Remove LayoutWidget plugin
This plugin is not used anymore.

REVIEW: 125407
2015-09-26 22:08:31 +02:00
Ragnar Thomsen
a4f7192406 Port solid-automounter and keyboard kded plugins to json metadata...
and disable installation of the desktop files.
2015-08-22 02:15:37 +02:00
Andreas Sturmlechner
4d2bc6d551 Make tests optional
This is a small patch for CMakeLists.txt to only require Qt5Test if BUILD_TESTING.
Also changed
kcms/keyboard/CMakeLists.txt
kcms/lookandfeel/CMakeLists.txt
to only add test subdirs if BUILD_TESTING.

REVIEW: 122207
2015-01-28 18:56:31 +01:00
Lukáš Tinkl
13abf54e3c use KModifierKeyInfo directly to set the numlock status
BUG: 339643
2015-01-23 18:13:26 +01:00
Alex Richardson
27a5604a93 Fix compilation of geometry_parser.cpp with clang 3.4
Apparently the default instantiation depth of 256 (with clang 3.4) is not
enough to compile geometry_parser.cpp. It produces the following error:

/usr/local/include/boost/type_traits/is_reference.hpp:38:62: fatal error: recursive template instantiation exceeded maximum depth of 256
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl<T>::value)
                                                             ^
/usr/local/include/boost/type_traits/detail/bool_trait_def.hpp:69:30: note: expanded from macro 'BOOST_TT_AUX_BOOL_TRAIT_DEF1'
    BOOST_TT_AUX_BOOL_C_BASE(C) \
                             ^
/usr/local/include/boost/type_traits/detail/bool_trait_def.hpp:63:81: note: expanded from macro 'BOOST_TT_AUX_BOOL_C_BASE'

And after that a few hundred lines of template instantiation details.
Rasing the limit to 512 allows successfully compiling these files.

REVIEW: 121762
2015-01-18 21:55:09 +00:00
Montel Laurent
ce8cca519f USe ki18n_wrap_ui 2014-11-11 11:28:30 +01:00
Martin Klapetek
998999f1e9 Fix build of keyboards kcm on debian-based systems
e5741584 reintroduced xcb xinput code and added
"#include <xcb/xinput.h>" without properly looking for xinput in cmake
(and was placed in wrong ifdef).

This makes cmake look for xcb xinput and properly ifdef the code if
xcb/xinput.h is not found; for example debian-based systems ship xcb
without xinput altogether.

REVIEW: 120746
CCMAIL: arysin@gmail.com
2014-10-23 14:13:39 +02:00
Andriy Rysin
89f6992ecf revert back the change to pass geometry around 2014-10-12 15:36:44 -04:00
shivam makkar
41cb5c88d9 fixed preview for Sun models by adding include in grammar and improved preview implementation 2014-10-12 03:07:32 +05:30
Andriy Rysin
e32784940c Take keyboard geometry into account when showing layout preview
GSoC 2013 project by Shivam Makkar (amourphious1992@gmail.com)
REVIEW: 113413
2014-10-03 07:56:32 -04:00
David Edmundson
8f5b04f91f Remove legacy keyboard switcher applet 2014-08-16 12:01:35 +02:00
Lukáš Tinkl
bb26bfe853 one catalog to rule them all 2014-07-19 11:18:09 +02:00
Lukáš Tinkl
b550f33898 i18n fixes 2014-06-16 19:01:31 +02:00