Skip to content

Commit

Permalink
better buttons in question dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgriffin committed Jan 31, 2025
1 parent cbfb053 commit 53f3062
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bitcoin_usb/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,10 @@ def __enter__(self):
logger.error(f"{filepath} returned {error=}")

if not self.client.client.features.initialized:
if question_dialog(text=self.tr("Do you want to restore an existing seed onto the device?")):
if question_dialog(
text=self.tr("Do you want to restore an existing seed onto the device?"),
buttons=QMessageBox.StandardButton.No | QMessageBox.StandardButton.Yes,
):
self.client.restore_device(label=self.initalization_label)
else:
self.client.setup_device(label=self.initalization_label)
Expand All @@ -335,7 +338,10 @@ def __enter__(self):
self.noise_config = DialogNoiseConfig()
self.client.noise_config = self.noise_config
if not self.is_bitbox02_initialized(self.client):
if question_dialog(text=self.tr("Do you want to restore an existing seed onto the device?")):
if question_dialog(
text=self.tr("Do you want to restore an existing seed onto the device?"),
buttons=QMessageBox.StandardButton.No | QMessageBox.StandardButton.Yes,
):
self.client.restore_device(label=self.initalization_label)
else:
self.client.setup_device(label=self.initalization_label)
Expand Down

0 comments on commit 53f3062

Please sign in to comment.