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 | |
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>
-rw-r--r-- | kxkb/kcmlayout.cpp | 29 | ||||
-rw-r--r-- | kxkb/x11helper.cpp | 16 |
2 files changed, 17 insertions, 28 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); } } diff --git a/kxkb/x11helper.cpp b/kxkb/x11helper.cpp index 90e29d9e2..c4c051c91 100644 --- a/kxkb/x11helper.cpp +++ b/kxkb/x11helper.cpp @@ -195,7 +195,7 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly) { } // Items from these 'meta' groups fall into other groups // Admittedly not the best way to handle this - if (optName == "currencysign" || optName == "compat") break; + if (optName == "currencysign" || optName == "compat") continue; // HACK this should be called "compose" or else the code breaks if (optName == "Compose key") optName = "compose"; @@ -220,20 +220,6 @@ X11Helper::loadRules(const TQString& file, bool layoutsOnly) { } } - - for(TQDictIterator<char> it(rulesInfo->options) ; it.current() != NULL; ++it ) { - // Add missing option groups - TQString option(it.currentKey()); - int columnPos = option.find(":"); - - if( columnPos != -1 ) { - TQString group = option.mid(0, columnPos); - if( rulesInfo->options.find(group) == NULL ) { - rulesInfo->options.replace(group, group.latin1()); - kdDebug() << "Added missing option group: " << group << endl; - } - } - } // // workaround for empty misc options group description in XFree86 4.4.0 // if( rulesInfo->options.find("numpad:microsoft") && !rulesInfo->options.find("misc") ) { // rulesInfo->options.replace("misc", "Miscellaneous compatibility options" ); |