Added AcceptBit integration.
This commit is contained in:
parent
fd8af94419
commit
8f5d48584d
|
@ -11,6 +11,7 @@ import re
|
|||
import sys
|
||||
import time
|
||||
import wallet
|
||||
import webbrowser
|
||||
|
||||
try:
|
||||
import lib.gui_qt as gui_qt
|
||||
|
@ -118,12 +119,15 @@ class MiniWindow(QDialog):
|
|||
interact_button.setObjectName("interact_button")
|
||||
|
||||
app_menu = QMenu(interact_button)
|
||||
acceptbit_action = app_menu.addAction(_("A&cceptBit"))
|
||||
report_action = app_menu.addAction(_("&Report Bug"))
|
||||
about_action = app_menu.addAction(_("&About Electrum"))
|
||||
app_menu.addSeparator()
|
||||
quit_action = app_menu.addAction(_("&Quit"))
|
||||
interact_button.setMenu(app_menu)
|
||||
|
||||
self.connect(acceptbit_action, SIGNAL("triggered()"),
|
||||
self.acceptbit)
|
||||
self.connect(report_action, SIGNAL("triggered()"),
|
||||
self.show_report_bug)
|
||||
self.connect(about_action, SIGNAL("triggered()"), self.show_about)
|
||||
|
@ -309,6 +313,9 @@ class MiniWindow(QDialog):
|
|||
def update_completions(self, completions):
|
||||
self.address_completions.setStringList(completions)
|
||||
|
||||
def acceptbit(self):
|
||||
self.actuator.acceptbit(self.quote_currencies[0])
|
||||
|
||||
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."))
|
||||
|
@ -553,6 +560,11 @@ class MiniActuator:
|
|||
def is_valid(self, address):
|
||||
return self.wallet.is_valid(address)
|
||||
|
||||
def acceptbit(self, currency):
|
||||
master_pubkey = self.wallet.master_public_key.encode("hex")
|
||||
url = "http://acceptbit.com/mpk/%s/%s" % (master_pubkey, currency)
|
||||
webbrowser.open(url)
|
||||
|
||||
class MiniDriver(QObject):
|
||||
|
||||
INITIALIZING = 0
|
||||
|
|
Loading…
Reference in New Issue