Browse Source

Re-enable switching to already open session in the GUI. That was someone commented out?

master
Nils 10 months ago
parent
commit
f830f12ee9
  1. 1
      engine/api.py
  2. 4
      qtgui/mainwindow.py

1
engine/api.py

@ -109,6 +109,7 @@ class Callbacks(object):
This will also fire if we start and detect that a session is already open and running.
"""
for func in self.sessionOpenReady:
print (func)
func(nsmSessionExportDict)
def _sessionOpenLoading(self, nsmSessionExportDict):

4
qtgui/mainwindow.py

@ -213,7 +213,6 @@ class MainWindow(QtWidgets.QMainWindow):
logger.info(f"Got continue session as command line parameter but there is no session available.")
if not self.isVisible():
text = QtCore.QCoreApplication.translate("mainWindow", "Agordejo ready")
self.systemTray.showMessage("Agordejo", text, QtWidgets.QSystemTrayIcon.Information, 2000) #title, message, icon, timeout. #has messageClicked() signal.
@ -312,6 +311,7 @@ class MainWindow(QtWidgets.QMainWindow):
self.setWindowTitle(nsmSessionExportDict["nsmSessionName"])
self.recentlyOpenedSessions.add(nsmSessionExportDict["nsmSessionName"])
def toggleVisible(self, force:bool=None):
if force is None:
newState = not self.isVisible()
@ -503,7 +503,7 @@ class SessionController(object):
self._connectMenu()
#Callbacks
#api.callbacks.sessionOpenReady.append(lambda nsmSessionExportDict: self._switch("open")) #When loading ist done. This takes a while when non-nsm clients are in the session
api.callbacks.sessionOpenReady.append(lambda nsmSessionExportDict: self._switch("open")) #When loading ist done. This takes a while when non-nsm clients are in the session
api.callbacks.sessionClosed.append(lambda: self._setMenuEnabled(None))
api.callbacks.sessionClosed.append(lambda: self._switch("choose")) #The rest is handled by the widget itself. It keeps itself updated, no matter if visible or not.
api.callbacks.sessionOpenReady.append(lambda nsmSessionExportDict: self._setMenuEnabled(nsmSessionExportDict))

Loading…
Cancel
Save