def build_gui(self, container):
        """This method is called when the plugin is invoked.  It builds the
        GUI used by the plugin into the widget layout passed as
        ``container``.

        This method could be called several times if the plugin is opened
        and closed.

        """
        vbox, sw, self.orientation = Widgets.get_oriented_box(container)
        vbox.set_border_width(4)
        vbox.set_spacing(2)

        # create the Treeview
        always_expand = self.settings.get('always_expand', True)
        color_alternate = self.settings.get('color_alternate_rows', True)
        treeview = Widgets.TreeView(auto_expand=always_expand,
                                    sortable=True,
                                    use_alt_row_color=color_alternate)
        self.treeview = treeview
        treeview.setup_table(self.columns, 3, 'MODIFIED')
        treeview.set_column_width(0, self.settings.get('ts_colwidth', 250))
        treeview.add_callback('selected', self.show_more)
        vbox.add_widget(treeview, stretch=1)

        fr = Widgets.Frame('Selected History')

        captions = (('Channel:', 'label', 'chname', 'llabel'),
                    ('Image:', 'label', 'imname', 'llabel'),
                    ('Timestamp:', 'label', 'modified', 'llabel'))
        w, b = Widgets.build_info(captions)
        self.w.update(b)

        b.chname.set_text('')
        b.chname.set_tooltip('Channel name')

        b.imname.set_text('')
        b.imname.set_tooltip('Image name')

        b.modified.set_text('')
        b.modified.set_tooltip('Timestamp (UTC)')

        captions = (('Description:-', 'llabel'), ('descrip', 'textarea'))
        w2, b = Widgets.build_info(captions)
        self.w.update(b)

        b.descrip.set_editable(False)
        b.descrip.set_wrap(True)
        b.descrip.set_text('')
        b.descrip.set_tooltip('Displays selected history entry')

        vbox2 = Widgets.VBox()
        vbox2.set_border_width(4)
        vbox2.add_widget(w)
        vbox2.add_widget(w2)

        fr.set_widget(vbox2, stretch=0)
        vbox.add_widget(fr, stretch=0)

        container.add_widget(vbox, stretch=1)

        btns = Widgets.HBox()
        btns.set_spacing(3)

        btn = Widgets.Button('Close')
        btn.add_callback('activated', lambda w: self.close())
        btns.add_widget(btn, stretch=0)
        btn = Widgets.Button("Help")
        btn.add_callback('activated', lambda w: self.help())
        btns.add_widget(btn, stretch=0)
        btns.add_widget(Widgets.Label(''), stretch=1)

        container.add_widget(btns, stretch=0)

        self.gui_up = True
def build_gui ( self , container ) : vbox , sw , self . orientation = Widgets . get_oriented_box ( container ) vbox . set_border_width ( 4 ) vbox . set_spacing ( 2 ) always_expand = self . settings . get ( 'always_expand' , True ) color_alternate = self . settings . get ( 'color_alternate_rows' , True ) treeview = Widgets . TreeView ( auto_expand = always_expand , sortable = True , use_alt_row_color = color_alternate ) self . treeview = treeview treeview . setup_table ( self . columns , 3 , 'MODIFIED' ) treeview . set_column_width ( 0 , self . settings . get ( 'ts_colwidth' , 250 ) ) treeview . add_callback ( 'selected' , self . show_more ) vbox . add_widget ( treeview , stretch = 1 ) fr = Widgets . Frame ( 'Selected History' ) captions = ( ( 'Channel:' , 'label' , 'chname' , 'llabel' ) , ( 'Image:' , 'label' , 'imname' , 'llabel' ) , ( 'Timestamp:' , 'label' , 'modified' , 'llabel' ) ) w , b = Widgets . build_info ( captions ) self . w . update ( b ) b . chname . set_text ( '' ) b . chname . set_tooltip ( 'Channel name' ) b . imname . set_text ( '' ) b . imname . set_tooltip ( 'Image name' ) b . modified . set_text ( '' ) b . modified . set_tooltip ( 'Timestamp (UTC)' ) captions = ( ( 'Description:-' , 'llabel' ) , ( 'descrip' , 'textarea' ) ) w2 , b = Widgets . build_info ( captions ) self . w . update ( b ) b . descrip . set_editable ( False ) b . descrip . set_wrap ( True ) b . descrip . set_text ( '' ) b . descrip . set_tooltip ( 'Displays selected history entry' ) vbox2 = Widgets . VBox ( ) vbox2 . set_border_width ( 4 ) vbox2 . add_widget ( w ) vbox2 . add_widget ( w2 ) fr . set_widget ( vbox2 , stretch = 0 ) vbox . add_widget ( fr , stretch = 0 ) container . add_widget ( vbox , stretch = 1 ) btns = Widgets . HBox ( ) btns . set_spacing ( 3 ) btn = Widgets . Button ( 'Close' ) btn . add_callback ( 'activated' , lambda w : self . close ( ) ) btns . add_widget ( btn , stretch = 0 ) btn = Widgets . Button ( "Help" ) btn . add_callback ( 'activated' , lambda w : self . help ( ) ) btns . add_widget ( btn , stretch = 0 ) btns . add_widget ( Widgets . Label ( '' ) , stretch = 1 ) container . add_widget ( btns , stretch = 0 ) self . gui_up = True
This method is called when the plugin is invoked.  It builds the
        GUI used by the plugin into the widget layout passed as
        ``container``.

        This method could be called several times if the plugin is opened
        and closed.