[macruby-changes] [603] MacRuby/trunk/lib/hotcocoa/mappings/toolbar_item.rb

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 17 17:35:31 PDT 2008


Revision: 603
          http://trac.macosforge.org/projects/ruby/changeset/603
Author:   lsansonetti at apple.com
Date:     2008-09-17 17:35:31 -0700 (Wed, 17 Sep 2008)
Log Message:
-----------
set the palette label attribute as the label if provided

Modified Paths:
--------------
    MacRuby/trunk/lib/hotcocoa/mappings/toolbar_item.rb

Modified: MacRuby/trunk/lib/hotcocoa/mappings/toolbar_item.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/mappings/toolbar_item.rb	2008-09-18 00:29:23 UTC (rev 602)
+++ MacRuby/trunk/lib/hotcocoa/mappings/toolbar_item.rb	2008-09-18 00:35:31 UTC (rev 603)
@@ -2,8 +2,8 @@
 
   def init_with_options(toolbar_item, options)
     identifier = options.delete(:identifier)
+    label = options[:label]
     unless identifier
-      label = options[:label]
       if label
         identifier = label.tr(' ', '_')
       else
@@ -11,6 +11,10 @@
       end
     end
     toolbar_item.initWithItemIdentifier identifier
+    if label
+      toolbar_item.paletteLabel = label
+    end
+    toolbar_item
   end
 
   custom_methods do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080917/21e13815/attachment-0001.html 


More information about the macruby-changes mailing list