Logo Search packages:      
Sourcecode: gnome-mousetrap version File versions  Download package

def mouseTrap::prefGui::preffGui::addSpin (   self,
  label,
  var,
  startValue,
  section,
  option,
  min = 1,
  max = 15 
)

Creates a new spin button inside a HBox and return it.

Arguments:
- self: The main object pointer.
- label: The spin button label.
- var: The prefferences dict variable.
- startValue: The start value.

Definition at line 386 of file prefGui.py.

00386                                                                                   :
        """
        Creates a new spin button inside a HBox and return it.
        
        Arguments:
        - self: The main object pointer.
        - label: The spin button label.
        - var: The prefferences dict variable.
        - startValue: The start value.
        """
        
        spinHbox = gtk.HBox( spacing = 4 )
        
        spinLbl = gtk.Label( label )
        spinLbl.set_alignment( 0.0, 0.5 )
        spinLbl.show()
        spinHbox.pack_start( spinLbl, False, False )
        
        adj = gtk.Adjustment( startValue, min, max, 1, 1, 0)
        spinButton = gtk.SpinButton( adj, 0.0, 0 )
        spinButton.set_wrap( True )
        spinButton.connect( "value-changed", self._spinChanged, section, option )
        spinHbox.pack_start( spinButton, False, False )
        
        spinLbl.set_mnemonic_widget( spinButton )
        
        return spinHbox
        
    def close( self, *args ):


Generated by  Doxygen 1.6.0   Back to index