#NEWLINE# def __init__( self , plug , labelsAndValues , parenting = None ) : #NEWLINE# #INDENT# self . __selectionMenu = GafferUI . MultiSelectionMenu ( allowMultipleSelection = False , allowEmptySelection = False ) #NEWLINE# GafferUI . PlugValueWidget . __init__ ( self , self . __selectionMenu , plug , parenting = parenting ) #NEWLINE# self . __labelsAndValues = labelsAndValues #NEWLINE# for ( label , value ) in self . __labelsAndValues : #NEWLINE# #INDENT# self . __selectionMenu . append ( label ) #NEWLINE# #UNINDENT# self . __selectionChangedConnection = self . __selectionMenu . selectionChangedSignal ( ) . connect ( Gaffer . WeakMethod ( self . __selectionChanged ) ) #NEWLINE# self . _addPopupMenu ( self . __selectionMenu ) #NEWLINE# self . _updateFromPlug ( )