aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/SettingsMenu.cpp23
-rw-r--r--lumina-desktop/panel-plugins/userbutton/UserWidget.cpp9
-rw-r--r--lumina-desktop/panel-plugins/userbutton/UserWidget.h14
3 files changed, 29 insertions, 17 deletions
diff --git a/lumina-desktop/SettingsMenu.cpp b/lumina-desktop/SettingsMenu.cpp
index 6a24764c..9d369410 100644
--- a/lumina-desktop/SettingsMenu.cpp
+++ b/lumina-desktop/SettingsMenu.cpp
@@ -7,6 +7,8 @@
#include "SettingsMenu.h"
#include "LSession.h"
+#include <LuminaOS.h>
+
SettingsMenu::SettingsMenu() : QMenu(){
this->setTitle( tr("Desktop Settings") );
this->setIcon( LXDG::findIcon("configure","") );
@@ -18,15 +20,22 @@ SettingsMenu::SettingsMenu() : QMenu(){
act = new QAction( LXDG::findIcon("preferences-desktop",""), tr("Desktop"), this);
act->setWhatsThis("lumina-config");
this->addAction(act);
- #if defined(__FreeBSD__) || defined(__DragonFly__)
- if(QFile::exists("/usr/local/bin/qtconfig-qt4")){
- #endif
- #ifdef __linux__
- if(QFile::exists("/usr/bin/qtconfig-qt4")){
- #endif
+ QString qtconfig = LOS::QtConfigShortcut();
+ if(QFile::exists(qtconfig) && !qtconfig.isEmpty()){
act = new QAction( LXDG::findIcon("preferences-desktop-theme",""), tr("Window Theme"), this);
- act->setWhatsThis("qtconfig-qt4");
+ act->setWhatsThis(qtconfig);
+ this->addAction(act);
+ }
+ QString CONTROLPANEL = LOS::ControlPanelShortcut();
+ if(QFile::exists(CONTROLPANEL) && !CONTROLPANEL.isEmpty()){
+ //Now load the info
+ bool ok = false;
+ XDGDesktop cpan = LXDG::loadDesktopFile(CONTROLPANEL, ok);
+ if(ok){
+ act = new QAction( LXDG::findIcon(cpan.icon,""), tr("Control Panel"), this);
+ act->setWhatsThis("lumina-open \""+CONTROLPANEL+"\"");
this->addAction(act);
+ }
}
}
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);
bgstack15