#NEWLINE# def remove_action( self , action , sub_menu = 'Advanced' ) : #NEWLINE# #INDENT# "\n        Removes an action/separator from the editor's context menu.\n\n        :param action: Action/seprator to remove.\n        :param advanced: True to remove the action from the advanced submenu.\n        " #NEWLINE# if sub_menu : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# mnu = self . _sub_menus [ sub_menu ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# mnu . removeAction ( action ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . _actions . remove ( action ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# self . removeAction ( action )