From b3ee7109dd5c9cd21b219a758df45e0866936ffb Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 5 Oct 2014 20:16:42 +0200 Subject: 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 or whatever) update debian packaging scripts accordingly --- lumina-desktop/AppMenu.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lumina-desktop/AppMenu.cpp') 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*)) ); -- cgit