|
@ -408,19 +408,29 @@ class ElectrumWindow(QMainWindow): |
|
|
def address_label_changed(self, item, column, l, column_addr, column_label): |
|
|
def address_label_changed(self, item, column, l, column_addr, column_label): |
|
|
addr = unicode( item.text(column_addr) ) |
|
|
addr = unicode( item.text(column_addr) ) |
|
|
text = unicode( item.text(column_label) ) |
|
|
text = unicode( item.text(column_label) ) |
|
|
|
|
|
changed = False |
|
|
|
|
|
|
|
|
if text: |
|
|
if text: |
|
|
if text not in self.wallet.aliases.keys(): |
|
|
if text not in self.wallet.aliases.keys(): |
|
|
self.wallet.labels[addr] = text |
|
|
old_addr = self.wallet.labels.get(text) |
|
|
|
|
|
if old_addr != addr: |
|
|
|
|
|
self.wallet.labels[addr] = text |
|
|
|
|
|
changed = True |
|
|
else: |
|
|
else: |
|
|
print_error("Error: This is one of your aliases") |
|
|
print_error("Error: This is one of your aliases") |
|
|
label = self.wallet.labels.get(addr,'') |
|
|
label = self.wallet.labels.get(addr,'') |
|
|
item.setText(column_label, QString(label)) |
|
|
item.setText(column_label, QString(label)) |
|
|
else: |
|
|
else: |
|
|
s = self.wallet.labels.get(addr) |
|
|
s = self.wallet.labels.get(addr) |
|
|
if s: self.wallet.labels.pop(addr) |
|
|
if s: |
|
|
|
|
|
self.wallet.labels.pop(addr) |
|
|
|
|
|
changed = True |
|
|
|
|
|
|
|
|
|
|
|
if changed: |
|
|
|
|
|
self.wallet.update_tx_labels() |
|
|
|
|
|
self.update_history_tab() |
|
|
|
|
|
self.update_completions() |
|
|
|
|
|
|
|
|
self.update_history_tab() |
|
|
|
|
|
self.update_completions() |
|
|
|
|
|
|
|
|
|
|
|
def update_history_tab(self): |
|
|
def update_history_tab(self): |
|
|
self.history_list.clear() |
|
|
self.history_list.clear() |
|
|