Revision: 4306 http://skim-app.svn.sourceforge.net/skim-app/?rev=4306&view=rev Author: hofman Date: 2008-07-27 10:24:11 +0000 (Sun, 27 Jul 2008)
Log Message: ----------- change pragma mark and move action Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2008-07-26 21:06:07 UTC (rev 4305) +++ trunk/SKMainWindowController.m 2008-07-27 10:24:11 UTC (rev 4306) @@ -2052,6 +2052,28 @@ contextInfo:NULL]; } +- (void)bookmarkSheetDidEnd:(SKBookmarkSheetController *)controller returnCode:(int)returnCode contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + SKBookmarkController *bmController = [SKBookmarkController sharedBookmarkController]; + NSString *path = [[self document] fileName]; + NSString *label = [controller stringValue]; + unsigned int pageIndex = [[pdfView currentPage] pageIndex]; + [bmController addBookmarkForPath:path pageIndex:pageIndex label:label toFolder:[controller selectedFolder]]; + } +} + +- (IBAction)addBookmark:(id)sender { + if (bookmarkSheetController == nil) + bookmarkSheetController = [[SKBookmarkSheetController alloc] init]; + + [bookmarkSheetController setStringValue:[[self document] displayName]]; + + [bookmarkSheetController beginSheetModalForWindow: [self window] + modalDelegate:self + didEndSelector:@selector(bookmarkSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + - (IBAction)toggleReadingBar:(id)sender { [pdfView toggleReadingBar]; } @@ -3131,7 +3153,7 @@ [self registerDestinationHistory:dest]; } -#pragma mark Sub- and note- windows +#pragma mark Subwindows - (void)showSnapshotAtPageNumber:(int)pageNum forRect:(NSRect)rect scaleFactor:(float)scaleFactor autoFits:(BOOL)autoFits { SKSnapshotWindowController *swc = [[SKSnapshotWindowController alloc] init]; @@ -3282,30 +3304,6 @@ } } -#pragma mark Bookmarks - -- (void)bookmarkSheetDidEnd:(SKBookmarkSheetController *)controller returnCode:(int)returnCode contextInfo:(void *)contextInfo { - if (returnCode == NSAlertDefaultReturn) { - SKBookmarkController *bmController = [SKBookmarkController sharedBookmarkController]; - NSString *path = [[self document] fileName]; - NSString *label = [controller stringValue]; - unsigned int pageIndex = [[pdfView currentPage] pageIndex]; - [bmController addBookmarkForPath:path pageIndex:pageIndex label:label toFolder:[controller selectedFolder]]; - } -} - -- (IBAction)addBookmark:(id)sender { - if (bookmarkSheetController == nil) - bookmarkSheetController = [[SKBookmarkSheetController alloc] init]; - - [bookmarkSheetController setStringValue:[[self document] displayName]]; - - [bookmarkSheetController beginSheetModalForWindow: [self window] - modalDelegate:self - didEndSelector:@selector(bookmarkSheetDidEnd:returnCode:contextInfo:) - contextInfo:NULL]; -} - #pragma mark Observer registration - (void)registerAsObserver { 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 Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit