Exemplo n.º 1
0
 def onDetectImport(self):
     osutil = getOSUtil()
     if osutil.getOperatingSystemId() == u"win32": #$NON-NLS-1$
         action = ZDetectImportAction(self, self.model)
         context = ZMenuActionContext(self)
         action.runAction(context)
         pass
Exemplo n.º 2
0
 def onImportProfile(self, event):
     context = ZMenuActionContext(self)
     menu = ZModelBasedMenu(self.importMenuModel, context, self)
     (w, h) = self.importButton.GetSizeTuple() #@UnusedVariable
     pos = wx.Point(1, h - 2)
     self.importButton.PopupMenu(menu, pos)
     event.Skip()
Exemplo n.º 3
0
 def _popupGlyphMenu(self, menuNode, glyph):
     context = ZMenuActionContext(self)
     provider = ZActiveModelBasedMenuContentProvider(menuNode, context)
     handler = ZActiveModelBasedMenuEventHandler(context)
     menu = ZMenu(self, menuNode, provider, handler)
     (x, y) = glyph.GetPositionTuple()  #@UnusedVariable
     (w, h) = glyph.GetSizeTuple()  #@UnusedVariable
     self.PopupMenuXY(menu, x, y + h - 1)
Exemplo n.º 4
0
 def _createMenuBar(self):
     # FIXME (EPW) this should be supplied by the perspective
     menuContext = ZMenuActionContext(self)
     menuBarModel = ZBlogAppMainMenuBarModel(self.perspectives)
     provider = ZModelBasedMenuContentProvider(menuBarModel, menuContext)
     eventHandler = ZModelBasedMenuEventHandler(menuBarModel, menuContext)
     self.menuBar = ZMenuBar(self, provider, eventHandler)
     self.SetMenuBar(self.menuBar)
Exemplo n.º 5
0
 def _createChoiceMenu(self):
     menuModel = self._createChoiceMenuModel()
     menuContext = ZMenuActionContext(self)
     contentProvider = ZModelBasedMenuContentProvider(
         menuModel, menuContext)
     eventHandler = ZModelBasedMenuEventHandler(menuModel, menuContext)
     self.menu = ZMenu(self, menuModel.getRootNode(), contentProvider,
                       eventHandler)
Exemplo n.º 6
0
    def __init__(self, window, template):
        self.template = template

        ZMenuActionContext.__init__(self, window)
Exemplo n.º 7
0
 def getMenuActionContext(self):
     return ZMenuActionContext(self)
Exemplo n.º 8
0
 def _createActionContext(self):
     return ZMenuActionContext(self.dialog)
Exemplo n.º 9
0
 def __init__(self, window):
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 10
0
 def __init__(self, window, mediaStore, model):
     self.window = window
     self.mediaStore = mediaStore
     self.model = model
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 11
0
 def onSettings(self):
     context = ZMenuActionContext(self)
     self.settingsAction.runAction(context)
Exemplo n.º 12
0
 def onCreateAccount(self):
     context = ZMenuActionContext(self)
     self.newAccountAction.runAction(context)
Exemplo n.º 13
0
 def onDoubleClick(self, event):
     if self.mainWindow.IsIconized():
         menuContext = ZMenuActionContext(self.mainWindow)
         self.restoreAction.runAction(menuContext)
     event.Skip()
Exemplo n.º 14
0
 def __init__(self, window, url):
     self.url = url
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 15
0
 def _createActionContext(self):
     return ZMenuActionContext(getApplicationModel().getTopWindow())
Exemplo n.º 16
0
 def __init__(self, window):
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 17
0
    def __init__(self, window, translation):
        self.translation = translation

        ZMenuActionContext.__init__(self, window)
Exemplo n.º 18
0
 def __init__(self, window, account):
     self.account = account
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 19
0
 def __init__(self, window, blog):
     self.blog = blog
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 20
0
 def __init__(self, editor):
     self.editor = editor
     ZMenuActionContext.__init__(self, editor)
Exemplo n.º 21
0
 def onWritePost(self):
     context = ZMenuActionContext(self)
     self.writePostAction.runAction(context)
Exemplo n.º 22
0
    def __init__(self, window, translation):
        self.translation = translation

        ZMenuActionContext.__init__(self, window)
Exemplo n.º 23
0
 def _createMenuContext(self):
     return ZMenuActionContext(self.tab)
Exemplo n.º 24
0
 def CreatePopupMenu(self):
     menuContext = ZMenuActionContext(self.mainWindow)
     provider = ZModelBasedMenuContentProvider(self.menuModel, menuContext)
     handler = ZModelBasedMenuEventHandler(self.menuModel, menuContext)
     return ZMenu(self, self.menuModel.getRootNode(), provider, handler)
Exemplo n.º 25
0
 def __init__(self, editor):
     self.editor = editor
     ZMenuActionContext.__init__(self, editor)
Exemplo n.º 26
0
 def onNewMediaStorage(self):
     context = ZMenuActionContext(self)
     self.newStorageAction.runAction(context)
Exemplo n.º 27
0
 def __init__(self, window, documentIDO, blogId=None):
     self.documentIDO = documentIDO
     self.blogId = blogId
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 28
0
 def __init__(self, window, mediaStore, model):
     self.window = window
     self.mediaStore = mediaStore
     self.model = model
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 29
0
 def __init__(self, window, url):
     self.url = url
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 30
0
 def __init__(self, window, account):
     self.account = account
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 31
0
 def __init__(self, window, documentIDO, blogId = None):
     self.documentIDO = documentIDO
     self.blogId = blogId
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 32
0
 def __init__(self, window, imageUrl):
     self.imageUrl = imageUrl
     ZMenuActionContext.__init__(self, window)
Exemplo n.º 33
0
 def __init__(self, window, blog):
     self.blog = blog
     ZMenuActionContext.__init__(self, window)