Exemplo n.º 1
0
 def run(self):
     blogThisContentHandler= ZBlogThisHandler( blogThisData )
     doc = blogThisContentHandler.createBlogDocument()
     editorWindow = getEditorWindow()
     editorWindow.openDocument(doc)
     editorWindow.Show(True)
     editorWindow.Raise()
Exemplo n.º 2
0
 def runAction(self, actionContext):
     docIDO = actionContext.getDocumentIDO()
     docId = docIDO.getId()
     document = self._getDataStore().getDocument(docId)
     editorWindow = getEditorWindow()
     editorWindow.openDocument(document)
     editorWindow.Show()
Exemplo n.º 3
0
 def runAction(self, actionContext):
     docIDO = actionContext.getDocumentIDO()
     docId = docIDO.getId()
     document = self._getDataStore().getDocument(docId)
     editorWindow = getEditorWindow()
     editorWindow.openDocument(document)
     editorWindow.Show()
Exemplo n.º 4
0
 def run(self):
     blogThisContentHandler = ZBlogThisHandler(blogThisData)
     doc = blogThisContentHandler.createBlogDocument()
     editorWindow = getEditorWindow()
     editorWindow.openDocument(doc)
     editorWindow.Show(True)
     editorWindow.Raise()
Exemplo n.º 5
0
    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()
Exemplo n.º 7
0
 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()
Exemplo n.º 8
0
 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()
Exemplo n.º 9
0
 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()
Exemplo n.º 10
0
 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
Exemplo n.º 11
0
 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
Exemplo n.º 12
0
 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()
Exemplo n.º 13
0
    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)
Exemplo n.º 14
0
    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)
Exemplo n.º 15
0
 def runAction(self, actionContext): #@UnusedVariable
     document = self._createDocument(actionContext)
     editorWindow = getEditorWindow()
     editorWindow.openDocument(document)
     editorWindow.Show()