Fix docstring display.
This commit is contained in:
@@ -2583,11 +2583,14 @@ class ElectrumWindow(QMainWindow, PrintError):
|
||||
nz.valueChanged.connect(on_nz)
|
||||
gui_widgets.append((nz_label, nz))
|
||||
|
||||
def fmt_docs(key, klass):
|
||||
lines = [ln.lstrip(" ") for ln in klass.__doc__.split("\n")]
|
||||
return '\n'.join([key, "", " ".join(lines)])
|
||||
|
||||
choosers = sorted(COIN_CHOOSERS.keys())
|
||||
chooser_name = self.wallet.coin_chooser_name(self.config)
|
||||
msg = _('Choose coin (UTXO) selection method. The following are available:\n\n')
|
||||
msg += '\n\n'.join(key + ": " + klass.__doc__
|
||||
for key, klass in COIN_CHOOSERS.items())
|
||||
msg += '\n\n'.join(fmt_docs(*item) for item in COIN_CHOOSERS.items())
|
||||
chooser_label = HelpLabel(_('Coin selection') + ':', msg)
|
||||
chooser_combo = QComboBox()
|
||||
chooser_combo.addItems(choosers)
|
||||
|
||||
Reference in New Issue
Block a user