Ejemplo n.º 1
0
    def __init__(self):
        
        # Get Menu
        menu = MenuCache(AUTO_UPDATE=False, tag="openbox_pipe_menu", cache_dir = "openbox",  file_name = "openbox-xdg-menu-cache.xml")
        self.appsmenu = menu.getMenu()

        #update cache in the background
        t = threading.Thread(target=menu.updateCache())  
        t.start() 
Ejemplo n.º 2
0
    def __init__(self):

        # Get Menu
        menu = MenuCache(AUTO_UPDATE=False,
                         tag="openbox_pipe_menu",
                         cache_dir="openbox",
                         file_name="openbox-xdg-menu-cache.xml")
        self.appsmenu = menu.getMenu()

        #update cache in the background
        t = threading.Thread(target=menu.updateCache())
        t.start()
Ejemplo n.º 3
0
    def __init__(self, mainbox, launcher):
        self.window = launcher.window
        self.window.set_skip_taskbar_hint(True)
        self.window.connect("key-press-event", self.on_keypress)
        self.window.stick()
        self.mainbox = mainbox
        self.cur_page = 1
        self.cur_category = "ALL"
        # Get Menu
        menu = MenuCache(AUTO_UPDATE=False)
        self.appsmenu = menu.getMenu()

        #update cache in the background
        t = threading.Thread(target=menu.updateCache())  
        t.start() 

        # Get Categories
        categories = self.getCategories()
        
        
        # Create containers
        self.mainContainer = gtk.HBox(False, 0)
        self.buttonsContainer = gtk.VBox(False)

        # Get maxcolums and max rows
        self.maxcolums = self.calculate_maxcolums()
        self.maxrows = self.calculate_maxrows()
        
        # Get system font size
        self.font_style = self.buttonsContainer.get_style().font_desc.to_string()
        self.fontsize = int(re.search(r"(\d+)", self.font_style).group(1))        
        # Pack in the button container box into main container box, with two padder boxes
        self.mainContainer.pack_start(gtk.HBox(), True, True)
        self.mainContainer.pack_start(self.buttonsContainer, False, True, 0)
        self.mainContainer.pack_start(gtk.HBox(), True, True)

        #add toolbar
        self.add_toolbar(mainbox, categories, launcher)
        
        #add main container to main box
        mainbox.pack_start(self.mainContainer)

        self.load("ALL")
        self.search.connect("key-release-event", self.activate_search)
        self.window.add(mainbox)
        self.window.maximize() # HOT FIX