Beispiel #1
0
 def show_default_page(self):
     if self.default_widget != None and len(self.tab_items) == 0:
         container_remove_all(self.tab_content_box)
         self.tab_content_box.add(self.default_widget)
         self.tab_title_box.queue_draw()
         self.tab_content_box.queue_draw()
         
         self.show_all()
Beispiel #2
0
 def set_item_widget(self, item):
     if isinstance(item, PreferenceItem):
         container_remove_all(self.right_box)
         self.right_box.pack_start(item.item_widget)
         self.category_bar.select_items([item])
         
         return True
     else:
         return False
Beispiel #3
0
    def set_item_widget(self, item):
        if isinstance(item, PreferenceItem):
            container_remove_all(self.right_box)
            self.right_box.pack_start(item.item_widget)
            self.category_bar.select_items([item])

            return True
        else:
            return False
Beispiel #4
0
    def show_default_page(self):
        '''
        Show default page.
        '''
        if self.default_widget != None and len(self.tab_items) == 0:
            container_remove_all(self.tab_content_box)
            self.tab_content_box.add(self.default_widget)
            self.tab_title_box.queue_draw()
            self.tab_content_box.queue_draw()

            self.show_all()
Beispiel #5
0
    def set_buttons(self, buttons):
        '''
        Set buttons in box.

        @note: This function will use new buttons B{instead} old buttons in button box.
        
        @param buttons: A list of Gtk.Widget instance.
        '''
        container_remove_all(self.button_box)
        for button in buttons:
            self.button_box.pack_start(button, False, False, 4)
Beispiel #6
0
    def set_buttons(self, buttons):
        '''
        Set buttons in box.

        @note: This function will use new buttons B{instead} old buttons in button box.

        @param buttons: A list of Gtk.Widget instance.
        '''
        container_remove_all(self.button_box)
        for button in buttons:
            self.button_box.pack_start(button, False, False, 4)
Beispiel #7
0
 def switch_content(self, index):
     '''Switch content.'''
     if self.tab_index != index:
         self.tab_index = index
         widget = self.tab_items[index][1]
             
         container_remove_all(self.tab_content_box)
         self.tab_content_box.add(widget)
         self.tab_title_box.queue_draw()
         self.tab_content_box.queue_draw()
         
         self.show_all()
Beispiel #8
0
    def switch_content(self, index):
        '''
        Switch content with given index.

        @param index: Tab index.
        '''
        if self.tab_index != index and len(self.tab_items):
            self.tab_index = index
            widget = self.tab_items[index][1]

            container_remove_all(self.tab_content_box)
            self.tab_content_box.add(widget)
            self.tab_title_box.queue_draw()
            self.tab_content_box.queue_draw()

            self.show_all()
Beispiel #9
0
    def switch_content(self, index):
        '''
        Switch content with given index.

        @param index: Tab index.
        '''
        if self.tab_index != index and len(self.tab_items):
            self.tab_index = index
            widget = self.tab_items[index][1]
                
            container_remove_all(self.tab_content_box)
            self.tab_content_box.add(widget)
            self.tab_title_box.queue_draw()
            self.tab_content_box.queue_draw()
            
            self.show_all()
Beispiel #10
0
 def hide_titlebar(self):
     """
     Hide the title bar.
     """
     container_remove_all(self.titlebar_box)
Beispiel #11
0
 def hide_titlebar(self):
     '''
     Hide the title bar.
     '''
     container_remove_all(self.titlebar_box)
Beispiel #12
0
 def hide_titlebar(self):
     '''
     Hide the title bar.
     '''
     container_remove_all(self.titlebar_box)
Beispiel #13
0
 def set_buttons(self, buttons):
     '''Add buttons.'''
     container_remove_all(self.button_box)
     for button in buttons:
         self.button_box.pack_start(button, False, False, 4)