ruby-changes:4846
From: ko1@a...
Date: Fri, 9 May 2008 23:34:00 +0900 (JST)
Subject: [ruby-changes:4846] nagai - Ruby:r16340 (ruby_1_8): * ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
nagai 2008-05-09 23:33:25 +0900 (Fri, 09 May 2008)
New Revision: 16340
Modified files:
branches/ruby_1_8/ext/tk/lib/tk/grid.rb
branches/ruby_1_8/ext/tk/lib/tk/wm.rb
branches/ruby_1_8/ext/tk/lib/tk.rb
branches/ruby_1_8/ext/tk/lib/tkextlib/tile/tnotebook.rb
branches/ruby_1_8/ext/tk/lib/tkextlib/tile.rb
branches/ruby_1_8/ext/tk/lib/tkextlib/version.rb
branches/ruby_1_8/ext/tk/tcltklib.c
Log:
* ext/tk/lib/tk/wm.rb: methods of Tk::Wm_for_General module cannot
pass the given block to methods of Tk::Wm module.
* ext/tk/lib/tk/grid.rb: lack of module-method definitions.
* ext/tk/lib/tkextlib/tile.rb: lack of autoload definitions.
* ext/tk/lib/tkextlib/tile/tnotebook.rb: cannot use kanji (not UTF-8)
characters for headings.
* ext/tk/tcltklib.c: maybe a little more stable about @encoding value
of TclTkIp object.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tk/wm.rb?r1=16340&r2=16339&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/tcltklib.c?r1=16340&r2=16339&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tkextlib/tile.rb?r1=16340&r2=16339&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tkextlib/version.rb?r1=16340&r2=16339&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tk.rb?r1=16340&r2=16339&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tkextlib/tile/tnotebook.rb?r1=16340&r2=16339&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tk/grid.rb?r1=16340&r2=16339&diff_format=u
Index: ruby_1_8/ext/tk/tcltklib.c
===================================================================
--- ruby_1_8/ext/tk/tcltklib.c (revision 16339)
+++ ruby_1_8/ext/tk/tcltklib.c (revision 16340)
@@ -4,7 +4,7 @@
* Oct. 24, 1997 Y. Matsumoto
*/
-#define TCLTKLIB_RELEASE_DATE "2008-04-02"
+#define TCLTKLIB_RELEASE_DATE "2008-05-09"
#include "ruby.h"
@@ -7106,7 +7106,8 @@
if (NIL_P(enc)) {
encoding = (Tcl_Encoding)NULL;
} else {
- StringValue(enc);
+ /* StringValue(enc); */
+ enc = rb_funcall(enc, ID_to_s, 0, 0);
/* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
encoding = Tcl_GetEncoding((Tcl_Interp*)NULL,
RSTRING_PTR(enc));
@@ -7292,7 +7293,8 @@
if (NIL_P(enc)) {
encoding = (Tcl_Encoding)NULL;
} else {
- StringValue(enc);
+ /* StringValue(enc); */
+ enc = rb_funcall(enc, ID_to_s, 0, 0);
/* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
encoding = Tcl_GetEncoding((Tcl_Interp*)NULL,
RSTRING_PTR(enc));
Index: ruby_1_8/ext/tk/lib/tk.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tk.rb (revision 16339)
+++ ruby_1_8/ext/tk/lib/tk.rb (revision 16340)
@@ -5348,7 +5348,7 @@
#Tk.freeze
module Tk
- RELEASE_DATE = '2008-04-18'.freeze
+ RELEASE_DATE = '2008-05-09'.freeze
autoload :AUTO_PATH, 'tk/variable'
autoload :TCL_PACKAGE_PATH, 'tk/variable'
Index: ruby_1_8/ext/tk/lib/tkextlib/version.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tkextlib/version.rb (revision 16339)
+++ ruby_1_8/ext/tk/lib/tkextlib/version.rb (revision 16340)
@@ -2,5 +2,5 @@
# release date of tkextlib
#
module Tk
- Tkextlib_RELEASE_DATE = '2008-05-03'.freeze
+ Tkextlib_RELEASE_DATE = '2008-05-09'.freeze
end
Index: ruby_1_8/ext/tk/lib/tkextlib/tile/tnotebook.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tkextlib/tile/tnotebook.rb (revision 16339)
+++ ruby_1_8/ext/tk/lib/tkextlib/tile/tnotebook.rb (revision 16340)
@@ -77,9 +77,9 @@
def add(child, keys=nil)
if keys && keys != None
- tk_send_without_enc('add', _epath(child), *hash_kv(keys))
+ tk_send('add', _epath(child), *hash_kv(keys))
else
- tk_send_without_enc('add', _epath(child))
+ tk_send('add', _epath(child))
end
self
end
Index: ruby_1_8/ext/tk/lib/tkextlib/tile.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tkextlib/tile.rb (revision 16339)
+++ ruby_1_8/ext/tk/lib/tkextlib/tile.rb (revision 16340)
@@ -364,12 +364,16 @@
autoload :TLabelframe, 'tkextlib/tile/tlabelframe'
autoload :Labelframe, 'tkextlib/tile/tlabelframe'
+ autoload :TLabelFrame, 'tkextlib/tile/tlabelframe'
+ autoload :LabelFrame, 'tkextlib/tile/tlabelframe'
autoload :TLabel, 'tkextlib/tile/tlabel'
autoload :Label, 'tkextlib/tile/tlabel'
autoload :TMenubutton, 'tkextlib/tile/tmenubutton'
autoload :Menubutton, 'tkextlib/tile/tmenubutton'
+ autoload :TMenuButton, 'tkextlib/tile/tmenubutton'
+ autoload :MenuButton, 'tkextlib/tile/tmenubutton'
autoload :TNotebook, 'tkextlib/tile/tnotebook'
autoload :Notebook, 'tkextlib/tile/tnotebook'
Index: ruby_1_8/ext/tk/lib/tk/wm.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tk/wm.rb (revision 16339)
+++ ruby_1_8/ext/tk/lib/tk/wm.rb (revision 16340)
@@ -545,7 +545,7 @@
module Wm_for_General
Wm.instance_methods.each{|m|
if (m = m.to_s) =~ /^wm_(.*)$/
- eval "def #{m}(*args); Tk::Wm.#{$1}(self, *args); end"
+ eval "def #{m}(*args, &b); Tk::Wm.#{$1}(self, *args, &b); end"
end
}
end
Index: ruby_1_8/ext/tk/lib/tk/grid.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tk/grid.rb (revision 16339)
+++ ruby_1_8/ext/tk/lib/tk/grid.rb (revision 16340)
@@ -61,12 +61,14 @@
tk_call_without_enc("grid", 'columnconfigure',
master, index, *hash_kv(args))
end
+ alias column columnconfigure
def rowconfigure(master, index, args)
# master = master.epath if master.kind_of?(TkObject)
master = _epath(master)
tk_call_without_enc("grid", 'rowconfigure', master, index, *hash_kv(args))
end
+ alias row rowconfigure
def columnconfiginfo(master, index, slot=nil)
# master = master.epath if master.kind_of?(TkObject)
@@ -189,10 +191,10 @@
list(tk_call_without_enc('grid', 'slaves', master, *hash_kv(args)))
end
- module_function :bbox, :forget, :propagate, :info
+ module_function :anchor, :bbox, :add, :forget, :propagate, :info
module_function :remove, :size, :slaves, :location
module_function :grid, :configure, :columnconfigure, :rowconfigure
- module_function :columnconfiginfo, :rowconfiginfo
+ module_function :column, :row, :columnconfiginfo, :rowconfiginfo
end
=begin
def TkGrid(win, *args)
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/