def run(self): blogThisContentHandler= ZBlogThisHandler( blogThisData ) doc = blogThisContentHandler.createBlogDocument() editorWindow = getEditorWindow() editorWindow.openDocument(doc) editorWindow.Show(True) editorWindow.Raise()
def runAction(self, actionContext): docIDO = actionContext.getDocumentIDO() docId = docIDO.getId() document = self._getDataStore().getDocument(docId) editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show()
def runAction(self, actionContext): docIDO = actionContext.getDocumentIDO() docId = docIDO.getId() document = self._getDataStore().getDocument(docId) editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show()
def run(self): blogThisContentHandler = ZBlogThisHandler(blogThisData) doc = blogThisContentHandler.createBlogDocument() editorWindow = getEditorWindow() editorWindow.openDocument(doc) editorWindow.Show(True) editorWindow.Raise()
def runAction(self, actionContext): viewSelection = actionContext.getViewSelection() document = ZBlogDocument() pubMetaData = self._createPubMetaData(viewSelection) if pubMetaData: document.addPubMetaData(pubMetaData) editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show()
def runAction(self, actionContext): viewSelection = actionContext.getViewSelection() document = ZBlogDocument() pubMetaData = self._createPubMetaData(viewSelection) if pubMetaData: document.addPubMetaData(pubMetaData) editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show()
def runAction(self, actionContext): docIDO = actionContext.getDocumentIDO() docId = docIDO.getId() document = self._getDataStore().getDocument(docId) document.setId(None) document.setCreationTime(ZSchemaDateTime()) document.setLastModifiedTime(ZSchemaDateTime()) document.setPubMetaDataList([]) document.setBlogInfoList([]) editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show()
def runAction(self, actionContext): docIDO = actionContext.getDocumentIDO() docId = docIDO.getId() document = self._getDataStore().getDocument(docId) document.setId(None) document.setCreationTime(ZSchemaDateTime()) document.setLastModifiedTime(ZSchemaDateTime()) document.setPubMetaDataList([]) document.setBlogInfoList([]) editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show()
def _recoverCrashSnapshots(self): crashRecoveryService = getApplicationModel().getService(IZBlogAppServiceIDs.CRASH_RECOVERY_SERVICE_ID) snapshots = crashRecoveryService.getRecoverySnapshots() if snapshots: title = _extstr(u"startup.RecoverTitle") #$NON-NLS-1$ msg = _extstr(u"startup.RecoverMessage") % len(snapshots) #$NON-NLS-1$ if ZShowYesNoMessage(getApplicationModel().getTopWindow(), msg, title): for document in snapshots: editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show() crashRecoveryService.clearRecoverySnapshot()
def shouldShutdown(self, actionContext): numBgTasks = self._getNumRunningBackgroundTasks(actionContext) if numBgTasks > 0: if not ZShowYesNoMessage( actionContext.getWindow(), _extstr(u"shutdown.CancelRunningTasksMessage") % numBgTasks, _extstr(u"shutdown.CancelRunningTasksTitle"), ): # $NON-NLS-2$ #$NON-NLS-1$ return False editorWindow = getEditorWindow() if editorWindow is not None: return editorWindow.close() return True
def shouldShutdown(self, actionContext): numBgTasks = self._getNumRunningBackgroundTasks(actionContext) if numBgTasks > 0: if not ZShowYesNoMessage( actionContext.getWindow(), _extstr(u"shutdown.CancelRunningTasksMessage") % numBgTasks, _extstr(u"shutdown.CancelRunningTasksTitle" )): #$NON-NLS-2$ #$NON-NLS-1$ return False editorWindow = getEditorWindow() if editorWindow is not None: return editorWindow.close() return True
def _recoverCrashSnapshots(self): crashRecoveryService = getApplicationModel().getService( IZBlogAppServiceIDs.CRASH_RECOVERY_SERVICE_ID) snapshots = crashRecoveryService.getRecoverySnapshots() if snapshots: title = _extstr(u"startup.RecoverTitle") #$NON-NLS-1$ msg = _extstr(u"startup.RecoverMessage") % len( snapshots) #$NON-NLS-1$ if ZShowYesNoMessage(getApplicationModel().getTopWindow(), msg, title): for document in snapshots: editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show() crashRecoveryService.clearRecoverySnapshot()
def runAction(self, actionContext): bgTaskMan = getBackgroundTaskManager() templateMan = getTemplateManager() translationMan = getTranslationManager() editorWindow = getEditorWindow() if bgTaskMan is not None: bgTaskMan.Close() if editorWindow is not None: editorWindow.Close() if templateMan is not None: templateMan.Close() if translationMan is not None: translationMan.Close() self._stopBackgroundTasks(actionContext) self._saveWindowLayout(actionContext)
def runAction(self, actionContext): bgTaskMan = getBackgroundTaskManager() templateMan = getTemplateManager() translationMan = getTranslationManager() editorWindow = getEditorWindow() if bgTaskMan is not None: bgTaskMan.Close() if editorWindow is not None: editorWindow.Close() if templateMan is not None: templateMan.Close() if translationMan is not None: translationMan.Close() self._stopBackgroundTasks(actionContext) self._saveWindowLayout(actionContext)
def runAction(self, actionContext): #@UnusedVariable document = self._createDocument(actionContext) editorWindow = getEditorWindow() editorWindow.openDocument(document) editorWindow.Show()