Пример #1
0
    def __init__(self, standalone=False, filename=None):
        menu = Menu.parse(filename)

        if standalone:
            self.contents = "[begin] (Fluxbox)"
            self.contents.extend(self.menu(menu, depth=1))
            self.comtents.append("[end]")
        else:
            self.contents = self.menu(menu)
Пример #2
0
    def createMenu(self, parent, name, genericname=None, comment=None, icon=None, after=None, before=None):
        menu = Menu()

        menu.Parent = parent
        menu.Depth = parent.Depth + 1
        menu.Layout = parent.DefaultLayout
        menu.DefaultLayout = parent.DefaultLayout

        menu = self.editMenu(menu, name, genericname, comment, icon)

        self.__addEntry(parent, menu, after, before)

        sort(self.menu)

        return menu
Пример #3
0
 def __init__(self, filename=None):
     if filename:
         self._node = Menu.parse(filename)
     else:
         self._node = None
Пример #4
0
 def __init__(self, filename=None):
     if filename:
         self._node = Menu.parse(filename)
     else:
         self._node = None