Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice) OS: Linux FIXME in konsole/konsole.cpp asks for sorting of Keyboard menu entires. New layout: linux console vt100 (historical) VT420PC XTerm (XFree 3.x.x) XTerm (XFree 4.x.x)
Created attachment 4526 [details] Patch to sort KeyBoard menu entires
Subject: KDE_3_2_BRANCH: kdebase/konsole/konsole CVS commit by waba: Sort Settings/Keyboard entries (BR74269) Patch by Kurt V.Hindenburg CCMAIL: 74269-done@bugs.kde.org M +15 -1 konsole.cpp 1.441.2.4 --- kdebase/konsole/konsole/konsole.cpp #1.441.2.3:1.441.2.4 @@ -769,12 +769,26 @@ void Konsole::makeGUI() // insert keymaps into menu - //FIXME: sort + // This sorting seems a bit cumbersome; but it is not called often. + QStringList kt_titles; + typedef QMap<QString,KeyTrans*> QStringKeyTransMap; + QStringKeyTransMap kt_map; + for (int i = 0; i < KeyTrans::count(); i++) { KeyTrans* ktr = KeyTrans::find(i); assert( ktr ); + QString title=ktr->hdr().lower(); + kt_titles << title; + kt_map[title] = ktr; + } + kt_titles.sort(); + for ( QStringList::Iterator it = kt_titles.begin(); it != kt_titles.end(); ++it ) { + KeyTrans* ktr = kt_map[*it]; + assert( ktr ); QString title=ktr->hdr(); m_keytab->insertItem(title.replace('&',"&&"),ktr->numb()); + //KONSOLEDEBUG << *it << "---" << title << "---" << ktr->numb() << endl; } + applySettingsToGUI(); isRestored = false;