|
11 | 11 | import sys |
12 | 12 | import time |
13 | 13 | import wallet |
| 14 | +import webbrowser |
14 | 15 |
|
15 | 16 | try: |
16 | 17 | import lib.gui_qt as gui_qt |
@@ -118,12 +119,15 @@ def __init__(self, actuator, expand_callback): |
118 | 119 | interact_button.setObjectName("interact_button") |
119 | 120 |
|
120 | 121 | app_menu = QMenu(interact_button) |
| 122 | + acceptbit_action = app_menu.addAction(_("A&cceptBit")) |
121 | 123 | report_action = app_menu.addAction(_("&Report Bug")) |
122 | 124 | about_action = app_menu.addAction(_("&About Electrum")) |
123 | 125 | app_menu.addSeparator() |
124 | 126 | quit_action = app_menu.addAction(_("&Quit")) |
125 | 127 | interact_button.setMenu(app_menu) |
126 | 128 |
|
| 129 | + self.connect(acceptbit_action, SIGNAL("triggered()"), |
| 130 | + self.acceptbit) |
127 | 131 | self.connect(report_action, SIGNAL("triggered()"), |
128 | 132 | self.show_report_bug) |
129 | 133 | self.connect(about_action, SIGNAL("triggered()"), self.show_about) |
@@ -309,6 +313,9 @@ def copy_address(self): |
309 | 313 | def update_completions(self, completions): |
310 | 314 | self.address_completions.setStringList(completions) |
311 | 315 |
|
| 316 | + def acceptbit(self): |
| 317 | + self.actuator.acceptbit(self.quote_currencies[0]) |
| 318 | + |
312 | 319 | def show_about(self): |
313 | 320 | QMessageBox.about(self, "Electrum", |
314 | 321 | _("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 @@ def fetch_destination(self, address): |
553 | 560 | def is_valid(self, address): |
554 | 561 | return self.wallet.is_valid(address) |
555 | 562 |
|
| 563 | + def acceptbit(self, currency): |
| 564 | + master_pubkey = self.wallet.master_public_key.encode("hex") |
| 565 | + url = "http://acceptbit.com/mpk/%s/%s" % (master_pubkey, currency) |
| 566 | + webbrowser.open(url) |
| 567 | + |
556 | 568 | class MiniDriver(QObject): |
557 | 569 |
|
558 | 570 | INITIALIZING = 0 |
|
0 commit comments