tdo not show openalias field in red if no alias is defined - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 0fad7cd5e1d3499d5409a44d0f99c02f1f354459 (DIR) parent 3fbd81f8ab66fee5574b17a5a73febe61f92c84a (HTM) Author: ThomasV <thomasv@gitorious> Date: Mon, 13 Jul 2015 19:35:27 +0200 do not show openalias field in red if no alias is defined Diffstat: M gui/qt/main_window.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- (DIR) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -2550,6 +2550,9 @@ class ElectrumWindow(QMainWindow): def set_alias_color(): if not self.settings_dialog_visible: return + if not self.config.get('alias'): + alias_e.setStyleSheet("") + return if self.alias_info: alias_addr, alias_name, validated = self.alias_info alias_e.setStyleSheet(GREEN_BG if validated else RED_BG) t@@ -2559,7 +2562,8 @@ class ElectrumWindow(QMainWindow): alias_e.setStyleSheet("") alias = str(alias_e.text()) self.config.set_key('alias', alias, True) - self.fetch_alias() + if alias: + self.fetch_alias() set_alias_color() self.connect(self, SIGNAL('alias_received'), set_alias_color) alias_e.editingFinished.connect(on_alias_edit)