Revision
603
Author
lsansonetti@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

Diff

Modified: MacRuby/trunk/lib/hotcocoa/mappings/toolbar_item.rb (602 => 603)


--- 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