コード例 #1
0
 def _buildLinkMenu(self, gravity):
     parentId = self.addMenu(_extstr(u"blogcontenteditorlinkmenumodel.Link"), gravity) #$NON-NLS-1$
     url = None
     linkMenuBuilder = ZLinkMenuModelBuilder()
     if self.zXHTMLEditControlLinkContext:
         url = linkMenuBuilder.getLinkLocation(self.zXHTMLEditControlLinkContext)            
     linkMenuBuilder.buildLinkMenu(self, parentId, url)
コード例 #2
0
 def buildCopyUrlLocationMenuItems(self, linkContext, imageContext, gravity, parentId, addSeparater):
     linkMenuBuilder = ZLinkMenuModelBuilder()
     imageMenuBuilder = ZImageMenuModelBuilder()
     linkLocation = linkMenuBuilder.getLinkLocation(linkContext)
     imageLocation = imageMenuBuilder.getImageLocation(imageContext)
     if not linkLocation and not imageLocation:
         return
     if addSeparater:
         self.addSeparator(gravity)
         gravity = gravity + 1
     if linkLocation:
         linkMenuBuilder.buildCopyLinkLocationMenuItem(self, gravity, parentId)
     if imageLocation:
         imageMenuBuilder.buildCopyImageLocationMenuItem(self, gravity, parentId)
コード例 #3
0
 def _buildRemoveElemMenuItem(self, gravity):  
     if self.zXHTMLEditControlLinkContext:      
         linkMenuBuilder = ZLinkMenuModelBuilder()
         linkLocation = linkMenuBuilder.getLinkLocation(self.zXHTMLEditControlLinkContext)
         if linkLocation:
             linkMenuBuilder.buildRemoveLinkMenuItem(self, gravity, None)