init plugins before gui. register wallet types in plugin constructor
This commit is contained in:
@@ -44,7 +44,6 @@ except Exception:
|
||||
|
||||
from util import *
|
||||
from main_window import ElectrumWindow
|
||||
from electrum.plugins import init_plugins
|
||||
|
||||
|
||||
class OpenFileEventFilter(QObject):
|
||||
@@ -70,7 +69,6 @@ class ElectrumGui:
|
||||
if app is None:
|
||||
self.app = QApplication(sys.argv)
|
||||
self.app.installEventFilter(self.efilter)
|
||||
init_plugins(self)
|
||||
|
||||
|
||||
def build_tray_menu(self):
|
||||
@@ -193,7 +191,7 @@ class ElectrumGui:
|
||||
self.go_full()
|
||||
|
||||
# plugins that need to change the GUI do it here
|
||||
run_hook('init')
|
||||
run_hook('init_qt', self)
|
||||
|
||||
w.load_wallet(wallet)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
import PyQt4.QtCore as QtCore
|
||||
|
||||
import electrum
|
||||
from electrum.i18n import _
|
||||
from electrum import Wallet, Wallet_2of2, Wallet_2of3
|
||||
from electrum import bitcoin
|
||||
@@ -96,13 +97,7 @@ class InstallWizard(QDialog):
|
||||
grid.addWidget(gb2, 3, 0)
|
||||
group2 = QButtonGroup()
|
||||
|
||||
self.wallet_types = [
|
||||
('standard', _("Standard wallet"), Wallet),
|
||||
('2of2', _("Multisig wallet (2 of 2)"), Wallet_2of2),
|
||||
('2of3', _("Multisig wallet (2 of 3)"), Wallet_2of3)
|
||||
]
|
||||
run_hook('add_wallet_types', self.wallet_types)
|
||||
|
||||
self.wallet_types = filter(lambda x: x[0] not in ['old','xpub','imported'], electrum.wallet.wallet_types)
|
||||
for i, (t,l,c) in enumerate(self.wallet_types):
|
||||
button = QRadioButton(gb2)
|
||||
button.setText(l)
|
||||
|
||||
Reference in New Issue
Block a user