From b35617f6db3b3d76c8af61c25de3b10767a63a96 Mon Sep 17 00:00:00 2001 From: thomasv Date: Mon, 7 Jan 2013 14:03:45 +0100 Subject: [PATCH] merge imported labels with existing labels --- lib/gui_qt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index 375ba57f..decb1b9d 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -1541,11 +1541,13 @@ class ElectrumWindow(QMainWindow): f = open(labelsFile, 'r') data = f.read() f.close() - self.wallet.labels = json.loads(data) + for key, value in json.loads(data).items(): + self.wallet.labels[key] = value self.wallet.save() QMessageBox.information(None, "Labels imported", "Your labels where imported from '%s'" % str(labelsFile)) except (IOError, os.error), reason: - QMessageBox.critical(None, "Unable to export labels", "Electrum was unable to export your labels.\n" + str(reason)) + QMessageBox.critical(None, "Unable to import labels", "Electrum was unable to import your labels.\n" + str(reason)) + def do_export_labels(self):