import csv
import datetime
+from version import ELECTRUM_VERSION as electrum_version
from wallet import format_satoshis
import gui_qt
import shutil
class ElectrumGui(QObject):
- def __init__(self, wallet, config):
+ def __init__(self, wallet, config, expert=None):
super(QObject, self).__init__()
self.wallet = wallet
self.config = config
self.check_qt_version()
- self.app = QApplication(sys.argv)
-
+ self.expert = expert
+ if self.expert != None:
+ self.app = self.expert.app
+ else:
+ self.app = QApplication(sys.argv)
def check_qt_version(self):
qtVersion = qVersion()
if url:
self.set_url(url)
-
- timer = Timer()
- timer.start()
- self.expert = gui_qt.ElectrumWindow(self.wallet, self.config)
- self.expert.app = self.app
- self.expert.connect_slots(timer)
- self.expert.update_wallet()
- self.app.exec_()
+
+ if self.expert == None:
+ timer = Timer()
+ timer.start()
+ self.expert = gui_qt.ElectrumWindow(self.wallet, self.config)
+ self.expert.app = self.app
+ self.expert.connect_slots(timer)
+ self.expert.update_wallet()
+ self.app.exec_()
def expand(self):
"""Hide the lite mode window and show pro-mode."""
self.actuator = actuator
self.config = config
self.btc_balance = None
- self.quote_currencies = ["EUR", "USD", "GBP"]
+ self.quote_currencies = ["BRL", "CNY", "EUR", "GBP", "RUB", "USD"]
self.actuator.set_configured_currency(self.set_quote_currency)
self.exchanger = exchange_rate.Exchanger(self)
# Needed because price discovery is done in a different thread
quote_text = "(%s)" % quote_text
btc_balance = "%.2f" % (btc_balance / bitcoin(1))
self.balance_label.set_balance_text(btc_balance, quote_text)
- self.setWindowTitle("Electrum - %s BTC" % btc_balance)
+ self.setWindowTitle("Electrum %s - %s BTC" % (electrum_version, btc_balance))
def amount_input_changed(self, amount_text):
"""Update the number of bitcoins displayed."""
def show_about(self):
QMessageBox.about(self, "Electrum",
- _("Electrum's focus is speed, with low resource usage and simplifying Bitcoin. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjuction with high-performance servers that handle the most complicated parts of the Bitcoin system.\n\nSend donations to 1JwTMv4GWaPdf931N6LNPJeZBfZgZJ3zX1"))
+ _("Electrum's focus is speed, with low resource usage and simplifying Bitcoin. You do not need to perform regular backups, because your wallet can be recovered from a secret phrase that you can memorize or write on paper. Startup times are instant because it operates in conjuction with high-performance servers that handle the most complicated parts of the Bitcoin system."))
def show_report_bug(self):
QMessageBox.information(self, "Electrum - " + _("Reporting Bugs"),
- _("Please report any bugs as issues on github: https://github.com/spesmilo/electrum/issues"))
+ _("Please report any bugs as issues on github: <a href=\"https://github.com/spesmilo/electrum/issues\">https://github.com/spesmilo/electrum/issues</a>"))
def show_history(self, toggle_state):
if toggle_state: