author | sandman <sandman> | 2003-03-21 21:12:14 (UTC) |
---|---|---|
committer | sandman <sandman> | 2003-03-21 21:12:14 (UTC) |
commit | d11cf5483fbfa87a7be65891df2625def351f3a4 (patch) (side-by-side diff) | |
tree | 53ec1a4fefcd7a2fc37bd64a0bae3ce378c5ef7d | |
parent | 633fbff7e3d85a5fc16bd3ed3283723c44acb2aa (diff) | |
download | opie-d11cf5483fbfa87a7be65891df2625def351f3a4.zip opie-d11cf5483fbfa87a7be65891df2625def351f3a4.tar.gz opie-d11cf5483fbfa87a7be65891df2625def351f3a4.tar.bz2 |
fix for bug #647:
Programs are sorted by their internal name and not by the translated name
(in the O-Menu)
-rw-r--r-- | core/launcher/startmenu.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index 2871233..28c8b97 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp @@ -218,17 +218,25 @@ bool StartMenu::loadMenu( AppLnkSet *folder, QPopupMenu *menu ) if ( !pmenu ) pmenu = menu; else pmenu = 0; } if ( pmenu ) { QString t = app->name(); t.replace(QRegExp("&"),"&&"); // escape shortcut character - pmenu->insertItem( app->pixmap(), t, app->id() ); + + int index = -1; + + for ( index = 0; index < pmenu-> count ( ); index++ ) { + if ( pmenu-> text ( pmenu-> idAt ( index )). compare ( t ) > 0 ) + break; + } + + pmenu->insertItem( app->pixmap(), t, app->id(), index ); } result=TRUE; } } } if ( sepId && ( menu-> idAt ( 0 ) == sepId )) { // no tabs entries menu-> removeItem ( sepId ); |