#NEWLINE# def loadTreeView( self , openType , title , colHeader ) : #NEWLINE# #INDENT# self . title ( title ) #NEWLINE# self . openType = openType #NEWLINE# selectedNode = None #NEWLINE# for previousNode in self . treeView . get_children ( '' ) : #NEWLINE# #INDENT# self . treeView . delete ( previousNode ) #NEWLINE# #UNINDENT# if ( openType in ( ARCHIVE , DISCLOSURE_SYSTEM , PLUGIN ) ) : #NEWLINE# #INDENT# if ( openType == PLUGIN ) : #NEWLINE# #INDENT# width = 770 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# width = 500 #NEWLINE# #UNINDENT# self . treeView . column ( '#0' , width = width , anchor = 'w' ) #NEWLINE# self . treeView . heading ( '#0' , text = colHeader ) #NEWLINE# self . isRss = getattr ( self . filesource , 'isRss' , False ) #NEWLINE# if self . isRss : #NEWLINE# #INDENT# self . treeView . column ( '#0' , width = 350 , anchor = 'w' ) #NEWLINE# self . treeView [ 'columns' ] = ( 'descr' , 'date' , 'instDoc' ) #NEWLINE# self . treeView . column ( 'descr' , width = 50 , anchor = 'center' , stretch = False ) #NEWLINE# self . treeView . heading ( 'descr' , text = 'Form' ) #NEWLINE# self . treeView . column ( 'date' , width = 170 , anchor = 'w' , stretch = False ) #NEWLINE# self . treeView . heading ( 'date' , text = 'Pub Date' ) #NEWLINE# self . treeView . column ( 'instDoc' , width = 200 , anchor = 'w' , stretch = False ) #NEWLINE# self . treeView . heading ( 'instDoc' , text = 'Instance Document' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( openType == PLUGIN ) : #NEWLINE# #INDENT# self . treeView . column ( '#0' , width = 150 , anchor = 'w' ) #NEWLINE# self . treeView [ 'columns' ] = ( 'name' , 'vers' , 'descr' , 'license' ) #NEWLINE# self . treeView . column ( 'name' , width = 150 , anchor = 'w' , stretch = False ) #NEWLINE# self . treeView . heading ( 'name' , text = 'Name' ) #NEWLINE# self . treeView . column ( 'vers' , width = 60 , anchor = 'w' , stretch = False ) #NEWLINE# self . treeView . heading ( 'vers' , text = 'Version' ) #NEWLINE# self . treeView . column ( 'descr' , width = 300 , anchor = 'w' , stretch = False ) #NEWLINE# self . treeView . heading ( 'descr' , text = 'Description' ) #NEWLINE# self . treeView . column ( 'license' , width = 60 , anchor = 'w' , stretch = False ) #NEWLINE# self . treeView . heading ( 'license' , text = 'License' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . treeView [ 'columns' ] = tuple ( ) #NEWLINE# #UNINDENT# #UNINDENT# loadedPaths = [ ] #NEWLINE# for ( i , filename ) in enumerate ( self . filenames ) : #NEWLINE# #INDENT# if isinstance ( filename , tuple ) : #NEWLINE# #INDENT# if self . isRss : #NEWLINE# #INDENT# ( form , date , instDoc ) = filename [ 2 : 5 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( openType == PLUGIN ) : #NEWLINE# #INDENT# ( name , vers , descr , license ) = filename [ 3 : 7 ] #NEWLINE# #UNINDENT# #UNINDENT# filename = filename [ 0 ] #NEWLINE# self . hasToolTip = True #NEWLINE# #UNINDENT# if filename . endswith ( '/' ) : #NEWLINE# #INDENT# filename = filename [ : ( - 1 ) ] #NEWLINE# #UNINDENT# path = filename . split ( '/' ) #NEWLINE# if ( ( not self . isRss ) and ( len ( path ) > 1 ) and ( path [ : ( - 1 ) ] in loadedPaths ) ) : #NEWLINE# #INDENT# parent = 'file{0}' . format ( loadedPaths . index ( path [ : ( - 1 ) ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# parent = '' #NEWLINE# #UNINDENT# node = self . treeView . insert ( parent , 'end' , 'file{0}' . format ( i ) , text = path [ ( - 1 ) ] ) #NEWLINE# if self . isRss : #NEWLINE# #INDENT# self . treeView . set ( node , 'descr' , form ) #NEWLINE# self . treeView . set ( node , 'date' , date ) #NEWLINE# self . treeView . set ( node , 'instDoc' , os . path . basename ( instDoc ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( openType == PLUGIN ) : #NEWLINE# #INDENT# self . treeView . set ( node , 'name' , name ) #NEWLINE# self . treeView . set ( node , 'vers' , vers ) #NEWLINE# self . treeView . set ( node , 'descr' , descr ) #NEWLINE# self . treeView . set ( node , 'license' , license ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self . selection == filename ) : #NEWLINE# #INDENT# selectedNode = node #NEWLINE# #UNINDENT# loadedPaths . append ( path ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( openType == ENTRY_POINTS ) : #NEWLINE# #INDENT# self . treeView . column ( '#0' , width = 150 , anchor = 'w' ) #NEWLINE# self . treeView . heading ( '#0' , text = 'Name' ) #NEWLINE# self . treeView [ 'columns' ] = ( 'url' , ) #NEWLINE# self . treeView . column ( 'url' , width = 350 , anchor = 'w' ) #NEWLINE# self . treeView . heading ( 'url' , text = 'URL' ) #NEWLINE# for ( name , urls ) in self . taxonomyPackage [ 'nameToUrls' ] . items ( ) : #NEWLINE# #INDENT# displayUrl = urls [ 1 ] #NEWLINE# self . treeView . insert ( '' , 'end' , name , values = [ displayUrl ] , text = name ) #NEWLINE# #UNINDENT# self . hasToolTip = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# if selectedNode : #NEWLINE# #INDENT# self . treeView . see ( selectedNode ) #NEWLINE# self . treeView . selection_set ( selectedNode ) #NEWLINE# #UNINDENT# if self . showAltViewButton : #NEWLINE# #INDENT# self . altViewButton . config ( text = ( _ ( 'Show Files' ) if ( openType == ENTRY_POINTS ) else _ ( 'Show Entries' ) ) )