You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(23) |
Apr
(254) |
May
(252) |
Jun
(209) |
Jul
(198) |
Aug
(192) |
Sep
(207) |
Oct
(120) |
Nov
(179) |
Dec
(52) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(48) |
Feb
(69) |
Mar
(129) |
Apr
(250) |
May
(113) |
Jun
(177) |
Jul
(228) |
Aug
(155) |
Sep
(218) |
Oct
(185) |
Nov
(109) |
Dec
(88) |
2009 |
Jan
(83) |
Feb
(39) |
Mar
(70) |
Apr
(47) |
May
(48) |
Jun
(67) |
Jul
(61) |
Aug
(97) |
Sep
(221) |
Oct
(141) |
Nov
(70) |
Dec
(61) |
2010 |
Jan
(45) |
Feb
(76) |
Mar
(178) |
Apr
(106) |
May
(57) |
Jun
(32) |
Jul
(64) |
Aug
(98) |
Sep
(96) |
Oct
(19) |
Nov
(34) |
Dec
(117) |
2011 |
Jan
(55) |
Feb
(48) |
Mar
(64) |
Apr
(21) |
May
(39) |
Jun
(53) |
Jul
(99) |
Aug
(56) |
Sep
(39) |
Oct
(26) |
Nov
(19) |
Dec
(69) |
2012 |
Jan
(17) |
Feb
(40) |
Mar
(17) |
Apr
|
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(10) |
Sep
(10) |
Oct
(38) |
Nov
(48) |
Dec
(70) |
2013 |
Jan
(43) |
Feb
(47) |
Mar
(39) |
Apr
(37) |
May
(25) |
Jun
(6) |
Jul
(20) |
Aug
(49) |
Sep
(33) |
Oct
(34) |
Nov
(75) |
Dec
(6) |
2014 |
Jan
(32) |
Feb
(10) |
Mar
(17) |
Apr
|
May
|
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(4) |
Oct
(23) |
Nov
(80) |
Dec
(48) |
2015 |
Jan
(80) |
Feb
(50) |
Mar
(58) |
Apr
(20) |
May
(11) |
Jun
(16) |
Jul
(24) |
Aug
(27) |
Sep
(56) |
Oct
(30) |
Nov
(16) |
Dec
(6) |
2016 |
Jan
(31) |
Feb
(14) |
Mar
(23) |
Apr
(17) |
May
(40) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(32) |
Oct
(36) |
Nov
(23) |
Dec
(9) |
2017 |
Jan
(37) |
Feb
(23) |
Mar
(65) |
Apr
(22) |
May
(6) |
Jun
(3) |
Jul
|
Aug
|
Sep
(3) |
Oct
(22) |
Nov
(63) |
Dec
(71) |
2018 |
Jan
(83) |
Feb
(21) |
Mar
(35) |
Apr
(44) |
May
(14) |
Jun
(12) |
Jul
(8) |
Aug
(18) |
Sep
(10) |
Oct
(145) |
Nov
(144) |
Dec
(76) |
2019 |
Jan
(18) |
Feb
(28) |
Mar
(5) |
Apr
(208) |
May
(291) |
Jun
(158) |
Jul
(27) |
Aug
(8) |
Sep
(10) |
Oct
(83) |
Nov
(41) |
Dec
(31) |
2020 |
Jan
(16) |
Feb
(46) |
Mar
(100) |
Apr
(78) |
May
(69) |
Jun
(71) |
Jul
(28) |
Aug
(131) |
Sep
(176) |
Oct
(89) |
Nov
(147) |
Dec
(19) |
2021 |
Jan
(19) |
Feb
(25) |
Mar
(91) |
Apr
(98) |
May
(14) |
Jun
(44) |
Jul
(8) |
Aug
(3) |
Sep
(38) |
Oct
(57) |
Nov
(97) |
Dec
(74) |
2022 |
Jan
(89) |
Feb
(47) |
Mar
(15) |
Apr
(50) |
May
(54) |
Jun
(56) |
Jul
(80) |
Aug
(12) |
Sep
(11) |
Oct
(60) |
Nov
(48) |
Dec
(4) |
2023 |
Jan
(75) |
Feb
(49) |
Mar
(84) |
Apr
(24) |
May
(13) |
Jun
(74) |
Jul
(32) |
Aug
(66) |
Sep
(50) |
Oct
(38) |
Nov
(105) |
Dec
(181) |
2024 |
Jan
(21) |
Feb
(49) |
Mar
(77) |
Apr
(84) |
May
(20) |
Jun
(71) |
Jul
(53) |
Aug
(33) |
Sep
(54) |
Oct
(124) |
Nov
(151) |
Dec
(73) |
2025 |
Jan
(61) |
Feb
(17) |
Mar
(136) |
Apr
(72) |
May
(200) |
Jun
(238) |
Jul
(91) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ho...@us...> - 2007-06-02 11:02:11
|
Revision: 2207 http://skim-app.svn.sourceforge.net/skim-app/?rev=2207&view=rev Author: hofman Date: 2007-06-02 04:02:09 -0700 (Sat, 02 Jun 2007) Log Message: ----------- Add contextual menu items to show all note types or select displayed note types from a sheet. Modified Paths: -------------- trunk/Dutch.lproj/Localizable.strings trunk/Dutch.lproj/MainMenu.nib/info.nib trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib trunk/Dutch.lproj/MainWindow.nib/classes.nib trunk/Dutch.lproj/MainWindow.nib/info.nib trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib trunk/Dutch.lproj/NotesDocument.nib/classes.nib trunk/Dutch.lproj/NotesDocument.nib/keyedobjects.nib trunk/English.lproj/Localizable.strings trunk/English.lproj/MainWindow.nib/classes.nib trunk/English.lproj/MainWindow.nib/info.nib trunk/English.lproj/MainWindow.nib/keyedobjects.nib trunk/English.lproj/NotesDocument.nib/classes.nib trunk/English.lproj/NotesDocument.nib/info.nib trunk/English.lproj/NotesDocument.nib/keyedobjects.nib trunk/Italian.lproj/Localizable.strings trunk/Italian.lproj/MainWindow.nib/classes.nib trunk/Italian.lproj/MainWindow.nib/info.nib trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKNotesDocument.h trunk/SKNotesDocument.m Modified: trunk/Dutch.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainMenu.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -7,14 +7,10 @@ <key>IBEditorPositions</key> <dict> <key>29</key> - <string>140 614 635 44 0 0 1440 938 </string> + <string>140 614 542 44 0 0 1440 938 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> - <key>IBOpenObjects</key> - <array> - <integer>29</integer> - </array> <key>IBSystem Version</key> <string>8P135</string> </dict> Modified: trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainWindow.nib/classes.nib =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/classes.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/Dutch.lproj/MainWindow.nib/classes.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -36,6 +36,8 @@ { ACTIONS = { addBookmark = id; + autoCropAll = id; + autoSelectContent = id; changeColor = id; changeDisplayBox = id; changeLeftSidePaneState = id; @@ -44,10 +46,14 @@ changeToolMode = id; chooseScale = id; createNewNote = id; + crop = id; + cropAll = id; dismissBookmarkSheet = id; dismissChoosePageSheet = id; dismissChooseScaleSheet = id; + dismissNoteTypeSheet = id; dismissPasswordSheet = id; + displayAllNoteTypes = id; displayFacingPages = id; displaySinglePages = id; doAutoScale = id; @@ -60,6 +66,7 @@ doZoomOut = id; doZoomToActualSize = id; doZoomToFit = id; + doZoomToSelection = id; enterFullScreen = id; enterPresentation = id; exitFullScreen = id; @@ -75,11 +82,13 @@ savePDFSettingToDefaults = id; search = id; searchPDF = id; + selectNoteTypes = id; takeSnapshot = id; toggleAutoActualSize = id; toggleAutoScale = id; toggleDisplayAsBook = id; toggleDisplayContinuous = id; + toggleDisplayNoteType = id; toggleDisplayPageBreaks = id; toggleFullScreen = id; toggleLeftSidePane = id; @@ -114,6 +123,8 @@ noteArrayController = NSArrayController; noteOutlineView = SKNoteOutlineView; notePopUpButton = BDSKImagePopUpButton; + noteTypeMatrix = NSMatrix; + noteTypeSheet = NSWindow; noteView = NSView; outlineView = NSOutlineView; ownerController = NSObjectController; @@ -124,12 +135,13 @@ passwordSheet = NSWindow; pdfContentBox = BDSKEdgeView; pdfView = SKPDFView; + progressBar = NSProgressIndicator; + progressField = NSTextField; + progressSheet = NSWindow; rightSideBox = NSBox; rightSideButton = NSSegmentedControl; rightSideContentBox = NSBox; rightSideEdgeView = BDSKEdgeView; - saveProgressBar = NSProgressIndicator; - saveProgressSheet = NSWindow; scaleField = NSTextField; searchField = NSSearchField; snapshotArrayController = NSArrayController; Modified: trunk/Dutch.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -27,7 +27,12 @@ </array> <key>IBOpenObjects</key> <array> - <integer>511</integer> + <integer>585</integer> + <integer>208</integer> + <integer>168</integer> + <integer>256</integer> + <integer>553</integer> + <integer>5</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/NotesDocument.nib/classes.nib =================================================================== --- trunk/Dutch.lproj/NotesDocument.nib/classes.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/Dutch.lproj/NotesDocument.nib/classes.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -15,10 +15,21 @@ }, {CLASS = SKNoteOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, { - ACTIONS = {openPDF = id; }; + ACTIONS = { + dismissNoteTypeSheet = id; + displayAllNoteTypes = id; + openPDF = id; + selectNoteTypes = id; + toggleDisplayNoteType = id; + }; CLASS = SKNotesDocument; LANGUAGE = ObjC; - OUTLETS = {arrayController = NSArrayController; outlineView = NSOutlineView; }; + OUTLETS = { + arrayController = NSArrayController; + noteTypeMatrix = NSMatrix; + noteTypeSheet = NSWindow; + outlineView = NSOutlineView; + }; SUPERCLASS = NSDocument; } ); Modified: trunk/Dutch.lproj/NotesDocument.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainWindow.nib/classes.nib =================================================================== --- trunk/English.lproj/MainWindow.nib/classes.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/English.lproj/MainWindow.nib/classes.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -36,6 +36,8 @@ { ACTIONS = { addBookmark = id; + autoCropAll = id; + autoSelectContent = id; changeColor = id; changeDisplayBox = id; changeLeftSidePaneState = id; @@ -44,10 +46,14 @@ changeToolMode = id; chooseScale = id; createNewNote = id; + crop = id; + cropAll = id; dismissBookmarkSheet = id; dismissChoosePageSheet = id; dismissChooseScaleSheet = id; + dismissNoteTypeSheet = id; dismissPasswordSheet = id; + displayAllNoteTypes = id; displayFacingPages = id; displaySinglePages = id; doAutoScale = id; @@ -60,6 +66,7 @@ doZoomOut = id; doZoomToActualSize = id; doZoomToFit = id; + doZoomToSelection = id; enterFullScreen = id; enterPresentation = id; exitFullScreen = id; @@ -75,11 +82,13 @@ savePDFSettingToDefaults = id; search = id; searchPDF = id; + selectNoteTypes = id; takeSnapshot = id; toggleAutoActualSize = id; toggleAutoScale = id; toggleDisplayAsBook = id; toggleDisplayContinuous = id; + toggleDisplayNoteType = id; toggleDisplayPageBreaks = id; toggleFullScreen = id; toggleLeftSidePane = id; @@ -114,6 +123,8 @@ noteArrayController = NSArrayController; noteOutlineView = SKNoteOutlineView; notePopUpButton = BDSKImagePopUpButton; + noteTypeMatrix = NSMatrix; + noteTypeSheet = NSWindow; noteView = NSView; outlineView = NSOutlineView; ownerController = NSObjectController; @@ -124,12 +135,13 @@ passwordSheet = NSWindow; pdfContentBox = BDSKEdgeView; pdfView = SKPDFView; + progressBar = NSProgressIndicator; + progressField = NSTextField; + progressSheet = NSWindow; rightSideBox = NSBox; rightSideButton = NSSegmentedControl; rightSideContentBox = NSBox; rightSideEdgeView = BDSKEdgeView; - saveProgressBar = NSProgressIndicator; - saveProgressSheet = NSWindow; scaleField = NSTextField; searchField = NSSearchField; snapshotArrayController = NSArrayController; Modified: trunk/English.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/English.lproj/MainWindow.nib/info.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/English.lproj/MainWindow.nib/info.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -27,17 +27,18 @@ </array> <key>IBOpenObjects</key> <array> - <integer>539</integer> - <integer>208</integer> - <integer>5</integer> + <integer>600</integer> <integer>224</integer> + <integer>256</integer> + <integer>502</integer> <integer>168</integer> <integer>585</integer> - <integer>256</integer> + <integer>208</integer> <integer>553</integer> + <integer>511</integer> + <integer>539</integer> <integer>314</integer> - <integer>511</integer> - <integer>502</integer> + <integer>5</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/English.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/NotesDocument.nib/classes.nib =================================================================== --- trunk/English.lproj/NotesDocument.nib/classes.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/English.lproj/NotesDocument.nib/classes.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -15,10 +15,21 @@ }, {CLASS = SKNoteOutlineView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, { - ACTIONS = {openPDF = id; }; + ACTIONS = { + dismissNoteTypeSheet = id; + displayAllNoteTypes = id; + openPDF = id; + selectNoteTypes = id; + toggleDisplayNoteType = id; + }; CLASS = SKNotesDocument; LANGUAGE = ObjC; - OUTLETS = {arrayController = NSArrayController; outlineView = NSOutlineView; }; + OUTLETS = { + arrayController = NSArrayController; + noteTypeMatrix = NSMatrix; + noteTypeSheet = NSWindow; + outlineView = NSOutlineView; + }; SUPERCLASS = NSDocument; } ); Modified: trunk/English.lproj/NotesDocument.nib/info.nib =================================================================== --- trunk/English.lproj/NotesDocument.nib/info.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/English.lproj/NotesDocument.nib/info.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -9,6 +9,7 @@ <key>IBOpenObjects</key> <array> <integer>5</integer> + <integer>62</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/English.lproj/NotesDocument.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainWindow.nib/classes.nib =================================================================== --- trunk/Italian.lproj/MainWindow.nib/classes.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/Italian.lproj/MainWindow.nib/classes.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -36,6 +36,8 @@ { ACTIONS = { addBookmark = id; + autoCropAll = id; + autoSelectContent = id; changeColor = id; changeDisplayBox = id; changeLeftSidePaneState = id; @@ -44,10 +46,14 @@ changeToolMode = id; chooseScale = id; createNewNote = id; + crop = id; + cropAll = id; dismissBookmarkSheet = id; dismissChoosePageSheet = id; dismissChooseScaleSheet = id; + dismissNoteTypeSheet = id; dismissPasswordSheet = id; + displayAllNoteTypes = id; displayFacingPages = id; displaySinglePages = id; doAutoScale = id; @@ -60,6 +66,7 @@ doZoomOut = id; doZoomToActualSize = id; doZoomToFit = id; + doZoomToSelection = id; enterFullScreen = id; enterPresentation = id; exitFullScreen = id; @@ -75,11 +82,13 @@ savePDFSettingToDefaults = id; search = id; searchPDF = id; + selectNoteTypes = id; takeSnapshot = id; toggleAutoActualSize = id; toggleAutoScale = id; toggleDisplayAsBook = id; toggleDisplayContinuous = id; + toggleDisplayNoteType = id; toggleDisplayPageBreaks = id; toggleFullScreen = id; toggleLeftSidePane = id; @@ -114,6 +123,8 @@ noteArrayController = NSArrayController; noteOutlineView = SKNoteOutlineView; notePopUpButton = BDSKImagePopUpButton; + noteTypeMatrix = NSMatrix; + noteTypeSheet = NSWindow; noteView = NSView; outlineView = NSOutlineView; ownerController = NSObjectController; @@ -124,12 +135,13 @@ passwordSheet = NSWindow; pdfContentBox = BDSKEdgeView; pdfView = SKPDFView; + progressBar = NSProgressIndicator; + progressField = NSTextField; + progressSheet = NSWindow; rightSideBox = NSBox; rightSideButton = NSSegmentedControl; rightSideContentBox = NSBox; rightSideEdgeView = BDSKEdgeView; - saveProgressBar = NSProgressIndicator; - saveProgressSheet = NSWindow; scaleField = NSTextField; searchField = NSSearchField; snapshotArrayController = NSArrayController; Modified: trunk/Italian.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-02 11:02:09 UTC (rev 2207) @@ -27,9 +27,10 @@ </array> <key>IBOpenObjects</key> <array> + <integer>601</integer> + <integer>168</integer> <integer>511</integer> <integer>553</integer> - <integer>168</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/SKMainWindowController.h 2007-06-02 11:02:09 UTC (rev 2207) @@ -151,6 +151,9 @@ IBOutlet NSWindow *bookmarkSheet; IBOutlet NSTextField *bookmarkField; + IBOutlet NSWindow *noteTypeSheet; + IBOutlet NSMatrix *noteTypeMatrix; + IBOutlet NSWindow *progressSheet; IBOutlet NSProgressIndicator *progressBar; IBOutlet NSTextField *progressField; @@ -226,7 +229,10 @@ - (IBAction)password:(id)sender; - (IBAction)dismissPasswordSheet:(id)sender; - (IBAction)savePDFSettingToDefaults:(id)sender; -- (void)toggleDisplayNoteType:(id)sender; +- (IBAction)toggleDisplayNoteType:(id)sender; +- (IBAction)displayAllNoteTypes:(id)sender; +- (IBAction)selectNoteTypes:(id)sender; +- (IBAction)dismissNoteTypeSheet:(id)sender; - (void)showSnapshotAtPageNumber:(int)pageNum forRect:(NSRect)rect factor:(int)factor; - (void)toggleSnapshots:(NSArray *)snapshotArray; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/SKMainWindowController.m 2007-06-02 11:02:09 UTC (rev 2207) @@ -281,6 +281,11 @@ [menuItem setTarget:self]; [menuItem setRepresentedObject:@"Line"]; [menuItem setState:NSOnState]; + [menu addItem:[NSMenuItem separatorItem]]; + menuItem = [menu addItemWithTitle:NSLocalizedString(@"Show All", @"Menu item title") action:@selector(displayAllNoteTypes:) keyEquivalent:@""]; + [menuItem setTarget:self]; + menuItem = [menu addItemWithTitle:[NSLocalizedString(@"Select", @"Menu item title") stringByAppendingEllipsis] action:@selector(selectNoteTypes:) keyEquivalent:@""]; + [menuItem setTarget:self]; [[noteOutlineView headerView] setMenu:menu]; // NB: the next line will load the PDF document and annotations, so necessary setup must be finished first! @@ -1742,16 +1747,14 @@ [pdfView printWithInfo:[[self document] printInfo] autoRotate:NO]; } -- (void)toggleDisplayNoteType:(id)sender { - [sender setState:![sender state]]; - +- (void)updateNoteTypeFilter { NSExpression *lhs = [NSExpression expressionForKeyPath:@"type"]; NSMutableArray *predicateArray = [NSMutableArray array]; NSMenu *menu = [[noteOutlineView headerView] menu]; - int i, iMax = [menu numberOfItems]; + int i; BOOL shouldFilter = NO; - for (i = 0; i < iMax; i++) { + for (i = 0; i < 8; i++) { NSMenuItem *item = [menu itemAtIndex:i]; if ([item state] == NSOnState) { NSString *type = [item representedObject]; @@ -1766,6 +1769,47 @@ [noteOutlineView reloadData]; } +- (IBAction)toggleDisplayNoteType:(id)sender { + [sender setState:![sender state]]; + [self updateNoteTypeFilter]; +} + +- (IBAction)displayAllNoteTypes:(id)sender { + NSMenu *menu = [[noteOutlineView headerView] menu]; + int i; + for (i = 0; i < 8; i++) + [[menu itemAtIndex:i] setState:NSOnState]; + [self updateNoteTypeFilter]; +} + +- (void)noteTypeSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { + if (returnCode == NSOKButton) { + NSMenu *menu = [[noteOutlineView headerView] menu]; + int i; + for (i = 0; i < 8; i++) + [[menu itemAtIndex:i] setState:[[noteTypeMatrix cellAtRow:i % 4 column:i / 4] state]]; + [self updateNoteTypeFilter]; + } +} + +- (IBAction)selectNoteTypes:(id)sender { + NSMenu *menu = [[noteOutlineView headerView] menu]; + int i; + for (i = 0; i < 8; i++) + [[noteTypeMatrix cellAtRow:i % 4 column:i / 4] setState:[[menu itemAtIndex:i] state]]; + + [NSApp beginSheet:noteTypeSheet + modalForWindow:[self window] + modalDelegate:self + didEndSelector:@selector(noteTypeSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)dismissNoteTypeSheet:(id)sender { + [NSApp endSheet:noteTypeSheet returnCode:[sender tag]]; + [noteTypeSheet orderOut:self]; +} + #pragma mark Swapping tables - (void)replaceSideView:(NSView *)oldView withView:(NSView *)newView animate:(BOOL)animate { Modified: trunk/SKNotesDocument.h =================================================================== --- trunk/SKNotesDocument.h 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/SKNotesDocument.h 2007-06-02 11:02:09 UTC (rev 2207) @@ -42,6 +42,8 @@ @interface SKNotesDocument : NSDocument { IBOutlet NSOutlineView *outlineView; IBOutlet NSArrayController *arrayController; + IBOutlet NSWindow *noteTypeSheet; + IBOutlet NSMatrix *noteTypeMatrix; NSMutableArray *notes; } @@ -57,6 +59,9 @@ - (NSString *)notesString; - (NSData *)notesRTFData; -- (void)toggleDisplayNoteType:(id)sender; +- (IBAction)toggleDisplayNoteType:(id)sender; +- (IBAction)displayAllNoteTypes:(id)sender; +- (IBAction)selectNoteTypes:(id)sender; +- (IBAction)dismissNoteTypeSheet:(id)sender; @end Modified: trunk/SKNotesDocument.m =================================================================== --- trunk/SKNotesDocument.m 2007-06-02 09:16:38 UTC (rev 2206) +++ trunk/SKNotesDocument.m 2007-06-02 11:02:09 UTC (rev 2207) @@ -44,6 +44,7 @@ #import "SKTemplateParser.h" #import "SKApplicationController.h" #import "NSString_SKExtensions.h" +#import "NSValue_SKExtensions.h" @implementation SKNotesDocument @@ -104,6 +105,11 @@ [menuItem setTarget:self]; [menuItem setRepresentedObject:@"Line"]; [menuItem setState:NSOnState]; + [menu addItem:[NSMenuItem separatorItem]]; + menuItem = [menu addItemWithTitle:NSLocalizedString(@"Show All", @"Menu item title") action:@selector(displayAllNoteTypes:) keyEquivalent:@""]; + [menuItem setTarget:self]; + menuItem = [menu addItemWithTitle:[NSLocalizedString(@"Select", @"Menu item title") stringByAppendingEllipsis] action:@selector(selectNoteTypes:) keyEquivalent:@""]; + [menuItem setTarget:self]; [[outlineView headerView] setMenu:menu]; [outlineView reloadData]; @@ -198,16 +204,14 @@ else NSBeep(); } -- (void)toggleDisplayNoteType:(id)sender { - [sender setState:![sender state]]; - +- (void)updateNoteTypeFilter { NSExpression *lhs = [NSExpression expressionForKeyPath:@"type"]; NSMutableArray *predicateArray = [NSMutableArray array]; NSMenu *menu = [[outlineView headerView] menu]; - int i, iMax = [menu numberOfItems]; + int i; BOOL shouldFilter = NO; - for (i = 0; i < iMax; i++) { + for (i = 0; i < 8; i++) { NSMenuItem *item = [menu itemAtIndex:i]; if ([item state] == NSOnState) { NSString *type = [item representedObject]; @@ -222,6 +226,47 @@ [outlineView reloadData]; } +- (IBAction)toggleDisplayNoteType:(id)sender { + [sender setState:![sender state]]; + [self updateNoteTypeFilter]; +} + +- (IBAction)displayAllNoteTypes:(id)sender { + NSMenu *menu = [[outlineView headerView] menu]; + int i; + for (i = 0; i < 8; i++) + [[menu itemAtIndex:i] setState:NSOnState]; + [self updateNoteTypeFilter]; +} + +- (void)noteTypeSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { + if (returnCode == NSOKButton) { + NSMenu *menu = [[outlineView headerView] menu]; + int i; + for (i = 0; i < 8; i++) + [[menu itemAtIndex:i] setState:[[noteTypeMatrix cellAtRow:i % 4 column:i / 4] state]]; + [self updateNoteTypeFilter]; + } +} + +- (IBAction)selectNoteTypes:(id)sender { + NSMenu *menu = [[outlineView headerView] menu]; + int i; + for (i = 0; i < 8; i++) + [[noteTypeMatrix cellAtRow:i % 4 column:i / 4] setState:[[menu itemAtIndex:i] state]]; + + [NSApp beginSheet:noteTypeSheet + modalForWindow:[self windowForSheet] + modalDelegate:self + didEndSelector:@selector(noteTypeSheetDidEnd:returnCode:contextInfo:) + contextInfo:NULL]; +} + +- (IBAction)dismissNoteTypeSheet:(id)sender { + [NSApp endSheet:noteTypeSheet returnCode:[sender tag]]; + [noteTypeSheet orderOut:self]; +} + #pragma mark Accessors - (NSArray *)notes { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-02 09:16:41
|
Revision: 2206 http://skim-app.svn.sourceforge.net/skim-app/?rev=2206&view=rev Author: hofman Date: 2007-06-02 02:16:38 -0700 (Sat, 02 Jun 2007) Log Message: ----------- fix sort selector for type. Modified Paths: -------------- trunk/SKMainWindowController.m trunk/SKNotesDocument.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-01 22:07:11 UTC (rev 2205) +++ trunk/SKMainWindowController.m 2007-06-02 09:16:38 UTC (rev 2206) @@ -2572,7 +2572,7 @@ NSSortDescriptor *boundsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"bounds" ascending:ascending selector:@selector(boundsCompare:)] autorelease]; NSMutableArray *sds = [NSMutableArray arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil]; if ([tcID isEqualToString:@"type"]) { - [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"noteType" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; + [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"noteType" ascending:YES] autorelease] atIndex:0]; } else if ([tcID isEqualToString:@"note"]) { [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"contents" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; } else if ([tcID isEqualToString:@"page"]) { Modified: trunk/SKNotesDocument.m =================================================================== --- trunk/SKNotesDocument.m 2007-06-01 22:07:11 UTC (rev 2205) +++ trunk/SKNotesDocument.m 2007-06-02 09:16:38 UTC (rev 2206) @@ -296,7 +296,7 @@ NSSortDescriptor *boundsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"bounds" ascending:ascending selector:@selector(boundsCompare:)] autorelease]; NSMutableArray *sds = [NSMutableArray arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil]; if ([tcID isEqualToString:@"type"]) { - [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"noteType" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; + [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"noteType" ascending:YES] autorelease] atIndex:0]; } else if ([tcID isEqualToString:@"note"]) { [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"contents" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; } else if ([tcID isEqualToString:@"page"]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 22:07:14
|
Revision: 2205 http://skim-app.svn.sourceforge.net/skim-app/?rev=2205&view=rev Author: hofman Date: 2007-06-01 15:07:11 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Implement sorting and filtering of notes in notes document. Modified Paths: -------------- trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib trunk/English.lproj/MainWindow.nib/info.nib trunk/English.lproj/MainWindow.nib/keyedobjects.nib trunk/Italian.lproj/MainWindow.nib/info.nib trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib trunk/SKMainWindowController.m trunk/SKNotesDocument.h trunk/SKNotesDocument.m trunk/Skim.xcodeproj/project.pbxproj Modified: trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/English.lproj/MainWindow.nib/info.nib 2007-06-01 21:51:06 UTC (rev 2204) +++ trunk/English.lproj/MainWindow.nib/info.nib 2007-06-01 22:07:11 UTC (rev 2205) @@ -27,17 +27,17 @@ </array> <key>IBOpenObjects</key> <array> - <integer>314</integer> <integer>539</integer> - <integer>502</integer> + <integer>208</integer> + <integer>5</integer> <integer>224</integer> - <integer>511</integer> - <integer>553</integer> - <integer>5</integer> - <integer>208</integer> + <integer>168</integer> <integer>585</integer> <integer>256</integer> - <integer>168</integer> + <integer>553</integer> + <integer>314</integer> + <integer>511</integer> + <integer>502</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/English.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-01 21:51:06 UTC (rev 2204) +++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-01 22:07:11 UTC (rev 2205) @@ -27,9 +27,9 @@ </array> <key>IBOpenObjects</key> <array> + <integer>511</integer> + <integer>553</integer> <integer>168</integer> - <integer>553</integer> - <integer>511</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-01 21:51:06 UTC (rev 2204) +++ trunk/SKMainWindowController.m 2007-06-01 22:07:11 UTC (rev 2205) @@ -2570,7 +2570,7 @@ NSString *tcID = [tableColumn identifier]; NSSortDescriptor *pageIndexSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"pageIndex" ascending:ascending] autorelease]; NSSortDescriptor *boundsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"bounds" ascending:ascending selector:@selector(boundsCompare:)] autorelease]; - NSMutableArray *sds = [NSArray arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil]; + NSMutableArray *sds = [NSMutableArray arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil]; if ([tcID isEqualToString:@"type"]) { [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"noteType" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; } else if ([tcID isEqualToString:@"note"]) { Modified: trunk/SKNotesDocument.h =================================================================== --- trunk/SKNotesDocument.h 2007-06-01 21:51:06 UTC (rev 2204) +++ trunk/SKNotesDocument.h 2007-06-01 22:07:11 UTC (rev 2205) @@ -57,4 +57,6 @@ - (NSString *)notesString; - (NSData *)notesRTFData; +- (void)toggleDisplayNoteType:(id)sender; + @end Modified: trunk/SKNotesDocument.m =================================================================== --- trunk/SKNotesDocument.m 2007-06-01 21:51:06 UTC (rev 2204) +++ trunk/SKNotesDocument.m 2007-06-01 22:07:11 UTC (rev 2205) @@ -38,11 +38,12 @@ #import "SKNotesDocument.h" #import "SKDocument.h" -#import "SKNoteOutlineView.h" +#import "SKoutlineView.h" #import "BDAlias.h" #import "SKDocumentController.h" #import "SKTemplateParser.h" #import "SKApplicationController.h" +#import "NSString_SKExtensions.h" @implementation SKNotesDocument @@ -69,6 +70,42 @@ NSSortDescriptor *contentsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"contents" ascending:YES] autorelease]; [arrayController setSortDescriptors:[NSArray arrayWithObjects:indexSortDescriptor, contentsSortDescriptor, nil]]; + NSMenu *menu = [[[NSMenu allocWithZone:[NSMenu menuZone]] init] autorelease]; + NSMenuItem *menuItem = nil; + menuItem = [menu addItemWithTitle:[@"FreeText" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"FreeText"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Note" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setState:NSOnState]; + [menuItem setRepresentedObject:@"Note"]; + menuItem = [menu addItemWithTitle:[@"Circle" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Circle"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Square" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Square"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Highlight" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Highlight"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Underline" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Underline"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"StrikeOut" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"StrikeOut"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Line" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Line"]; + [menuItem setState:NSOnState]; + [[outlineView headerView] setMenu:menu]; + [outlineView reloadData]; } @@ -161,6 +198,30 @@ else NSBeep(); } +- (void)toggleDisplayNoteType:(id)sender { + [sender setState:![sender state]]; + + NSExpression *lhs = [NSExpression expressionForKeyPath:@"type"]; + NSMutableArray *predicateArray = [NSMutableArray array]; + NSMenu *menu = [[outlineView headerView] menu]; + int i, iMax = [menu numberOfItems]; + BOOL shouldFilter = NO; + + for (i = 0; i < iMax; i++) { + NSMenuItem *item = [menu itemAtIndex:i]; + if ([item state] == NSOnState) { + NSString *type = [item representedObject]; + NSExpression *rhs = [NSExpression expressionForConstantValue:type]; + NSPredicate *predicate = [NSComparisonPredicate predicateWithLeftExpression:lhs rightExpression:rhs modifier:NSDirectPredicateModifier type:NSEqualToPredicateOperatorType options:0]; + [predicateArray addObject:predicate]; + } else { + shouldFilter = YES; + } + } + [arrayController setFilterPredicate:shouldFilter ? [NSCompoundPredicate orPredicateWithSubpredicates:predicateArray] : nil]; + [outlineView reloadData]; +} + #pragma mark Accessors - (NSArray *)notes { @@ -191,7 +252,7 @@ - (int)outlineView:(NSOutlineView *)ov numberOfChildrenOfItem:(id)item { if (item == nil) - return [notes count]; + return [[arrayController arrangedObjects] count]; else if ([[item valueForKey:@"type"] isEqualToString:@"Note"]) return 1; return 0; @@ -222,6 +283,37 @@ return nil; } +- (void)outlineView:(NSOutlineView *)ov didClickTableColumn:(NSTableColumn *)tableColumn { + NSTableColumn *oldTableColumn = [ov highlightedTableColumn]; + NSArray *sortDescriptors = nil; + BOOL ascending = YES; + if ([oldTableColumn isEqual:tableColumn]) { + sortDescriptors = [[arrayController sortDescriptors] valueForKey:@"reversedSortDescriptor"]; + ascending = [[sortDescriptors lastObject] ascending]; + } else { + NSString *tcID = [tableColumn identifier]; + NSSortDescriptor *pageIndexSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"pageIndex" ascending:ascending] autorelease]; + NSSortDescriptor *boundsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"bounds" ascending:ascending selector:@selector(boundsCompare:)] autorelease]; + NSMutableArray *sds = [NSMutableArray arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil]; + if ([tcID isEqualToString:@"type"]) { + [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"noteType" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; + } else if ([tcID isEqualToString:@"note"]) { + [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"contents" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; + } else if ([tcID isEqualToString:@"page"]) { + if (oldTableColumn == nil) + ascending = NO; + } + sortDescriptors = sds; + if (oldTableColumn) + [ov setIndicatorImage:nil inTableColumn:oldTableColumn]; + [ov setHighlightedTableColumn:tableColumn]; + } + [arrayController setSortDescriptors:sortDescriptors]; + [ov setIndicatorImage:[NSImage imageNamed:ascending ? @"NSAscendingSortIndicator" : @"NSDescendingSortIndicator"] + inTableColumn:tableColumn]; + [ov reloadData]; +} + - (float)outlineView:(NSOutlineView *)ov heightOfRowByItem:(id)item { NSNumber *heightNumber = [item valueForKey:@"rowHeight"]; return heightNumber ? [heightNumber floatValue] : 17.0; Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2007-06-01 21:51:06 UTC (rev 2204) +++ trunk/Skim.xcodeproj/project.pbxproj 2007-06-01 22:07:11 UTC (rev 2205) @@ -311,7 +311,7 @@ 45A3BD380B4F097D002B297F /* InitialUserDefaults.plist */ = {isa = PBXFileReference; explicitFileType = text.xml; fileEncoding = 4; path = InitialUserDefaults.plist; sourceTree = "<group>"; }; 45B113BF0B329A7E00DE0660 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; }; - 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; A489FDBA0BC8E8D100BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/InfoWindow.nib; sourceTree = "<group>"; }; A489FDBD0BC8E8DA00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainMenu.nib; sourceTree = "<group>"; }; A489FDC00BC8E8DF00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainWindow.nib; sourceTree = "<group>"; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 21:51:09
|
Revision: 2204 http://skim-app.svn.sourceforge.net/skim-app/?rev=2204&view=rev Author: hofman Date: 2007-06-01 14:51:06 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Declare selector. Modified Paths: -------------- trunk/SKMainWindowController.h Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2007-06-01 21:03:22 UTC (rev 2203) +++ trunk/SKMainWindowController.h 2007-06-01 21:51:06 UTC (rev 2204) @@ -226,6 +226,7 @@ - (IBAction)password:(id)sender; - (IBAction)dismissPasswordSheet:(id)sender; - (IBAction)savePDFSettingToDefaults:(id)sender; +- (void)toggleDisplayNoteType:(id)sender; - (void)showSnapshotAtPageNumber:(int)pageNum forRect:(NSRect)rect factor:(int)factor; - (void)toggleSnapshots:(NSArray *)snapshotArray; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 21:03:23
|
Revision: 2203 http://skim-app.svn.sourceforge.net/skim-app/?rev=2203&view=rev Author: hofman Date: 2007-06-01 14:03:22 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Add a filter for notes in noteOutlineView. Can be changed through the context menu of the headerView. Modified Paths: -------------- trunk/NSString_SKExtensions.h trunk/NSString_SKExtensions.m trunk/SKMainWindowController.m Modified: trunk/NSString_SKExtensions.h =================================================================== --- trunk/NSString_SKExtensions.h 2007-06-01 20:05:36 UTC (rev 2202) +++ trunk/NSString_SKExtensions.h 2007-06-01 21:03:22 UTC (rev 2203) @@ -52,6 +52,8 @@ - (NSRange)rangeOfTrailingEmptyLine; - (NSRange)rangeOfTrailingEmptyLineInRange:(NSRange)range; +- (NSString *)typeName; + - (NSString *)rectString; - (NSString *)pointString; - (NSString *)originString; Modified: trunk/NSString_SKExtensions.m =================================================================== --- trunk/NSString_SKExtensions.m 2007-06-01 20:05:36 UTC (rev 2202) +++ trunk/NSString_SKExtensions.m 2007-06-01 21:03:22 UTC (rev 2203) @@ -231,7 +231,7 @@ return NSLocalizedString(@"Underline", @"Description for export"); else if ([self isEqualToString:@"StrikeOut"]) return NSLocalizedString(@"Strike Out", @"Description for export"); - else if ([self isEqualToString:@"Arrow"]) + else if ([self isEqualToString:@"Line"]) return NSLocalizedString(@"Arrow", @"Description for export"); else return self; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-01 20:05:36 UTC (rev 2202) +++ trunk/SKMainWindowController.m 2007-06-01 21:03:22 UTC (rev 2203) @@ -247,6 +247,42 @@ [snapshotArrayController setSortDescriptors:[NSArray arrayWithObjects:pageIndexSortDescriptor, nil]]; [ownerController setContent:self]; + NSMenu *menu = [[[NSMenu allocWithZone:[NSMenu menuZone]] init] autorelease]; + NSMenuItem *menuItem = nil; + menuItem = [menu addItemWithTitle:[@"FreeText" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"FreeText"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Note" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setState:NSOnState]; + [menuItem setRepresentedObject:@"Note"]; + menuItem = [menu addItemWithTitle:[@"Circle" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Circle"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Square" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Square"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Highlight" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Highlight"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Underline" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Underline"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"StrikeOut" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"StrikeOut"]; + [menuItem setState:NSOnState]; + menuItem = [menu addItemWithTitle:[@"Line" typeName] action:@selector(toggleDisplayNoteType:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setRepresentedObject:@"Line"]; + [menuItem setState:NSOnState]; + [[noteOutlineView headerView] setMenu:menu]; + // NB: the next line will load the PDF document and annotations, so necessary setup must be finished first! // windowControllerDidLoadNib: is not called automatically because the document overrides makeWindowControllers [[self document] windowControllerDidLoadNib:self]; @@ -1706,6 +1742,30 @@ [pdfView printWithInfo:[[self document] printInfo] autoRotate:NO]; } +- (void)toggleDisplayNoteType:(id)sender { + [sender setState:![sender state]]; + + NSExpression *lhs = [NSExpression expressionForKeyPath:@"type"]; + NSMutableArray *predicateArray = [NSMutableArray array]; + NSMenu *menu = [[noteOutlineView headerView] menu]; + int i, iMax = [menu numberOfItems]; + BOOL shouldFilter = NO; + + for (i = 0; i < iMax; i++) { + NSMenuItem *item = [menu itemAtIndex:i]; + if ([item state] == NSOnState) { + NSString *type = [item representedObject]; + NSExpression *rhs = [NSExpression expressionForConstantValue:type]; + NSPredicate *predicate = [NSComparisonPredicate predicateWithLeftExpression:lhs rightExpression:rhs modifier:NSDirectPredicateModifier type:NSEqualToPredicateOperatorType options:0]; + [predicateArray addObject:predicate]; + } else { + shouldFilter = YES; + } + } + [noteArrayController setFilterPredicate:shouldFilter ? [NSCompoundPredicate orPredicateWithSubpredicates:predicateArray] : nil]; + [noteOutlineView reloadData]; +} + #pragma mark Swapping tables - (void)replaceSideView:(NSView *)oldView withView:(NSView *)newView animate:(BOOL)animate { @@ -2185,8 +2245,8 @@ if (annotation) { updatingNoteSelection = YES; - [noteArrayController addObject:annotation]; - [noteArrayController rearrangeObjects]; // doesn't see to be done automatically + [[self mutableArrayValueForKey:@"notes"] addObject:annotation]; + [noteArrayController rearrangeObjects]; // doesn't seem to be done automatically updatingNoteSelection = NO; } if (page) { @@ -2218,7 +2278,8 @@ break; } } - [noteArrayController removeObject:annotation]; + [[self mutableArrayValueForKey:@"notes"] removeObject:annotation]; + [noteArrayController rearrangeObjects]; } if (page) { [self updateThumbnailAtPageIndex:[[pdfView document] indexForPage:page]]; @@ -2389,7 +2450,7 @@ } } else if ([ov isEqual:noteOutlineView]) { if (item == nil) { - return [self countOfNotes]; + return [[noteArrayController arrangedObjects] count]; } else { return [[item texts] count]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ama...@us...> - 2007-06-01 20:05:38
|
Revision: 2202 http://skim-app.svn.sourceforge.net/skim-app/?rev=2202&view=rev Author: amaxwell Date: 2007-06-01 13:05:36 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Use environment variable to find Help Indexer.app Modified Paths: -------------- trunk/Skim.xcodeproj/project.pbxproj Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2007-06-01 18:56:11 UTC (rev 2201) +++ trunk/Skim.xcodeproj/project.pbxproj 2007-06-01 20:05:36 UTC (rev 2202) @@ -311,7 +311,7 @@ 45A3BD380B4F097D002B297F /* InitialUserDefaults.plist */ = {isa = PBXFileReference; explicitFileType = text.xml; fileEncoding = 4; path = InitialUserDefaults.plist; sourceTree = "<group>"; }; 45B113BF0B329A7E00DE0660 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; }; - 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; A489FDBA0BC8E8D100BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/InfoWindow.nib; sourceTree = "<group>"; }; A489FDBD0BC8E8DA00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainMenu.nib; sourceTree = "<group>"; }; A489FDC00BC8E8DF00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainWindow.nib; sourceTree = "<group>"; }; @@ -1205,7 +1205,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ ${BUILD_STYLE} = \"Debug\" ]; then\nexit 0\nfi\nif [ -d \"/Developer/Applications/Utilities/Help Indexer.app/\" ]; then\necho \"*** Indexing Tiger Help ***\"\ncd \"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nfor LOC_DIR in *.lproj; do \\\nif [ \"${LOC_DIR}\" = \"French.lproj\" ]; then LANG=\"fr\"; \\\nelif [ \"${LOC_DIR}\" = \"German.lproj\" ]; then LANG=\"de\"; \\\nelif [ \"${LOC_DIR}\" = \"Hungarian.lproj\" ]; then LANG=\"hu\"; \\\nelif [ \"${LOC_DIR}\" = \"Italian.lproj\" ]; then LANG=\"it\"; \\\nelif [ \"${LOC_DIR}\" = \"Spanish.lproj\" ]; then LANG=\"es\"; \\\nelif [ \"${LOC_DIR}\" = \"Swedish.lproj\" ]; then LANG=\"sv\"; \\\nelse LANG=\"en\"; \\\nfi; \\\n\"/Developer/Applications/Utilities/Help Indexer.app/Contents/MacOS/Help Indexer\" \\\n\"${LOC_DIR}/Skim Help\" \\\n-Tokenizer 1 \\\n-ShowProgress NO \\\n-LogStyle 2 \\\n-IndexAnchors YES \\\n-TigerIndexing YES \\\n-GenerateSummaries YES \\\n-Stopwords \"${LANG}\" \\\n-MinTermLength 3;\\\ndone\nfi\nexit 0"; + shellScript = "if [ ${BUILD_STYLE} = \"Debug\" ]; then\nexit 0\nfi\nif [ -d \"${SYSTEM_DEVELOPER_UTILITIES_DIR}/Help Indexer.app/\" ]; then\necho \"*** Indexing Tiger Help ***\"\ncd \"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nfor LOC_DIR in *.lproj; do \\\nif [ \"${LOC_DIR}\" = \"French.lproj\" ]; then LANG=\"fr\"; \\\nelif [ \"${LOC_DIR}\" = \"German.lproj\" ]; then LANG=\"de\"; \\\nelif [ \"${LOC_DIR}\" = \"Hungarian.lproj\" ]; then LANG=\"hu\"; \\\nelif [ \"${LOC_DIR}\" = \"Italian.lproj\" ]; then LANG=\"it\"; \\\nelif [ \"${LOC_DIR}\" = \"Spanish.lproj\" ]; then LANG=\"es\"; \\\nelif [ \"${LOC_DIR}\" = \"Swedish.lproj\" ]; then LANG=\"sv\"; \\\nelse LANG=\"en\"; \\\nfi; \\\n\"${SYSTEM_DEVELOPER_UTILITIES_DIR}/Help Indexer.app/Contents/MacOS/Help Indexer\" \\\n\"${LOC_DIR}/Skim Help\" \\\n-Tokenizer 1 \\\n-ShowProgress NO \\\n-LogStyle 2 \\\n-IndexAnchors YES \\\n-TigerIndexing YES \\\n-GenerateSummaries YES \\\n-Stopwords \"${LANG}\" \\\n-MinTermLength 3;\\\ndone\nfi\nexit 0"; }; CE592C630B9239E300C113DF /* ShellScript */ = { isa = PBXShellScriptBuildPhase; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 18:56:13
|
Revision: 2201 http://skim-app.svn.sourceforge.net/skim-app/?rev=2201&view=rev Author: hofman Date: 2007-06-01 11:56:11 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Subsort notes by page and location on page. Sort type according to the SKNoteType enum. Modified Paths: -------------- trunk/NSArray_SKExtensions.m trunk/SKMainWindowController.m trunk/SKPDFAnnotationNote.h trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/NSArray_SKExtensions.m =================================================================== --- trunk/NSArray_SKExtensions.m 2007-06-01 18:36:19 UTC (rev 2200) +++ trunk/NSArray_SKExtensions.m 2007-06-01 18:56:11 UTC (rev 2201) @@ -51,7 +51,7 @@ } - (NSArray *)arraySortedByType { - return [self sortedArrayUsingDescriptors:[NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"type" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]]]; + return [self sortedArrayUsingDescriptors:[NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"noteType" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]]]; } - (NSArray *)arraySortedByContents { Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-01 18:36:19 UTC (rev 2200) +++ trunk/SKMainWindowController.m 2007-06-01 18:56:11 UTC (rev 2201) @@ -2507,19 +2507,18 @@ ascending = [[sortDescriptors lastObject] ascending]; } else { NSString *tcID = [tableColumn identifier]; + NSSortDescriptor *pageIndexSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"pageIndex" ascending:ascending] autorelease]; + NSSortDescriptor *boundsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"bounds" ascending:ascending selector:@selector(boundsCompare:)] autorelease]; + NSMutableArray *sds = [NSArray arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil]; if ([tcID isEqualToString:@"type"]) { - NSSortDescriptor *typeSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"type" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]; - sortDescriptors = [NSArray arrayWithObjects:typeSortDescriptor, nil]; + [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"noteType" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; } else if ([tcID isEqualToString:@"note"]) { - NSSortDescriptor *contentsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"contents" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]; - sortDescriptors = [NSArray arrayWithObjects:contentsSortDescriptor, nil]; + [sds insertObject:[[[NSSortDescriptor alloc] initWithKey:@"contents" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease] atIndex:0]; } else if ([tcID isEqualToString:@"page"]) { if (oldTableColumn == nil) ascending = NO; - NSSortDescriptor *pageIndexSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"pageIndex" ascending:ascending] autorelease]; - NSSortDescriptor *boundsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"bounds" ascending:ascending selector:@selector(boundsCompare:)] autorelease]; - sortDescriptors = [NSArray arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil]; } + sortDescriptors = sds; if (oldTableColumn) [ov setIndicatorImage:nil inTableColumn:oldTableColumn]; [ov setHighlightedTableColumn:tableColumn]; Modified: trunk/SKPDFAnnotationNote.h =================================================================== --- trunk/SKPDFAnnotationNote.h 2007-06-01 18:36:19 UTC (rev 2200) +++ trunk/SKPDFAnnotationNote.h 2007-06-01 18:56:11 UTC (rev 2201) @@ -52,6 +52,7 @@ - (PDFDestination *)destination; - (unsigned int)pageIndex; +- (int)noteType; - (NSImage *)image; - (NSAttributedString *)text; @@ -70,7 +71,7 @@ - (BOOL)hitTest:(NSPoint)point; - (NSScriptObjectSpecifier *)objectSpecifier; -- (int)noteType; +- (int)asNoteType; - (id)textContents; - (void)setTextContents:(id)text; - (id)richText; Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-01 18:36:19 UTC (rev 2200) +++ trunk/SKPDFAnnotationNote.m 2007-06-01 18:56:11 UTC (rev 2201) @@ -165,6 +165,26 @@ return page ? [[page document] indexForPage:page] : NSNotFound; } +- (int)noteType { + if ([[self type] isEqualToString:@"FreeText"]) + return SKFreeTextNote; + else if ([[self type] isEqualToString:@"Note"]) + return SKAnchoredNote; + else if ([[self type] isEqualToString:@"Circle"]) + return SKCircleNote; + else if ([[self type] isEqualToString:@"Square"]) + return SKSquareNote; + else if ([[self type] isEqualToString:@"Highlight"] || [[self type] isEqualToString:@"MarkUp"]) + return SKHighlightNote; + else if ([[self type] isEqualToString:@"Underline"]) + return SKUnderlineNote; + else if ([[self type] isEqualToString:@"StrikeOut"]) + return SKStrikeOutNote; + else if ([[self type] isEqualToString:@"Line"]) + return SKArrowNote; + return 0; +} + - (void)replacementSetBounds:(NSRect)bounds { if ([self isNoteAnnotation]) { [[[self undoManager] prepareWithInvocationTarget:self] setBounds:[self bounds]]; @@ -237,7 +257,7 @@ if (classCode == 'Note') { NSMutableDictionary *properties = [[[(NSCreateCommand *)currentCommand resolvedKeyDictionary] mutableCopy] autorelease]; - int type = [[properties objectForKey:@"noteType"] intValue]; + int type = [[properties objectForKey:@"asNoteType"] intValue]; if (type == 0) { [currentCommand setScriptErrorNumber:NSRequiredArgumentsMissingScriptError]; @@ -278,7 +298,7 @@ } } -- (int)noteType { +- (int)asNoteType { if ([[self type] isEqualToString:@"FreeText"]) return SKASTextNote; else if ([[self type] isEqualToString:@"Note"]) Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-01 18:36:19 UTC (rev 2200) +++ trunk/Skim.sdef 2007-06-01 18:56:11 UTC (rev 2201) @@ -535,7 +535,7 @@ <cocoa class="PDFAnnotation"/> <property name="type" code="NTyp" type="note type" access="r" description="The type of note."> - <cocoa key="noteType"/> + <cocoa key="asNoteType"/> </property> <contents name="text" code="ctxt" type="rich text" description="The text of the note. Attributes are ignored."> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 18:36:21
|
Revision: 2200 http://skim-app.svn.sourceforge.net/skim-app/?rev=2200&view=rev Author: hofman Date: 2007-06-01 11:36:19 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Implement table sorting for notes outlineView. Modified Paths: -------------- trunk/Dutch.lproj/MainWindow.nib/data.dependency trunk/Dutch.lproj/MainWindow.nib/info.nib trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib trunk/English.lproj/MainWindow.nib/info.nib trunk/English.lproj/MainWindow.nib/keyedobjects.nib trunk/Italian.lproj/MainWindow.nib/info.nib trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib trunk/SKMainWindowController.m Modified: trunk/Dutch.lproj/MainWindow.nib/data.dependency =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-06-01 16:45:55 UTC (rev 2199) +++ trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-06-01 18:36:19 UTC (rev 2200) @@ -5,7 +5,6 @@ <key>IBPaletteDependency</key> <array> <string>PDFKit</string> - <string>Controllers</string> </array> </dict> </plist> Modified: trunk/Dutch.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-06-01 16:45:55 UTC (rev 2199) +++ trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-06-01 18:36:19 UTC (rev 2200) @@ -25,6 +25,10 @@ <array> <integer>208</integer> </array> + <key>IBOpenObjects</key> + <array> + <integer>511</integer> + </array> <key>IBSystem Version</key> <string>8P135</string> </dict> Modified: trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/English.lproj/MainWindow.nib/info.nib 2007-06-01 16:45:55 UTC (rev 2199) +++ trunk/English.lproj/MainWindow.nib/info.nib 2007-06-01 18:36:19 UTC (rev 2200) @@ -27,17 +27,17 @@ </array> <key>IBOpenObjects</key> <array> - <integer>168</integer> + <integer>314</integer> + <integer>539</integer> <integer>502</integer> + <integer>224</integer> + <integer>511</integer> <integer>553</integer> - <integer>511</integer> - <integer>314</integer> + <integer>5</integer> + <integer>208</integer> <integer>585</integer> - <integer>208</integer> <integer>256</integer> - <integer>5</integer> - <integer>539</integer> - <integer>224</integer> + <integer>168</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/English.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-01 16:45:55 UTC (rev 2199) +++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-01 18:36:19 UTC (rev 2200) @@ -17,7 +17,7 @@ <key>502</key> <string>402 294 220 442 0 0 1024 746 </string> <key>511</key> - <string>402 294 220 442 0 0 1024 746 </string> + <string>610 420 220 442 0 0 1440 938 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> @@ -29,6 +29,7 @@ <array> <integer>168</integer> <integer>553</integer> + <integer>511</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-01 16:45:55 UTC (rev 2199) +++ trunk/SKMainWindowController.m 2007-06-01 18:36:19 UTC (rev 2200) @@ -2497,6 +2497,40 @@ return NO; } +- (void)outlineView:(NSOutlineView *)ov didClickTableColumn:(NSTableColumn *)tableColumn { + if ([ov isEqual:noteOutlineView]) { + NSTableColumn *oldTableColumn = [ov highlightedTableColumn]; + NSArray *sortDescriptors = nil; + BOOL ascending = YES; + if ([oldTableColumn isEqual:tableColumn]) { + sortDescriptors = [[noteArrayController sortDescriptors] valueForKey:@"reversedSortDescriptor"]; + ascending = [[sortDescriptors lastObject] ascending]; + } else { + NSString *tcID = [tableColumn identifier]; + if ([tcID isEqualToString:@"type"]) { + NSSortDescriptor *typeSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"type" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]; + sortDescriptors = [NSArray arrayWithObjects:typeSortDescriptor, nil]; + } else if ([tcID isEqualToString:@"note"]) { + NSSortDescriptor *contentsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"contents" ascending:YES selector:@selector(caseInsensitiveCompare:)] autorelease]; + sortDescriptors = [NSArray arrayWithObjects:contentsSortDescriptor, nil]; + } else if ([tcID isEqualToString:@"page"]) { + if (oldTableColumn == nil) + ascending = NO; + NSSortDescriptor *pageIndexSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"pageIndex" ascending:ascending] autorelease]; + NSSortDescriptor *boundsSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"bounds" ascending:ascending selector:@selector(boundsCompare:)] autorelease]; + sortDescriptors = [NSArray arrayWithObjects:pageIndexSortDescriptor, boundsSortDescriptor, nil]; + } + if (oldTableColumn) + [ov setIndicatorImage:nil inTableColumn:oldTableColumn]; + [ov setHighlightedTableColumn:tableColumn]; + } + [noteArrayController setSortDescriptors:sortDescriptors]; + [ov setIndicatorImage:[NSImage imageNamed:ascending ? @"NSAscendingSortIndicator" : @"NSDescendingSortIndicator"] + inTableColumn:tableColumn]; + [ov reloadData]; + } +} + - (void)outlineViewSelectionDidChange:(NSNotification *)notification{ // Get the destination associated with the search result list. Tell the PDFView to go there. if ([[notification object] isEqual:outlineView] && (updatingOutlineSelection == NO)){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 16:46:06
|
Revision: 2199 http://skim-app.svn.sourceforge.net/skim-app/?rev=2199&view=rev Author: hofman Date: 2007-06-01 09:45:55 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Remove leading underscore from variable (reserved for Apple). Modified Paths: -------------- trunk/PDFPage_SKExtensions.m Modified: trunk/PDFPage_SKExtensions.m =================================================================== --- trunk/PDFPage_SKExtensions.m 2007-06-01 15:02:29 UTC (rev 2198) +++ trunk/PDFPage_SKExtensions.m 2007-06-01 16:45:55 UTC (rev 2199) @@ -53,16 +53,16 @@ #define FOREGROUND_BOX_MARGIN 10.0 // A subclass with ivars would be nicer in some respects, but that would require subclassing PDFDocument and returning instances of the subclass for each page. -static CFMutableDictionaryRef _bboxCache = NULL; +static CFMutableDictionaryRef bboxCache = NULL; static IMP originalDealloc = NULL; + (void)load { originalDealloc = OBReplaceMethodImplementationWithSelector(self, @selector(dealloc), @selector(replacementDealloc)); - _bboxCache = CFDictionaryCreateMutable(NULL, 0, NULL, &kCFTypeDictionaryValueCallBacks); + bboxCache = CFDictionaryCreateMutable(NULL, 0, NULL, &kCFTypeDictionaryValueCallBacks); } - (void)replacementDealloc { - CFDictionaryRemoveValue(_bboxCache, self); + CFDictionaryRemoveValue(bboxCache, self); originalDealloc(self, _cmd); } @@ -70,7 +70,7 @@ - (NSRect)foregroundBox { NSValue *rectValue = nil; - if (FALSE == CFDictionaryGetValueIfPresent(_bboxCache, (void *)self, (const void **)&rectValue)) { + if (FALSE == CFDictionaryGetValueIfPresent(bboxCache, (void *)self, (const void **)&rectValue)) { float marginWidth = [[NSUserDefaults standardUserDefaults] floatForKey:@"SKAutoCropBoxMarginWidth"]; float marginHeight = [[NSUserDefaults standardUserDefaults] floatForKey:@"SKAutoCropBoxMarginHeight"]; NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithPDFPage:self forBox:kPDFDisplayBoxMediaBox]; @@ -87,7 +87,7 @@ [imageRep release]; r = NSIntersectionRect(NSInsetRect(r, -marginWidth, -marginHeight), b); rectValue = [NSValue valueWithRect:r]; - CFDictionarySetValue(_bboxCache, (void *)self, (void *)rectValue); + CFDictionarySetValue(bboxCache, (void *)self, (void *)rectValue); } return [rectValue rectValue]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 15:02:30
|
Revision: 2198 http://skim-app.svn.sourceforge.net/skim-app/?rev=2198&view=rev Author: hofman Date: 2007-06-01 08:02:29 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Some more settings for splash window. Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2007-06-01 14:43:58 UTC (rev 2197) +++ trunk/SKApplicationController.m 2007-06-01 15:02:29 UTC (rev 2198) @@ -449,38 +449,37 @@ - (id)initWithType:(int)splashType atPoint:(NSPoint)point screen:(NSScreen *)screen { NSRect contentRect = NSMakeRect(point.x - 30.0, point.y - 30.0, 60.0, 60.0); if (self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO screen:screen]) { + [self setIgnoresMouseEvents:YES]; [self setBackgroundColor:[NSColor clearColor]]; + [self setAlphaValue:0.95]; [self setOpaque:NO]; [self setDisplaysWhenScreenProfileChanges:YES]; - [self setReleasedWhenClosed:NO]; [self setLevel:NSStatusWindowLevel]; [self setContentView:[[[SKSplashContentView alloc] initWithType:splashType] autorelease]]; } return self; } -- (void)animationDidEnd:(NSAnimation *)animation { - [self close]; - [self autorelease]; -} +- (BOOL)canBecomeKeyWindow { return NO; } -- (void)animationDidStop:(NSAnimation *)animation { - [self close]; - [self autorelease]; -} +- (BOOL)canBecomeMainWindow { return NO; } + +- (void)animationDidEnd:(NSAnimation *)animation { [self close]; } +- (void)animationDidStop:(NSAnimation *)animation { [self close]; } + - (void)fadeOut:(NSTimer *)timer { NSDictionary *fadeOutDict = [[NSDictionary alloc] initWithObjectsAndKeys:self, NSViewAnimationTargetKey, NSViewAnimationFadeOutEffect, NSViewAnimationEffectKey, nil]; NSViewAnimation *animation = [[[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:fadeOutDict, nil]] autorelease]; [fadeOutDict release]; - [animation setDuration:2.0]; + [animation setDuration:1.0]; [animation setAnimationBlockingMode:NSAnimationNonblocking]; [animation setDelegate:self]; [animation startAnimation]; } - (void)show { - [self retain]; + [self retain]; // isReleasedWhenClosed is true by default [self orderFrontRegardless]; [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(fadeOut:) userInfo:nil repeats:NO]; } @@ -538,8 +537,8 @@ [path appendBezierPath:arrow]; arrow = [NSBezierPath bezierPath]; - [arrow moveToPoint:NSMakePoint(NSMinX(bounds) + 8.0, NSMidY(bounds))]; - [arrow relativeLineToPoint:NSMakePoint(7.0, 5.0)]; + [arrow moveToPoint:NSMakePoint(NSMinX(bounds) + 5.0, NSMidY(bounds))]; + [arrow relativeLineToPoint:NSMakePoint(10.0, 5.0)]; [arrow relativeLineToPoint:NSMakePoint(0.0, -10.0)]; [arrow closePath]; [path appendBezierPath:arrow]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 14:44:00
|
Revision: 2197 http://skim-app.svn.sourceforge.net/skim-app/?rev=2197&view=rev Author: hofman Date: 2007-06-01 07:43:58 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Don't release hover window when closed. Modified Paths: -------------- trunk/SKPDFHoverWindow.m Modified: trunk/SKPDFHoverWindow.m =================================================================== --- trunk/SKPDFHoverWindow.m 2007-06-01 13:30:03 UTC (rev 2196) +++ trunk/SKPDFHoverWindow.m 2007-06-01 14:43:58 UTC (rev 2197) @@ -64,6 +64,7 @@ [self setIgnoresMouseEvents:YES]; [self setBackgroundColor:[NSColor whiteColor]]; [self setHasShadow:YES]; + [self setReleasedWhenClosed:NO]; [self setLevel:NSStatusWindowLevel]; [self setAlphaValue:ALPHA_VALUE]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 13:30:05
|
Revision: 2196 http://skim-app.svn.sourceforge.net/skim-app/?rev=2196&view=rev Author: hofman Date: 2007-06-01 06:30:03 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Add enum for splash window type. Add navigation triangles to splash image for navigation/zoom mode. Modified Paths: -------------- trunk/SKApplicationController.h trunk/SKApplicationController.m Modified: trunk/SKApplicationController.h =================================================================== --- trunk/SKApplicationController.h 2007-06-01 11:47:12 UTC (rev 2195) +++ trunk/SKApplicationController.h 2007-06-01 13:30:03 UTC (rev 2196) @@ -65,6 +65,11 @@ @end +enum { + SKSplashTypeResize, + SKSplashTypeScroll +}; + @interface SKSplashWindow : NSWindow - (id)initWithType:(int)splashType atPoint:(NSPoint)point screen:(NSScreen *)screen; - (void)show; Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2007-06-01 11:47:12 UTC (rev 2195) +++ trunk/SKApplicationController.m 2007-06-01 13:30:03 UTC (rev 2196) @@ -322,7 +322,7 @@ NSWindow *window = [controller window]; NSRect rect = [window frame]; - [[[[SKSplashWindow alloc] initWithType:remoteScrolling atPoint:NSMakePoint(NSMidX(rect), NSMidY(rect)) screen:[window screen]] autorelease] show]; + [[[[SKSplashWindow alloc] initWithType:remoteScrolling ? SKSplashTypeScroll : SKSplashTypeResize atPoint:NSMakePoint(NSMidX(rect), NSMidY(rect)) screen:[window screen]] autorelease] show]; break; } default: @@ -500,28 +500,35 @@ - (void)drawRect:(NSRect)rect { NSRect bounds = [self bounds]; + NSPoint center = NSMakePoint(NSMidX(bounds), NSMidY(bounds)); [[NSColor colorWithCalibratedWhite:0.0 alpha:0.5] setFill]; [NSBezierPath fillRoundRectInRect:[self bounds] radius:10.0]; NSBezierPath *path = nil; - if (splashType == 0) { - float centerX = NSMidX(bounds), centerY = NSMidY(bounds); + if (splashType == SKSplashTypeResize) { - path = [NSBezierPath bezierPathWithOvalInRect:NSInsetRect(bounds, 8.0, 8.0)]; - [path appendBezierPath:[NSBezierPath bezierPathWithOvalInRect:NSInsetRect(bounds, 23.0, 23.0)]]; + path = [NSBezierPath bezierPathWithRoundRectInRect:NSInsetRect(bounds, 20.0, 20.0) radius:3.0]; + [path appendBezierPath:[NSBezierPath bezierPathWithRect:NSInsetRect(bounds, 24.0, 24.0)]]; NSBezierPath *arrow = [NSBezierPath bezierPath]; - [arrow moveToPoint:NSMakePoint(NSMidX(bounds), NSMinY(bounds) + 10.0)]; - [arrow relativeLineToPoint:NSMakePoint(8.0, 8.0)]; - [arrow relativeLineToPoint:NSMakePoint(-16.0, 0.0)]; + [arrow moveToPoint:NSMakePoint(NSMinX(bounds) + 10.0, NSMinY(bounds) + 10.0)]; + [arrow relativeLineToPoint:NSMakePoint(6.0, 0.0)]; + [arrow relativeLineToPoint:NSMakePoint(-2.0, 2.0)]; + [arrow relativeLineToPoint:NSMakePoint(2.0, 2.0)]; + [arrow relativeLineToPoint:NSMakePoint(2.0, -2.0)]; + [arrow relativeLineToPoint:NSMakePoint(0.0, 6.0)]; + [arrow relativeLineToPoint:NSMakePoint(-6.0, 0.0)]; + [arrow relativeLineToPoint:NSMakePoint(2.0, -2.0)]; + [arrow relativeLineToPoint:NSMakePoint(-2.0, -2.0)]; + [arrow relativeLineToPoint:NSMakePoint(-2.0, 2.0)]; [arrow closePath]; NSAffineTransform *transform = [[[NSAffineTransform alloc] init] autorelease]; - [transform translateXBy:centerX yBy:centerY]; + [transform translateXBy:center.x yBy:center.y]; [transform rotateByDegrees:90.0]; - [transform translateXBy:-centerX yBy:-centerY]; + [transform translateXBy:-center.x yBy:-center.y]; [path appendBezierPath:arrow]; [arrow transformUsingAffineTransform:transform]; [path appendBezierPath:arrow]; @@ -530,30 +537,36 @@ [arrow transformUsingAffineTransform:transform]; [path appendBezierPath:arrow]; + arrow = [NSBezierPath bezierPath]; + [arrow moveToPoint:NSMakePoint(NSMinX(bounds) + 8.0, NSMidY(bounds))]; + [arrow relativeLineToPoint:NSMakePoint(7.0, 5.0)]; + [arrow relativeLineToPoint:NSMakePoint(0.0, -10.0)]; + [arrow closePath]; + [path appendBezierPath:arrow]; + [transform translateXBy:center.x yBy:center.y]; + [transform rotateByDegrees:90.0]; + [transform translateXBy:-center.x yBy:-center.y]; + [arrow transformUsingAffineTransform:transform]; + [path appendBezierPath:arrow]; + [path setWindingRule:NSEvenOddWindingRule]; - } else if (splashType == 1) { - float centerX = NSMidX(bounds), centerY = NSMidY(bounds); - path = [NSBezierPath bezierPathWithRoundRectInRect:NSInsetRect(bounds, 20.0, 20.0) radius:3.0]; - [path appendBezierPath:[NSBezierPath bezierPathWithRect:NSInsetRect(bounds, 24.0, 24.0)]]; + } else if (splashType == SKSplashTypeScroll) { + path = [NSBezierPath bezierPathWithOvalInRect:NSInsetRect(bounds, 8.0, 8.0)]; + [path appendBezierPath:[NSBezierPath bezierPathWithOvalInRect:NSInsetRect(bounds, 9.0, 9.0)]]; + [path appendBezierPath:[NSBezierPath bezierPathWithOvalInRect:NSInsetRect(bounds, 25.0, 25.0)]]; + NSBezierPath *arrow = [NSBezierPath bezierPath]; - [arrow moveToPoint:NSMakePoint(NSMinX(bounds) + 10.0, NSMinY(bounds) + 10.0)]; - [arrow relativeLineToPoint:NSMakePoint(6.0, 0.0)]; - [arrow relativeLineToPoint:NSMakePoint(-2.0, 2.0)]; - [arrow relativeLineToPoint:NSMakePoint(2.0, 2.0)]; - [arrow relativeLineToPoint:NSMakePoint(2.0, -2.0)]; - [arrow relativeLineToPoint:NSMakePoint(0.0, 6.0)]; - [arrow relativeLineToPoint:NSMakePoint(-6.0, 0.0)]; - [arrow relativeLineToPoint:NSMakePoint(2.0, -2.0)]; - [arrow relativeLineToPoint:NSMakePoint(-2.0, -2.0)]; - [arrow relativeLineToPoint:NSMakePoint(-2.0, 2.0)]; + [arrow moveToPoint:NSMakePoint(NSMidX(bounds), NSMinY(bounds) + 12.0)]; + [arrow relativeLineToPoint:NSMakePoint(7.0, 7.0)]; + [arrow relativeLineToPoint:NSMakePoint(-14.0, 0.0)]; [arrow closePath]; NSAffineTransform *transform = [[[NSAffineTransform alloc] init] autorelease]; - [transform translateXBy:centerX yBy:centerY]; + [transform translateXBy:center.x yBy:center.y]; [transform rotateByDegrees:90.0]; - [transform translateXBy:-centerX yBy:-centerY]; + [transform translateXBy:-center.x yBy:-center.y]; [path appendBezierPath:arrow]; [arrow transformUsingAffineTransform:transform]; [path appendBezierPath:arrow]; @@ -563,6 +576,7 @@ [path appendBezierPath:arrow]; [path setWindingRule:NSEvenOddWindingRule]; + } [[NSColor colorWithCalibratedWhite:1.0 alpha:1.0] setFill]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-01 11:47:28
|
Revision: 2195 http://skim-app.svn.sourceforge.net/skim-app/?rev=2195&view=rev Author: hofman Date: 2007-06-01 04:47:12 -0700 (Fri, 01 Jun 2007) Log Message: ----------- Remote control menu button switches between scrolling and page navigation/zoom. Show a little animation when switching. Modified Paths: -------------- trunk/SKApplicationController.h trunk/SKApplicationController.m Modified: trunk/SKApplicationController.h =================================================================== --- trunk/SKApplicationController.h 2007-05-31 17:54:13 UTC (rev 2194) +++ trunk/SKApplicationController.h 2007-06-01 11:47:12 UTC (rev 2195) @@ -42,6 +42,7 @@ @interface SKApplicationController : NSObject { IBOutlet SUUpdater *updater; + BOOL remoteScrolling; } + (void)setupDefaults; @@ -62,3 +63,17 @@ - (NSString *)pathForApplicationSupportFile:(NSString *)file ofType:(NSString *)extension; @end + + +@interface SKSplashWindow : NSWindow +- (id)initWithType:(int)splashType atPoint:(NSPoint)point screen:(NSScreen *)screen; +- (void)show; +@end + + +@interface SKSplashContentView : NSView { + int splashType; +} +- (id)initWithType:(int)aSplashType; +@end + Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2007-05-31 17:54:13 UTC (rev 2194) +++ trunk/SKApplicationController.m 2007-06-01 11:47:12 UTC (rev 2195) @@ -49,8 +49,53 @@ #import <Quartz/Quartz.h> #import <Sparkle/Sparkle.h> #import "AppleRemote.h" +#import "NSBezierPath_BDSKExtensions.h" +@interface NSView (SKScrollingExtensions) +- (void)scrollLineUp; +- (void)scrollLineDown; +- (void)scrollLineRight; +- (void)scrollLineLeft; +@end + +@implementation NSView (SKScrollingExtensions) + +- (void)scrollLineUp { + NSScrollView *scrollView = [self enclosingScrollView]; + NSView *documentView = [scrollView documentView]; + NSPoint point = [documentView visibleRect].origin; + point.y -= [scrollView verticalLineScroll]; + [documentView scrollPoint:point]; +} + +- (void)scrollLineDown { + NSScrollView *scrollView = [self enclosingScrollView]; + NSView *documentView = [scrollView documentView]; + NSPoint point = [documentView visibleRect].origin; + point.y += [scrollView verticalLineScroll]; + [documentView scrollPoint:point]; +} + +- (void)scrollLineRight { + NSScrollView *scrollView = [self enclosingScrollView]; + NSView *documentView = [scrollView documentView]; + NSPoint point = [documentView visibleRect].origin; + point.x -= [scrollView horizontalLineScroll]; + [documentView scrollPoint:point]; +} + +- (void)scrollLineLeft { + NSScrollView *scrollView = [self enclosingScrollView]; + NSView *documentView = [scrollView documentView]; + NSPoint point = [documentView visibleRect].origin; + point.x += [scrollView horizontalLineScroll]; + [documentView scrollPoint:point]; +} + +@end + + @implementation SKApplicationController + (void)initialize{ @@ -233,13 +278,17 @@ case kRemoteButtonVolume_Plus: if (pressedDown == NO) break; - if ([controller isPresentation]) + if (remoteScrolling) + [[[controller pdfView] documentView] scrollLineUp]; + else if ([controller isPresentation]) [controller doAutoScale:nil]; else [controller doZoomIn:nil]; break; case kRemoteButtonVolume_Minus: - if (pressedDown == NO) + if (remoteScrolling) + [[[controller pdfView] documentView] scrollLineDown]; + else if (pressedDown == NO) break; if ([controller isPresentation]) [controller doZoomToActualSize:nil]; @@ -250,17 +299,32 @@ if (pressedDown == NO) break; case kRemoteButtonRight: - [controller doGoToNextPage:nil]; + if (remoteScrolling) + [[[controller pdfView] documentView] scrollLineRight]; + else + [controller doGoToNextPage:nil]; break; case kRemoteButtonLeft_Hold: if (pressedDown == NO) break; case kRemoteButtonLeft: - [controller doGoToPreviousPage:nil]; + if (remoteScrolling) + [[[controller pdfView] documentView] scrollLineLeft]; + else + [controller doGoToPreviousPage:nil]; break; case kRemoteButtonPlay: [controller togglePresentation:nil]; break; + case kRemoteButtonMenu: + { + remoteScrolling = !remoteScrolling; + + NSWindow *window = [controller window]; + NSRect rect = [window frame]; + [[[[SKSplashWindow alloc] initWithType:remoteScrolling atPoint:NSMakePoint(NSMidX(rect), NSMidY(rect)) screen:[window screen]] autorelease] show]; + break; + } default: break; } @@ -377,3 +441,132 @@ } @end + +#pragma mark - + +@implementation SKSplashWindow + +- (id)initWithType:(int)splashType atPoint:(NSPoint)point screen:(NSScreen *)screen { + NSRect contentRect = NSMakeRect(point.x - 30.0, point.y - 30.0, 60.0, 60.0); + if (self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO screen:screen]) { + [self setBackgroundColor:[NSColor clearColor]]; + [self setOpaque:NO]; + [self setDisplaysWhenScreenProfileChanges:YES]; + [self setReleasedWhenClosed:NO]; + [self setLevel:NSStatusWindowLevel]; + [self setContentView:[[[SKSplashContentView alloc] initWithType:splashType] autorelease]]; + } + return self; +} + +- (void)animationDidEnd:(NSAnimation *)animation { + [self close]; + [self autorelease]; +} + +- (void)animationDidStop:(NSAnimation *)animation { + [self close]; + [self autorelease]; +} + +- (void)fadeOut:(NSTimer *)timer { + NSDictionary *fadeOutDict = [[NSDictionary alloc] initWithObjectsAndKeys:self, NSViewAnimationTargetKey, NSViewAnimationFadeOutEffect, NSViewAnimationEffectKey, nil]; + NSViewAnimation *animation = [[[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:fadeOutDict, nil]] autorelease]; + [fadeOutDict release]; + [animation setDuration:2.0]; + [animation setAnimationBlockingMode:NSAnimationNonblocking]; + [animation setDelegate:self]; + [animation startAnimation]; +} + +- (void)show { + [self retain]; + [self orderFrontRegardless]; + [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(fadeOut:) userInfo:nil repeats:NO]; +} + +@end + +#pragma mark - + +@implementation SKSplashContentView + +- (id)initWithType:(int)aSplashType { + if (self = [super init]) { + splashType = aSplashType; + } + return self; +} + +- (void)drawRect:(NSRect)rect { + NSRect bounds = [self bounds]; + + [[NSColor colorWithCalibratedWhite:0.0 alpha:0.5] setFill]; + [NSBezierPath fillRoundRectInRect:[self bounds] radius:10.0]; + + NSBezierPath *path = nil; + + if (splashType == 0) { + float centerX = NSMidX(bounds), centerY = NSMidY(bounds); + + path = [NSBezierPath bezierPathWithOvalInRect:NSInsetRect(bounds, 8.0, 8.0)]; + [path appendBezierPath:[NSBezierPath bezierPathWithOvalInRect:NSInsetRect(bounds, 23.0, 23.0)]]; + + NSBezierPath *arrow = [NSBezierPath bezierPath]; + [arrow moveToPoint:NSMakePoint(NSMidX(bounds), NSMinY(bounds) + 10.0)]; + [arrow relativeLineToPoint:NSMakePoint(8.0, 8.0)]; + [arrow relativeLineToPoint:NSMakePoint(-16.0, 0.0)]; + [arrow closePath]; + + NSAffineTransform *transform = [[[NSAffineTransform alloc] init] autorelease]; + [transform translateXBy:centerX yBy:centerY]; + [transform rotateByDegrees:90.0]; + [transform translateXBy:-centerX yBy:-centerY]; + [path appendBezierPath:arrow]; + [arrow transformUsingAffineTransform:transform]; + [path appendBezierPath:arrow]; + [arrow transformUsingAffineTransform:transform]; + [path appendBezierPath:arrow]; + [arrow transformUsingAffineTransform:transform]; + [path appendBezierPath:arrow]; + + [path setWindingRule:NSEvenOddWindingRule]; + } else if (splashType == 1) { + float centerX = NSMidX(bounds), centerY = NSMidY(bounds); + + path = [NSBezierPath bezierPathWithRoundRectInRect:NSInsetRect(bounds, 20.0, 20.0) radius:3.0]; + [path appendBezierPath:[NSBezierPath bezierPathWithRect:NSInsetRect(bounds, 24.0, 24.0)]]; + + NSBezierPath *arrow = [NSBezierPath bezierPath]; + [arrow moveToPoint:NSMakePoint(NSMinX(bounds) + 10.0, NSMinY(bounds) + 10.0)]; + [arrow relativeLineToPoint:NSMakePoint(6.0, 0.0)]; + [arrow relativeLineToPoint:NSMakePoint(-2.0, 2.0)]; + [arrow relativeLineToPoint:NSMakePoint(2.0, 2.0)]; + [arrow relativeLineToPoint:NSMakePoint(2.0, -2.0)]; + [arrow relativeLineToPoint:NSMakePoint(0.0, 6.0)]; + [arrow relativeLineToPoint:NSMakePoint(-6.0, 0.0)]; + [arrow relativeLineToPoint:NSMakePoint(2.0, -2.0)]; + [arrow relativeLineToPoint:NSMakePoint(-2.0, -2.0)]; + [arrow relativeLineToPoint:NSMakePoint(-2.0, 2.0)]; + [arrow closePath]; + + NSAffineTransform *transform = [[[NSAffineTransform alloc] init] autorelease]; + [transform translateXBy:centerX yBy:centerY]; + [transform rotateByDegrees:90.0]; + [transform translateXBy:-centerX yBy:-centerY]; + [path appendBezierPath:arrow]; + [arrow transformUsingAffineTransform:transform]; + [path appendBezierPath:arrow]; + [arrow transformUsingAffineTransform:transform]; + [path appendBezierPath:arrow]; + [arrow transformUsingAffineTransform:transform]; + [path appendBezierPath:arrow]; + + [path setWindingRule:NSEvenOddWindingRule]; + } + + [[NSColor colorWithCalibratedWhite:1.0 alpha:1.0] setFill]; + [path fill]; +} + +@end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-31 17:54:15
|
Revision: 2194 http://skim-app.svn.sourceforge.net/skim-app/?rev=2194&view=rev Author: hofman Date: 2007-05-31 10:54:13 -0700 (Thu, 31 May 2007) Log Message: ----------- Add shortcut for Export menu item. Modified Paths: -------------- trunk/Dutch.lproj/MainMenu.nib/info.nib trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib trunk/English.lproj/MainMenu.nib/keyedobjects.nib trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib Modified: trunk/Dutch.lproj/MainMenu.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-05-31 17:49:52 UTC (rev 2193) +++ trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-05-31 17:54:13 UTC (rev 2194) @@ -7,10 +7,14 @@ <key>IBEditorPositions</key> <dict> <key>29</key> - <string>140 614 542 44 0 0 1440 938 </string> + <string>140 614 635 44 0 0 1440 938 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> + <key>IBOpenObjects</key> + <array> + <integer>29</integer> + </array> <key>IBSystem Version</key> <string>8P135</string> </dict> Modified: trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-31 17:49:53
|
Revision: 2193 http://skim-app.svn.sourceforge.net/skim-app/?rev=2193&view=rev Author: hofman Date: 2007-05-31 10:49:52 -0700 (Thu, 31 May 2007) Log Message: ----------- Save last exported type in defaults. Modified Paths: -------------- trunk/SKDocument.h trunk/SKDocument.m Modified: trunk/SKDocument.h =================================================================== --- trunk/SKDocument.h 2007-05-31 17:47:45 UTC (rev 2192) +++ trunk/SKDocument.h 2007-05-31 17:49:52 UTC (rev 2193) @@ -56,9 +56,7 @@ // temporary variables: PDFDocument *pdfDocument; NSMutableArray *noteDicts; - - NSString *lastExportedType; - + SKPDFSynchronizer *synchronizer; NSTimer *fileUpdateTimer; Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-05-31 17:47:45 UTC (rev 2192) +++ trunk/SKDocument.m 2007-05-31 17:49:52 UTC (rev 2193) @@ -89,7 +89,6 @@ [pdfData release]; [noteDicts release]; [readNotesAccessoryView release]; - [lastExportedType release]; [super dealloc]; } @@ -149,6 +148,7 @@ - (BOOL)prepareSavePanel:(NSSavePanel *)savePanel { NSPopUpButton *formatPopup = popUpButtonSubview([savePanel accessoryView]); + NSString *lastExportedType = [[NSUserDefaults standardUserDefaults] stringForKey:@"SKLastExportedType"]; if (formatPopup && lastExportedType) { NSString *title = [[NSDocumentController sharedDocumentController] displayNameForType:lastExportedType]; int index = [formatPopup indexOfItemWithTitle:title]; @@ -159,10 +159,8 @@ } - (BOOL)saveToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName forSaveOperation:(NSSaveOperationType)saveOperation error:(NSError **)outError{ - if (saveOperation == NSSaveToOperation) { - [lastExportedType release]; - lastExportedType = [typeName retain]; - } + if (saveOperation == NSSaveToOperation) + [[NSUserDefaults standardUserDefaults] setObject:typeName forKey:@"SKLastExportedType"]; BOOL success = [super saveToURL:absoluteURL ofType:typeName forSaveOperation:saveOperation error:outError]; // we check for notes and may save a .skim as well: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-31 17:47:48
|
Revision: 2192 http://skim-app.svn.sourceforge.net/skim-app/?rev=2192&view=rev Author: hofman Date: 2007-05-31 10:47:45 -0700 (Thu, 31 May 2007) Log Message: ----------- Remember last used export type and select it. Modified Paths: -------------- trunk/SKDocument.h trunk/SKDocument.m Modified: trunk/SKDocument.h =================================================================== --- trunk/SKDocument.h 2007-05-31 12:30:41 UTC (rev 2191) +++ trunk/SKDocument.h 2007-05-31 17:47:45 UTC (rev 2192) @@ -57,6 +57,8 @@ PDFDocument *pdfDocument; NSMutableArray *noteDicts; + NSString *lastExportedType; + SKPDFSynchronizer *synchronizer; NSTimer *fileUpdateTimer; Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-05-31 12:30:41 UTC (rev 2191) +++ trunk/SKDocument.m 2007-05-31 17:47:45 UTC (rev 2192) @@ -89,6 +89,7 @@ [pdfData release]; [noteDicts release]; [readNotesAccessoryView release]; + [lastExportedType release]; [super dealloc]; } @@ -130,7 +131,39 @@ #pragma mark Document read/write +static NSPopUpButton *popUpButtonSubview(NSView *view) +{ + if ([view isKindOfClass:[NSPopUpButton class]]) + return (NSPopUpButton *)view; + + NSEnumerator *viewEnum = [[view subviews] objectEnumerator]; + NSView *subview; + NSPopUpButton *popup; + + while (subview = [viewEnum nextObject]) { + if (popup = popUpButtonSubview(subview)) + return popup; + } + return nil; +} + +- (BOOL)prepareSavePanel:(NSSavePanel *)savePanel { + NSPopUpButton *formatPopup = popUpButtonSubview([savePanel accessoryView]); + if (formatPopup && lastExportedType) { + NSString *title = [[NSDocumentController sharedDocumentController] displayNameForType:lastExportedType]; + int index = [formatPopup indexOfItemWithTitle:title]; + if (index != -1) + [formatPopup selectItemAtIndex:index]; + } + return YES; +} + - (BOOL)saveToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName forSaveOperation:(NSSaveOperationType)saveOperation error:(NSError **)outError{ + if (saveOperation == NSSaveToOperation) { + [lastExportedType release]; + lastExportedType = [typeName retain]; + } + BOOL success = [super saveToURL:absoluteURL ofType:typeName forSaveOperation:saveOperation error:outError]; // we check for notes and may save a .skim as well: if (success && [typeName isEqualToString:SKPDFDocumentType]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-31 12:41:30
|
Revision: 2191 http://skim-app.svn.sourceforge.net/skim-app/?rev=2191&view=rev Author: hofman Date: 2007-05-31 05:30:41 -0700 (Thu, 31 May 2007) Log Message: ----------- Loop over domains for app support file. Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2007-05-31 11:33:13 UTC (rev 2190) +++ trunk/SKApplicationController.m 2007-05-31 12:30:41 UTC (rev 2191) @@ -357,29 +357,22 @@ NSString *filename = [file stringByAppendingPathExtension:extension]; NSString *fullPath = nil; NSString *appSupportPath = nil; - if (appSupportPath = [self applicationSupportPathForDomain:kUserDomain create:NO]) { - fullPath = [appSupportPath stringByAppendingPathComponent:filename]; - if ([fm fileExistsAtPath:fullPath] == NO) { - fullPath = nil; - if (appSupportPath = [self applicationSupportPathForDomain:kLocalDomain create:NO]) { - fullPath = [appSupportPath stringByAppendingPathComponent:filename]; - if ([fm fileExistsAtPath:fullPath] == NO) { - fullPath = nil; - if (appSupportPath = [self applicationSupportPathForDomain:kNetworkDomain create:NO]) { - fullPath = [appSupportPath stringByAppendingPathComponent:filename]; - if ([fm fileExistsAtPath:fullPath] == NO) { - fullPath = nil; - if (appSupportPath = [[NSBundle mainBundle] sharedSupportPath]) { - fullPath = [appSupportPath stringByAppendingPathComponent:filename]; - if ([fm fileExistsAtPath:fullPath] == NO) - fullPath = nil; - } - } - } - } - } + int domains[3] = {kUserDomain, kLocalDomain, kNetworkDomain}; + int i; + + for (i = 0; fullPath == nil && i < 3; i++) { + if (appSupportPath = [self applicationSupportPathForDomain:domains[i] create:NO]) { + fullPath = [appSupportPath stringByAppendingPathComponent:filename]; + if ([fm fileExistsAtPath:fullPath] == NO) + fullPath = nil; } } + if (fullPath == nil) { + fullPath = [[[NSBundle mainBundle] sharedSupportPath] stringByAppendingPathComponent:filename]; + if ([fm fileExistsAtPath:fullPath] == NO) + fullPath = nil; + } + return fullPath; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-31 11:33:15
|
Revision: 2190 http://skim-app.svn.sourceforge.net/skim-app/?rev=2190&view=rev Author: hofman Date: 2007-05-31 04:33:13 -0700 (Thu, 31 May 2007) Log Message: ----------- Make sure added annotations are hidden when hiding notes. Don't outline hidden text notes. Modified Paths: -------------- trunk/SKMainWindowController.m trunk/SKPDFView.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-31 10:14:02 UTC (rev 2189) +++ trunk/SKMainWindowController.m 2007-05-31 11:33:13 UTC (rev 2190) @@ -541,6 +541,7 @@ while (dict = [e nextObject]) { unsigned pageIndex = [[dict objectForKey:@"pageIndex"] unsignedIntValue]; if (annotation = [[PDFAnnotation alloc] initWithDictionary:dict]) { + [annotation setShouldDisplay:[pdfView hideNotes] == NO]; if (pageIndex == NSNotFound) pageIndex = 0; else if (pageIndex >= [pdfDoc pageCount]) Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-31 10:14:02 UTC (rev 2189) +++ trunk/SKPDFView.m 2007-05-31 11:33:13 UTC (rev 2190) @@ -240,7 +240,7 @@ for (i = 0; i < count; i++) { PDFAnnotation *annotation = [allAnnotations objectAtIndex: i]; - if ([annotation isNoteAnnotation] || [[annotation type] isEqualToString:@"Link"]) { + if (([annotation isNoteAnnotation] || [[annotation type] isEqualToString:@"Link"]) && [annotation shouldDisplay]) { if (annotation == activeAnnotation) { foundActive = YES; } else if ([[annotation type] isEqualToString:@"FreeText"]) { @@ -1331,6 +1331,7 @@ - (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page { [[[self undoManager] prepareWithInvocationTarget:self] removeAnnotation:annotation]; + [annotation setShouldDisplay:hideNotes == NO]; [page addAnnotation:annotation]; [self setNeedsDisplayForAnnotation:annotation]; [[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewDidAddAnnotationNotification object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:page, @"page", annotation, @"annotation", nil]]; @@ -1397,7 +1398,7 @@ } - (void)editActiveAnnotation:(id)sender { - if (nil == activeAnnotation) + if (nil == activeAnnotation || hideNotes) return; [self endAnnotationEdit:self]; @@ -2281,39 +2282,41 @@ } } - if (([theEvent modifierFlags] & NSAlternateKeyMask) && [newActiveAnnotation isMovable]) { - // select a new copy of the annotation - PDFAnnotation *newAnnotation = [[PDFAnnotation alloc] initWithDictionary:[newActiveAnnotation dictionaryValue]]; - [[self undoManager] beginUndoGrouping]; - didBeginUndoGrouping = YES; - [self addAnnotation:newAnnotation toPage:page]; - [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")]; - newActiveAnnotation = newAnnotation; - [newAnnotation release]; - } else if (toolMode == SKNoteToolMode && newActiveAnnotation == nil && hideNotes == NO && - NSPointInRect(mouseDownOnPage, [page boundsForBox:[self displayBox]]) && - (annotationMode == SKFreeTextNote || annotationMode == SKAnchoredNote || annotationMode == SKCircleNote || annotationMode == SKSquareNote || annotationMode == SKArrowNote)) { - float width = annotationMode == SKAnchoredNote ? 16.0 : annotationMode == SKArrowNote ? 4.0 : 8.0; - NSRect bounds = NSMakeRect(pagePoint.x - floorf(0.5 * width), pagePoint.y - floorf(0.5 * width), width, width); - [[self undoManager] beginUndoGrouping]; - didBeginUndoGrouping = YES; - [self addAnnotationWithType:annotationMode contents:nil page:page bounds:bounds]; - newActiveAnnotation = activeAnnotation; - mouseDownInAnnotation = YES; - clickDelta.x = pagePoint.x - NSMinX(bounds); - clickDelta.y = pagePoint.y - NSMinY(bounds); - } else if (([theEvent modifierFlags] & NSShiftKeyMask) && [activeAnnotation isEqual:newActiveAnnotation] == NO && [[activeAnnotation page] isEqual:[newActiveAnnotation page]] && [[activeAnnotation type] isEqualToString:[newActiveAnnotation type]] && [activeAnnotation isMarkupAnnotation]) { - int markupType = [(SKPDFAnnotationMarkup *)activeAnnotation markupType]; - PDFSelection *sel = [(SKPDFAnnotationMarkup *)activeAnnotation selection]; - [sel addSelection:[(SKPDFAnnotationMarkup *)newActiveAnnotation selection]]; - - [self removeActiveAnnotation:nil]; - [self removeAnnotation:newActiveAnnotation]; - - newActiveAnnotation = [[[SKPDFAnnotationMarkup alloc] initWithSelection:sel markupType:markupType] autorelease]; - [newActiveAnnotation setContents:[[sel string] stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines]]; - [self addAnnotation:newActiveAnnotation toPage:page]; - [[self undoManager] setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")]; + if (hideNotes == NO) { + if (([theEvent modifierFlags] & NSAlternateKeyMask) && [newActiveAnnotation isMovable]) { + // select a new copy of the annotation + PDFAnnotation *newAnnotation = [[PDFAnnotation alloc] initWithDictionary:[newActiveAnnotation dictionaryValue]]; + [[self undoManager] beginUndoGrouping]; + didBeginUndoGrouping = YES; + [self addAnnotation:newAnnotation toPage:page]; + [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")]; + newActiveAnnotation = newAnnotation; + [newAnnotation release]; + } else if (toolMode == SKNoteToolMode && newActiveAnnotation == nil && + NSPointInRect(mouseDownOnPage, [page boundsForBox:[self displayBox]]) && + (annotationMode == SKFreeTextNote || annotationMode == SKAnchoredNote || annotationMode == SKCircleNote || annotationMode == SKSquareNote || annotationMode == SKArrowNote)) { + float width = annotationMode == SKAnchoredNote ? 16.0 : annotationMode == SKArrowNote ? 4.0 : 8.0; + NSRect bounds = NSMakeRect(pagePoint.x - floorf(0.5 * width), pagePoint.y - floorf(0.5 * width), width, width); + [[self undoManager] beginUndoGrouping]; + didBeginUndoGrouping = YES; + [self addAnnotationWithType:annotationMode contents:nil page:page bounds:bounds]; + newActiveAnnotation = activeAnnotation; + mouseDownInAnnotation = YES; + clickDelta.x = pagePoint.x - NSMinX(bounds); + clickDelta.y = pagePoint.y - NSMinY(bounds); + } else if (([theEvent modifierFlags] & NSShiftKeyMask) && [activeAnnotation isEqual:newActiveAnnotation] == NO && [[activeAnnotation page] isEqual:[newActiveAnnotation page]] && [[activeAnnotation type] isEqualToString:[newActiveAnnotation type]] && [activeAnnotation isMarkupAnnotation]) { + int markupType = [(SKPDFAnnotationMarkup *)activeAnnotation markupType]; + PDFSelection *sel = [(SKPDFAnnotationMarkup *)activeAnnotation selection]; + [sel addSelection:[(SKPDFAnnotationMarkup *)newActiveAnnotation selection]]; + + [self removeActiveAnnotation:nil]; + [self removeAnnotation:newActiveAnnotation]; + + newActiveAnnotation = [[[SKPDFAnnotationMarkup alloc] initWithSelection:sel markupType:markupType] autorelease]; + [newActiveAnnotation setContents:[[sel string] stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines]]; + [self addAnnotation:newActiveAnnotation toPage:page]; + [[self undoManager] setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")]; + } } if (activeAnnotation != newActiveAnnotation) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-31 10:14:07
|
Revision: 2189 http://skim-app.svn.sourceforge.net/skim-app/?rev=2189&view=rev Author: hofman Date: 2007-05-31 03:14:02 -0700 (Thu, 31 May 2007) Log Message: ----------- Implement hiding of notes. Note management is disabled while hiding notes. State toggled using menu item. See RFE # 1728726. Modified Paths: -------------- trunk/Dutch.lproj/Localizable.strings trunk/Dutch.lproj/MainMenu.nib/classes.nib trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib trunk/Dutch.lproj/MainWindow.nib/data.dependency trunk/Dutch.lproj/MainWindow.nib/info.nib trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib trunk/English.lproj/Localizable.strings trunk/English.lproj/MainMenu.nib/classes.nib trunk/English.lproj/MainMenu.nib/keyedobjects.nib trunk/Italian.lproj/Localizable.strings trunk/Italian.lproj/MainMenu.nib/classes.nib trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib trunk/SKMainWindowController.m trunk/SKPDFAnnotationNote.m trunk/SKPDFView.h trunk/SKPDFView.m Modified: trunk/Dutch.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainMenu.nib/classes.nib =================================================================== --- trunk/Dutch.lproj/MainMenu.nib/classes.nib 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/Dutch.lproj/MainMenu.nib/classes.nib 2007-05-31 10:14:02 UTC (rev 2189) @@ -50,6 +50,7 @@ toggleDisplayContinuous = id; toggleDisplayPageBreaks = id; toggleFullScreen = id; + toggleHideNotes = id; toggleLeftSidePane = id; togglePresentation = id; toggleReadingBar = id; Modified: trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainWindow.nib/data.dependency =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-05-31 10:14:02 UTC (rev 2189) @@ -5,6 +5,7 @@ <key>IBPaletteDependency</key> <array> <string>PDFKit</string> + <string>Controllers</string> </array> </dict> </plist> Modified: trunk/Dutch.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-05-31 10:14:02 UTC (rev 2189) @@ -25,10 +25,6 @@ <array> <integer>208</integer> </array> - <key>IBOpenObjects</key> - <array> - <integer>168</integer> - </array> <key>IBSystem Version</key> <string>8P135</string> </dict> Modified: trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainMenu.nib/classes.nib =================================================================== --- trunk/English.lproj/MainMenu.nib/classes.nib 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/English.lproj/MainMenu.nib/classes.nib 2007-05-31 10:14:02 UTC (rev 2189) @@ -50,6 +50,7 @@ toggleDisplayContinuous = id; toggleDisplayPageBreaks = id; toggleFullScreen = id; + toggleHideNotes = id; toggleLeftSidePane = id; togglePresentation = id; toggleReadingBar = id; Modified: trunk/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainMenu.nib/classes.nib =================================================================== --- trunk/Italian.lproj/MainMenu.nib/classes.nib 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/Italian.lproj/MainMenu.nib/classes.nib 2007-05-31 10:14:02 UTC (rev 2189) @@ -49,6 +49,7 @@ toggleDisplayContinuous = id; toggleDisplayPageBreaks = id; toggleFullScreen = id; + toggleHideNotes = id; toggleLeftSidePane = id; togglePresentation = id; toggleReadingBar = id; Modified: trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/SKMainWindowController.m 2007-05-31 10:14:02 UTC (rev 2189) @@ -770,21 +770,36 @@ } - (IBAction)createNewNote:(id)sender{ - [pdfView addAnnotationFromSelectionWithType:[sender tag]]; + if ([pdfView hideNotes] == NO) { + [pdfView addAnnotationFromSelectionWithType:[sender tag]]; + } else NSBeep(); } - (IBAction)editNote:(id)sender{ - [pdfView editActiveAnnotation:sender]; + if ([pdfView hideNotes] == NO) { + [pdfView editActiveAnnotation:sender]; + } else NSBeep(); } - (void)selectSelectedNote{ - id annotation = [self selectedNote]; - if (annotation) { - [pdfView scrollAnnotationToVisible:annotation]; - [pdfView setActiveAnnotation:annotation]; - } + if ([pdfView hideNotes] == NO) { + id annotation = [self selectedNote]; + if (annotation) { + [pdfView scrollAnnotationToVisible:annotation]; + [pdfView setActiveAnnotation:annotation]; + } + } else NSBeep(); } +- (IBAction)toggleHideNotes:(id)sender{ + BOOL wasHidden = [pdfView hideNotes]; + NSEnumerator *noteEnum = [notes objectEnumerator]; + PDFAnnotation *note; + while (note = [noteEnum nextObject]) + [note setShouldDisplay:wasHidden]; + [pdfView setHideNotes:wasHidden == NO]; +} + - (IBAction)takeSnapshot:(id)sender{ [pdfView takeSnapshot:sender]; } @@ -2466,10 +2481,12 @@ if ([ov isEqual:noteOutlineView]) { if ([[tableColumn identifier] isEqualToString:@"note"]) { if ([item type] == nil) { - PDFAnnotation *annotation = [(SKNoteText *)item annotation]; - [pdfView scrollAnnotationToVisible:annotation]; - [pdfView setActiveAnnotation:annotation]; - [self showNote:annotation]; + if ([pdfView hideNotes] == NO) { + PDFAnnotation *annotation = [(SKNoteText *)item annotation]; + [pdfView scrollAnnotationToVisible:annotation]; + [pdfView setActiveAnnotation:annotation]; + [self showNote:annotation]; + } return NO; } else { return YES; @@ -3375,9 +3392,9 @@ } else if ([identifier isEqualToString:SKDocumentToolbarPresentationItemIdentifier]) { return YES; } else if ([identifier isEqualToString:SKDocumentToolbarNewNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewCircleNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewArrowItemIdentifier]) { - return [pdfView toolMode] == SKTextToolMode || [pdfView toolMode] == SKNoteToolMode; + return ([pdfView toolMode] == SKTextToolMode || [pdfView toolMode] == SKNoteToolMode) && [pdfView hideNotes] == NO; } else if ([identifier isEqualToString:SKDocumentToolbarNewMarkupItemIdentifier]) { - return ([pdfView toolMode] == SKTextToolMode || [pdfView toolMode] == SKNoteToolMode) && [[[pdfView currentSelection] pages] count]; + return ([pdfView toolMode] == SKTextToolMode || [pdfView toolMode] == SKNoteToolMode) && [[[pdfView currentSelection] pages] count] && [pdfView hideNotes] == NO; } else if ([identifier isEqualToString:SKDocumentToolbarInfoItemIdentifier]) { return YES; } else { @@ -3389,10 +3406,16 @@ SEL action = [menuItem action]; if (action == @selector(createNewNote:)) { BOOL isMarkup = [menuItem tag] == SKHighlightNote || [menuItem tag] == SKUnderlineNote || [menuItem tag] == SKStrikeOutNote; - return ([pdfView toolMode] == SKTextToolMode || [pdfView toolMode] == SKNoteToolMode) && (isMarkup == NO || [[[pdfView currentSelection] pages] count]); + return ([pdfView toolMode] == SKTextToolMode || [pdfView toolMode] == SKNoteToolMode) && (isMarkup == NO || [[[pdfView currentSelection] pages] count]) && [pdfView hideNotes] == NO; } else if (action == @selector(editNote:)) { PDFAnnotation *annotation = [pdfView activeAnnotation]; return [annotation isNoteAnnotation] && ([[annotation type] isEqualToString:@"FreeText"] || [[annotation type] isEqualToString:@"Note"]); + } else if (action == @selector(toggleHideNotes:)) { + if ([pdfView hideNotes]) + [menuItem setTitle:NSLocalizedString(@"Show Notes", @"Menu item title")]; + else + [menuItem setTitle:NSLocalizedString(@"Hide Notes", @"Menu item title")]; + return YES; } else if (action == @selector(displaySinglePages:)) { BOOL displaySinglePages = [pdfView displayMode] == kPDFDisplaySinglePage || [pdfView displayMode] == kPDFDisplaySinglePageContinuous; [menuItem setState:displaySinglePages ? NSOnState : NSOffState]; Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/SKPDFAnnotationNote.m 2007-05-31 10:14:02 UTC (rev 2189) @@ -219,7 +219,7 @@ - (BOOL)isEditable { return NO; } - (BOOL)hitTest:(NSPoint)point { - return NSPointInRect(point, [self bounds]); + return [self shouldDisplay] ? NSPointInRect(point, [self bounds]) : NO; } - (NSUndoManager *)undoManager { Modified: trunk/SKPDFView.h =================================================================== --- trunk/SKPDFView.h 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/SKPDFView.h 2007-05-31 10:14:02 UTC (rev 2189) @@ -75,6 +75,8 @@ SKToolMode toolMode; SKNoteType annotationMode; + BOOL hideNotes; + BOOL autohidesCursor; BOOL hasNavigation; BOOL activateNavigationAtBottom; @@ -118,6 +120,9 @@ - (NSRect)currentSelectionRect; - (void)setCurrentSelectionRect:(NSRect)rect; +- (BOOL)hideNotes; +- (void)setHideNotes:(BOOL)flag; + - (BOOL)hasReadingBar; - (void)toggleReadingBar; Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-31 09:22:40 UTC (rev 2188) +++ trunk/SKPDFView.m 2007-05-31 10:14:02 UTC (rev 2189) @@ -149,6 +149,8 @@ toolMode = [[NSUserDefaults standardUserDefaults] integerForKey:SKLastToolModeKey]; annotationMode = [[NSUserDefaults standardUserDefaults] integerForKey:SKLastAnnotationModeKey]; + hideNotes = NO; + autohidesCursor = NO; hasNavigation = NO; autohideTimer = nil; @@ -465,6 +467,19 @@ } } +- (BOOL)hideNotes { + return hideNotes; +} + +- (void)setHideNotes:(BOOL)flag { + if (hideNotes != flag) { + hideNotes = flag; + if (hideNotes) + [self setActiveAnnotation:nil]; + [self setNeedsDisplay:YES]; + } +} + #pragma mark Reading bar - (BOOL)hasReadingBar { @@ -504,7 +519,7 @@ NSData *pdfData = nil; NSData *tiffData = nil; - if ([activeAnnotation isNoteAnnotation] && [activeAnnotation isMovable]) { + if ([self hideNotes] == NO && [activeAnnotation isNoteAnnotation] && [activeAnnotation isMovable]) { if (noteData = [NSKeyedArchiver archivedDataWithRootObject:[activeAnnotation dictionaryValue]]) [types addObject:SKSkimNotePboardType]; } @@ -568,6 +583,11 @@ } - (void)pasteNoteAlternate:(BOOL)isAlternate { + if ([self hideNotes]) { + NSBeep(); + return; + } + NSPasteboard *pboard = [NSPasteboard generalPasteboard]; NSString *pboardType = [pboard availableTypeFromArray:[NSArray arrayWithObjects:SKSkimNotePboardType, NSStringPboardType, nil]]; if (pboardType == nil) { @@ -636,7 +656,7 @@ - (void)cut:(id)sender { - if ([activeAnnotation isNoteAnnotation]) { + if ([self hideNotes] == NO && [activeAnnotation isNoteAnnotation]) { [self copy:sender]; [self delete:sender]; } else @@ -743,7 +763,7 @@ [self dragReadingBarWithEvent:theEvent]; } else if (page == nil || [self selectAnnotationWithEvent:theEvent] == NO) { PDFAreaOfInterest area = [self areaOfInterestForMouse:theEvent]; - BOOL canSelectOrDrag = area == kPDFNoArea || toolMode == SKTextToolMode || annotationMode == SKHighlightNote || annotationMode == SKUnderlineNote || annotationMode == SKStrikeOutNote; + BOOL canSelectOrDrag = area == kPDFNoArea || toolMode == SKTextToolMode || hideNotes || annotationMode == SKHighlightNote || annotationMode == SKUnderlineNote || annotationMode == SKStrikeOutNote; if (area == kPDFNoArea || (canSelectOrDrag && area == kPDFPageArea && [[page selectionForRect:NSMakeRect(p.x - 30.0, p.y - 40.0, 60.0, 80.0)] string] == nil)) { [self dragWithEvent:theEvent]; } else if (canSelectOrDrag) { @@ -798,7 +818,7 @@ NSString *selString = [[[[activeAnnotation page] selectionForRect:[activeAnnotation bounds]] string] stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines]; [activeAnnotation setContents:selString]; } - } else if (toolMode == SKNoteToolMode && [self currentSelection] && (annotationMode == SKHighlightNote || annotationMode == SKUnderlineNote || annotationMode == SKStrikeOutNote)) { + } else if (toolMode == SKNoteToolMode && hideNotes == NO && [self currentSelection] && (annotationMode == SKHighlightNote || annotationMode == SKUnderlineNote || annotationMode == SKStrikeOutNote)) { [self addAnnotationFromSelectionWithType:annotationMode]; [self setCurrentSelection:nil]; } else @@ -975,7 +995,7 @@ } - if ([self toolMode] == SKTextToolMode || [self toolMode] == SKNoteToolMode) { + if (([self toolMode] == SKTextToolMode || [self toolMode] == SKNoteToolMode) && [self hideNotes] == NO) { [menu insertItem:[NSMenuItem separatorItem] atIndex:0]; @@ -1072,7 +1092,7 @@ if ([[menu itemAtIndex:0] isSeparatorItem]) [menu removeItemAtIndex:0]; - } else if (toolMode == SKSelectToolMode && NSIsEmptyRect(selectionRect) == NO) { + } else if ((toolMode == SKSelectToolMode && NSIsEmptyRect(selectionRect) == NO) || ([self toolMode] == SKTextToolMode && [self currentSelection] && [self hideNotes])) { [menu insertItem:[NSMenuItem separatorItem] atIndex:0]; @@ -1461,7 +1481,7 @@ NSArray *annotations = [[pdfDoc pageAtIndex:pageIndex] annotations]; while (++i < (int)[annotations count] && annotation == nil) { annotation = [annotations objectAtIndex:i]; - if ([annotation isNoteAnnotation] == NO && [[annotation type] isEqualToString:@"Link"] == NO) + if (([self hideNotes] || [annotation isNoteAnnotation] == NO) && [[annotation type] isEqualToString:@"Link"] == NO) annotation = nil; } if (startPageIndex == -1) @@ -1506,7 +1526,7 @@ NSArray *annotations = [[pdfDoc pageAtIndex:pageIndex] annotations]; while (--i >= 0 && annotation == nil) { annotation = [annotations objectAtIndex:i]; - if ([annotation isNoteAnnotation] == NO && [[annotation type] isEqualToString:@"Link"] == NO) + if (([self hideNotes] || [annotation isNoteAnnotation] == NO) && [[annotation type] isEqualToString:@"Link"] == NO) annotation = nil; } if (startPageIndex == -1) @@ -2270,7 +2290,7 @@ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")]; newActiveAnnotation = newAnnotation; [newAnnotation release]; - } else if (toolMode == SKNoteToolMode && newActiveAnnotation == nil && + } else if (toolMode == SKNoteToolMode && newActiveAnnotation == nil && hideNotes == NO && NSPointInRect(mouseDownOnPage, [page boundsForBox:[self displayBox]]) && (annotationMode == SKFreeTextNote || annotationMode == SKAnchoredNote || annotationMode == SKCircleNote || annotationMode == SKSquareNote || annotationMode == SKArrowNote)) { float width = annotationMode == SKAnchoredNote ? 16.0 : annotationMode == SKArrowNote ? 4.0 : 8.0; @@ -3086,7 +3106,7 @@ PDFPage *page = [self pageForPoint:p nearest:NO]; p = [self convertPoint:p toPage:page]; PDFAreaOfInterest area = [self areaOfInterestForMouse:theEvent]; - BOOL canSelectOrDrag = area == kPDFNoArea || toolMode == SKTextToolMode || annotationMode == SKHighlightNote || annotationMode == SKUnderlineNote || annotationMode == SKStrikeOutNote; + BOOL canSelectOrDrag = area == kPDFNoArea || toolMode == SKTextToolMode || hideNotes || annotationMode == SKHighlightNote || annotationMode == SKUnderlineNote || annotationMode == SKStrikeOutNote; if ((readingBar && [[readingBar page] isEqual:page] && NSPointInRect(p, [readingBar currentBoundsForBox:[self displayBox]])) || (area == kPDFNoArea || (canSelectOrDrag && area == kPDFPageArea && [[page selectionForRect:NSMakeRect(p.x - 30.0, p.y - 40.0, 60.0, 80.0)] string] == nil))) cursor = [NSCursor openHandCursor]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-31 09:22:41
|
Revision: 2188 http://skim-app.svn.sourceforge.net/skim-app/?rev=2188&view=rev Author: hofman Date: 2007-05-31 02:22:40 -0700 (Thu, 31 May 2007) Log Message: ----------- Remove unused ivar. Modified Paths: -------------- trunk/SKMainWindowController.h Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2007-05-31 08:47:48 UTC (rev 2187) +++ trunk/SKMainWindowController.h 2007-05-31 09:22:40 UTC (rev 2188) @@ -170,8 +170,6 @@ float thumbnailCacheSize; float snapshotCacheSize; - - BOOL edited; } - (IBAction)pickColor:(id)sender; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-31 08:47:49
|
Revision: 2187 http://skim-app.svn.sourceforge.net/skim-app/?rev=2187&view=rev Author: hofman Date: 2007-05-31 01:47:48 -0700 (Thu, 31 May 2007) Log Message: ----------- Change zoom to selection when any of the scrollers is not shown. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-30 18:58:33 UTC (rev 2186) +++ trunk/SKMainWindowController.m 2007-05-31 08:47:48 UTC (rev 2187) @@ -897,11 +897,24 @@ float scale = 1.0; bounds.size.width -= [NSScroller scrollerWidth]; bounds.size.height -= [NSScroller scrollerWidth]; - if (NSWidth(bounds) / NSHeight(bounds) > NSWidth(selRect) / NSHeight(selRect)) + if (NSWidth(bounds) * NSHeight(selRect) > NSWidth(selRect) * NSHeight(bounds)) scale = NSHeight(bounds) / NSHeight(selRect); else scale = NSWidth(bounds) / NSWidth(selRect); [pdfView setScaleFactor:scale]; + NSScrollView *scrollView = [[pdfView documentView] enclosingScrollView]; + if ([scrollView hasHorizontalScroller] == NO || [scrollView hasVerticalScroller] == NO) { + bounds = [pdfView bounds]; + if ([scrollView hasVerticalScroller]) + bounds.size.width -= [NSScroller scrollerWidth]; + if ([scrollView hasHorizontalScroller]) + bounds.size.height -= [NSScroller scrollerWidth]; + if (NSWidth(bounds) * NSHeight(selRect) > NSWidth(selRect) * NSHeight(bounds)) + scale = NSHeight(bounds) / NSHeight(selRect); + else + scale = NSWidth(bounds) / NSWidth(selRect); + [pdfView setScaleFactor:scale]; + } [pdfView scrollRect:selRect inPageToVisible:[pdfView currentPage]]; } else NSBeep(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-30 18:58:35
|
Revision: 2186 http://skim-app.svn.sourceforge.net/skim-app/?rev=2186&view=rev Author: hofman Date: 2007-05-30 11:58:33 -0700 (Wed, 30 May 2007) Log Message: ----------- Set alpha for arrow image. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-30 18:54:01 UTC (rev 2185) +++ trunk/SKMainWindowController.m 2007-05-30 18:58:33 UTC (rev 2186) @@ -2060,58 +2060,66 @@ if (noteToolAdornImages[0] == nil) { NSSize size = NSMakeSize(23.0, 11.0); NSPoint point = NSMakePoint(2.0, 0.0); + NSColor *color = [NSColor colorWithDeviceWhite:0.0 alpha:0.75]; NSBezierPath *arrowPath = [NSBezierPath bezierPath]; [arrowPath moveToPoint:NSMakePoint(20.5,4.0)]; [arrowPath lineToPoint:NSMakePoint(18.0,7.0)]; [arrowPath lineToPoint:NSMakePoint(23.0,7.0)]; [arrowPath closePath]; - [[NSColor blackColor] setFill]; noteToolAdornImages[SKFreeTextNote] = [[NSImage alloc] initWithSize:size]; [noteToolAdornImages[SKFreeTextNote] lockFocus]; [[NSImage imageNamed:@"TextNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [color setFill]; [arrowPath fill]; [noteToolAdornImages[SKFreeTextNote] unlockFocus]; noteToolAdornImages[SKAnchoredNote] = [[NSImage alloc] initWithSize:size]; [noteToolAdornImages[SKAnchoredNote] lockFocus]; [[NSImage imageNamed:@"AnchoredNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [color setFill]; [arrowPath fill]; [noteToolAdornImages[SKAnchoredNote] unlockFocus]; noteToolAdornImages[SKCircleNote] = [[NSImage alloc] initWithSize:size]; [noteToolAdornImages[SKCircleNote] lockFocus]; [[NSImage imageNamed:@"CircleNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [color setFill]; [arrowPath fill]; [noteToolAdornImages[SKCircleNote] unlockFocus]; noteToolAdornImages[SKSquareNote] = [[NSImage alloc] initWithSize:size]; [noteToolAdornImages[SKSquareNote] lockFocus]; [[NSImage imageNamed:@"SquareNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [color setFill]; [arrowPath fill]; [noteToolAdornImages[SKSquareNote] unlockFocus]; noteToolAdornImages[SKHighlightNote] = [[NSImage alloc] initWithSize:size]; [noteToolAdornImages[SKHighlightNote] lockFocus]; [[NSImage imageNamed:@"HighlightNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [color setFill]; [arrowPath fill]; [noteToolAdornImages[SKHighlightNote] unlockFocus]; noteToolAdornImages[SKUnderlineNote] = [[NSImage alloc] initWithSize:size]; [noteToolAdornImages[SKUnderlineNote] lockFocus]; [[NSImage imageNamed:@"UnderlineNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [color setFill]; [arrowPath fill]; [noteToolAdornImages[SKUnderlineNote] unlockFocus]; noteToolAdornImages[SKStrikeOutNote] = [[NSImage alloc] initWithSize:size]; [noteToolAdornImages[SKStrikeOutNote] lockFocus]; [[NSImage imageNamed:@"StrikeOutNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [color setFill]; [arrowPath fill]; [noteToolAdornImages[SKStrikeOutNote] unlockFocus]; noteToolAdornImages[SKArrowNote] = [[NSImage alloc] initWithSize:size]; [noteToolAdornImages[SKArrowNote] lockFocus]; [[NSImage imageNamed:@"ArrowNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [color setFill]; [arrowPath fill]; [noteToolAdornImages[SKArrowNote] unlockFocus]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-30 18:54:05
|
Revision: 2185 http://skim-app.svn.sourceforge.net/skim-app/?rev=2185&view=rev Author: hofman Date: 2007-05-30 11:54:01 -0700 (Wed, 30 May 2007) Log Message: ----------- Draw arrows in tool mode adorns ourselves. Modified Paths: -------------- trunk/Dutch.lproj/MainWindow.nib/data.dependency trunk/Dutch.lproj/MainWindow.nib/info.nib trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib trunk/English.lproj/MainWindow.nib/info.nib trunk/English.lproj/MainWindow.nib/keyedobjects.nib trunk/Italian.lproj/MainWindow.nib/info.nib trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib trunk/SKMainWindowController.m trunk/Skim.xcodeproj/project.pbxproj Removed Paths: ------------- trunk/Images/AnchoredNoteToolAdorn.tiff trunk/Images/ArrowNoteToolAdorn.tiff trunk/Images/CircleNoteToolAdorn.tiff trunk/Images/HighlightNoteToolAdorn.tiff trunk/Images/SquareNoteToolAdorn.tiff trunk/Images/StrikeOutNoteToolAdorn.tiff trunk/Images/TextNoteToolAdorn.tiff trunk/Images/UnderlineNoteToolAdorn.tiff Modified: trunk/Dutch.lproj/MainWindow.nib/data.dependency =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-05-30 16:26:52 UTC (rev 2184) +++ trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-05-30 18:54:01 UTC (rev 2185) @@ -4,7 +4,6 @@ <dict> <key>IBPaletteDependency</key> <array> - <string>Controllers</string> <string>PDFKit</string> </array> </dict> Modified: trunk/Dutch.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-05-30 16:26:52 UTC (rev 2184) +++ trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-05-30 18:54:01 UTC (rev 2185) @@ -25,6 +25,10 @@ <array> <integer>208</integer> </array> + <key>IBOpenObjects</key> + <array> + <integer>168</integer> + </array> <key>IBSystem Version</key> <string>8P135</string> </dict> Modified: trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/English.lproj/MainWindow.nib/info.nib 2007-05-30 16:26:52 UTC (rev 2184) +++ trunk/English.lproj/MainWindow.nib/info.nib 2007-05-30 18:54:01 UTC (rev 2185) @@ -27,17 +27,17 @@ </array> <key>IBOpenObjects</key> <array> - <integer>314</integer> + <integer>168</integer> + <integer>502</integer> <integer>553</integer> - <integer>208</integer> - <integer>168</integer> - <integer>224</integer> <integer>511</integer> + <integer>314</integer> <integer>585</integer> - <integer>502</integer> - <integer>539</integer> + <integer>208</integer> <integer>256</integer> <integer>5</integer> + <integer>539</integer> + <integer>224</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/English.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Deleted: trunk/Images/AnchoredNoteToolAdorn.tiff =================================================================== (Binary files differ) Deleted: trunk/Images/ArrowNoteToolAdorn.tiff =================================================================== (Binary files differ) Deleted: trunk/Images/CircleNoteToolAdorn.tiff =================================================================== (Binary files differ) Deleted: trunk/Images/HighlightNoteToolAdorn.tiff =================================================================== (Binary files differ) Deleted: trunk/Images/SquareNoteToolAdorn.tiff =================================================================== (Binary files differ) Deleted: trunk/Images/StrikeOutNoteToolAdorn.tiff =================================================================== (Binary files differ) Deleted: trunk/Images/TextNoteToolAdorn.tiff =================================================================== (Binary files differ) Deleted: trunk/Images/UnderlineNoteToolAdorn.tiff =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Italian.lproj/MainWindow.nib/info.nib 2007-05-30 16:26:52 UTC (rev 2184) +++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-05-30 18:54:01 UTC (rev 2185) @@ -7,7 +7,7 @@ <key>IBEditorPositions</key> <dict> <key>168</key> - <string>571 529 237 195 0 0 1440 938 </string> + <string>601 543 237 195 0 0 1440 938 </string> <key>224</key> <string>402 294 220 442 0 0 1024 746 </string> <key>256</key> @@ -27,8 +27,8 @@ </array> <key>IBOpenObjects</key> <array> + <integer>168</integer> <integer>553</integer> - <integer>168</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-30 16:26:52 UTC (rev 2184) +++ trunk/SKMainWindowController.m 2007-05-30 18:54:01 UTC (rev 2185) @@ -2055,27 +2055,68 @@ } - (void)handleAnnotationModeChangedNotification:(NSNotification *)notification { - NSImage *image = nil; - switch ([pdfView annotationMode]) { - case SKFreeTextNote: - image = [NSImage imageNamed:@"TextNoteToolAdorn"]; - break; - case SKAnchoredNote: - image = [NSImage imageNamed:@"AnchoredNoteToolAdorn"]; break; - case SKCircleNote: - image = [NSImage imageNamed:@"CircleNoteToolAdorn"]; break; - case SKSquareNote: - image = [NSImage imageNamed:@"SquareNoteToolAdorn"]; break; - case SKHighlightNote: - image = [NSImage imageNamed:@"HighlightNoteToolAdorn"]; break; - case SKUnderlineNote: - image = [NSImage imageNamed:@"UnderlineNoteToolAdorn"]; break; - case SKStrikeOutNote: - image = [NSImage imageNamed:@"StrikeOutNoteToolAdorn"]; break; - case SKArrowNote: - image = [NSImage imageNamed:@"ArrowNoteToolAdorn"]; break; + static NSImage *noteToolAdornImages[8] = {nil, nil, nil, nil, nil, nil, nil, nil}; + + if (noteToolAdornImages[0] == nil) { + NSSize size = NSMakeSize(23.0, 11.0); + NSPoint point = NSMakePoint(2.0, 0.0); + NSBezierPath *arrowPath = [NSBezierPath bezierPath]; + [arrowPath moveToPoint:NSMakePoint(20.5,4.0)]; + [arrowPath lineToPoint:NSMakePoint(18.0,7.0)]; + [arrowPath lineToPoint:NSMakePoint(23.0,7.0)]; + [arrowPath closePath]; + [[NSColor blackColor] setFill]; + + noteToolAdornImages[SKFreeTextNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKFreeTextNote] lockFocus]; + [[NSImage imageNamed:@"TextNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [arrowPath fill]; + [noteToolAdornImages[SKFreeTextNote] unlockFocus]; + + noteToolAdornImages[SKAnchoredNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKAnchoredNote] lockFocus]; + [[NSImage imageNamed:@"AnchoredNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [arrowPath fill]; + [noteToolAdornImages[SKAnchoredNote] unlockFocus]; + + noteToolAdornImages[SKCircleNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKCircleNote] lockFocus]; + [[NSImage imageNamed:@"CircleNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [arrowPath fill]; + [noteToolAdornImages[SKCircleNote] unlockFocus]; + + noteToolAdornImages[SKSquareNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKSquareNote] lockFocus]; + [[NSImage imageNamed:@"SquareNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [arrowPath fill]; + [noteToolAdornImages[SKSquareNote] unlockFocus]; + + noteToolAdornImages[SKHighlightNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKHighlightNote] lockFocus]; + [[NSImage imageNamed:@"HighlightNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [arrowPath fill]; + [noteToolAdornImages[SKHighlightNote] unlockFocus]; + + noteToolAdornImages[SKUnderlineNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKUnderlineNote] lockFocus]; + [[NSImage imageNamed:@"UnderlineNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [arrowPath fill]; + [noteToolAdornImages[SKUnderlineNote] unlockFocus]; + + noteToolAdornImages[SKStrikeOutNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKStrikeOutNote] lockFocus]; + [[NSImage imageNamed:@"StrikeOutNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [arrowPath fill]; + [noteToolAdornImages[SKStrikeOutNote] unlockFocus]; + + noteToolAdornImages[SKArrowNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKArrowNote] lockFocus]; + [[NSImage imageNamed:@"ArrowNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + [arrowPath fill]; + [noteToolAdornImages[SKArrowNote] unlockFocus]; } - [toolModeButton setImage:image forSegment:SKNoteToolMode]; + + [toolModeButton setImage:noteToolAdornImages[[pdfView annotationMode]] forSegment:SKNoteToolMode]; } - (void)handleApplicationWillTerminateNotification:(NSNotification *)notification { Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2007-05-30 16:26:52 UTC (rev 2184) +++ trunk/Skim.xcodeproj/project.pbxproj 2007-05-30 18:54:01 UTC (rev 2185) @@ -99,14 +99,6 @@ CE41B2CC0C08D17100E36EB7 /* NSValue_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE41B2CA0C08D17100E36EB7 /* NSValue_SKExtensions.m */; }; CE4294A30BBD29120016FDC2 /* SKReadingBar.m in Sources */ = {isa = PBXBuildFile; fileRef = CE4294A20BBD29120016FDC2 /* SKReadingBar.m */; }; CE4373B40BB5440E00A56987 /* PSDocument.icns in Resources */ = {isa = PBXBuildFile; fileRef = CE4373B30BB5440E00A56987 /* PSDocument.icns */; }; - CE468C410BF1F0F60007AA12 /* ArrowNoteToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE468C390BF1F0F60007AA12 /* ArrowNoteToolAdorn.tiff */; }; - CE468C420BF1F0F60007AA12 /* UnderlineNoteToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE468C3A0BF1F0F60007AA12 /* UnderlineNoteToolAdorn.tiff */; }; - CE468C430BF1F0F60007AA12 /* StrikeOutNoteToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE468C3B0BF1F0F60007AA12 /* StrikeOutNoteToolAdorn.tiff */; }; - CE468C440BF1F0F60007AA12 /* HighlightNoteToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE468C3C0BF1F0F60007AA12 /* HighlightNoteToolAdorn.tiff */; }; - CE468C450BF1F0F60007AA12 /* CircleNoteToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE468C3D0BF1F0F60007AA12 /* CircleNoteToolAdorn.tiff */; }; - CE468C460BF1F0F60007AA12 /* SquareNoteToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE468C3E0BF1F0F60007AA12 /* SquareNoteToolAdorn.tiff */; }; - CE468C470BF1F0F60007AA12 /* TextNoteToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE468C3F0BF1F0F60007AA12 /* TextNoteToolAdorn.tiff */; }; - CE468C480BF1F0F60007AA12 /* AnchoredNoteToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE468C400BF1F0F60007AA12 /* AnchoredNoteToolAdorn.tiff */; }; CE48BAD80C089EA300A166C6 /* SKTemplateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = CE48BAD60C089EA300A166C6 /* SKTemplateParser.m */; }; CE48BBB60C08AD7000A166C6 /* notesTemplate.txt in Resources */ = {isa = PBXBuildFile; fileRef = CE48BBB40C08AD7000A166C6 /* notesTemplate.txt */; }; CE48BBB70C08AD7000A166C6 /* notesTemplate.rtf in Resources */ = {isa = PBXBuildFile; fileRef = CE48BBB50C08AD7000A166C6 /* notesTemplate.rtf */; }; @@ -319,7 +311,7 @@ 45A3BD380B4F097D002B297F /* InitialUserDefaults.plist */ = {isa = PBXFileReference; explicitFileType = text.xml; fileEncoding = 4; path = InitialUserDefaults.plist; sourceTree = "<group>"; }; 45B113BF0B329A7E00DE0660 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; }; - 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; A489FDBA0BC8E8D100BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/InfoWindow.nib; sourceTree = "<group>"; }; A489FDBD0BC8E8DA00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainMenu.nib; sourceTree = "<group>"; }; A489FDC00BC8E8DF00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainWindow.nib; sourceTree = "<group>"; }; @@ -413,14 +405,6 @@ CE4294A10BBD29120016FDC2 /* SKReadingBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKReadingBar.h; sourceTree = "<group>"; }; CE4294A20BBD29120016FDC2 /* SKReadingBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKReadingBar.m; sourceTree = "<group>"; }; CE4373B30BB5440E00A56987 /* PSDocument.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = PSDocument.icns; path = Images/PSDocument.icns; sourceTree = "<group>"; }; - CE468C390BF1F0F60007AA12 /* ArrowNoteToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ArrowNoteToolAdorn.tiff; path = Images/ArrowNoteToolAdorn.tiff; sourceTree = "<group>"; }; - CE468C3A0BF1F0F60007AA12 /* UnderlineNoteToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = UnderlineNoteToolAdorn.tiff; path = Images/UnderlineNoteToolAdorn.tiff; sourceTree = "<group>"; }; - CE468C3B0BF1F0F60007AA12 /* StrikeOutNoteToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = StrikeOutNoteToolAdorn.tiff; path = Images/StrikeOutNoteToolAdorn.tiff; sourceTree = "<group>"; }; - CE468C3C0BF1F0F60007AA12 /* HighlightNoteToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = HighlightNoteToolAdorn.tiff; path = Images/HighlightNoteToolAdorn.tiff; sourceTree = "<group>"; }; - CE468C3D0BF1F0F60007AA12 /* CircleNoteToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = CircleNoteToolAdorn.tiff; path = Images/CircleNoteToolAdorn.tiff; sourceTree = "<group>"; }; - CE468C3E0BF1F0F60007AA12 /* SquareNoteToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = SquareNoteToolAdorn.tiff; path = Images/SquareNoteToolAdorn.tiff; sourceTree = "<group>"; }; - CE468C3F0BF1F0F60007AA12 /* TextNoteToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = TextNoteToolAdorn.tiff; path = Images/TextNoteToolAdorn.tiff; sourceTree = "<group>"; }; - CE468C400BF1F0F60007AA12 /* AnchoredNoteToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = AnchoredNoteToolAdorn.tiff; path = Images/AnchoredNoteToolAdorn.tiff; sourceTree = "<group>"; }; CE485B650BC4420900FA7109 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Dutch; path = "Dutch.lproj/Skim Help"; sourceTree = "<group>"; }; CE485B780BC4426800FA7109 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Dutch; path = Dutch.lproj/InfoWindow.nib; sourceTree = "<group>"; }; CE485B7B0BC4427100FA7109 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Dutch; path = Dutch.lproj/MainMenu.nib; sourceTree = "<group>"; }; @@ -922,14 +906,6 @@ CE5478BC0B33456300F8AFB6 /* MoveToolAdorn.tiff */, CECBA5900BFCEE250030AB59 /* SelectToolAdorn.tiff */, CE5478C30B33456300F8AFB6 /* TextToolAdorn.tiff */, - CE468C390BF1F0F60007AA12 /* ArrowNoteToolAdorn.tiff */, - CE468C3A0BF1F0F60007AA12 /* UnderlineNoteToolAdorn.tiff */, - CE468C3B0BF1F0F60007AA12 /* StrikeOutNoteToolAdorn.tiff */, - CE468C3C0BF1F0F60007AA12 /* HighlightNoteToolAdorn.tiff */, - CE468C3D0BF1F0F60007AA12 /* CircleNoteToolAdorn.tiff */, - CE468C3E0BF1F0F60007AA12 /* SquareNoteToolAdorn.tiff */, - CE468C3F0BF1F0F60007AA12 /* TextNoteToolAdorn.tiff */, - CE468C400BF1F0F60007AA12 /* AnchoredNoteToolAdorn.tiff */, CE380C600B837B6100A1B779 /* NoteViewAdorn.tiff */, CE4EB8220B7B96D00091F228 /* OutlineViewAdorn.tiff */, CE380C610B837B6100A1B779 /* SnapshotViewAdorn.tiff */, @@ -1171,14 +1147,6 @@ CE7C5D050BD8062C0011315D /* ArrowNoteAdorn.tiff in Resources */, CE7C5D190BD8086C0011315D /* ToolbarArrowNote.tiff in Resources */, CE1E25680BDA61E80011D9DD /* ReadNotesAccessoryView.nib in Resources */, - CE468C410BF1F0F60007AA12 /* ArrowNoteToolAdorn.tiff in Resources */, - CE468C420BF1F0F60007AA12 /* UnderlineNoteToolAdorn.tiff in Resources */, - CE468C430BF1F0F60007AA12 /* StrikeOutNoteToolAdorn.tiff in Resources */, - CE468C440BF1F0F60007AA12 /* HighlightNoteToolAdorn.tiff in Resources */, - CE468C450BF1F0F60007AA12 /* CircleNoteToolAdorn.tiff in Resources */, - CE468C460BF1F0F60007AA12 /* SquareNoteToolAdorn.tiff in Resources */, - CE468C470BF1F0F60007AA12 /* TextNoteToolAdorn.tiff in Resources */, - CE468C480BF1F0F60007AA12 /* AnchoredNoteToolAdorn.tiff in Resources */, CECBA5910BFCEE260030AB59 /* SelectToolAdorn.tiff in Resources */, CE31AC4E0C02E919003612A9 /* ToolbarCrop.tiff in Resources */, CE01D08C0C07157200FA32EF /* ToolbarZoomToSelection.tiff in Resources */, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-30 16:26:53
|
Revision: 2184 http://skim-app.svn.sourceforge.net/skim-app/?rev=2184&view=rev Author: hofman Date: 2007-05-30 09:26:52 -0700 (Wed, 30 May 2007) Log Message: ----------- Move tag to tags. Added Paths: ----------- tags/REL_0_4_1/ Removed Paths: ------------- REL_0_4_1/ Copied: tags/REL_0_4_1 (from rev 2183, REL_0_4_1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-30 16:26:45
|
Revision: 2183 http://skim-app.svn.sourceforge.net/skim-app/?rev=2183&view=rev Author: hofman Date: 2007-05-30 09:26:35 -0700 (Wed, 30 May 2007) Log Message: ----------- Move tag to tags. Added Paths: ----------- tags/REL_0_4/ Removed Paths: ------------- REL_0_4/ Copied: tags/REL_0_4 (from rev 2182, REL_0_4) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |