diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-14 15:17:52 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-14 15:17:52 +0000 |
commit | 9126130c4a6225e8f9dd50252acbe5cdfa9129b7 (patch) | |
tree | b883671eefc3bdc0726484fd14b9ccc3e4cba1ea /ext/tk/sample | |
parent | 15b2474e19b5c0f4482ff9322c60bb8a79101e2a (diff) |
* ext/tk/lib/tk/text.rb: typo. call a wrong method.
* ext/tk/lib/tk/itemconfig.rb: ditto.
* ext/tk/sample/ttk_wrapper.rb: bug fix.
* ext/tk/sample/tktextio.rb: add binding for 'Ctrl-u' at console mode.
* ext/tk/lib/tk.rb, ext/tk/lib/tk/itemfont.rb, ext/tk/lib/font.rb:
support __IGNORE_UNKNOWN_CONFIGURE_OPTION__ about font options.
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb,
ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb: bug fix.
* ext/tk/lib/tkextlib/tile/tpaned.rb: improve TPaned#add.
* ext/tk/lib/tk/timer.rb: add TkTimer#at_end(proc) to register the
procedure which called at end of the timer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample')
-rw-r--r-- | ext/tk/sample/tktextio.rb | 12 | ||||
-rw-r--r-- | ext/tk/sample/ttk_wrapper.rb | 18 |
2 files changed, 20 insertions, 10 deletions
diff --git a/ext/tk/sample/tktextio.rb b/ext/tk/sample/tktextio.rb index 4573bcebdf..9f012feada 100644 --- a/ext/tk/sample/tktextio.rb +++ b/ext/tk/sample/tktextio.rb @@ -254,7 +254,15 @@ class TkTextIO < TkText Tk.callback_break end end - private :_cb_up, :_cb_down, :_cb_left, :_cb_backspace, :_cb_ctrl_a + def _cb_ctrl_u + if @console_mode + mark_set('insert', @ins_head) + delete('insert', 'insert lineend') + Tk.callback_break + end + end + private :_cb_up, :_cb_down, :_cb_left, :_cb_backspace, + :_cb_ctrl_a, :_cb_ctrl_u def _setup_console_bindings @bindtag = TkBindTag.new @@ -328,6 +336,8 @@ class TkTextIO < TkText @bindtag.bind('Home'){ _cb_ctrl_a } @bindtag.bind('Control-a'){ _cb_ctrl_a } + + @bindtag.bind('Control-u'){ _cb_ctrl_u } end private :_setup_console_bindings diff --git a/ext/tk/sample/ttk_wrapper.rb b/ext/tk/sample/ttk_wrapper.rb index ddae24019f..4a4491b5bd 100644 --- a/ext/tk/sample/ttk_wrapper.rb +++ b/ext/tk/sample/ttk_wrapper.rb @@ -52,6 +52,15 @@ end ########################################################################## +# define Tcl/Tk procedures for compatibility. +# those are required when want to use themes included +# in "sample/tkextlib/tile/demo.rb". +########################################################################## +Tk::Tile.__define_LoadImages_proc_for_compatibility__! +Tk::Tile::Style.__define_wrapper_proc_for_compatibility__! + + +########################################################################## # use themes defined on the demo of Ttk (Tile) extension ########################################################################## demodir = File.dirname(__FILE__) @@ -92,15 +101,6 @@ themes_by_ruby.each{|f| ########################################################################## -# define Tcl/Tk procedures for compatibility. -# those are required when want to use themes included -# in "sample/tkextlib/tile/demo.rb". -########################################################################## -Tk::Tile.__define_LoadImages_proc_for_compatibility__! -Tk::Tile::Style.__define_wrapper_proc_for_compatibility__! - - -########################################################################## # ignore unsupported options of Ttk widgets ########################################################################## TkConfigMethod.__set_IGNORE_UNKNOWN_CONFIGURE_OPTION__! true |