Posted to tcl by emiliano at Tue Jul 14 19:35:43 GMT 2009view raw

  1. Index: library/iconlist.tcl
  2. ===================================================================
  3. RCS file: /cvsroot/tktoolkit/tk/library/iconlist.tcl,v
  4. retrieving revision 1.2
  5. diff -u -r1.2 iconlist.tcl
  6. --- library/iconlist.tcl 16 Feb 2009 00:57:26 -0000 1.2
  7. +++ library/iconlist.tcl 14 Jul 2009 19:31:00 -0000
  8. @@ -443,7 +443,9 @@
  9. #
  10. method Create {} {
  11. ttk::frame $w
  12. - set hull [ttk::entry $w.cHull -takefocus 0]
  13. + set hull [ttk::frame $w.cHull -style TEntry -takefocus 0]
  14. + bind $hull <FocusIn> {%W state focus}
  15. + bind $hull <FocusOut> {%W state !focus}
  16. set sbar [ttk::scrollbar $w.cHull.sbar -orient horizontal -takefocus 0]
  17. catch {$sbar configure -highlightthickness 0}
  18. set canvas [canvas $w.cHull.canvas -highlightthick 0 -takefocus 1 \
  19. Index: library/tkfbox.tcl
  20. ===================================================================
  21. RCS file: /cvsroot/tktoolkit/tk/library/tkfbox.tcl,v
  22. retrieving revision 1.74
  23. diff -u -r1.74 tkfbox.tcl
  24. --- library/tkfbox.tcl 14 Apr 2009 18:09:50 -0000 1.74
  25. +++ library/tkfbox.tcl 14 Jul 2009 19:31:02 -0000
  26. @@ -83,6 +83,29 @@
  27. KDHGfDZNcz2SZIx547/0BVRRX7n8uT/sAAAAAElFTkSuQmCC
  28. }]
  29. }
  30. + if {![info exists ::tk::Priv(homeImage)]} {
  31. + set ::tk::Priv(homeImage) [image create photo -data {
  32. + iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABmJLR0QA/wD/AP+gva
  33. + eTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH1QoOFCMCb8BVTwAAAyVJREFU
  34. + OMullcFvG0UUh7+Z7Dq1G+NtnEBdRG0hVTSiqkAoNFIvHCCgKmotWVUiCMpf4FO1FQ
  35. + KVf2CFVEgFJyCIHIKg0j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KFzoJj8AAAAASUVORK5CYII=
  51. + }]
  52. + }
  53. }
  54.  
  55. # ::tk::dialog::file:: --
  56. @@ -121,6 +144,7 @@
  57. set data(dirMenuBtn) $w.contents.f1.menu
  58. set data(dirMenu) $w.contents.f1.menu.menu
  59. set data(upBtn) $w.contents.f1.up
  60. + set data(homeBtn) $w.contents.f1.home
  61. set data(icons) $w.contents.icons
  62. set data(ent) $w.contents.f2.ent
  63. set data(typeMenuLab) $w.contents.f2.lab2
  64. @@ -348,10 +372,13 @@
  65. $data(dirMenu) add radiobutton -label "" -variable \
  66. [format %s(selectPath) ::tk::dialog::file::$dataName]
  67. set data(upBtn) [ttk::button $f1.up]
  68. - $data(upBtn) configure -image $Priv(updirImage)
  69. + $data(upBtn) configure -image $Priv(updirImage) -default disabled
  70. + set data(homeBtn) [ttk::button $f1.home]
  71. + $data(homeBtn) configure -image $Priv(homeImage) -default disabled
  72.  
  73. $f1.menu configure -takefocus 1;# -highlightthickness 2
  74.  
  75. + pack $data(homeBtn) -side right -padx 4 -fill both
  76. pack $data(upBtn) -side right -padx 4 -fill both
  77. pack $f1.lab -side left -padx 4 -fill both
  78. pack $f1.menu -expand yes -fill both -padx 4
  79. @@ -453,6 +480,7 @@
  80.  
  81. wm protocol $w WM_DELETE_WINDOW [list ::tk::dialog::file::CancelCmd $w]
  82. $data(upBtn) configure -command [list ::tk::dialog::file::UpDirCmd $w]
  83. + $data(homeBtn) configure -command [list ::tk::dialog::file::HomeCmd $w]
  84. $data(cancelBtn) configure -command [list ::tk::dialog::file::CancelCmd $w]
  85. bind $w <KeyPress-Escape> [list $data(cancelBtn) invoke]
  86. bind $w <Alt-Key> [list tk::AltKeyInDialog $w %A]
  87. @@ -964,6 +992,14 @@
  88. }
  89. }
  90.  
  91. +# Gets called when user presses the "home directory" button
  92. +#
  93. +proc ::tk::dialog::file::HomeCmd {w} {
  94. + upvar ::tk::dialog::file::[winfo name $w] data
  95. +
  96. + set data(selectPath) $::env(HOME)
  97. +}
  98. +
  99. # Join a file name to a path name. The "file join" command will break if the
  100. # filename begins with ~
  101. #
  102.