1
0

lightning: complete moving of lightning objects, acquire net/wallet lock while answering lightning requests

This commit is contained in:
Janus
2018-03-15 17:38:02 +01:00
committed by ThomasV
parent 98f6f67c6b
commit d84eab0418
6 changed files with 51 additions and 14 deletions

View File

@@ -52,6 +52,7 @@ from electrum.logging import Logger
from .installwizard import InstallWizard, WalletAlreadyOpenInMemory
from electrum.lightning import LightningUI
from .util import get_default_language, read_QIcon, ColorScheme, custom_message_box
from .main_window import ElectrumWindow
@@ -139,6 +140,11 @@ class ElectrumGui(Logger):
# the OS/window manager/etc might set *a dark theme*.
# Hence, try to choose colors accordingly:
ColorScheme.update_from_widget(QWidget(), force_dark=use_dark_theme)
self.lightning = LightningUI(self.set_console_and_return_lightning)
def set_console_and_return_lightning(self):
self.windows[0].wallet.network.lightningrpc.setConsole(self.windows[0].console)
return self.windows[0].wallet.network.lightningrpc
def build_tray_menu(self):
# Avoid immediate GC of old menu when window closed via its action