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

ruby-changes:12579

From: yugui <ko1@a...>
Date: Mon, 27 Jul 2009 00:32:33 +0900 (JST)
Subject: [ruby-changes:12579] Ruby:r24288 (ruby_1_9_1): merges r24180 from trunk into ruby_1_9_1.

yugui	2009-07-27 00:31:55 +0900 (Mon, 27 Jul 2009)

  New Revision: 24288

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24288

  Log:
    merges r24180 from trunk into ruby_1_9_1.
    --
    * ext/tk/lib/tk.rb,ext/tk/lib/tk/grid.rb: Bug fix on grid_slaves().
      Extend usage pattern of grid_column()/grid_row().

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/ext/tk/lib/tk/grid.rb
    branches/ruby_1_9_1/ext/tk/lib/tk.rb
    branches/ruby_1_9_1/version.h

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 24287)
+++ ruby_1_9_1/ChangeLog	(revision 24288)
@@ -1,3 +1,8 @@
+Sat Jul 18 07:06:31 2009  Hidetoshi NAGAI  <nagai@a...>
+
+	* ext/tk/lib/tk.rb,ext/tk/lib/tk/grid.rb: Bug fix on grid_slaves().
+	  Extend usage pattern of grid_column()/grid_row().
+
 Sat Jul 18 06:30:35 2009  NAKAMURA Usaku  <usa@r...>
 
 	* include/ruby/win32.h: include winsock headers in extern "C++" for
Index: ruby_1_9_1/ext/tk/lib/tk.rb
===================================================================
--- ruby_1_9_1/ext/tk/lib/tk.rb	(revision 24287)
+++ ruby_1_9_1/ext/tk/lib/tk.rb	(revision 24288)
@@ -5177,14 +5177,12 @@
     TkGrid.columnconfigure(self, index, keys)
   end
   alias grid_columnconfigure grid_columnconfig
-  alias grid_column grid_columnconfig
 
   def grid_rowconfig(index, keys)
     #tk_call('grid', 'rowconfigure', epath, index, *hash_kv(keys))
     TkGrid.rowconfigure(self, index, keys)
   end
   alias grid_rowconfigure grid_rowconfig
-  alias grid_row grid_rowconfig
 
   def grid_columnconfiginfo(index, slot=nil)
     #if slot
@@ -5214,6 +5212,22 @@
     TkGrid.rowconfiginfo(self, index, slot)
   end
 
+  def grid_column(index, keys=nil)
+    if keys.kind_of?(Hash)
+      grid_columnconfigure(index, keys)
+    else
+      grid_columnconfiginfo(index, keys)
+    end
+  end
+
+  def grid_row(index, keys=nil)
+    if keys.kind_of?(Hash)
+      grid_rowconfigure(index, keys)
+    else
+      grid_rowconfiginfo(index, keys)
+    end
+  end
+
   def grid_info()
     #list(tk_call('grid', 'info', epath))
     TkGrid.info(self)
@@ -5250,9 +5264,9 @@
     TkGrid.size(self)
   end
 
-  def grid_slaves(args)
+  def grid_slaves(keys = nil)
     #list(tk_call('grid', 'slaves', epath, *hash_kv(args)))
-    TkGrid.slaves(self, args)
+    TkGrid.slaves(self, keys)
   end
 
   def place(keys)
Index: ruby_1_9_1/ext/tk/lib/tk/grid.rb
===================================================================
--- ruby_1_9_1/ext/tk/lib/tk/grid.rb	(revision 24287)
+++ ruby_1_9_1/ext/tk/lib/tk/grid.rb	(revision 24288)
@@ -104,14 +104,12 @@
     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)
@@ -171,6 +169,22 @@
     end
   end
 
+  def column(master, index, keys=nil)
+    if keys.kind_of?(Hash)
+      columnconfigure(master, index, keys)
+    else
+      columnconfiginfo(master, index, keys)
+    end
+  end
+
+  def row(master, index, keys=nil)
+    if keys.kind_of?(Hash)
+      rowconfigure(master, index, keys)
+    else
+      rowconfiginfo(master, index, keys)
+    end
+  end
+
   def add(widget, *args)
     configure(widget, *args)
   end
@@ -228,7 +242,7 @@
     list(tk_call_without_enc('grid', 'size', master))
   end
 
-  def slaves(master, args)
+  def slaves(master, keys=nil)
     # master = master.epath if master.kind_of?(TkObject)
     master = _epath(master)
     list(tk_call_without_enc('grid', 'slaves', master, *hash_kv(args)))
Index: ruby_1_9_1/version.h
===================================================================
--- ruby_1_9_1/version.h	(revision 24287)
+++ ruby_1_9_1/version.h	(revision 24288)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 245
+#define RUBY_PATCHLEVEL 246
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 9
 #define RUBY_VERSION_TEENY 1

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

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