From 47161fc29677c82e8aaa17075562078919d2562a Mon Sep 17 00:00:00 2001 From: ocean Date: Fri, 8 Apr 2005 03:24:15 +0000 Subject: * lib/tkextlib/treectrl/tktreectrl.rb (selection_clear): fixed typo. * sample/tkextlib/treectrl/random.rb: node deselection now works. * sample/tkextlib/treectrl/demo.rb: fixed typo. (popup menu on column header) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/ChangeLog.tkextlib | 8 ++++++++ ext/tk/lib/tkextlib/treectrl/tktreectrl.rb | 2 +- ext/tk/sample/tkextlib/treectrl/demo.rb | 2 +- ext/tk/sample/tkextlib/treectrl/random.rb | 9 +++++---- 4 files changed, 15 insertions(+), 6 deletions(-) (limited to 'ext/tk') diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib index 6a5338ed1..98092f84c 100644 --- a/ext/tk/ChangeLog.tkextlib +++ b/ext/tk/ChangeLog.tkextlib @@ -1,3 +1,11 @@ +2005-04-08 ocean + + * lib/tkextlib/treectrl/tktreectrl.rb (selection_clear): fixed typo. + + * sample/tkextlib/treectrl/random.rb: node deselection now works. + + * sample/tkextlib/treectrl/demo.rb: fixed typo. (popup menu on column header) + 2005-04-08 ocean * sample/tkextlib/treectrl/help.rb: fixed typo. (wrong color) diff --git a/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb b/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb index 269711b22..136666c4a 100644 --- a/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb +++ b/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb @@ -1302,7 +1302,7 @@ class Tk::TreeCtrl end def selection_clear(*args) # first, last - tk_send('selection', 'clear' *args) + tk_send('selection', 'clear', *args) self end diff --git a/ext/tk/sample/tkextlib/treectrl/demo.rb b/ext/tk/sample/tkextlib/treectrl/demo.rb index ec8698ec5..e3d018058 100644 --- a/ext/tk/sample/tkextlib/treectrl/demo.rb +++ b/ext/tk/sample/tkextlib/treectrl/demo.rb @@ -496,7 +496,7 @@ class TkTreeCtrl_demo @popup[:arrowside].value = w.column_cget(col, :arrowside) @popup[:arrowgravity].value = w.column_cget(col, :arrowgravity) @popup[:expand].value = w.column_cget(col, :expand) - @popup[:sqeeeze].value = w.column_cget(col, :squeeze) + @popup[:squeeze].value = w.column_cget(col, :squeeze) @popup[:justify].value = w.column_cget(col, :justify) @mHeader[w].popup(rootx, rooty) return diff --git a/ext/tk/sample/tkextlib/treectrl/random.rb b/ext/tk/sample/tkextlib/treectrl/random.rb index f9a38b0d8..259cb1865 100644 --- a/ext/tk/sample/tkextlib/treectrl/random.rb +++ b/ext/tk/sample/tkextlib/treectrl/random.rb @@ -100,7 +100,6 @@ def demoRandom(t) clicks = Tk::Clock.clicks (0...(random_N())).each{|i| item_i = items[i] - item_j = nil numChildren = t.item_numchildren(item_i) if numChildren > 0 if $Version_1_1_OrLater @@ -179,15 +178,17 @@ def randomButton1(t, x, y) id = t.identify(x, y) puts id.inspect @Priv['buttonMode'] = '' + + # Click outside any item if id.empty? - # Click outside any item + t.selection_clear + # Click in header elsif id[0] == 'header' - # Click in header Tk::TreeCtrl::BindCallback.buttonPress1(t, x, y) + # Click in item else - # Click in item where, item, arg1, arg2, arg3, arg4 = id case arg1 when 'button' -- cgit