summaryrefslogtreecommitdiffstats
path: root/kxkb/kcmlayoutwidget.ui
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2023-02-10 14:57:28 +0200
committerMavridis Philippe <mavridisf@gmail.com>2023-03-24 15:28:11 +0200
commite8208c1dfb4dcd17b1168ac2614aa8d5b761f3fd (patch)
tree26a597b2a9a11e9cab352940be0d687ea6593668 /kxkb/kcmlayoutwidget.ui
parenta67db2d4847d798c01d4fd7584c5bb9297e109e3 (diff)
downloadtdebase-e8208c1dfb4dcd17b1168ac2614aa8d5b761f3fd.tar.gz
tdebase-e8208c1dfb4dcd17b1168ac2614aa8d5b761f3fd.zip
Kxkb: improve TDE Control Centre module.
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>
Diffstat (limited to 'kxkb/kcmlayoutwidget.ui')
-rw-r--r--kxkb/kcmlayoutwidget.ui525
1 files changed, 362 insertions, 163 deletions
diff --git a/kxkb/kcmlayoutwidget.ui b/kxkb/kcmlayoutwidget.ui
index a36919b77..aab21c2cf 100644
--- a/kxkb/kcmlayoutwidget.ui
+++ b/kxkb/kcmlayoutwidget.ui
@@ -116,7 +116,7 @@
</sizepolicy>
</property>
<property name="whatsThis" stdset="0">
- <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>
</property>
</widget>
<widget class="TQLabel" row="0" column="2" rowspan="1" colspan="3">
@@ -430,13 +430,166 @@
<attribute name="title">
<string>Switching Options</string>
</attribute>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <spacer row="1" column="0">
+ <vbox>
+ <widget class="TQFrame">
<property name="name">
- <cstring>spacer1</cstring>
+ <cstring>swOptsFrame</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <vbox>
+ <widget class="TQButtonGroup">
+ <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>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQRadioButton">
+ <property name="name">
+ <cstring>radioButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Global</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQRadioButton">
+ <property name="name">
+ <cstring>radioButton1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Application</string>
+ </property>
+ </widget>
+ <widget class="TQRadioButton">
+ <property name="name">
+ <cstring>radioButton1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Window</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="TQGroupBox">
+ <property name="name">
+ <cstring>grpBoxStickySwitching</cstring>
+ </property>
+ <property name="title">
+ <string>Sticky Switching</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>chkEnableSticky</cstring>
+ </property>
+ <property name="text">
+ <string>Enable sticky switching</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <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>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="3">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLabel" row="1" column="1">
+ <property name="name">
+ <cstring>textLabel1_5</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Number of layouts to rotate:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>spinBox1</cstring>
+ </property>
+ </widget>
+ <widget class="TQSpinBox" row="1" column="2">
+ <property name="name">
+ <cstring>spinStickyDepth</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="maxValue">
+ <number>10</number>
+ </property>
+ <property name="minValue">
+ <number>2</number>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
@@ -451,9 +604,19 @@
</size>
</property>
</spacer>
- <widget class="TQFrame" row="0" column="0">
+ </vbox>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Indicator Options</string>
+ </attribute>
+ <vbox>
+ <widget class="TQFrame">
<property name="name">
- <cstring>optionsFrame</cstring>
+ <cstring>indOptsFrame</cstring>
</property>
<property name="frameShape">
<enum>StyledPanel</enum>
@@ -465,10 +628,7 @@
<number>0</number>
</property>
<grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQButtonGroup" row="1" column="0">
+ <widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>grpStyle</cstring>
</property>
@@ -514,7 +674,7 @@
</widget>
</vbox>
</widget>
- <widget class="TQButtonGroup" row="1" column="1">
+ <widget class="TQButtonGroup" row="1" column="0" colspan="2">
<property name="name">
<cstring>grpLabel</cstring>
</property>
@@ -558,6 +718,9 @@
<enum>Plain</enum>
</property>
<grid>
+ <property name="margin">
+ <number>0</number>
+ </property>
<spacer row="0" column="0">
<property name="name">
<cstring>spacer2</cstring>
@@ -593,7 +756,32 @@
<property name="whatsThis" stdset="0">
<string>This color will be used as the indicator's background unless the indicator was set to display a flag.</string>
</property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
</widget>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>spacer23</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
<spacer row="1" column="0">
<property name="name">
<cstring>spacer2</cstring>
@@ -626,29 +814,71 @@
<property name="name">
<cstring>fgColor</cstring>
</property>
- <property name="whatsThis" stdset="0">
- <string>This color will be used to draw the language label on the indicator.</string>
- </property>
+ <property name="whatsThis" stdset="0">
+ <string>This color will be used to draw the language label on the indicator.</string>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <spacer row="1" column="3">
+ <property name="name">
+ <cstring>spacer23</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="4" column="0">
+ <property name="name">
+ <cstring>spacer22</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQCheckBox" row="4" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>chkBgTransparent</cstring>
+ </property>
+ <property name="text">
+ <string>Transparent background</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Check this to remove the indicator's background. Only applicable in "Label only" mode.</string>
+ </property>
</widget>
</grid>
</widget>
- <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="3">
- <property name="name">
- <cstring>chkBgTransparent</cstring>
- </property>
- <property name="text">
- <string>Transparent background</string>
- </property>
- <property name="whatsThis" stdset="0">
- <string>Check this to remove the indicator's background. Only applicable in "Label only" mode.</string>
- </property>
- </widget>
<widget class="KSeparator" row="5" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>separator1</cstring>
</property>
</widget>
- <widget class="TQLabel" row="6" column="0" rowspan="1">
+ <widget class="TQLabel" row="6" column="0">
<property name="name">
<cstring>labelFontRequester</cstring>
</property>
@@ -659,12 +889,12 @@
<string>This is the font which will be used by the layout indicator to draw the label.</string>
</property>
</widget>
- <widget class="TDEFontRequester" row="6" column="2">
+ <widget class="TDEFontRequester" row="6" column="1" colspan="2">
<property name="name">
<cstring>labelFont</cstring>
</property>
</widget>
- <widget class="TQCheckBox" row="7" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="7" column="0">
<property name="name">
<cstring>chkLabelShadow</cstring>
</property>
@@ -674,8 +904,16 @@
<property name="whatsThis" stdset="0">
<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,86 +923,23 @@
<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>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQRadioButton">
- <property name="name">
- <cstring>radioButton1</cstring>
- </property>
- <property name="text">
- <string>&amp;Global</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="TQRadioButton">
- <property name="name">
- <cstring>radioButton1_3</cstring>
- </property>
- <property name="text">
- <string>Application</string>
- </property>
- </widget>
- <widget class="TQRadioButton">
- <property name="name">
- <cstring>radioButton1_2</cstring>
- </property>
- <property name="text">
- <string>&amp;Window</string>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="TQGroupBox" row="2" column="1">
- <property name="name">
- <cstring>grpBoxStickySwitching</cstring>
- </property>
- <property name="title">
- <string>Sticky Switching</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3">
- <property name="name">
- <cstring>chkEnableSticky</cstring>
- </property>
- <property name="text">
- <string>Enable sticky switching</string>
- </property>
- <property name="whatsThis" stdset="0">
- <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>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </widget>
- <spacer row="1" column="0">
+ </widget> <spacer row="7" column="2">
<property name="name">
- <cstring>spacer2</cstring>
+ <cstring>spacer23</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
- <enum>Fixed</enum>
+ <enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
@@ -773,55 +948,46 @@
</size>
</property>
</spacer>
- <widget class="TQLabel" row="1" column="1">
- <property name="name">
- <cstring>textLabel1_5</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Number of layouts to rotate:</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>spinBox1</cstring>
- </property>
- </widget>
- <widget class="TQSpinBox" row="1" column="2">
- <property name="name">
- <cstring>spinStickyDepth</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="maxValue">
- <number>10</number>
- </property>
- <property name="minValue">
- <number>2</number>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
</grid>
</widget>
- <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQButtonGroup" row="0" column="1">
<property name="name">
- <cstring>chkShowSingle</cstring>
+ <cstring>grpMisc</cstring>
</property>
- <property name="text">
- <string>Show indicator for single layout</string>
+ <property name="title">
+ <string>Miscellaneous</string>
</property>
+ <vbox>
+ <widget class="TQCheckBox">
+ <property name="name">
+ <cstring>chkShowSingle</cstring>
+ </property>
+ <property name="text">
+ <string>Show indicator for single layout</string>
+ </property>
+ </widget>
+ </vbox>
</widget>
</grid>
</widget>
- </grid>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
</widget>
<widget class="TQWidget">
<property name="name">
@@ -848,15 +1014,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>checkResetOld</cstring>
- </property>
- <property name="text">
- <string>&amp;Reset old options</string>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_3_2</cstring>
</property>
@@ -864,7 +1022,7 @@
<string>Command:</string>
</property>
</widget>
- <widget class="TQLineEdit" row="2" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>editCmdLineOpt</cstring>
</property>
@@ -872,7 +1030,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="TQListView" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQListView" row="0" column="0" rowspan="1" colspan="2">
<column>
<property name="text">
<string>Options</string>
@@ -890,6 +1048,41 @@
</widget>
</grid>
</widget>
+ <widget class="TQButtonGroup">
+ <property name="name">
+ <cstring>xkbOptsMode</cstring>
+ </property>
+ <property name="title">
+ <string>Options Mode</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Here you can choose how the options you select here will be applied: in addition to, or instead of existing options.</string>
+ </property>
+ <vbox>
+ <widget class="TQRadioButton">
+ <property name="name">
+ <cstring>radXkbOverwrite</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Overwrite existing options (recommended)</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <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>&amp;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>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
</vbox>
</widget>
</widget>
@@ -903,6 +1096,18 @@
<slot>setEnabled(bool)</slot>
</connection>
<connection>
+ <sender>chkEnable</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>swOptsFrame</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>chkEnable</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>indOptsFrame</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
<sender>chkEnableSticky</sender>
<signal>toggled(bool)</signal>
<receiver>spinStickyDepth</receiver>
@@ -927,12 +1132,6 @@
<slot>setEnabled(bool)</slot>
</connection>
<connection>
- <sender>chkEnable</sender>
- <signal>toggled(bool)</signal>
- <receiver>optionsFrame</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
<sender>radFlagOnly</sender>
<signal>toggled(bool)</signal>
<receiver>grpLabel</receiver>