コード例 #1
0
ファイル: tab_window.py プロジェクト: liuhuan520/deepin-ui
 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()
コード例 #2
0
ファイル: dialog.py プロジェクト: Jiarui315/deepin-ui
 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
コード例 #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
コード例 #4
0
ファイル: tab_window.py プロジェクト: masums/deepin-ui
    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()
コード例 #5
0
ファイル: dialog.py プロジェクト: Jiarui315/deepin-ui
    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)
コード例 #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)
コード例 #7
0
ファイル: tab_window.py プロジェクト: netphi/deepin-ui
 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()
コード例 #8
0
ファイル: tab_window.py プロジェクト: masums/deepin-ui
    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()
コード例 #9
0
ファイル: tab_window.py プロジェクト: Jiarui315/deepin-ui
    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()
コード例 #10
0
ファイル: application.py プロジェクト: liuhuan520/deepin-ui
 def hide_titlebar(self):
     """
     Hide the title bar.
     """
     container_remove_all(self.titlebar_box)
コード例 #11
0
ファイル: application.py プロジェクト: chenzhiwei/deepin-ui
 def hide_titlebar(self):
     '''
     Hide the title bar.
     '''
     container_remove_all(self.titlebar_box)
コード例 #12
0
 def hide_titlebar(self):
     '''
     Hide the title bar.
     '''
     container_remove_all(self.titlebar_box)
コード例 #13
0
ファイル: dialog.py プロジェクト: netphi/deepin-ui
 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)