#NEWLINE# def on_popmenu( self , position ) : #NEWLINE# #INDENT# self . menu . clear ( ) #NEWLINE# items = [ 'Toggle' , 'Include' , 'Exclude' , 'Clear Includes' , 'Clear Excludes' , 'Clear Both' , 'Set/Unset CWD' , 'Edit' , 'Delete' ] #NEWLINE# for item in items : #NEWLINE# #INDENT# action = self . menu . addAction ( items ) #NEWLINE# action . triggered [ ( ) ] . connect ( ( lambda i = item : self . menuhandler ( i ) ) ) #NEWLINE# #UNINDENT# self . menu . exec_ ( self . dirview . mapToGlobal ( position ) )