Posted to tcl by emiliano at Wed Feb 06 15:06:03 GMT 2008view raw

  1. --- library/ttk/scale.tcl.orig 2008-02-06 13:05:02.000000000 -0300
  2. +++ library/ttk/scale.tcl 2008-02-06 12:56:21.000000000 -0300
  3. @@ -50,5 +50,5 @@
  4.  
  5. proc ttk::scale::Increment {w delta} {
  6. if {![winfo exists $w]} return
  7. - $w set [expr {[$w get] + $delta}]
  8. + $w set [expr {[$w get] + $delta*[$w cget -increment]}]
  9. }
  10. --- generic/ttk/ttkScale.c.orig 2008-02-06 12:41:19.000000000 -0300
  11. +++ generic/ttk/ttkScale.c 2008-02-06 12:54:37.000000000 -0300
  12. @@ -23,6 +23,7 @@
  13. /* slider element options */
  14. Tcl_Obj *fromObj; /* minimum value */
  15. Tcl_Obj *toObj; /* maximum value */
  16. + Tcl_Obj *incrObj; /* increment value */
  17. Tcl_Obj *valueObj; /* current value */
  18. Tcl_Obj *lengthObj; /* length of the long axis of the scale */
  19. Tcl_Obj *orientObj; /* widget orientation */
  20. @@ -62,6 +63,8 @@
  21. Tk_Offset(Scale,scale.fromObj), -1, 0, 0, 0},
  22. {TK_OPTION_DOUBLE, "-to", "to", "To", "1.0",
  23. Tk_Offset(Scale,scale.toObj), -1, 0, 0, 0},
  24. + {TK_OPTION_DOUBLE, "-increment", "increment", "Increment", "1.0",
  25. + Tk_Offset(Scale,scale.incrObj), -1, 0, 0, 0},
  26. {TK_OPTION_DOUBLE, "-value", "value", "Value", "0",
  27. Tk_Offset(Scale,scale.valueObj), -1, 0, 0, 0},
  28. {TK_OPTION_PIXELS, "-length", "length", "Length",
  29.