rename menu: create tx
authorThomasV <thomasv@gitorious>
Sun, 15 Sep 2013 07:03:45 +0000 (09:03 +0200)
committerThomasV <thomasv@gitorious>
Sun, 15 Sep 2013 07:03:45 +0000 (09:03 +0200)
gui/gui_classic/main_window.py
lib/blockchain.py
lib/network.py

index e50f14f..57b3944 100644 (file)
@@ -362,12 +362,12 @@ class ElectrumWindow(QMainWindow):
         raw_transaction_text = raw_transaction_menu.addAction(_("&From text"))
         raw_transaction_text.triggered.connect(self.do_process_from_text)
 
-        csv_transaction_menu = wallet_menu.addMenu(_("&Load CSV transaction"))
+        csv_transaction_menu = wallet_menu.addMenu(_("&Create transaction"))
 
-        csv_transaction_file = csv_transaction_menu.addAction(_("&From file"))
+        csv_transaction_file = csv_transaction_menu.addAction(_("&From CSV file"))
         csv_transaction_file.triggered.connect(self.do_process_from_csv_file)
 
-        csv_transaction_text = csv_transaction_menu.addAction(_("&From text"))
+        csv_transaction_text = csv_transaction_menu.addAction(_("&From CSV text"))
         csv_transaction_text.triggered.connect(self.do_process_from_csv_text)
 
         wallet_menu.addSeparator()
index d0563d6..625c78f 100644 (file)
@@ -64,10 +64,9 @@ class Blockchain(threading.Thread):
 
             if not result: continue
 
-            i, result = result
-            if not result: continue
+            i, header = result
+            if not header: continue
             
-            header = result.get('result')
             height = header.get('block_height')
             self.servers_height[i.server] = height
 
index fba2937..81b476e 100644 (file)
@@ -50,6 +50,7 @@ class Network(threading.Thread):
         self.servers = []
         self.banner = ''
         self.interface = None
+        self.heights = {}
 
 
     def register_callback(self, event, callback):
@@ -156,7 +157,10 @@ class Network(threading.Thread):
                     else:
                         self.trigger_callback('disconnected')
                 
-    def on_header(self, i, result):
+    def on_header(self, i, r):
+        result = r.get('result')
+        if not result: return
+        self.heights[i.server] = result.get('block_height')
         self.blockchain.queue.put((i,result))
 
     def on_peers(self, i, r):