#NEWLINE# def sort_files( self ) : #NEWLINE# #INDENT# open_files = self . open_files #NEWLINE# open_views = [ ] #NEWLINE# open_files . sort ( ) #NEWLINE# for f in open_files : #NEWLINE# #INDENT# f = f [ 0 ] #NEWLINE# for fv in self . open_views : #NEWLINE# #INDENT# if fv . file_name ( ) : #NEWLINE# #INDENT# f = f . replace ( ( ' - ' + os . path . dirname ( fv . file_name ( ) ) ) , '' ) #NEWLINE# if ( ( f == os . path . basename ( fv . file_name ( ) ) ) or ( f == ( os . path . basename ( fv . file_name ( ) ) + self . settings . get ( 'mark_dirty_file_char' ) ) ) ) : #NEWLINE# #INDENT# open_views . append ( fv ) #NEWLINE# self . open_views . remove ( fv ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( fv . name ( ) == f ) or ( ( fv . name ( ) + self . settings . get ( 'mark_dirty_file_char' ) ) == f ) ) : #NEWLINE# #INDENT# open_views . append ( fv ) #NEWLINE# self . open_views . remove ( fv ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( f == 'Untitled' ) and ( not fv . name ( ) ) ) : #NEWLINE# #INDENT# open_views . append ( fv ) #NEWLINE# self . open_views . remove ( open_views ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# self . open_views = open_views