Skip to content

Commit

Permalink
Merge #694: qt: Fix various issues
Browse files Browse the repository at this point in the history
14f8044 bitbox02: Detect GUI on Windows as not-external gui (Andrew Chow)
a2fb2a2 qt: Use correct name for p2pkh radio button (Andrew Chow)
ba8d132 qt: Include '/*' in getkeypool path regex (Andrew Chow)
593acb0 qt: Use correct name for xpub display field (Andrew Chow)

Pull request description:

  The Qt GUI was slightly broken in a few places.

Top commit has no ACKs.

Tree-SHA512: 0dbfd1837530db265d7fdc83f3f2194e6c1d1aa3e62de33853f905a9304210c7fcbf658147d4325f8e3d1fe1836c4dcb0d25800debd621fec31b320065f41f4a
  • Loading branch information
achow101 committed Jul 26, 2023
2 parents 8338f17 + 14f8044 commit 9b5c23b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hwilib/_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(self, client):
def getxpub_button_clicked(self):
path = self.ui.path_lineedit.text()
res = do_command(commands.getxpub, self.client, path)
self.ui.xpub_lineedit.setText(res['xpub'])
self.ui.xpub_textedit.setText(res['xpub'])

class SignPSBTDialog(QDialog):
def __init__(self, client):
Expand Down Expand Up @@ -239,7 +239,7 @@ def __init__(self, opts):
self.ui.internal_checkbox.setChecked(opts['internal'])
self.ui.keypool_checkbox.setChecked(opts['keypool'])
self.ui.account_spinbox.setValue(opts['account'])
self.ui.path_lineedit.setValidator(QRegExpValidator(QRegExp("m(/[0-9]+['Hh]?)+"), None))
self.ui.path_lineedit.setValidator(QRegExpValidator(QRegExp(r"m(/[0-9]+['Hh]?)+/\*"), None))
if opts['account_used']:
self.ui.account_radio.setChecked(True)
self.ui.path_radio.setChecked(False)
Expand Down
2 changes: 1 addition & 1 deletion hwilib/devices/bitbox02.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(self, msg: str):

# External GUI tools using hwi.py as a command line tool to integrate hardware wallets usually do
# not have an actual terminal for IO.
_using_external_gui = not sys.stdout.isatty()
_using_external_gui = sys.stdout is not None and not sys.stdout.isatty()
if _using_external_gui:
_unpaired_errmsg = "Device not paired yet. Please pair using the BitBoxApp, then close the BitBoxApp and try again."
else:
Expand Down
2 changes: 1 addition & 1 deletion hwilib/ui/displayaddressdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton">
<widget class="QRadioButton" name="pkh_radio">
<property name="text">
<string>P2PKH</string>
</property>
Expand Down

0 comments on commit 9b5c23b

Please sign in to comment.