Revision: 4002
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4002&view=rev
Author:   hofman
Date:     2008-06-11 04:39:21 -0700 (Wed, 11 Jun 2008)

Log Message:
-----------
Avoid copying toolbar items.

Modified Paths:
--------------
    trunk/SKBookmarkController.m

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2008-06-11 09:46:45 UTC (rev 4001)
+++ trunk/SKBookmarkController.m        2008-06-11 11:39:21 UTC (rev 4002)
@@ -660,11 +660,11 @@
     [[self window] setToolbar:toolbar];
 }
 
-- (NSToolbarItem *) toolbar:(NSToolbar *)toolbar 
itemForItemIdentifier:(NSString *)itemIdent willBeInsertedIntoToolbar:(BOOL) 
willBeInserted {
-
+- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar 
itemForItemIdentifier:(NSString *)itemIdent 
willBeInsertedIntoToolbar:(BOOL)willBeInserted {
     NSToolbarItem *item = [toolbarItems objectForKey:itemIdent];
-    NSToolbarItem *newItem = [[item copy] autorelease];
-    return newItem;
+    if (willBeInserted == NO)
+        item = [[item copy] autorelease];
+    return item;
 }
 
 - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to