#NEWLINE# def selection_toggled( self , widget , window ) : #NEWLINE# #INDENT# if widget . get_active ( ) : #NEWLINE# #INDENT# self . have_selection = window . selection_owner_set ( 'PRIMARY' ) #NEWLINE# if ( not self . have_selection ) : #NEWLINE# #INDENT# widget . set_active ( False ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if self . have_selection : #NEWLINE# #INDENT# self . have_selection = False #NEWLINE# #UNINDENT# #UNINDENT# return