summaryrefslogtreecommitdiff
path: root/ext/tk
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-09 14:33:25 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-09 14:33:25 +0000
commitba75e8cd291821135743c88249ceca2256662011 (patch)
treec1fe9992c3754822ac659c710c6e18f4ff74a9a4 /ext/tk
parent86cc2435e490741b1d99d892862f64598b27954a (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk')
-rw-r--r--ext/tk/lib/tk.rb2
-rw-r--r--ext/tk/lib/tk/grid.rb6
-rw-r--r--ext/tk/lib/tk/wm.rb2
-rw-r--r--ext/tk/lib/tkextlib/tile.rb4
-rw-r--r--ext/tk/lib/tkextlib/tile/tnotebook.rb4
-rw-r--r--ext/tk/lib/tkextlib/version.rb2
-rw-r--r--ext/tk/tcltklib.c8
7 files changed, 18 insertions, 10 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 2aafcfecc3..92ba00e7ed 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -5348,7 +5348,7 @@ TkWidget = TkWindow
#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'
diff --git a/ext/tk/lib/tk/grid.rb b/ext/tk/lib/tk/grid.rb
index 10fdf3569b..c1bb6d2e65 100644
--- a/ext/tk/lib/tk/grid.rb
+++ b/ext/tk/lib/tk/grid.rb
@@ -61,12 +61,14 @@ module TkGrid
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 @@ module TkGrid
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)
diff --git a/ext/tk/lib/tk/wm.rb b/ext/tk/lib/tk/wm.rb
index 49dd4d73c2..96aa96d2f8 100644
--- a/ext/tk/lib/tk/wm.rb
+++ b/ext/tk/lib/tk/wm.rb
@@ -545,7 +545,7 @@ module Tk
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
diff --git a/ext/tk/lib/tkextlib/tile.rb b/ext/tk/lib/tkextlib/tile.rb
index e2e76c0bd1..60ea012cc0 100644
--- a/ext/tk/lib/tkextlib/tile.rb
+++ b/ext/tk/lib/tkextlib/tile.rb
@@ -364,12 +364,16 @@ module Tk
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'
diff --git a/ext/tk/lib/tkextlib/tile/tnotebook.rb b/ext/tk/lib/tkextlib/tile/tnotebook.rb
index 76f225c579..075059d5cc 100644
--- a/ext/tk/lib/tkextlib/tile/tnotebook.rb
+++ b/ext/tk/lib/tkextlib/tile/tnotebook.rb
@@ -77,9 +77,9 @@ class Tk::Tile::TNotebook < TkWindow
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
diff --git a/ext/tk/lib/tkextlib/version.rb b/ext/tk/lib/tkextlib/version.rb
index d777c71201..6ff1fdf2ea 100644
--- a/ext/tk/lib/tkextlib/version.rb
+++ b/ext/tk/lib/tkextlib/version.rb
@@ -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
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c
index e9aeb7d2fc..0ad4be8c5f 100644
--- a/ext/tk/tcltklib.c
+++ b/ext/tk/tcltklib.c
@@ -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 @@ lib_toUTF8_core(ip_obj, src, encodename)
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 @@ lib_fromUTF8_core(ip_obj, src, encodename)
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));