mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/sample/tkextlib/treectrl/demo.rb: should use Hash#index.
* ext/tk/sample/tkextlib/treectrl/demo.rb: TkImage was not cached properly. * ext/tk/sample/tkextlib/treectrl/random.rb: fixed typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0f52655b06
commit
4b7cc65b81
3 changed files with 15 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,11 @@
|
|||
Thu Mar 31 23:52:48 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||
|
||||
* ext/tk/sample/tkextlib/treectrl/demo.rb: should use Hash#index.
|
||||
|
||||
* ext/tk/sample/tkextlib/treectrl/demo.rb: TkImage was not cached properly.
|
||||
|
||||
* ext/tk/sample/tkextlib/treectrl/random.rb: fixed typo.
|
||||
|
||||
Thu Mar 31 22:23:51 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (SRC_EXT): exclude just case different suffixes on case
|
||||
|
@ -78,7 +86,7 @@ Tue Mar 29 00:04:57 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
|
|||
* lib/drb/drb.rb: move method DRbObject#reinit to DRbObject.new_with.
|
||||
extract method DRbObject.prepare_backtrace. add DRb.regist_server,
|
||||
remove_server, fetch_server. change server in thread variable if
|
||||
in-proc sesrver. [druby-ja:113]
|
||||
in-proc server. [druby-ja:113]
|
||||
|
||||
* lib/drb/gw.rb: ditto.
|
||||
|
||||
|
|
|
@ -7,6 +7,10 @@ $ScriptDir = File.dirname(File.expand_path(__FILE__))
|
|||
|
||||
$HasColumnCreate = Tk::TreeCtrl::HasColumnCreateCommand
|
||||
|
||||
class Hash
|
||||
alias key index
|
||||
end
|
||||
|
||||
class TkTreeCtrl_demo
|
||||
def initialize(dir)
|
||||
@ScriptDir = dir || '.'
|
||||
|
@ -102,9 +106,8 @@ class TkTreeCtrl_demo
|
|||
|
||||
def init_pics(*args)
|
||||
args.each{|pat|
|
||||
pat = "#{pat}.gif"
|
||||
unless TkImage.names.find{|img| (name = @images.key(img)) && File.fnmatch(pat, name)}
|
||||
Dir.glob(File.join(@ScriptDir, 'pics', pat)).each{|file|
|
||||
Dir.glob(File.join(@ScriptDir, 'pics', "#{pat}.gif")).each{|file|
|
||||
name = File.basename(file, '.gif')
|
||||
img = TkPhotoImage.new(:file=>file)
|
||||
@images[name] = img
|
||||
|
|
|
@ -184,7 +184,7 @@ def randomButton1(t, x, y)
|
|||
|
||||
elsif id[0] == 'header'
|
||||
# Click in header
|
||||
Tk::TreeCtrl::BindCallback.buttonPress1(w, x, y)
|
||||
Tk::TreeCtrl::BindCallback.buttonPress1(t, x, y)
|
||||
|
||||
else
|
||||
# Click in item
|
||||
|
|
Loading…
Reference in a new issue