def updateVisibility(): """ actually update and save the log window visibility """ global visible # save the visibility config.save(visible, 'logWindowVisibility') logger.debug(f'saved window visibility') if visible: logWindow.instance.ShowWithEffect(wx.SHOW_EFFECT_BLEND) logWindow.instance.Raise() wx.GetTopLevelWindows()[0].Raise() else: logWindow.instance.HideWithEffect(wx.SHOW_EFFECT_BLEND)
def __init__(self, wxDest=None): logger.debug(f'initialised log handler with level NOTSET') super().__init__(logging.NOTSET) self.setLevel(logging.NOTSET)
def OnMoveEnd(self, evt: wx.Event): # get the window position as wx.Point and convert it to list pos = list(self.GetPosition().Get()) logger.debug(f'saved logwindow position: {pos}') config.save(pos, 'logWindowPos')
def OnClose(evt: wx.CloseEvent): logger.debug(f'hidden log window') toggleVisibility()