#NEWLINE# def close_current( self , force = False ) : #NEWLINE# #INDENT# ' Closes the currently selected tab:\n        ' #NEWLINE# widget = self . control . currentWidget ( ) #NEWLINE# for i in xrange ( len ( self . _uis ) ) : #NEWLINE# #INDENT# ( page , ui , _ , _ ) = self . _uis [ i ] #NEWLINE# if ( _ is widget ) : #NEWLINE# #INDENT# if ( force or ui . handler . close ( ui . info , True ) ) : #NEWLINE# #INDENT# del self . value [ i ] #NEWLINE# #UNINDENT# break #NEWLINE# #UNINDENT# #UNINDENT# if self . factory . show_notebook_menu : #NEWLINE# #INDENT# for ( name , tmp ) in self . _pagewidgets . items ( ) : #NEWLINE# #INDENT# if ( tmp is widget ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# action = self . _action_dict [ name ] #NEWLINE# self . _context_menu . removeAction ( action ) #NEWLINE# del self . _action_dict [ name ] #NEWLINE# del self . _pagewidgets [ name ] #NEWLINE# #UNINDENT# return