diff options
Diffstat (limited to 'lumina-desktop/panel-plugins')
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserWidget.cpp | 9 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserWidget.h | 14 |
2 files changed, 13 insertions, 10 deletions
diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp index f3dcad38..8b49ed43 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp +++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp @@ -40,7 +40,8 @@ UserWidget::UserWidget(QWidget* parent) : QWidget(parent), ui(new Ui::UserWidget connect(ui->tool_fav_dirs, SIGNAL(clicked()), this, SLOT(FavChanged()) ); connect(ui->combo_app_cats, SIGNAL(currentIndexChanged(int)), this, SLOT(updateApps()) ); //Setup the special buttons - if(QFile::exists(APPSTORE)){ + QString APPSTORE = LOS::AppStoreShortcut(); + if(QFile::exists(APPSTORE) && !APPSTORE.isEmpty()){ //Now load the info bool ok = false; XDGDesktop store = LXDG::loadDesktopFile(APPSTORE, ok); @@ -53,7 +54,8 @@ UserWidget::UserWidget(QWidget* parent) : QWidget(parent), ui(new Ui::UserWidget }else{ ui->tool_app_store->setVisible(false); //not available } - if(QFile::exists(CONTROLPANEL)){ + QString CONTROLPANEL = LOS::ControlPanelShortcut(); + if(QFile::exists(CONTROLPANEL) && !CONTROLPANEL.isEmpty()){ //Now load the info bool ok = false; XDGDesktop cpan = LXDG::loadDesktopFile(CONTROLPANEL, ok); @@ -65,7 +67,8 @@ UserWidget::UserWidget(QWidget* parent) : QWidget(parent), ui(new Ui::UserWidget }else{ ui->tool_controlpanel->setVisible(false); //not available } - if(QFile::exists(QTCONFIG)){ + QString QTCONFIG = LOS::QtConfigShortcut(); + if(QFile::exists(QTCONFIG) && !QTCONFIG.isEmpty()){ ui->tool_qtconfig->setVisible(true); ui->tool_qtconfig->setIcon( LXDG::findIcon("preferences-desktop-theme","") ); connect(ui->tool_qtconfig, SIGNAL(clicked()), this, SLOT(openQtConfig()) ); diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.h b/lumina-desktop/panel-plugins/userbutton/UserWidget.h index 5bc737a1..b9eaffbe 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserWidget.h +++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.h @@ -17,12 +17,12 @@ #include <QScrollArea> #include <LuminaXDG.h> - +#include <LuminaOS.h> #include "UserItemWidget.h" -#define APPSTORE QString("/usr/local/share/applications/softmanager.desktop") -#define CONTROLPANEL QString("/usr/local/share/applications/pccontrol.desktop") -#define QTCONFIG QString("/usr/local/bin/qtconfig-qt4") +//#define APPSTORE QString("/usr/local/share/applications/softmanager.desktop") +//#define CONTROLPANEL QString("/usr/local/share/applications/pccontrol.desktop") +//#define QTCONFIG QString("/usr/local/bin/qtconfig-qt4") #define SSAVER QString("xscreensaver-demo") namespace Ui{ @@ -59,16 +59,16 @@ private slots: //Slots for the special buttons void openStore(){ - LaunchItem("lumina-open \""+APPSTORE+"\""); + LaunchItem("lumina-open \""+LOS::AppStoreShortcut()+"\""); } void openControlPanel(){ - LaunchItem("lumina-open \""+CONTROLPANEL+"\""); + LaunchItem("lumina-open \""+LOS::ControlPanelShortcut()+"\""); } void openDeskSettings(){ LaunchItem("lumina-config"); } void openQtConfig(){ - LaunchItem(QTCONFIG); + LaunchItem( LOS::QtConfigShortcut() ); } void openScreenSaverConfig(){ LaunchItem(SSAVER); |