diff options
author | Weblate <noreply@weblate.org> | 2017-11-24 19:26:13 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-11-24 19:26:13 +0000 |
commit | 56890dfdacb3272808dfaedee7f4d9208f6d5acc (patch) | |
tree | 2da40ddecdc429da1e495b3136d0c9dc61ef56c3 /src-qt5/core/lumina-desktop/SystemWindow.cpp | |
parent | Translated using Weblate (Hungarian) (diff) | |
parent | Merge pull request #512 from schnitzeltony/master (diff) | |
download | lumina-56890dfdacb3272808dfaedee7f4d9208f6d5acc.tar.gz lumina-56890dfdacb3272808dfaedee7f4d9208f6d5acc.tar.bz2 lumina-56890dfdacb3272808dfaedee7f4d9208f6d5acc.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop/SystemWindow.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/SystemWindow.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src-qt5/core/lumina-desktop/SystemWindow.cpp b/src-qt5/core/lumina-desktop/SystemWindow.cpp index c709bb2a..dbcec2a2 100644 --- a/src-qt5/core/lumina-desktop/SystemWindow.cpp +++ b/src-qt5/core/lumina-desktop/SystemWindow.cpp @@ -29,6 +29,7 @@ SystemWindow::SystemWindow() : QDialog(), ui(new Ui::SystemWindow){ connect(ui->tool_suspend, SIGNAL(clicked()), this, SLOT(sysSuspend()) ); connect(ui->push_cancel, SIGNAL(clicked()), this, SLOT(sysCancel()) ); connect(ui->push_lock, SIGNAL(clicked()), this, SLOT(sysLock()) ); + connect(ui->tool_restart_updates, SIGNAL(clicked()), this, SLOT(sysUpdate()) ); //Disable buttons if necessary updateWindow(); ui->tool_suspend->setVisible(LOS::systemCanSuspend()); //does not change with time - just do a single check @@ -46,6 +47,7 @@ void SystemWindow::updateWindow(){ bool ok = LOS::userHasShutdownAccess(); ui->tool_restart->setEnabled(ok); ui->tool_shutdown->setEnabled(ok); + ui->frame_update->setVisible( !LOS::systemPendingUpdates().isEmpty() ); //Center this window on the current screen QPoint center = QApplication::desktop()->screenGeometry(QCursor::pos()).center(); //get the center of the current screen this->move(center.x() - this->width()/2, center.y() - this->height()/2); @@ -74,21 +76,29 @@ void SystemWindow::sysLogout(){ LSession::processEvents(); QTimer::singleShot(0, LSession::handle(), SLOT(StartLogout()) ); } - + void SystemWindow::sysRestart(){ - bool skip = false; - if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled - this->close(); - LSession::processEvents(); - LSession::handle()->StartReboot(skip); + //bool skip = false; + //if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled + //this->close(); + //LSession::processEvents(); + LSession::handle()->StartReboot(true); +} + +void SystemWindow::sysUpdate(){ + //bool skip = false; + //if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled + //this->close(); + //LSession::processEvents(); + LSession::handle()->StartReboot(false); } - + void SystemWindow::sysShutdown(){ - bool skip = false; - if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled - this->close(); - LSession::processEvents(); - LSession::handle()->StartShutdown(skip); + //bool skip = false; + //if(!promptAboutUpdates(skip)){ this->close(); return; } //cancelled + //this->close(); + //LSession::processEvents(); + LSession::handle()->StartShutdown(); } void SystemWindow::sysSuspend(){ |