|
|
@ -356,7 +356,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): |
|
|
|
|
|
|
|
def watching_only_changed(self): |
|
|
|
title = 'Electrum %s - %s' % (self.wallet.electrum_version, |
|
|
|
self.wallet.basename().decode('utf8')) |
|
|
|
self.wallet.basename()) |
|
|
|
extra = [self.wallet.storage.get('wallet_type', '?')] |
|
|
|
if self.wallet.is_watching_only(): |
|
|
|
self.warn_if_watching_only() |
|
|
@ -401,7 +401,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): |
|
|
|
self.show_critical(_("Electrum was unable to copy your wallet file to the specified location.") + "\n" + str(reason), title=_("Unable to create backup")) |
|
|
|
|
|
|
|
def update_recently_visited(self, filename): |
|
|
|
filename = filename.decode('utf8') |
|
|
|
recent = self.config.get('recently_open', []) |
|
|
|
try: |
|
|
|
sorted(recent) |
|
|
@ -416,7 +415,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): |
|
|
|
for i, k in enumerate(sorted(recent)): |
|
|
|
b = os.path.basename(k) |
|
|
|
def loader(k): |
|
|
|
return lambda: self.gui_object.new_window(k.encode('utf8')) |
|
|
|
return lambda: self.gui_object.new_window(k) |
|
|
|
self.recently_visited_menu.addAction(b, loader(k)).setShortcut(QKeySequence("Ctrl+%d"%(i+1))) |
|
|
|
self.recently_visited_menu.setEnabled(len(recent)) |
|
|
|
|
|
|
@ -702,7 +701,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): |
|
|
|
text = _("Not connected") |
|
|
|
icon = QIcon(":icons/status_disconnected.png") |
|
|
|
|
|
|
|
self.tray.setToolTip("%s (%s)" % (text, self.wallet.basename().decode('utf8'))) |
|
|
|
self.tray.setToolTip("%s (%s)" % (text, self.wallet.basename())) |
|
|
|
self.balance_label.setText(text) |
|
|
|
self.status_button.setIcon( icon ) |
|
|
|
|
|
|
@ -2009,7 +2008,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): |
|
|
|
d.exec_() |
|
|
|
|
|
|
|
def password_dialog(self, msg=None, parent=None): |
|
|
|
from password_dialog import PasswordDialog |
|
|
|
from .password_dialog import PasswordDialog |
|
|
|
parent = parent or self |
|
|
|
d = PasswordDialog(parent, msg) |
|
|
|
return d.run() |
|
|
@ -2378,7 +2377,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): |
|
|
|
if not self.config.is_modifiable('language'): |
|
|
|
for w in [lang_combo, lang_label]: w.setEnabled(False) |
|
|
|
def on_lang(x): |
|
|
|
lang_request = languages.keys()[lang_combo.currentIndex()] |
|
|
|
lang_request = list(languages.keys())[lang_combo.currentIndex()] |
|
|
|
if lang_request != self.config.get('language'): |
|
|
|
self.config.set_key("language", lang_request, True) |
|
|
|
self.need_restart = True |
|
|
|