#NEWLINE# def build_gui( self , container ) : #NEWLINE# #INDENT# vbox = Widgets . VBox ( ) #NEWLINE# vbox . set_margins ( 2 , 2 , 2 , 2 ) #NEWLINE# color_alternate = self . settings . get ( 'color_alternate_rows' , True ) #NEWLINE# table = Widgets . TreeView ( sortable = True , selection = 'multiple' , use_alt_row_color = color_alternate , dragable = True ) #NEWLINE# table . add_callback ( 'activated' , self . item_dblclicked_cb ) #NEWLINE# table . add_callback ( 'drag-start' , self . item_drag_cb ) #NEWLINE# col = 0 #NEWLINE# self . _name_idx = 0 #NEWLINE# for ( hdr , attrname ) in self . columns : #NEWLINE# #INDENT# if ( attrname == 'name' ) : #NEWLINE# #INDENT# self . _name_idx = col #NEWLINE# #UNINDENT# col += 1 #NEWLINE# #UNINDENT# table . setup_table ( self . columns , 1 , 'name' ) #NEWLINE# vbox . add_widget ( table , stretch = 1 ) #NEWLINE# self . treeview = table #NEWLINE# self . entry = Widgets . TextEntry ( ) #NEWLINE# vbox . add_widget ( self . entry , stretch = 0 ) #NEWLINE# self . entry . add_callback ( 'activated' , self . browse_cb ) #NEWLINE# hbox = Widgets . HBox ( ) #NEWLINE# btn = Widgets . Button ( 'Load' ) #NEWLINE# btn . add_callback ( 'activated' , ( lambda w : self . load_cb ( ) ) ) #NEWLINE# hbox . add_widget ( btn , stretch = 0 ) #NEWLINE# btn = Widgets . Button ( 'Save Image As' ) #NEWLINE# hbox . add_widget ( table , stretch = 0 ) #NEWLINE# self . entry2 = Widgets . TextEntry ( ) #NEWLINE# hbox . add_widget ( self . entry2 , stretch = 1 ) #NEWLINE# vbox . add_widget ( hbox , stretch = 0 ) #NEWLINE# self . entry2 . add_callback ( 'activated' , self . save_as_cb ) #NEWLINE# btn . add_callback ( 'activated' , ( lambda w : self . save_as_cb ( ) ) ) #NEWLINE# btns = Widgets . HBox ( ) #NEWLINE# btns . set_spacing ( 3 ) #NEWLINE# btn = Widgets . Button ( 'Close' ) #NEWLINE# btn . add_callback ( 'activated' , ( lambda w : self . close ( ) ) ) #NEWLINE# btns . add_widget ( btn , stretch = 0 ) #NEWLINE# btn = Widgets . Button ( 'Refresh' ) #NEWLINE# btn . add_callback ( 'activated' , ( lambda w : self . refresh ( ) ) ) #NEWLINE# btns . add_widget ( btn , stretch = 0 ) #NEWLINE# btn = Widgets . Button ( 'Make Thumbs' ) #NEWLINE# btn . add_callback ( 'activated' , ( lambda w : self . make_thumbs ( ) ) ) #NEWLINE# btns . add_widget ( btn , stretch = 0 ) #NEWLINE# vbox . add_widget ( btns , stretch = 0 ) #NEWLINE# container . add_widget ( vbox , stretch = 1 )