mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
Fix "Back" button in installwizard
Since this seems to be the first page of the wizard, there is nothing to go back to. Furthermore, clicking "Back" actually takes you to the next step. This changes the button to "Close" and closes the wizard.
This commit is contained in:
parent
96a685a765
commit
15d74b4e19
1 changed files with 3 additions and 2 deletions
|
@ -109,6 +109,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||||
self.title = QLabel()
|
self.title = QLabel()
|
||||||
self.main_widget = QWidget()
|
self.main_widget = QWidget()
|
||||||
self.back_button = QPushButton(_("Back"), self)
|
self.back_button = QPushButton(_("Back"), self)
|
||||||
|
self.back_button.setText(_('Back') if self.can_go_back() else _('Cancel'))
|
||||||
self.next_button = QPushButton(_("Next"), self)
|
self.next_button = QPushButton(_("Next"), self)
|
||||||
self.next_button.setDefault(True)
|
self.next_button.setDefault(True)
|
||||||
self.logo = QLabel()
|
self.logo = QLabel()
|
||||||
|
@ -209,8 +210,8 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||||
while True:
|
while True:
|
||||||
if self.storage.file_exists() and not self.storage.is_encrypted():
|
if self.storage.file_exists() and not self.storage.is_encrypted():
|
||||||
break
|
break
|
||||||
if not self.loop.exec_():
|
if self.loop.exec_() != 2: # 2 = next
|
||||||
return
|
self.close()
|
||||||
if not self.storage.file_exists():
|
if not self.storage.file_exists():
|
||||||
break
|
break
|
||||||
if self.storage.file_exists() and self.storage.is_encrypted():
|
if self.storage.file_exists() and self.storage.is_encrypted():
|
||||||
|
|
Loading…
Add table
Reference in a new issue