mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/tcltklib.c: add TclTkIp#_create_console() method to create
a Tcl/Tk's console window. * ext/tk/lib/multi-tk.rb: support TclTkIp#_create_console() method. * ext/tk/lib/remote-tk.rb: ditto. * ext/tk/lib/tk/console.rb: ditto. * ext/tk/lib/tk.rb: update RELEASE_DATE * ext/tk/sample/demo-*/check2.rb: use 'return' in the Proc object. * ext/tk/sample/tkextlib/**: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a07bc1123a
commit
11974f26b3
17 changed files with 612 additions and 442 deletions
|
@ -76,31 +76,31 @@ TkCheckButton.new($check2_demo, :text=>'
|
|||
# tristate check
|
||||
in_check = false
|
||||
tristate_check = proc{|n1,n2,op|
|
||||
return if in_check
|
||||
|
||||
in_check = true
|
||||
begin
|
||||
if n1 == safety
|
||||
if safety == 'none'
|
||||
wipers.value = 0
|
||||
brakes.value = 0
|
||||
sober.value = 0
|
||||
elsif safety == 'all'
|
||||
wipers.value = 1
|
||||
brakes.value = 1
|
||||
sober.value = 1
|
||||
end
|
||||
else
|
||||
if wipers == 1 && brakes == 1 && sober == 1
|
||||
safety.value = 'all'
|
||||
elsif wipers == 1 || brakes == 1 || sober == 1
|
||||
safety.value = 'partial'
|
||||
unless in_check
|
||||
in_check = true
|
||||
begin
|
||||
if n1 == safety
|
||||
if safety == 'none'
|
||||
wipers.value = 0
|
||||
brakes.value = 0
|
||||
sober.value = 0
|
||||
elsif safety == 'all'
|
||||
wipers.value = 1
|
||||
brakes.value = 1
|
||||
sober.value = 1
|
||||
end
|
||||
else
|
||||
safety.value = 'none'
|
||||
if wipers == 1 && brakes == 1 && sober == 1
|
||||
safety.value = 'all'
|
||||
elsif wipers == 1 || brakes == 1 || sober == 1
|
||||
safety.value = 'partial'
|
||||
else
|
||||
safety.value = 'none'
|
||||
end
|
||||
end
|
||||
ensure
|
||||
in_check = false
|
||||
end
|
||||
ensure
|
||||
in_check = false
|
||||
end
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue