Revision: 6584
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6584&view=rev
Author:   hofman
Date:     2010-06-10 10:13:19 +0000 (Thu, 10 Jun 2010)

Log Message:
-----------
remove extra copy menu item from pdfview context menu

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2010-06-10 09:49:51 UTC (rev 6583)
+++ trunk/SKPDFView.m   2010-06-10 10:13:19 UTC (rev 6584)
@@ -1211,6 +1211,15 @@
     if (interactionMode == SKPresentationMode)
         return menu;
     
+    NSInteger copyIdx = [menu indexOfItemWithTarget:self 
andAction:@selector(copy:)];
+    if (copyIdx != -1) {
+        [menu removeItemAtIndex:copyIdx];
+        if ([menu numberOfItems] > copyIdx && [[menu itemAtIndex:copyIdx] 
isSeparatorItem] && (copyIdx == 0 || [[menu itemAtIndex:copyIdx - 1] 
isSeparatorItem]))
+            [menu removeItemAtIndex:copyIdx];
+        if (copyIdx > 0 && copyIdx == [menu numberOfItems] - 1 && [[menu 
itemAtIndex:copyIdx - 1] isSeparatorItem])
+            [menu removeItemAtIndex:copyIdx - 1];
+    }
+    
     [menu insertItem:[NSMenuItem separatorItem] atIndex:0];
     
     submenu = [[NSMenu allocWithZone:[menu zone]] init];


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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to