Revision: 5027
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5027&view=rev
Author:   hofman
Date:     2008-12-07 12:38:58 +0000 (Sun, 07 Dec 2008)

Log Message:
-----------
copy the correct page from contextual menu of thumbnail table

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

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2008-12-04 18:01:54 UTC (rev 5026)
+++ trunk/SKMainWindowController_UI.m   2008-12-07 12:38:58 UTC (rev 5027)
@@ -453,6 +453,10 @@
     }
 }
 
+- (void)copyPage:(id)sender {
+    [self tableView:thumbnailTableView copyRowsWithIndexes:[sender 
representedObject]];
+}
+
 - (void)showSnapshot:(id)sender {
     SKSnapshotWindowController *controller = [sender representedObject];
     if ([[controller window] isVisible])
@@ -471,8 +475,8 @@
     NSMenu *menu = nil;
     if ([tv isEqual:thumbnailTableView]) {
         menu = [[[NSMenu allocWithZone:[NSMenu menuZone]] init] autorelease];
-        NSMenuItem *menuItem = [menu 
addItemWithTitle:NSLocalizedString(@"Copy", @"Menu item title") 
action:@selector(copy:) target:thumbnailTableView];
-        [menuItem setRepresentedObject:[[pdfView document] pageAtIndex:row]];
+        NSMenuItem *menuItem = [menu 
addItemWithTitle:NSLocalizedString(@"Copy", @"Menu item title") 
action:@selector(copyPage:) target:self];
+        [menuItem setRepresentedObject:[NSIndexSet indexSetWithIndex:row]];
     } else if ([tv isEqual:snapshotTableView]) {
         [snapshotTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] 
byExtendingSelection:NO];
         


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

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to