tPlot plugin for multiple windows. - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 6372a3f6ce9b4215c884a699468a12716ccc1576
DIR parent 89fbda30e08db26a67fd060d98188ced05c82b60
HTML Author: Neil Booth <kyuupichan@gmail.com>
Date: Fri, 4 Sep 2015 17:43:07 +0900
Plot plugin for multiple windows.
Diffstat:
M plugins/plot.py | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
---
DIR diff --git a/plugins/plot.py b/plugins/plot.py
t@@ -17,9 +17,6 @@ except:
flag_matlib=False
-
-
-
class Plugin(BasePlugin):
def is_available(self):
t@@ -29,17 +26,13 @@ class Plugin(BasePlugin):
return False
@hook
- def init_qt(self, gui):
- self.win = gui.main_window
-
- @hook
- def export_history_dialog(self, d,hbox):
- self.wallet = d.wallet
- history = self.wallet.get_history()
+ def export_history_dialog(self, window, hbox):
+ wallet = window.wallet
+ history = wallet.get_history()
if len(history) > 0:
b = QPushButton(_("Preview plot"))
hbox.addWidget(b)
- b.clicked.connect(lambda: self.do_plot(self.wallet, history))
+ b.clicked.connect(lambda: self.do_plot(wallet, history))
else:
b = QPushButton(_("No history to plot"))
hbox.addWidget(b)