#NEWLINE# def link( self , clone ) : #NEWLINE# #INDENT# '\n        Links the clone with its original. We copy the file manager infos\n        (path, mimetype, ...) and setup the clone text document as reference\n        to our text document.\n\n        :param clone: clone to link.\n        ' #NEWLINE# clone . file . _path = self . file . path #NEWLINE# clone . file . _encoding = clone . file . encoding #NEWLINE# clone . file . _mimetype = self . file . mimetype #NEWLINE# clone . setDocument ( self . document ( ) ) #NEWLINE# for ( original_mode , mode ) in zip ( list ( self . modes ) , list ( clone . modes ) ) : #NEWLINE# #INDENT# mode . enabled = original_mode . enabled #NEWLINE# mode . clone_settings ( original_mode ) #NEWLINE# #UNINDENT# for ( original_panel , panel ) in zip ( list ( self . panels ) , list ( clone . panels ) ) : #NEWLINE# #INDENT# panel . enabled = original_panel . isEnabled ( ) #NEWLINE# panel . clone_settings ( original_panel ) #NEWLINE# if ( not original_panel . isVisible ( ) ) : #NEWLINE# #INDENT# panel . setVisible ( False ) #NEWLINE# #UNINDENT# #UNINDENT# clone . use_spaces_instead_of_tabs = self . use_spaces_instead_of_tabs #NEWLINE# clone . tab_length = self . tab_length #NEWLINE# clone . save_on_focus_out = self . save_on_focus_out #NEWLINE# clone . show_whitespaces = self . show_whitespaces #NEWLINE# clone . font_name = self . font_name #NEWLINE# clone . font_size = self . font_size #NEWLINE# clone . zoom_level = self . zoom_level #NEWLINE# clone . background = self . background #NEWLINE# clone . foreground = self . foreground #NEWLINE# clone . whitespaces_foreground = self . whitespaces_foreground #NEWLINE# clone . selection_background = self . selection_background #NEWLINE# clone . selection_foreground = self . selection_foreground #NEWLINE# clone . word_separators = self . word_separators #NEWLINE# clone . file . clone_settings ( self . file )