From d11cf5483fbfa87a7be65891df2625def351f3a4 Mon Sep 17 00:00:00 2001 From: sandman Date: Fri, 21 Mar 2003 21:12:14 +0000 Subject: fix for bug #647: Programs are sorted by their internal name and not by the translated name (in the O-Menu) --- (limited to 'core/launcher') 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 @@ -223,7 +223,15 @@ bool StartMenu::loadMenu( AppLnkSet *folder, QPopupMenu *menu ) 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; } -- cgit v0.9.0.2