1) Add conflicts check for hotkey checkboxes
Due to the ability to set multiple keyboard layout switching hotkeys,
it is important to inform the user of conflicting options that are
not handled properly by the X.org server when set at the same time
(e.g. Win+Space and Alt+Space).
This change adds a warning that informs the user about the problem and
the conflicting options. This warning is shown only when setting
multiple hotkeys via the Xkb options tab, which is for the advanced
user. Most users will ever need only one hotkey, and the combobox on
the first tab should be more than enough.
2) Add "none" item to layout switching options
3) Replace Reset old options checkbox with radio buttons
As per discussion, this makes the function of the option more
apparent. WhatIs hints have been added for additional clarity.
4) Update hotkey combobox per server options
5) Avoid duplication of options by querying Xkb for already set options.
This was a problem in Append Mode in which `setxkbmap` strings would
get too long due to setting already set options. This code checks for
already set options and omits them from the new `setxkbmap` call.
This does not apply to Overwrite Mode.
6) Overwrite previous grp: options when using the combobox
See previous commit message about the addition of hotkeys combobox.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
<string>Here you can choose the key combination you want to use to switch to the next layout. This list includes only the most common variants. If you choose "Other...", then you will be redirected to the "Options" tab where you can pick from all the available variants.</string>
<string>Here you can choose the key combination you want to use to switch to the next layout. This list includes only the most common variants. If you choose "Other...", then you will be redirected to the "Options" tab where you can pick from all the available variants. Note that if you have selected Append Mode in the Xkb Options tab this option is not available; you have to use the Xkb Options tab instead.</string>
<string>If you select "Application" or "Window" switching policy, changing the keyboard layout will only affect the current application or window.</string>
<string>If you have more than two layouts and turn this option on, switching with the keyboard shortcut or clicking on the kxkb indicator will only cycle through the last few layouts. You can specify the number of layouts to rotate below. You can still access all layouts by right-clicking on the kxkb indicator.</string>
<string>Draw a drop shadow behind the language label. In some cases this option can improve readability.</string>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>4</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="KColorButton" row="7" column="2">
<widget class="KColorButton" row="7" column="1">
<property name="name">
<cstring>shColor</cstring>
</property>
@ -685,143 +923,71 @@
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</grid>
</widget>
<widget class="TQButtonGroup" row="2" column="0">
<property name="name">
<cstring>grpSwitching</cstring>
</property>
<property name="title">
<string>Switching Policy</string>
</property>
<property name="exclusive">
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
<string>If you select "Application" or "Window" switching policy, changing the keyboard layout will only affect the current application or window.</string>
<string>If you have more than two layouts and turn this option on, switching with the keyboard shortcut or clicking on the kxkb indicator will only cycle through the last few layouts. You can specify the number of layouts to rotate below. You can still access all layouts by right-clicking on the kxkb indicator.</string>
<string>Overwrite any existing Xkb options that might have been previously set by another program or from a script (e.g. via setxkbmap). This is the recommended option.</string>
</property>
</widget>
<widget class="TQRadioButton">
<property name="name">
<cstring>radXkbAppend</cstring>
</property>
<property name="text">
<string>&Append to existing options</string>
</property>
<property name="whatsThis" stdset="0">
<string>Append the selected options to any existing Xkb options that might have been previously set by another program or from a script (e.g. via setxkbmap). Only use this if you really need to.</string>