Summary: | FIXME/Patch: sorting Settings/Keyboard entires | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Kurt Hindenburg <khindenburg> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Patch to sort KeyBoard menu entires |
Description
Kurt Hindenburg
2004-02-05 19:27:48 UTC
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; |