From 906d408e7c2212d450af8b3be1ea30258ebe8633 Mon Sep 17 00:00:00 2001 From: nagai Date: Fri, 14 Nov 2003 04:25:11 +0000 Subject: [PATCH] * ext/tcltklib/tcltklib.c: fix (en-bugged at 2003/11/07) * ext/tk/lib/tkdialog.rb: TkDialog.new accepts the parent widget [ruby-talk:85066] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ ext/tcltklib/tcltklib.c | 4 +--- ext/tk/lib/tk.rb | 1 - ext/tk/lib/tkdialog.rb | 21 +++++++++++++-------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index e545d645c7..01ccf02b68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Nov 14 13:21:30 2003 Hidetoshi NAGAI + + * ext/tcltklib/tcltklib.c: fix (en-bugged at 2003/11/07) + + * ext/tk/lib/tkdialog.rb: TkDialog.new accepts a parent widget + argument [ruby-talk:85066] + Thu Nov 13 20:53:35 2003 Tanaka Akira * lib/open-uri.rb (Kernel[#.]open): hard coded URI schemes removed. diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c index a49bd7c7f6..d20c24eb22 100644 --- a/ext/tcltklib/tcltklib.c +++ b/ext/tcltklib/tcltklib.c @@ -461,9 +461,7 @@ lib_eventloop_core(check_root, check_var) } } - found_event = Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT); - - if (found_event) { + if (Tcl_DoOneEvent(TCL_ALL_EVENTS | TCL_DONT_WAIT)) { tick_counter++; } else { tick_counter += no_event_tick; diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index dffa918f58..9c7a0982c2 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -3943,7 +3943,6 @@ class TkWindowmes) + def initialize(parent = nil, mes = nil) + if !mes + if parent.kind_of? TkWindow + mes = "" + else + mes = parent.to_s + parent = nil + end + end + super(parent, :message=>mes) end def show(mes = nil) @@ -263,8 +268,8 @@ class TkWarning < TkWarning2 def self.show(*args) self.new(*args) end - def initialize(mes) - super(mes) + def initialize(*args) + super(*args) show end end