Revision: 5003
http://skim-app.svn.sourceforge.net/skim-app/?rev=5003&view=rev
Author: hofman
Date: 2008-11-27 15:19:14 +0000 (Thu, 27 Nov 2008)
Log Message:
-----------
redirect copy of thumbnail from contextual menu to table
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2008-11-27 12:51:28 UTC (rev 5002)
+++ trunk/SKMainWindowController_UI.m 2008-11-27 15:19:14 UTC (rev 5003)
@@ -453,22 +453,6 @@
}
}
-- (void)copyPage:(id)sender {
- PDFPage *page = [sender representedObject];
- NSData *pdfData = [page dataRepresentation];
- NSData *tiffData = [[page imageForBox:[pdfView displayBox]]
TIFFRepresentation];
- NSPasteboard *pboard = [NSPasteboard generalPasteboard];
- [pboard declareTypes:[NSArray arrayWithObjects:NSPDFPboardType,
NSTIFFPboardType, nil] owner:nil];
- [pboard setData:pdfData forType:NSPDFPboardType];
- [pboard setData:tiffData forType:NSTIFFPboardType];
-}
-
-- (void)deleteSnapshot:(id)sender {
- SKSnapshotWindowController *controller = [sender representedObject];
- [[controller window] orderOut:self];
- [[self mutableArrayValueForKey:SKMainWindowSnapshotsKey]
removeObject:controller];
-}
-
- (void)showSnapshot:(id)sender {
SKSnapshotWindowController *controller = [sender representedObject];
if ([[controller window] isVisible])
@@ -487,14 +471,14 @@
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(copyPage:) target:self];
+ NSMenuItem *menuItem = [menu
addItemWithTitle:NSLocalizedString(@"Copy", @"Menu item title")
action:@selector(copy:) target:thumbnailTableView];
[menuItem setRepresentedObject:[[pdfView document] pageAtIndex:row]];
} else if ([tv isEqual:snapshotTableView]) {
[snapshotTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row]
byExtendingSelection:NO];
menu = [[[NSMenu allocWithZone:[NSMenu menuZone]] init] autorelease];
SKSnapshotWindowController *controller = [[snapshotArrayController
arrangedObjects] objectAtIndex:row];
- NSMenuItem *menuItem = [menu
addItemWithTitle:NSLocalizedString(@"Delete", @"Menu item title")
action:@selector(deleteSnapshot:) target:self];
+ NSMenuItem *menuItem = [menu
addItemWithTitle:NSLocalizedString(@"Delete", @"Menu item title")
action:@selector(delete:) target:snapshotTableView];
[menuItem setRepresentedObject:controller];
menuItem = [menu addItemWithTitle:NSLocalizedString(@"Show", @"Menu
item title") action:@selector(showSnapshot:) target:self];
[menuItem setRepresentedObject:controller];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit