diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-03-29 22:43:34 +0300 |
---|---|---|
committer | Alexander Golubev <fatzer2@gmail.com> | 2024-03-29 22:43:34 +0300 |
commit | ba689d9fc30651dc4d5757ce7118c1dcca871600 (patch) | |
tree | 1922bd0bb06b197503e36d232bf2e5566c0a404c /kxkb/kcmlayout.cpp | |
parent | c04e4905182ba9a5db632b5c59655603ad9f87f4 (diff) | |
download | tdebase-fix/kxkb-450.tar.gz tdebase-fix/kxkb-450.zip |
kxkb: add options without group to the custom groupfix/kxkb-450
Bug: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/450
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'kxkb/kcmlayout.cpp')
-rw-r--r-- | kxkb/kcmlayout.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/kxkb/kcmlayout.cpp b/kxkb/kcmlayout.cpp index f9fbf3c59..a2f0889f1 100644 --- a/kxkb/kcmlayout.cpp +++ b/kxkb/kcmlayout.cpp @@ -718,20 +718,23 @@ TQWidget* LayoutConfig::makeOptionsTab() if (pos >= 0) { OptionListItem *parent = m_optionGroups[key.left(pos)]; - if (parent == NULL ) - parent = m_optionGroups["misc"]; - if (parent != NULL) { - // workaroung for mistake in rules file for xkb options in XFree 4.2.0 - TQString text(it.current()); - text = text.replace( "Cap$", "Caps." ); - if ( parent->type() == TQCheckListItem::CheckBoxController - || key.startsWith("grp:")) - new OptionListItem(parent, XkbRules::trOpt(text), - TQCheckListItem::CheckBox, key); - else - new OptionListItem(parent, XkbRules::trOpt(text), - TQCheckListItem::RadioButton, key); + if (parent == NULL ) { // All unparanted options go into "custom" group + parent = m_optionGroups["custom"]; + if (parent == NULL ) { + parent = new OptionListItem(listView, XkbRules::trOpt( I18N_NOOP("Miscellaneous options") ), + TQCheckListItem::CheckBoxController, "custom"); + } } + // workaroung for mistake in rules file for xkb options in XFree 4.2.0 + TQString text(it.current()); + text = text.replace( "Cap$", "Caps." ); + if ( parent->type() == TQCheckListItem::CheckBoxController + || key.startsWith("grp:")) + new OptionListItem(parent, XkbRules::trOpt(text), + TQCheckListItem::CheckBox, key); + else + new OptionListItem(parent, XkbRules::trOpt(text), + TQCheckListItem::RadioButton, key); } } |