diff options
Diffstat (limited to 'raveos-welcome/raveos_welcome.py')
| -rw-r--r-- | raveos-welcome/raveos_welcome.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/raveos-welcome/raveos_welcome.py b/raveos-welcome/raveos_welcome.py index daae931..ec1e2a8 100644 --- a/raveos-welcome/raveos_welcome.py +++ b/raveos-welcome/raveos_welcome.py @@ -280,6 +280,7 @@ T = { "en": "With the App Installer you can install all important " "software in one place — from browsers to developer tools."}, "finish_install": {"hu": "APP INSTALLER INDÍTÁSA", "en": "LAUNCH APP INSTALLER"}, + "finish_reboot": {"hu": "ÚJRAINDÍTÁS", "en": "REBOOT SYSTEM"}, "finish_close": {"hu": "Bezárás", "en": "Close"}, "finish_install_missing": {"hu": "Nem található az App Installer.", "en": "App Installer not found."}, "finish_install_err": {"hu": "Nem sikerült elindítani. Napló: {log}", "en": "Failed to launch. Log: {log}"}, @@ -1778,10 +1779,22 @@ class FinishPage(QWidget): self.card_body.setWordWrap(True) card_lay.addWidget(self.card_body) + btn_box = QHBoxLayout() + btn_box.setSpacing(12) + + self.reboot_btn = QPushButton(_t("finish_reboot")) + self.reboot_btn.setObjectName("secondary") + self.reboot_btn.clicked.connect(self._on_reboot) + btn_box.addWidget(self.reboot_btn) + + btn_box.addStretch() + self.install_btn = QPushButton(_t("finish_install")) self.install_btn.setObjectName("primary") self.install_btn.clicked.connect(self.launch_installer.emit) - card_lay.addWidget(self.install_btn, alignment=Qt.AlignmentFlag.AlignRight) + btn_box.addWidget(self.install_btn) + + card_lay.addLayout(btn_box) self.install_status = QLabel("") self.install_status.setObjectName("body") @@ -1792,12 +1805,17 @@ class FinishPage(QWidget): lay.addWidget(card) lay.addStretch() + def _on_reboot(self): + import subprocess + subprocess.Popen(["systemctl", "reboot"]) + def retranslate(self): self.done_label.setText(_t("finish_ok")) self.title.setText(_t("finish_title")) self.sub.setText(_t("finish_sub")) self.card_title.setText(_t("finish_next_step")) self.card_body.setText(_t("finish_inst_desc")) + self.reboot_btn.setText(_t("finish_reboot")) self.install_btn.setText(_t("finish_install")) def show_error(self, msg): |