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