aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/SettingsMenu.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-07-22 11:46:28 -0400
committerKen Moore <moorekou@gmail.com>2015-07-22 11:46:28 -0400
commit9d59ab6020d1d3857a580e73e5d1823b514bf8a7 (patch)
tree6ffdb4965d7c2a4e12bb2b08ec8667af6032eb47 /lumina-desktop/SettingsMenu.cpp
parentFinish cleaning up the new localization configuration settings in libLumina, ... (diff)
downloadlumina-9d59ab6020d1d3857a580e73e5d1823b514bf8a7.tar.gz
lumina-9d59ab6020d1d3857a580e73e5d1823b514bf8a7.tar.bz2
lumina-9d59ab6020d1d3857a580e73e5d1823b514bf8a7.zip
Make sure that all the interface elements in lumina-desktop actively re-load their text/icons when the system locale is changed.
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