[前][次][番号順一覧][スレッド一覧]

ruby-changes:4476

From: ko1@a...
Date: Fri, 11 Apr 2008 10:23:59 +0900 (JST)
Subject: [ruby-changes:4476] nagai - Ruby:r15967 (ruby_1_8): * ext/tk/lib/tkextlib/tile.rb:

nagai	2008-04-11 10:23:38 +0900 (Fri, 11 Apr 2008)

  New Revision: 15967

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ext/tk/lib/tkextlib/tile/style.rb
    branches/ruby_1_8/ext/tk/lib/tkextlib/tile.rb
    branches/ruby_1_8/ext/tk/sample/tkextlib/tile/demo.rb

  Log:
    * ext/tk/lib/tkextlib/tile.rb:
      __define_LoadImages_proc_for_compatibility__! do nothing when the 
      Tcl command exists.
    
    * ext/tk/lib/tkextlib/tile/style.rb:
      __define_wrapper_proc_for_compatibility__! do nothing when the Tcl
      command exists.
    
    * ext/tk/sample/tkextlib/tile/demo.rb: don't create 'step' theme if 
      it already exists.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15967&r2=15966&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tkextlib/tile/style.rb?r1=15967&r2=15966&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tkextlib/tile.rb?r1=15967&r2=15966&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/sample/tkextlib/tile/demo.rb?r1=15967&r2=15966&diff_format=u

Index: ruby_1_8/ext/tk/sample/tkextlib/tile/demo.rb
===================================================================
--- ruby_1_8/ext/tk/sample/tkextlib/tile/demo.rb	(revision 15966)
+++ ruby_1_8/ext/tk/sample/tkextlib/tile/demo.rb	(revision 15967)
@@ -24,7 +24,9 @@
 Tk::Tile.__define_LoadImages_proc_for_compatibility__!
 Tk::Tile::Style.__define_wrapper_proc_for_compatibility__!
 
-Tk::Tile::Style.theme_create('step')
+unless Tk::Tile::Style.theme_names.include?('step')
+  Tk::Tile::Style.theme_create('step')
+end
 
 Tk.load_tclscript(File.join(demodir, 'toolbutton.tcl'))
 Tk.load_tclscript(File.join(demodir, 'repeater.tcl'))
Index: ruby_1_8/ext/tk/lib/tkextlib/tile/style.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tkextlib/tile/style.rb	(revision 15966)
+++ ruby_1_8/ext/tk/lib/tkextlib/tile/style.rb	(revision 15967)
@@ -34,8 +34,11 @@
     if Tk::Tile::TILE_SPEC_VERSION_ID < 7
       def __define_wrapper_proc_for_compatibility__!
         unless Tk.info(:commands, '::ttk::style').empty?
-          fail RuntimeError,
-               "can't define ':ttk::style' command (already exist)"
+          # fail RuntimeError,
+          #      "can't define '::ttk::style' command (already exist)"
+
+          # do nothing !!!
+          warn "Warning: can't define '::ttk::style' command (already exist)" if $DEBUG
         end
         TkCore::INTERP.add_tk_procs('::ttk::style', 'args', <<-'EOS')
         if [string equal [lrange $args 0 1] {element create}] {
Index: ruby_1_8/ext/tk/lib/tkextlib/tile.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tkextlib/tile.rb	(revision 15966)
+++ ruby_1_8/ext/tk/lib/tkextlib/tile.rb	(revision 15967)
@@ -133,7 +133,10 @@
       ns_list.each{|ns|
         cmd = "#{ns}::#{proc_name}"
         unless Tk.info(:commands, cmd).empty?
-          fail RuntimeError, "can't define '#{cmd}' command (already exist)"
+          #fail RuntimeError, "can't define '#{cmd}' command (already exist)"
+
+          # do nothing !!!
+          warn "Warning: can't define '#{cmd}' command (already exist)" if $DEBUG
         end
         TkNamespace.eval(ns){
           TkCore::INTERP.add_tk_procs(proc_name, 'imgdir {patterns {*.gif}}', 
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 15966)
+++ ruby_1_8/ChangeLog	(revision 15967)
@@ -1,3 +1,16 @@
+Fri Apr 11 10:22:54 2008  Hidetoshi NAGAI  <nagai@a...>
+
+	* ext/tk/lib/tkextlib/tile.rb:
+	  __define_LoadImages_proc_for_compatibility__! do nothing when the 
+	  Tcl command exists.
+
+	* ext/tk/lib/tkextlib/tile/style.rb:
+	  __define_wrapper_proc_for_compatibility__! do nothing when the Tcl
+	  command exists.
+
+	* ext/tk/sample/tkextlib/tile/demo.rb: don't create 'step' theme if 
+	  it already exists.
+
 Fri Apr 11 08:05:12 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* marshal.c (w_object): add volatile to avoid potential GC bug.  a

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]