aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/SettingsMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/SettingsMenu.cpp')
-rw-r--r--lumina-desktop/SettingsMenu.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/lumina-desktop/SettingsMenu.cpp b/lumina-desktop/SettingsMenu.cpp
index 078739a6..f9a2fa13 100644
--- a/lumina-desktop/SettingsMenu.cpp
+++ b/lumina-desktop/SettingsMenu.cpp
@@ -10,17 +10,21 @@
#include <LuminaOS.h>
SettingsMenu::SettingsMenu() : QMenu(){
- QTimer::singleShot(100, this, SLOT(InitMenu()) );
+ connect(this, SIGNAL(triggered(QAction*)), this, SLOT(runApp(QAction*)) );
+ connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(UpdateMenu()) );
+
+ QTimer::singleShot(100, this, SLOT(UpdateMenu()) );
}
SettingsMenu::~SettingsMenu(){
}
-void SettingsMenu::InitMenu(){
+void SettingsMenu::UpdateMenu(){
+ //Change the title/icon to account for locale/icon changes
this->setTitle( tr("Settings") );
this->setIcon( LXDG::findIcon("configure","") );
- connect(this, SIGNAL(triggered(QAction*)), this, SLOT(runApp(QAction*)) );
+ this->clear();
//Now setup the possible configuration options
QAction *act = new QAction(LXDG::findIcon("preferences-desktop-screensaver",""), tr("Screensaver"), this);
act->setWhatsThis("xscreensaver-demo");
@@ -54,6 +58,7 @@ void SettingsMenu::InitMenu(){
this->addAction(act);
}
+
void SettingsMenu::runApp(QAction* act){
LSession::LaunchApplication(act->whatsThis());
}
bgstack15