aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/AppMenu.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-09-15 12:31:25 -0400
committerKen Moore <ken@pcbsd.org>2014-09-15 12:31:25 -0400
commit13c418eadd33bbbeb91146c0d3e3008fc1bcfe59 (patch)
tree9ac7d683e3557342c35feaf648e8bb4b3793ca57 /lumina-desktop/AppMenu.cpp
parentHave lumina-fm save/remember the last-used size and open itself with that siz... (diff)
downloadlumina-13c418eadd33bbbeb91146c0d3e3008fc1bcfe59.tar.gz
lumina-13c418eadd33bbbeb91146c0d3e3008fc1bcfe59.tar.bz2
lumina-13c418eadd33bbbeb91146c0d3e3008fc1bcfe59.zip
Update the Lumina user button a bit:
1) Add a new "All" category that is shown by default for listing applications. 2) Speed up the time to open the user menu by only reloading if more than 30 seconds have passed since the previous time it was opened.
Diffstat (limited to 'lumina-desktop/AppMenu.cpp')
-rw-r--r--lumina-desktop/AppMenu.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lumina-desktop/AppMenu.cpp b/lumina-desktop/AppMenu.cpp
index e2e5cede..c2d79c09 100644
--- a/lumina-desktop/AppMenu.cpp
+++ b/lumina-desktop/AppMenu.cpp
@@ -32,7 +32,9 @@ QHash<QString, QList<XDGDesktop> >* AppMenu::currentAppHash(){
void AppMenu::updateAppList(){
this->clear();
APPS.clear();
- APPS = LXDG::sortDesktopCats( LXDG::systemDesktopFiles() );
+ QList<XDGDesktop> allfiles = LXDG::systemDesktopFiles();
+ APPS = LXDG::sortDesktopCats(allfiles);
+ APPS.insert("All", LXDG::sortDesktopNames(allfiles));
//Now fill the menu
bool ok; //for checking inputs
//Add link to the file manager
@@ -54,7 +56,8 @@ void AppMenu::updateAppList(){
for(int i=0; i<cats.length(); i++){
//Make sure they are translated and have the right icons
QString name, icon;
- if(cats[i] == "Multimedia"){ name = tr("Multimedia"); icon = "applications-multimedia"; }
+ if(cats[i]=="All"){continue; } //skip this listing for the menu
+ else if(cats[i] == "Multimedia"){ name = tr("Multimedia"); icon = "applications-multimedia"; }
else if(cats[i] == "Development"){ name = tr("Development"); icon = "applications-development"; }
else if(cats[i] == "Education"){ name = tr("Education"); icon = "applications-education"; }
else if(cats[i] == "Game"){ name = tr("Games"); icon = "applications-games"; }
bgstack15