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

ruby-changes:4538

From: ko1@a...
Date: Tue, 15 Apr 2008 17:00:59 +0900 (JST)
Subject: [ruby-changes:4538] nagai - Ruby:r16031 (ruby_1_8): * ext/tk/lib/tk/menuspec.rb: option check will fail when

nagai	2008-04-15 16:59:56 +0900 (Tue, 15 Apr 2008)

  New Revision: 16031

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ext/tk/lib/tk/menuspec.rb
    branches/ruby_1_8/ext/tk/lib/tk/palette.rb
    branches/ruby_1_8/ext/tk/lib/tk.rb

  Log:
    * ext/tk/lib/tk/menuspec.rb: option check will fail when 
      TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ is true.
    
    * ext/tk/lib/tk/palette.rb: bug fix.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tk/palette.rb?r1=16031&r2=16030&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=16031&r2=16030&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tk.rb?r1=16031&r2=16030&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ext/tk/lib/tk/menuspec.rb?r1=16031&r2=16030&diff_format=u

Index: ruby_1_8/ext/tk/lib/tk.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tk.rb	(revision 16030)
+++ ruby_1_8/ext/tk/lib/tk.rb	(revision 16031)
@@ -5341,7 +5341,7 @@
 #Tk.freeze
 
 module Tk
-  RELEASE_DATE = '2008-04-13'.freeze
+  RELEASE_DATE = '2008-04-15'.freeze
 
   autoload :AUTO_PATH,        'tk/variable'
   autoload :TCL_PACKAGE_PATH, 'tk/variable'
Index: ruby_1_8/ext/tk/lib/tk/menuspec.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tk/menuspec.rb	(revision 16030)
+++ ruby_1_8/ext/tk/lib/tk/menuspec.rb	(revision 16031)
@@ -155,15 +155,12 @@
   def _use_menubar?(parent)
     use_menubar = false
     if parent.kind_of?(Tk::Root) || parent.kind_of?(Tk::Toplevel)
-      return true 
+      true 
+    elsif parent.current_configinfo.has_key?('menu')
+      true
     else
-      begin
-        parent.cget('menu')
-        return true 
-      rescue
-      end
+      false
     end
-    false
   end
   private :_use_menubar?
 
@@ -171,7 +168,7 @@
     #unless (mbar = parent.menu).kind_of?(TkMenu)
     # --> use current TkMenu class
     mbar = parent.menu
-    unless parent.menu.kind_of?(Tk::Menu) || parent.menu.kind_of?(TkMenu)
+    unless mbar.kind_of?(Tk::Menu) || mbar.kind_of?(TkMenu)
       #mbar = Tk::Menu.new(parent, :tearoff=>false)
       mbar = TkMenu.new(parent, :tearoff=>false)
       parent.menu(mbar)
@@ -198,7 +195,6 @@
 
     if _use_menubar?(parent)
       # menubar by menu entries
-
       mbar = _create_menu_for_menubar(parent)
 
       menu_name = nil
Index: ruby_1_8/ext/tk/lib/tk/palette.rb
===================================================================
--- ruby_1_8/ext/tk/lib/tk/palette.rb	(revision 16030)
+++ ruby_1_8/ext/tk/lib/tk/palette.rb	(revision 16031)
@@ -15,7 +15,7 @@
   ].freeze
 
   def TkPalette.set(*args)
-    args = args.to_a.flatten if args.kind_of? Hash
+    args = args[0].to_a.flatten if args[0].kind_of? Hash
     tk_call('tk_setPalette', *args)
   end
   def TkPalette.setPalette(*args)
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 16030)
+++ ruby_1_8/ChangeLog	(revision 16031)
@@ -1,3 +1,10 @@
+Tue Apr 15 16:58:55 2008  Hidetoshi NAGAI  <nagai@a...>
+
+	* ext/tk/lib/tk/menuspec.rb: option check will fail when 
+	  TkConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ is true.
+
+	* ext/tk/lib/tk/palette.rb: bug fix.
+
 Tue Apr 15 16:47:48 2008  Kazuhiro NISHIYAMA  <zn@m...>
 
 	* signal.c, gc.c: New methods: GC.stress, GC.stress=;

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

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