revealer plugin: do not add icon to status bar
timelock_recovery: move help button to the top
This commit is contained in:
@@ -98,12 +98,10 @@ class Plugin(RevealerPlugin):
|
||||
QFontDatabase.addApplicationFont(os.path.join(os.path.dirname(__file__), 'DejaVuSansMono-Bold.ttf'))
|
||||
|
||||
@hook
|
||||
def create_status_bar(self, sb):
|
||||
b = StatusBarButton(
|
||||
read_QIcon_from_bytes(self.icon_bytes),
|
||||
"Revealer "+_("Visual Cryptography Plugin"),
|
||||
partial(self.setup_dialog, sb), sb.height())
|
||||
sb.addPermanentWidget(b)
|
||||
def init_menubar(self, window):
|
||||
ma = window.wallet_menu.addAction('Revealer', partial(self.setup_dialog, window))
|
||||
icon = read_QIcon_from_bytes(self.icon_bytes)
|
||||
ma.setIcon(icon)
|
||||
|
||||
def requires_settings(self):
|
||||
return True
|
||||
@@ -131,7 +129,7 @@ class Plugin(RevealerPlugin):
|
||||
return keystore.get_seed(password)
|
||||
|
||||
def setup_dialog(self, window):
|
||||
self.wallet = window.parent().wallet
|
||||
self.wallet = window.wallet
|
||||
self.update_wallet_name(self.wallet)
|
||||
self.user_input = False
|
||||
|
||||
|
||||
@@ -192,18 +192,22 @@ class Plugin(TimelockRecoveryPlugin):
|
||||
plan_dialog.close()
|
||||
return
|
||||
|
||||
plan_grid = QGridLayout()
|
||||
plan_grid.setSpacing(8)
|
||||
grid_row = 0
|
||||
|
||||
title_hbox = QHBoxLayout()
|
||||
title_hbox.addWidget(QLabel(_('To create a recovery plan, enter a recipient and a cancellation time window')))
|
||||
title_hbox.addStretch(1)
|
||||
help_button = QPushButton(_("Help"))
|
||||
help_button.clicked.connect(lambda: self.create_intro_dialog(context))
|
||||
title_hbox.addWidget(help_button)
|
||||
|
||||
next_button = QPushButton(_("Next"), plan_dialog)
|
||||
next_button.clicked.connect(plan_dialog.close)
|
||||
next_button.clicked.connect(lambda: self.start_plan(context))
|
||||
next_button.setEnabled(False)
|
||||
|
||||
plan_grid = QGridLayout()
|
||||
plan_grid.setSpacing(8)
|
||||
grid_row = 0
|
||||
|
||||
payto_e = PayToEdit(context.main_window.send_tab) # Reuse configuration from send tab
|
||||
payto_e.toggle_paytomany()
|
||||
|
||||
@@ -349,8 +353,10 @@ class Plugin(TimelockRecoveryPlugin):
|
||||
|
||||
# Create a VBox layout for the main contents of the dialog.
|
||||
vbox_layout = QVBoxLayout()
|
||||
vbox_layout.addLayout(title_hbox)
|
||||
vbox_layout.addStretch(1)
|
||||
vbox_layout.addLayout(plan_grid, stretch=1)
|
||||
vbox_layout.addLayout(Buttons(help_button, next_button))
|
||||
vbox_layout.addLayout(Buttons(next_button))
|
||||
|
||||
# Populate the HBox layout.
|
||||
hbox_layout.addWidget(logo_label)
|
||||
|
||||
Reference in New Issue
Block a user