mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* sample/tkextlib/iwidgets/sample/hierarchy.rb: fail to treat
Japanese (i18n?) filenames. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
59fd11fb35
commit
7f6e93fd62
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-03-31 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* sample/tkextlib/iwidgets/sample/hierarchy.rb: fail to treat
|
||||
Japanese (i18n?) filenames.
|
||||
|
||||
2005-03-30 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* sample/tkextlib/bwidget/tree.rb: use 'return' in the Proc object.
|
||||
|
|
|
@ -3,11 +3,11 @@ require 'tk'
|
|||
require 'tkextlib/iwidgets'
|
||||
|
||||
def get_files(file)
|
||||
dir = (file.empty?)? ENV['HOME'] : file
|
||||
dir = (file.empty?)? ENV['HOME'] : TkComm._fromUTF8(file)
|
||||
Dir.chdir(dir) rescue return ''
|
||||
rlist = []
|
||||
Dir['*'].sort.each{|f| rlist << File.join(dir, f) }
|
||||
rlist
|
||||
Dir['*'].sort.collect{|f|
|
||||
TkCore::INTERP._merge_tklist(TkComm._toUTF8(File.join(dir, f)))
|
||||
}
|
||||
end
|
||||
|
||||
Tk::Iwidgets::Hierarchy.new(:querycommand=>proc{|arg| get_files(arg.node)},
|
||||
|
|
Loading…
Reference in a new issue