|
@ -326,20 +326,19 @@ class MainWindow(QtWidgets.QMainWindow): |
|
|
"geometry":self.restoreGeometry, |
|
|
"geometry":self.restoreGeometry, |
|
|
"windowState":self.restoreState, |
|
|
"windowState":self.restoreState, |
|
|
"recentlyOpenedSessions":self.recentlyOpenedSessions.load, |
|
|
"recentlyOpenedSessions":self.recentlyOpenedSessions.load, |
|
|
"visible":self.recentlyOpenedSessions.load, |
|
|
"tab": lambda i: self.ui.tabbyCat.setCurrentIndex(int(i)), |
|
|
"tab": lambda i: self.ui.tabbyCat.setCurrentIndex(int(i)), |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for key in settings.allKeys(): |
|
|
for key in settings.allKeys(): |
|
|
if key in actions: #if not it doesn't matter. this is all uncritical. |
|
|
if key in actions: #if not it doesn't matter. this is all uncritical. |
|
|
actions[key](settings.value(key)) |
|
|
actions[key](settings.value(key)) |
|
|
|
|
|
|
|
|
if self.systemTray.available and settings.contains("visible") and settings.value("visible") == "false": |
|
|
if self.systemTray.available and settings.contains("visible") and settings.value("visible") == "false": |
|
|
self.setVisible(False) |
|
|
self.setVisible(False) |
|
|
else: |
|
|
else: |
|
|
self.setVisible(True) #This is also the default state if there is no config |
|
|
self.setVisible(True) #This is also the default state if there is no config |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SessionController(object): |
|
|
class SessionController(object): |
|
|
"""Controls the StackWidget that contains the Session Tree, Open Session/Client and their |
|
|
"""Controls the StackWidget that contains the Session Tree, Open Session/Client and their |
|
|
quick and easy variants. |
|
|
quick and easy variants. |
|
@ -391,7 +390,7 @@ class SessionController(object): |
|
|
action.setEnabled(state) |
|
|
action.setEnabled(state) |
|
|
|
|
|
|
|
|
if state and not self.openSessionController.clientTabe.clientsTreeWidget.currentItem(): |
|
|
if state and not self.openSessionController.clientTabe.clientsTreeWidget.currentItem(): |
|
|
state = False #we wanted to activate, but there is no client selected. |
|
|
state = False #we wanted to activate, but there is no client selected. |
|
|
for action in self.ui.menuClientNameId.actions(): |
|
|
for action in self.ui.menuClientNameId.actions(): |
|
|
action.setEnabled(state) |
|
|
action.setEnabled(state) |
|
|
|
|
|
|
|
|