Since KDE 3.4 there is underlying support for dynamically determining whether a module should
be loaded or not, depending on an exported test function which would return a boolean value
depending on the success of one or more tests (e.g. for presence of specific hardware).
This approach is documented but has so far not been implemented by the TDE Control Centre.
This commit adds a check to the TCC which performs the test function if needed (that is, if
the X-TDE-Test-Module property is true) and, if it returns false, prevents showing the
module in the tree list, which is the intended behaviour of the test function feature.
For more information see:
https://wiki.trinitydesktop.org/index.php?title=TDEConfig_Module_HOWTO&oldid=1893#Making_a_KCModule_dynamically_available
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
- Add actions related to keys XF86Sleep (Suspend) and XF86ScreenSaver (Lock Session)
- Fix name of "Log Out" actions
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
The corresponding shortcuts have been added as part of the KDesktop shortucts, to complement similar options (logout, shutdown, reboot).
The shortcuts are only shown for the options that KSMServer reports via DCOP as valid.
In order to do be able to make a DCOP call from kdesktopbindings.cpp, the <dcopref.h> include had to be added to several files of the shortcuts TDECM.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
This leverages the existing code that interacts with X11 and sets the setting system-wide, as happens already with scroll direction reversal.
This resolves issue #497.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
1) New layout switching approach
The new approach is based on the "grp" options group of Xkb
and so enables us to use predefined X11 layout (group) switching
hotkeys like "Caps Lock" or "Shift+Alt" (you can see the full list
in the Options tab). The added bonus to this is that we conform
to the Xkb setting.
The code lets Xkb handle the keyboard layout switching hotkey(s)
and is similar to the one that is used in kkbswitch, monitoring
for an Xkb group (layout) change event.
This solution required me to remove some hacky and obsolete code
which was there to support really old pre-XFree-4.2 era systems
and included the "include groups" hack.
This means that the "Enable latin layout" checkbox is now gone
and setxkbmap is only called when the keyboard layouts and/or
options are modified, and not for every layout change.
2) Common layout switching hotkeys combobox
A combobox was added to the first page of the Keyboard Layouts
KCM module. It provides to the users a quick way to set a layout
switching key combination. It also controls the "grp" group in
the Xkb tab.
A special note about this combobox is that, even if Append Mode
was selected in the Xkb Options tab, this hotkey will overwrite
previous hotkey options. This means that all grp: options will
be forced removed before applying the option from the combobox
(in contrast to specifying options via the Xkb Options tab,
which, in Append Mode, will not get overwritten until next login).
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>