aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/SystemWindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lumina-desktop/SystemWindow.cpp b/lumina-desktop/SystemWindow.cpp
index dc9dc488..10d44524 100644
--- a/lumina-desktop/SystemWindow.cpp
+++ b/lumina-desktop/SystemWindow.cpp
@@ -20,6 +20,11 @@ SystemWindow::SystemWindow() : QDialog(), ui(new Ui::SystemWindow){
connect(ui->tool_shutdown, SIGNAL(clicked()), this, SLOT(sysShutdown()) );
connect(ui->push_cancel, SIGNAL(clicked()), this, SLOT(sysCancel()) );
connect(ui->push_lock, SIGNAL(clicked()), this, SLOT(sysLock()) );
+ //Disable the shutdown/restart buttons if necessary
+ if( !LOS::userHasShutdownAccess() ){
+ ui->tool_restart->setEnabled(false);
+ ui->tool_shutdown->setEnabled(false);
+ }
//Center this window on the screen
QDesktopWidget desktop;
this->move(desktop.screenGeometry().width()/2 - this->width()/2, desktop.screenGeometry().height()/2 - this->height()/2);
bgstack15