diff options
author | Christopher Roy Bratusek <nano@jpberlin.de> | 2014-10-05 20:16:42 +0200 |
---|---|---|
committer | Christopher Roy Bratusek <nano@jpberlin.de> | 2014-10-05 20:16:42 +0200 |
commit | b3ee7109dd5c9cd21b219a758df45e0866936ffb (patch) | |
tree | f40cf1c32802d9bb2253352cf4eea2d8418ec79d /lumina-desktop/AppMenu.cpp | |
parent | Add the template for the new LuminaThemes library class (not integrated into ... (diff) | |
download | lumina-b3ee7109dd5c9cd21b219a758df45e0866936ffb.tar.gz lumina-b3ee7109dd5c9cd21b219a758df45e0866936ffb.tar.bz2 lumina-b3ee7109dd5c9cd21b219a758df45e0866936ffb.zip |
add global.h containing PREFIX and make use of it in all sub-modules,
add PREFIX and LIBPREFIX to the qmake .pro files (allows to change prefix and libdir using <qmake PREFIX=/usr LIBDIR=/usr/lib/x86_64-linux-gnu/> or whatever)
update debian packaging scripts accordingly
Diffstat (limited to 'lumina-desktop/AppMenu.cpp')
-rw-r--r-- | lumina-desktop/AppMenu.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lumina-desktop/AppMenu.cpp b/lumina-desktop/AppMenu.cpp index bf7f6d6f..8893c629 100644 --- a/lumina-desktop/AppMenu.cpp +++ b/lumina-desktop/AppMenu.cpp @@ -6,10 +6,11 @@ //=========================================== #include "AppMenu.h" #include "LSession.h" +#include "../global.h" AppMenu::AppMenu(QWidget* parent) : QMenu(parent){ - appstorelink = "/usr/local/share/applications/softmanager.desktop"; //Default application "store" to display (AppCafe in PC-BSD) - controlpanellink = "/usr/local/share/applications/pccontrol.desktop"; //Default control panel + appstorelink = PREFIX + "/share/applications/softmanager.desktop"; //Default application "store" to display (AppCafe in PC-BSD) + controlpanellink = PREFIX + "/share/applications/pccontrol.desktop"; //Default control panel APPS.clear(); watcher = new QFileSystemWatcher(this); connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(watcherUpdate()) ); @@ -42,12 +43,12 @@ void AppMenu::updateAppList(){ this->addAction( LXDG::findIcon("user-home", ""), tr("Open Home"), this, SLOT(launchFileManager()) ); //--Look for the app store XDGDesktop store = LXDG::loadDesktopFile(appstorelink, ok); - if(ok){ + if(ok){ this->addAction( LXDG::findIcon(store.icon, ""), tr("Install Applications"), this, SLOT(launchStore()) ); } //--Look for the control panel store = LXDG::loadDesktopFile(controlpanellink, ok); - if(ok){ + if(ok){ this->addAction( LXDG::findIcon(store.icon, ""), tr("Control Panel"), this, SLOT(launchControlPanel()) ); } this->addSeparator(); @@ -70,7 +71,7 @@ void AppMenu::updateAppList(){ else if(cats[i] == "System"){ name = tr("System"); icon = "applications-system"; } else if(cats[i] == "Utility"){ name = tr("Utility"); icon = "applications-utilities"; } else{ name = tr("Unsorted"); icon = "applications-other"; } - + QMenu *menu = new QMenu(name, this); menu->setIcon(LXDG::findIcon(icon,"")); connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(launchApp(QAction*)) ); |