diff options
author | Ken Moore <ken@ixsystems.com> | 2017-11-17 12:34:27 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-11-17 12:34:27 -0500 |
commit | 36f7dae7d983ab89532fb6613e75cf4491065e66 (patch) | |
tree | 12db34ad7584d4daf3be121c16b398ccc90fd26f /src-qt5/core/lumina-desktop/panel-plugins/systemstart | |
parent | Fix the pkg-plist for lumina-core. (diff) | |
download | lumina-36f7dae7d983ab89532fb6613e75cf4491065e66.tar.gz lumina-36f7dae7d983ab89532fb6613e75cf4491065e66.tar.bz2 lumina-36f7dae7d983ab89532fb6613e75cf4491065e66.zip |
Get rid of the updates available dialog/prompt in Lumina.
Replace it with an extra "reboot w/ updates" button in both the start menu and the system logout window.
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/systemstart')
3 files changed, 57 insertions, 21 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index beaa5d92..272bf0fa 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -507,6 +507,7 @@ void StartMenu::on_stackedWidget_currentChanged(int val){ tmp = LOS::audioVolume(); ui->frame_audio->setVisible(tmp >= 0); if(tmp >= 0){ ui->slider_volume->setValue(tmp); } + }else if(page == ui->page_leave){ if( !ui->frame_leave_system->whatsThis().isEmpty() ){ //This frame is allowed/visible - need to adjust the shutdown detection @@ -514,6 +515,7 @@ void StartMenu::on_stackedWidget_currentChanged(int val){ ui->tool_restart->setEnabled(!updating); ui->tool_shutdown->setEnabled(!updating); ui->label_updating->setVisible(updating); //to let the user know *why* they can't shutdown/restart right now + ui->tool_restart_updates->setVisible(!updating && !LOS::systemPendingUpdates().isEmpty() ); } ui->frame_leave_suspend->setVisible( LOS::systemCanSuspend() ); } @@ -590,17 +592,25 @@ void StartMenu::on_tool_logout_clicked(){ void StartMenu::on_tool_restart_clicked(){ emit CloseMenu(); QCoreApplication::processEvents(); - bool skipupdates = false; - if( !promptAboutUpdates(skipupdates) ){ return; } - LSession::handle()->StartReboot(skipupdates); + //bool skipupdates = false; + //if( !promptAboutUpdates(skipupdates) ){ return; } + LSession::handle()->StartReboot(true); +} + +void StartMenu::on_tool_restart_update_clicked(){ + emit CloseMenu(); + QCoreApplication::processEvents(); + //bool skipupdates = false; + //if( !promptAboutUpdates(skipupdates) ){ return; } + LSession::handle()->StartReboot(false); } void StartMenu::on_tool_shutdown_clicked(){ emit CloseMenu(); QCoreApplication::processEvents(); - bool skipupdates = false; - if( !promptAboutUpdates(skipupdates) ){ return; } - LSession::handle()->StartShutdown(skipupdates); + //bool skipupdates = false; + //if( !promptAboutUpdates(skipupdates) ){ return; } + LSession::handle()->StartShutdown(); } void StartMenu::on_tool_suspend_clicked(){ diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h index e2dbb273..41bc3ec4 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.h @@ -73,6 +73,7 @@ private slots: void on_tool_lock_clicked(); void on_tool_logout_clicked(); void on_tool_restart_clicked(); + void on_tool_restart_update_clicked(); void on_tool_shutdown_clicked(); void on_tool_suspend_clicked(); @@ -80,17 +81,17 @@ private slots: void on_slider_volume_valueChanged(int); void on_tool_launch_mixer_clicked(); void on_tool_mute_audio_clicked(); - + //Screen Brightness void on_slider_bright_valueChanged(int); - + //Workspace void on_tool_set_nextwkspace_clicked(); void on_tool_set_prevwkspace_clicked(); - + //Locale void on_combo_locale_currentIndexChanged(int); - + //Search void on_line_search_textEdited(QString); void startSearch(); @@ -99,7 +100,7 @@ private slots: signals: void CloseMenu(); void UpdateQuickLaunch(QStringList); - + }; #endif diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.ui b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.ui index d374bfce..500b6559 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.ui +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>181</width> - <height>405</height> + <width>336</width> + <height>466</height> </rect> </property> <property name="windowTitle"> @@ -42,7 +42,7 @@ <item> <widget class="QStackedWidget" name="stackedWidget"> <property name="currentIndex"> - <number>4</number> + <number>3</number> </property> <widget class="QWidget" name="page_main"> <layout class="QVBoxLayout" name="verticalLayout_2"> @@ -142,8 +142,8 @@ <rect> <x>0</x> <y>0</y> - <width>179</width> - <height>208</height> + <width>334</width> + <height>102</height> </rect> </property> </widget> @@ -438,8 +438,8 @@ <rect> <x>0</x> <y>0</y> - <width>179</width> - <height>299</height> + <width>334</width> + <height>277</height> </rect> </property> </widget> @@ -1003,6 +1003,31 @@ </widget> </item> <item> + <widget class="QToolButton" name="tool_restart_updates"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true">QToolButton{ background-color: rgba(150,150,0,100); }</string> + </property> + <property name="text"> + <string>Update and Restart</string> + </property> + <property name="icon"> + <iconset theme="system-reboot"/> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextBesideIcon</enum> + </property> + <property name="autoRaise"> + <bool>true</bool> + </property> + </widget> + </item> + <item> <widget class="QToolButton" name="tool_shutdown"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> @@ -1033,7 +1058,7 @@ <item> <widget class="QLabel" name="label_updating"> <property name="text"> - <string>(System Performing Updates)</string> + <string>(System Preparing Updates)</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> @@ -1099,8 +1124,8 @@ <rect> <x>0</x> <y>0</y> - <width>167</width> - <height>345</height> + <width>308</width> + <height>351</height> </rect> </property> </widget> |