Browse Source

open each wallet in a separate window

283
ThomasV 9 years ago
parent
commit
ce06d92100
  1. 8
      gui/qt/__init__.py
  2. 12
      gui/qt/main_window.py

8
gui/qt/__init__.py

@ -109,8 +109,12 @@ class ElectrumGui:
def new_window(self, config):
self.app.emit(SIGNAL('new_window'), config)
def start_new_window(self, config):
path = config.get_wallet_path()
def load_wallet_file(self, path):
self.app.emit(SIGNAL('new_window'), self.config, path)
def start_new_window(self, config, path=None):
if path is None:
path = config.get_wallet_path()
for w in self.windows:
if w.config.get_wallet_path() == path:
break

12
gui/qt/main_window.py

@ -141,10 +141,10 @@ class ElectrumWindow(QMainWindow):
tabs.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.setCentralWidget(tabs)
try:
self.setGeometry(*self.config.get("winpos-qt"))
except:
self.setGeometry(100, 100, 840, 400)
#try:
# self.setGeometry(*self.config.get("winpos-qt"))
#except:
# self.setGeometry(100, 100, 840, 400)
if self.config.get("is_maximized"):
self.showMaximized()
@ -293,7 +293,7 @@ class ElectrumWindow(QMainWindow):
filename = unicode(QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder))
if not filename:
return
self.load_wallet_file(filename)
self.gui_object.load_wallet_file(filename)
def run_wizard(self, storage, action):
import installwizard
@ -423,7 +423,7 @@ class ElectrumWindow(QMainWindow):
for i, k in enumerate(sorted(recent)):
b = os.path.basename(k)
def loader(k):
return lambda: self.load_wallet_file(k)
return lambda: self.gui_object.load_wallet_file(k)
self.recently_visited_menu.addAction(b, loader(k)).setShortcut(QKeySequence("Ctrl+%d"%(i+1)))
self.recently_visited_menu.setEnabled(len(recent))

Loading…
Cancel
Save