-rw-r--r-- | core/launcher/startmenu.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index 15707b4..5bac874 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp | |||
@@ -96,49 +96,49 @@ void StartMenu::createMenu() | |||
96 | launchMenu = new StartPopupMenu( this ); | 96 | launchMenu = new StartPopupMenu( this ); |
97 | 97 | ||
98 | loadMenu( apps, launchMenu ); | 98 | loadMenu( apps, launchMenu ); |
99 | 99 | ||
100 | } | 100 | } |
101 | 101 | ||
102 | void StartMenu::itemSelected( int id ) | 102 | void StartMenu::itemSelected( int id ) |
103 | { | 103 | { |
104 | const AppLnk *app = apps->find( id ); | 104 | const AppLnk *app = apps->find( id ); |
105 | if ( app ) | 105 | if ( app ) |
106 | app->execute(); | 106 | app->execute(); |
107 | } | 107 | } |
108 | 108 | ||
109 | bool StartMenu::loadMenu( AppLnkSet *folder, QPopupMenu *menu ) | 109 | bool StartMenu::loadMenu( AppLnkSet *folder, QPopupMenu *menu ) |
110 | { | 110 | { |
111 | bool result = FALSE; | 111 | bool result = FALSE; |
112 | 112 | ||
113 | QStringList typs = folder->types(); | 113 | QStringList typs = folder->types(); |
114 | QDict<QPopupMenu> typpop; | 114 | QDict<QPopupMenu> typpop; |
115 | for (QStringList::Iterator tit=typs.begin(); tit!=typs.end(); ++tit) { | 115 | for (QStringList::Iterator tit=typs.begin(); tit!=typs.end(); ++tit) { |
116 | if ( !(*tit).isEmpty() ) { | 116 | if ( !(*tit).isEmpty() ) { |
117 | QPopupMenu *new_menu = new StartPopupMenu( menu ); | 117 | QPopupMenu *new_menu = new StartPopupMenu( menu ); |
118 | typpop.insert(*tit, new_menu); | 118 | typpop.insert(*tit, new_menu); |
119 | connect( new_menu, SIGNAL(activated(int)), SLOT(itemSelected(int)) ); | 119 | connect( new_menu, SIGNAL(activated(int)), SLOT(itemSelected(int)) ); |
120 | menu->insertItem( folder->typePixmap(*tit), *tit, new_menu ); | 120 | menu->insertItem( folder->typePixmap(*tit), folder->typeName(*tit), new_menu ); |
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||
124 | QListIterator<AppLnk> it( folder->children() ); | 124 | QListIterator<AppLnk> it( folder->children() ); |
125 | for ( ; it.current(); ++it ) { | 125 | for ( ; it.current(); ++it ) { |
126 | AppLnk *app = it.current(); | 126 | AppLnk *app = it.current(); |
127 | if ( app->type() == "Separator" ) { | 127 | if ( app->type() == "Separator" ) { |
128 | menu->insertSeparator(); | 128 | menu->insertSeparator(); |
129 | } else { | 129 | } else { |
130 | QString t = app->type(); | 130 | QString t = app->type(); |
131 | QPopupMenu* pmenu = typpop.find(t); | 131 | QPopupMenu* pmenu = typpop.find(t); |
132 | if ( !pmenu ) | 132 | if ( !pmenu ) |
133 | pmenu = menu; | 133 | pmenu = menu; |
134 | pmenu->insertItem( app->pixmap(), app->name(), app->id() ); | 134 | pmenu->insertItem( app->pixmap(), app->name(), app->id() ); |
135 | result=TRUE; | 135 | result=TRUE; |
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||
139 | if ( result ) | 139 | if ( result ) |
140 | connect( menu, SIGNAL(activated(int)), SLOT(itemSelected(int)) ); | 140 | connect( menu, SIGNAL(activated(int)), SLOT(itemSelected(int)) ); |
141 | 141 | ||
142 | return result; | 142 | return result; |
143 | } | 143 | } |
144 | 144 | ||