#NEWLINE# def updateFileHistory( self , url , importToDTS ) : #NEWLINE# #INDENT# key = ( 'importHistory' if importToDTS else 'fileHistory' ) #NEWLINE# fileHistory = self . config . setdefault ( key , [ ] ) #NEWLINE# while ( fileHistory . count ( url ) > 0 ) : #NEWLINE# #INDENT# fileHistory . remove ( url ) #NEWLINE# #UNINDENT# if ( len ( fileHistory ) > 10 ) : #NEWLINE# #INDENT# fileHistory [ 10 : ] = [ ] #NEWLINE# #UNINDENT# fileHistory . insert ( 0 , url ) #NEWLINE# self . config [ key ] = fileHistory #NEWLINE# self . loadFileMenuHistory ( ) #NEWLINE# self . saveConfig ( )