def setTitle(self, shortTitle): LayeredControlPresenter.setTitle(self, shortTitle) # Shorten title if too long maxLen = self.getConfig().getint("main", "tabs_maxCharacters", 0) if maxLen > 0 and len(shortTitle) > maxLen: shortTitle = shortTitle[:(maxLen//2)] + u"..." + \ shortTitle[-((maxLen+1)//2):] self.fireMiscEventProps({"changed presenter title": True, "title": shortTitle})
def __init__(self, mainControl): LayeredControlPresenter.__init__(self) self.mainControl = mainControl self.docPage = None self.currentDocPageProxyEvent = ProxyMiscEvent(self) self.currentDocPageProxyEvent.addListener(self) # Connect page history self.pageHistory = PageHistory(self.getMainControl(), self) self.getMainControl().getMiscEvent().addListener(self)
def close(self): LayeredControlPresenter.close(self) self.getMainControl().getMiscEvent().removeListener(self) self.pageHistory.close() self.setDocPage(None) # TODO: Was commented out?