1
0

simplify interface: use callbacks

This commit is contained in:
ThomasV
2013-09-12 08:41:27 +02:00
parent b363d81fc1
commit 907dca6eb9
8 changed files with 169 additions and 208 deletions

View File

@@ -206,7 +206,7 @@ class ElectrumWindow(QMainWindow):
QShortcut(QKeySequence("Ctrl+PgDown"), self, lambda: tabs.setCurrentIndex( (tabs.currentIndex() + 1 )%tabs.count() ))
self.connect(self, QtCore.SIGNAL('update_status'), self.update_status)
self.connect(self, QtCore.SIGNAL('banner_signal'), lambda: self.console.showMessage(self.wallet.interface.banner) )
self.connect(self, QtCore.SIGNAL('banner_signal'), lambda: self.console.showMessage(self.network.banner) )
self.connect(self, QtCore.SIGNAL('transaction_signal'), lambda: self.notify_transactions() )
self.history_list.setFocus(True)
@@ -240,7 +240,7 @@ class ElectrumWindow(QMainWindow):
self.setWindowTitle( title )
self.update_wallet()
# set initial message
self.console.showMessage(self.wallet.interface.banner)
self.console.showMessage(self.network.banner)
# Once GUI has been initialized check if we want to announce something since the callback has been called before the GUI was initialized
self.notify_transactions()

View File

@@ -23,7 +23,7 @@ import os.path, json, ast, traceback
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from electrum.interface import DEFAULT_SERVERS, DEFAULT_PORTS
from electrum import DEFAULT_SERVERS, DEFAULT_PORTS
from qt_util import *
@@ -62,7 +62,7 @@ class NetworkDialog(QDialog):
status = _("Please choose a server.") + "\n" + _("Select 'Cancel' if you are offline.")
server = interface.server
self.servers = interface.get_servers()
self.servers = network.get_servers()
vbox = QVBoxLayout()