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-20 11:50:56
|
Revision: 2357 http://skim-app.svn.sourceforge.net/skim-app/?rev=2357&view=rev Author: hofman Date: 2007-06-20 04:50:54 -0700 (Wed, 20 Jun 2007) Log Message: ----------- Better updating of color panel. It should also be updated when the color of the active note changes outside the color panel (e.g. by undo). Add accessory view to color panel for circle/box notes so the interior color can be changed as well. Modified Paths: -------------- trunk/Dutch.lproj/Localizable.strings trunk/Dutch.lproj/MainMenu.nib/classes.nib 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/keyedobjects.nib trunk/English.lproj/Localizable.strings trunk/English.lproj/MainMenu.nib/classes.nib trunk/English.lproj/MainMenu.nib/keyedobjects.nib trunk/English.lproj/MainWindow.nib/classes.nib trunk/English.lproj/MainWindow.nib/info.nib trunk/English.lproj/MainWindow.nib/keyedobjects.nib trunk/Italian.lproj/Localizable.strings trunk/Italian.lproj/MainMenu.nib/classes.nib trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib 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 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-06-19 23:51:10 UTC (rev 2356) +++ trunk/Dutch.lproj/MainMenu.nib/classes.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -35,7 +35,6 @@ newDocumentFromClipboard = id; password = id; performFit = id; - pickColor = id; readNotes = id; rotateAllLeft = id; rotateAllRight = id; Modified: trunk/Dutch.lproj/MainMenu.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-06-19 23:51:10 UTC (rev 2356) +++ trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -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/Dutch.lproj/MainWindow.nib/classes.nib =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/classes.nib 2007-06-19 23:51:10 UTC (rev 2356) +++ trunk/Dutch.lproj/MainWindow.nib/classes.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -39,6 +39,7 @@ autoCropAll = id; autoSelectContent = id; changeColor = id; + changeColorFill = id; changeDisplayBox = id; changeFont = id; changeLeftSidePaneState = id; @@ -74,7 +75,6 @@ goBackOrForward = id; password = id; performFit = id; - pickColor = id; rotateAllLeft = id; rotateAllRight = id; rotateLeft = id; 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-06-19 23:51:10 UTC (rev 2356) +++ trunk/English.lproj/MainMenu.nib/classes.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -35,7 +35,6 @@ newDocumentFromClipboard = id; password = id; performFit = id; - pickColor = id; readNotes = id; rotateAllLeft = id; rotateAllRight = id; Modified: trunk/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainWindow.nib/classes.nib =================================================================== --- trunk/English.lproj/MainWindow.nib/classes.nib 2007-06-19 23:51:10 UTC (rev 2356) +++ trunk/English.lproj/MainWindow.nib/classes.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -39,6 +39,7 @@ autoCropAll = id; autoSelectContent = id; changeColor = id; + changeColorFill = id; changeDisplayBox = id; changeFont = id; changeLeftSidePaneState = id; @@ -74,7 +75,6 @@ goBackOrForward = id; password = id; performFit = id; - pickColor = id; rotateAllLeft = id; rotateAllRight = id; rotateLeft = id; Modified: trunk/English.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/English.lproj/MainWindow.nib/info.nib 2007-06-19 23:51:10 UTC (rev 2356) +++ trunk/English.lproj/MainWindow.nib/info.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -27,17 +27,17 @@ </array> <key>IBOpenObjects</key> <array> + <integer>208</integer> + <integer>585</integer> + <integer>511</integer> + <integer>168</integer> <integer>224</integer> - <integer>168</integer> - <integer>511</integer> + <integer>256</integer> + <integer>539</integer> <integer>553</integer> - <integer>314</integer> <integer>502</integer> - <integer>256</integer> - <integer>208</integer> <integer>5</integer> - <integer>539</integer> - <integer>585</integer> + <integer>314</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/English.lproj/MainWindow.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-06-19 23:51:10 UTC (rev 2356) +++ trunk/Italian.lproj/MainMenu.nib/classes.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -34,7 +34,6 @@ newDocumentFromClipboard = id; password = id; performFit = id; - pickColor = id; readNotes = id; rotateAllLeft = id; rotateAllRight = id; Modified: trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainWindow.nib/classes.nib =================================================================== --- trunk/Italian.lproj/MainWindow.nib/classes.nib 2007-06-19 23:51:10 UTC (rev 2356) +++ trunk/Italian.lproj/MainWindow.nib/classes.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -39,6 +39,7 @@ autoCropAll = id; autoSelectContent = id; changeColor = id; + changeColorFill = id; changeDisplayBox = id; changeFont = id; changeLeftSidePaneState = id; @@ -74,7 +75,6 @@ goBackOrForward = id; password = id; performFit = id; - pickColor = id; rotateAllLeft = id; rotateAllRight = id; rotateLeft = id; Modified: trunk/Italian.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-19 23:51:10 UTC (rev 2356) +++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-20 11:50:54 UTC (rev 2357) @@ -27,10 +27,10 @@ </array> <key>IBOpenObjects</key> <array> - <integer>168</integer> + <integer>553</integer> <integer>511</integer> <integer>539</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-19 23:51:10 UTC (rev 2356) +++ trunk/SKMainWindowController.h 2007-06-20 11:50:54 UTC (rev 2357) @@ -158,6 +158,10 @@ IBOutlet NSWindow *passwordSheet; IBOutlet NSTextField *passwordField; + NSButton *colorAccessoryView; + BOOL updatingColor; + BOOL updatingFont; + NSMutableArray *lastViewedPages; NSTimer *activityTimer; @@ -172,8 +176,8 @@ float snapshotCacheSize; } -- (IBAction)pickColor:(id)sender; - (IBAction)changeColor:(id)sender; +- (IBAction)changeColorFill:(id)sender; - (IBAction)changeFont:(id)sender; - (IBAction)createNewNote:(id)sender; - (IBAction)editNote:(id)sender; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-19 23:51:10 UTC (rev 2356) +++ trunk/SKMainWindowController.m 2007-06-20 11:50:54 UTC (rev 2357) @@ -136,6 +136,8 @@ rightSidePaneState = SKNoteSidePaneState; temporaryAnnotations = CFSetCreateMutable(kCFAllocatorDefault, 0, &kCFTypeSetCallBacks); isAnimating = NO; + updatingColor = NO; + updatingFont = NO; } return self; @@ -161,6 +163,7 @@ [pdfOutlineItems release]; [savedNormalSetup release]; [progressSheet release]; + [colorAccessoryView release]; [super dealloc]; } @@ -436,16 +439,67 @@ return displayName; } -- (void)windowDidBecomeKey:(NSNotification *)notification { +- (void)updateFontPanel { PDFAnnotation *annotation = [pdfView activeAnnotation]; - if ([annotation isNoteAnnotation]) { - if ([annotation respondsToSelector:@selector(font)]) + if ([[self window] isMainWindow]) { + if ([annotation isNoteAnnotation] && [annotation respondsToSelector:@selector(font)]) { + updatingFont = YES; [[NSFontManager sharedFontManager] setSelectedFont:[(PDFAnnotationFreeText *)annotation font] isMultiple:NO]; - [[NSColorPanel sharedColorPanel] setColor:[annotation color]]; + updatingFont = NO; + } } } +- (void)updateColorPanel { + PDFAnnotation *annotation = [pdfView activeAnnotation]; + NSColor *color = nil; + NSView *accessoryView = nil; + + if ([[self window] isMainWindow]) { + if ([annotation isNoteAnnotation]) { + if ([annotation respondsToSelector:@selector(setInteriorColor:)]) { + if (colorAccessoryView == nil) { + colorAccessoryView = [[NSButton alloc] init]; + [colorAccessoryView setButtonType:NSSwitchButton]; + [colorAccessoryView setTitle:NSLocalizedString(@"Fill color", @"Button title")]; + [colorAccessoryView setTarget:self]; + [colorAccessoryView setAction:@selector(changeColorFill:)]; + [colorAccessoryView sizeToFit]; + } + accessoryView = colorAccessoryView; + } + if ([annotation respondsToSelector:@selector(setInteriorColor:)] && [colorAccessoryView state] == NSOnState) { + color = [(id)annotation interiorColor]; + if (color == nil) + color = [NSColor clearColor]; + } else { + color = [annotation color]; + } + } + if ([[NSColorPanel sharedColorPanel] accessoryView] != accessoryView) + [[NSColorPanel sharedColorPanel] setAccessoryView:accessoryView]; + } + + if (color) { + updatingColor = YES; + [[NSColorPanel sharedColorPanel] setColor:color]; + updatingColor = NO; + } +} + +- (void)windowDidBecomeMain:(NSNotification *)notification { + if ([[self window] isEqual:[notification object]]) { + [self updateFontPanel]; + [self updateColorPanel]; + } +} + +- (void)windowDidResignMain:(NSNotification *)notification { + if ([[[NSColorPanel sharedColorPanel] accessoryView] isEqual:colorAccessoryView]) + [[NSColorPanel sharedColorPanel] setAccessoryView:nil]; +} + - (void)windowWillClose:(NSNotification *)notification { if ([[notification object] isEqual:[self window]]) { // timers retain their target, so invalidate them now or they may keep firing after the PDF is gone @@ -756,26 +810,35 @@ #pragma mark Actions -- (IBAction)pickColor:(id)sender{ - PDFAnnotation *annotation = [pdfView activeAnnotation]; - if ([annotation isNoteAnnotation]) - [[NSColorPanel sharedColorPanel] setColor:[annotation color]]; - [[NSColorPanel sharedColorPanel] makeKeyAndOrderFront:self]; -} - - (IBAction)changeColor:(id)sender{ PDFAnnotation *annotation = [pdfView activeAnnotation]; - if ([annotation isNoteAnnotation]) { - if ([[annotation color] isEqual:[sender color]] == NO) - [annotation setColor:[sender color]]; + if (updatingColor == NO && [annotation isNoteAnnotation]) { + BOOL isFill = [colorAccessoryView state] == NSOnState && [annotation respondsToSelector:@selector(setInteriorColor:)]; + NSColor *color = isFill ? [(id)annotation interiorColor] : [annotation color]; + if (color == nil) + color = [NSColor clearColor]; + if ([color isEqual:[sender color]] == NO) { + updatingColor = YES; + if (isFill) + [(id)annotation setInteriorColor:[[sender color] isEqual:[NSColor clearColor]] ? nil : [sender color]]; + else + [annotation setColor:[sender color]]; + updatingColor = NO; + } } } +- (IBAction)changeColorFill:(id)sender{ + [self updateColorPanel]; +} + - (IBAction)changeFont:(id)sender{ PDFAnnotation *annotation = [pdfView activeAnnotation]; - if ([annotation isNoteAnnotation] && [annotation respondsToSelector:@selector(setFont:)] && [annotation respondsToSelector:@selector(font)]) { + if (updatingFont == NO && [annotation isNoteAnnotation] && [annotation respondsToSelector:@selector(setFont:)] && [annotation respondsToSelector:@selector(font)]) { NSFont *font = [sender convertFont:[(PDFAnnotationFreeText *)annotation font]]; + updatingFont = YES; [(PDFAnnotationFreeText *)annotation setFont:font]; + updatingFont = NO; } } @@ -2222,15 +2285,14 @@ - (void)handleDidChangeActiveAnnotationNotification:(NSNotification *)notification { PDFAnnotation *annotation = [pdfView activeAnnotation]; + if ([[self window] isMainWindow]) { + [self updateFontPanel]; + [self updateColorPanel]; + } if ([annotation isNoteAnnotation]) { if ([self selectedNote] != annotation) { [noteOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[noteOutlineView rowForItem:annotation]] byExtendingSelection:NO]; } - if ([[self window] isKeyWindow]) { - if ([annotation respondsToSelector:@selector(font)]) - [[NSFontManager sharedFontManager] setSelectedFont:[(PDFAnnotationFreeText *)annotation font] isMultiple:NO]; - [[NSColorPanel sharedColorPanel] setColor:[annotation color]]; - } } else { [noteOutlineView deselectAll:self]; } @@ -2343,6 +2405,19 @@ [noteArrayController rearrangeObjects]; [noteOutlineView reloadData]; } + if ([[self window] isMainWindow] && [annotation isEqual:[pdfView activeAnnotation]]) { + NSString *key = [[notification userInfo] objectForKey:@"key"]; + if (updatingColor == NO && ([key isEqualToString:@"color"] || [key isEqualToString:@"interiorColor"])) { + updatingColor = YES; + [[NSColorPanel sharedColorPanel] setColor:[annotation color]]; + updatingColor = NO; + } + if (updatingFont == NO && ([key isEqualToString:@"font"] || [key isEqualToString:@"fontName"] || [key isEqualToString:@"fontSize"])) { + updatingFont = YES; + [[NSFontManager sharedFontManager] setSelectedFont:[(PDFAnnotationFreeText *)annotation font] isMultiple:NO]; + updatingFont = NO; + } + } } - (void)handlePageBoundsDidChangeNotification:(NSNotification *)notification { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-19 23:51:13
|
Revision: 2356 http://skim-app.svn.sourceforge.net/skim-app/?rev=2356&view=rev Author: hofman Date: 2007-06-19 16:51:10 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Add help on saving problems with fillable forms. Modified Paths: -------------- trunk/Dutch.lproj/Skim Help/skim.texi trunk/English.lproj/Skim Help/skim.texi trunk/Italian.lproj/Skim Help/skim.texi Modified: trunk/Dutch.lproj/Skim Help/skim.texi =================================================================== --- trunk/Dutch.lproj/Skim Help/skim.texi 2007-06-19 22:31:14 UTC (rev 2355) +++ trunk/Dutch.lproj/Skim Help/skim.texi 2007-06-19 23:51:10 UTC (rev 2356) @@ -1125,6 +1125,28 @@ @c ====================================================================================== +@topic Ik kan notities en merkeringen niet in andere PDF-vertoningsprogrammas zien + +Normaal worden notities en markeringen die aan een PDF-bestand zijn toegevoegd worden niet bewaard in de PDF-data, maar worden toegevoegd als 'uitgebreide attributen' (extended attributes). U kunt in Skim ook een kopie van het PDF-bestand bewaren dat de notities in de PDF-data insluit. Daarmee kunt u de notities ook in andere PDF-vertoningsprogrammas bekijken. + +@heading Zie ook +@menu +* PDF-bestanden met de notities en markeringen inbegrepen bewaren:: +@end menu + +@c ====================================================================================== + +@topic Wijzigingen aan PDFs met invulbare formulieren raken verloren + +Hoewel u met Skim formulieren in hiervoor geschikte PDF-documenten kunt invullen, worden wijzigingen die u aanbrent aan deze formulieren normaal niet bewaard. U kunt in Skim ook een kopie van het PDF-bestand bewaren dat de ingevulde formulieren in de PDF-data insluit, door het document te exporteren met ingebedde notities . Daarmee kunt u deze wijzigingen ook in andere PDF-vertoningsprogrammas bekijken. U kunt de formulieren in kopie na het bewaren echter niet meer wijzigen. + +@heading Zie ook +@menu +* PDF-bestanden met de notities en markeringen inbegrepen bewaren:: +@end menu + +@c ====================================================================================== + @topic PDF-bestanden met de notities en markeringen inbegrepen bewaren Normaal worden notities en markeringen die aan een PDF-bestand zijn toegevoegd worden niet bewaard in de PDF-data, maar worden toegevoegd als 'uitgebreide attributen' (extended attributes). U kunt in Skim ook een kopie van het PDF-bestand bewaren dat de notities in de PDF-data insluit. Daarmee kunt u de notities ook in andere PDF-vertoningsprogrammas bekijken. Modified: trunk/English.lproj/Skim Help/skim.texi =================================================================== --- trunk/English.lproj/Skim Help/skim.texi 2007-06-19 22:31:14 UTC (rev 2355) +++ trunk/English.lproj/Skim Help/skim.texi 2007-06-19 23:51:10 UTC (rev 2356) @@ -1119,6 +1119,28 @@ @c ====================================================================================== +@topic I don't see notes and highlights in other PDF viewers + +Normally, Notes and highlights you add to a PDF document are not saved in the PDF data, but are added to the file as extended attributes. However, Skim allows you to save a copy of your PDF file that does contain the notes in the PDF data. This allows you to see the notes also in other PDF viewers. + +@heading See also +@menu +* Saving PDF files with the notes and highlights included:: +@end menu + +@c ====================================================================================== + +@topic PDF with fillable forms loses edits to the forms + +Even though you can edit forms in PDF document that have them, those edits will not be saved. However, Skim allows you to save a copy of your PDF file that does contain the filled forms in the PDF data, by exporting it with embedded notes. This will also allow you to see the filled forms in other PDF viewers. However, after saving these edits, the forms will not be editable anymore. + +@heading See also +@menu +* Saving PDF files with the notes and highlights included:: +@end menu + +@c ====================================================================================== + @topic Saving PDF files with the notes and highlights included Normally, Notes and highlights you add to a PDF document are not saved in the PDF data, but are added to the file as extended attributes. However, Skim allows you to save a copy of your PDF file that does contain the notes in the PDF data. This allows you to see the notes also in other PDF viewers. Modified: trunk/Italian.lproj/Skim Help/skim.texi =================================================================== --- trunk/Italian.lproj/Skim Help/skim.texi 2007-06-19 22:31:14 UTC (rev 2355) +++ trunk/Italian.lproj/Skim Help/skim.texi 2007-06-19 23:51:10 UTC (rev 2356) @@ -1119,6 +1119,28 @@ @c ====================================================================================== +@topic I don't see notes and highlights in other PDF viewers + +Normally, Notes and highlights you add to a PDF document are not saved in the PDF data, but are added to the file as extended attributes. However, Skim allows you to save a copy of your PDF file that does contain the notes in the PDF data. This allows you to see the notes also in other PDF viewers. + +@heading See also +@menu +* Saving PDF files with the notes and highlights included:: +@end menu + +@c ====================================================================================== + +@topic PDF with fillable forms loses edits to the forms + +Even though you can edit forms in PDF document that have them, those edits will not be saved. However, Skim allows you to save a copy of your PDF file that does contain the filled forms in the PDF data, by exporting it with embedded notes. This will also allow you to see the filled forms in other PDF viewers. However, after saving these edits, the forms will not be editable anymore. + +@heading See also +@menu +* Saving PDF files with the notes and highlights included:: +@end menu + +@c ====================================================================================== + @topic Saving PDF files with the notes and highlights included Normally, Notes and highlights you add to a PDF document are not saved in the PDF data, but are added to the file as extended attributes. However, Skim allows you to save a copy of your PDF file that does contain the notes in the PDF data. This allows you to see the notes also in other PDF viewers. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-19 22:31:18
|
Revision: 2355 http://skim-app.svn.sourceforge.net/skim-app/?rev=2355&view=rev Author: hofman Date: 2007-06-19 15:31:14 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Don't autorecalculate keyview loop in main window, as this messes up the tab view loop for fillable forms. Instead, recalcuate the keyview loop when we modify the views. 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 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-19 21:54:10 UTC (rev 2354) +++ trunk/English.lproj/MainWindow.nib/info.nib 2007-06-19 22:31:14 UTC (rev 2355) @@ -27,17 +27,17 @@ </array> <key>IBOpenObjects</key> <array> + <integer>224</integer> <integer>168</integer> <integer>511</integer> + <integer>553</integer> + <integer>314</integer> + <integer>502</integer> + <integer>256</integer> + <integer>208</integer> <integer>5</integer> - <integer>256</integer> <integer>539</integer> - <integer>553</integer> <integer>585</integer> - <integer>224</integer> - <integer>208</integer> - <integer>502</integer> - <integer>314</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-19 21:54:10 UTC (rev 2354) +++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-19 22:31:14 UTC (rev 2355) @@ -27,10 +27,10 @@ </array> <key>IBOpenObjects</key> <array> + <integer>168</integer> + <integer>511</integer> <integer>539</integer> <integer>553</integer> - <integer>511</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-06-19 21:54:10 UTC (rev 2354) +++ trunk/SKMainWindowController.m 2007-06-19 22:31:14 UTC (rev 2355) @@ -1402,6 +1402,7 @@ [fullScreenWindow makeKeyAndOrderFront:self]; [fullScreenWindow makeFirstResponder:pdfView]; [fullScreenWindow setAcceptsMouseMovedEvents:YES]; + [fullScreenWindow recalculateKeyViewLoop]; [mainWindow orderOut:self]; } @@ -1434,6 +1435,7 @@ [fullScreenWindow setAlphaValue:1.0]; [mainWindow makeKeyAndOrderFront:self]; [mainWindow makeFirstResponder:pdfView]; + [mainWindow recalculateKeyViewLoop]; NSEnumerator *blankScreenEnumerator = [blankingWindows objectEnumerator]; NSWindow *window; @@ -1783,6 +1785,7 @@ [[newView window] makeFirstResponder:[newView nextKeyView]]; [oldView removeFromSuperview]; [oldView setHidden:NO]; + [[newView window] recalculateKeyViewLoop]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-19 21:54:10
|
Revision: 2354 http://skim-app.svn.sourceforge.net/skim-app/?rev=2354&view=rev Author: hofman Date: 2007-06-19 14:54:10 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Enable the password item always when the PDF is encrypted. It seems isLocked doesn't mean very much. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-19 13:01:40 UTC (rev 2353) +++ trunk/SKMainWindowController.m 2007-06-19 21:54:10 UTC (rev 2354) @@ -3675,7 +3675,7 @@ else return YES; } else if (action == @selector(password:)) { - return [[self pdfDocument] isEncrypted] && [[self pdfDocument] isLocked]; + return [[self pdfDocument] isEncrypted]; } else if (action == @selector(toggleReadingBar:)) { if ([[self pdfView] hasReadingBar]) [menuItem setTitle:NSLocalizedString(@"Hide Reading Bar", @"Menu item title")]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-19 13:01:42
|
Revision: 2353 http://skim-app.svn.sourceforge.net/skim-app/?rev=2353&view=rev Author: hofman Date: 2007-06-19 06:01:40 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Fix formatter for scale textfield. 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 Modified: trunk/Dutch.lproj/MainWindow.nib/data.dependency =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-06-19 09:34:06 UTC (rev 2352) +++ trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-06-19 13:01:40 UTC (rev 2353) @@ -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-06-19 09:34:06 UTC (rev 2352) +++ trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-06-19 13:01:40 UTC (rev 2353) @@ -25,6 +25,10 @@ <array> <integer>208</integer> </array> + <key>IBOpenObjects</key> + <array> + <integer>539</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-19 09:34:06 UTC (rev 2352) +++ trunk/English.lproj/MainWindow.nib/info.nib 2007-06-19 13:01:40 UTC (rev 2353) @@ -27,17 +27,17 @@ </array> <key>IBOpenObjects</key> <array> + <integer>168</integer> + <integer>511</integer> + <integer>5</integer> + <integer>256</integer> <integer>539</integer> - <integer>502</integer> + <integer>553</integer> <integer>585</integer> - <integer>256</integer> - <integer>5</integer> - <integer>553</integer> + <integer>224</integer> <integer>208</integer> + <integer>502</integer> <integer>314</integer> - <integer>511</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-19 09:34:06 UTC (rev 2352) +++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-06-19 13:01:40 UTC (rev 2353) @@ -27,9 +27,10 @@ </array> <key>IBOpenObjects</key> <array> + <integer>539</integer> + <integer>553</integer> <integer>511</integer> <integer>168</integer> - <integer>553</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/Italian.lproj/MainWindow.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-06-19 09:34:08
|
Revision: 2352 http://skim-app.svn.sourceforge.net/skim-app/?rev=2352&view=rev Author: hofman Date: 2007-06-19 02:34:06 -0700 (Tue, 19 Jun 2007) Log Message: ----------- No need to create a new border when we set it to nil. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-19 09:28:31 UTC (rev 2351) +++ trunk/SKPDFAnnotationNote.m 2007-06-19 09:34:06 UTC (rev 2352) @@ -285,11 +285,14 @@ } - (void)setLineWidth:(float)width { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setLineWidth:width]; - [self setBorder:width > 0.0 ? border : nil]; + PDFBorder *border = nil; + if (width > 0.0) { + border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setLineWidth:width]; + } + [self setBorder:border]; [border release]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-19 09:28:32
|
Revision: 2351 http://skim-app.svn.sourceforge.net/skim-app/?rev=2351&view=rev Author: hofman Date: 2007-06-19 02:28:31 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Define setting of border properties in PDFAnnotation category. It doesn't harm if it is done for other note types. Remove the border when the line width is non-positive. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-19 09:20:55 UTC (rev 2350) +++ trunk/SKPDFAnnotationNote.m 2007-06-19 09:28:31 UTC (rev 2351) @@ -271,19 +271,40 @@ return [[self border] style]; } -- (void)setBorderStyle:(PDFBorderStyle)style {} +- (void)setBorderStyle:(PDFBorderStyle)style { + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setStyle:style]; + [self setBorder:border]; + [border release]; +} - (float)lineWidth { return [[self border] lineWidth]; } -- (void)setLineWidth:(float)width {} +- (void)setLineWidth:(float)width { + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setLineWidth:width]; + [self setBorder:width > 0.0 ? border : nil]; + [border release]; +} - (NSArray *)dashPattern { return [[self border] dashPattern]; } -- (void)setDashPattern:(NSArray *)pattern {} +- (void)setDashPattern:(NSArray *)pattern { + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setDashPattern:pattern]; + [self setBorder:border]; + [border release]; +} - (void)replacementSetBounds:(NSRect)bounds { if ([self isNoteAnnotation]) { @@ -574,33 +595,6 @@ - (BOOL)shouldPrint { return YES; } -- (void)setBorderStyle:(PDFBorderStyle)style { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setStyle:style]; - [self setBorder:border]; - [border release]; -} - -- (void)setLineWidth:(float)width { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setLineWidth:width]; - [self setBorder:border]; - [border release]; -} - -- (void)setDashPattern:(NSArray *)pattern { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setDashPattern:pattern]; - [self setBorder:border]; - [border release]; -} - - (void)setInteriorColor:(NSColor *)color { [[[self undoManager] prepareWithInvocationTarget:self] setInteriorColor:[self interiorColor]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; @@ -653,33 +647,6 @@ - (BOOL)shouldPrint { return YES; } -- (void)setBorderStyle:(PDFBorderStyle)style { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setStyle:style]; - [self setBorder:border]; - [border release]; -} - -- (void)setLineWidth:(float)width { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setLineWidth:width]; - [self setBorder:border]; - [border release]; -} - -- (void)setDashPattern:(NSArray *)pattern { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setDashPattern:pattern]; - [self setBorder:border]; - [border release]; -} - - (void)setInteriorColor:(NSColor *)color { [[[self undoManager] prepareWithInvocationTarget:self] setInteriorColor:[self interiorColor]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; @@ -1026,33 +993,6 @@ - (BOOL)shouldPrint { return YES; } -- (void)setBorderStyle:(PDFBorderStyle)style { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setStyle:style]; - [self setBorder:border]; - [border release]; -} - -- (void)setLineWidth:(float)width { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setLineWidth:width]; - [self setBorder:border]; - [border release]; -} - -- (void)setDashPattern:(NSArray *)pattern { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setDashPattern:pattern]; - [self setBorder:border]; - [border release]; -} - - (void)setFont:(NSFont *)font { [[[self undoManager] prepareWithInvocationTarget:self] setFont:[self font]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; @@ -1313,33 +1253,6 @@ - (BOOL)shouldPrint { return YES; } -- (void)setBorderStyle:(PDFBorderStyle)style { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setStyle:style]; - [self setBorder:border]; - [border release]; -} - -- (void)setLineWidth:(float)width { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setLineWidth:width]; - [self setBorder:border]; - [border release]; -} - -- (void)setDashPattern:(NSArray *)pattern { - PDFBorder *border = [[self border] copyWithZone:[self zone]]; - if (border == nil) - border = [[PDFBorder allocWithZone:[self zone]] init]; - [border setDashPattern:pattern]; - [self setBorder:border]; - [border release]; -} - - (void)setStartPoint:(NSPoint)point { [[[self undoManager] prepareWithInvocationTarget:self] setStartPoint:[self startPoint]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-19 09:20:57
|
Revision: 2350 http://skim-app.svn.sourceforge.net/skim-app/?rev=2350&view=rev Author: hofman Date: 2007-06-19 02:20:55 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Make changing of note border undoable. Pass changes of border properties through a setBorder, because changing one property may change another one, and moreover the border can be nil. Add a border to line notes. Add a hidden default for the line width of a line note, factory setting 2 for a thicker line. Modified Paths: -------------- trunk/InitialUserDefaults.plist trunk/SKPDFAnnotationNote.m trunk/SKStringConstants.h trunk/SKStringConstants.m Modified: trunk/InitialUserDefaults.plist =================================================================== --- trunk/InitialUserDefaults.plist 2007-06-19 08:43:24 UTC (rev 2349) +++ trunk/InitialUserDefaults.plist 2007-06-19 09:20:55 UTC (rev 2350) @@ -127,6 +127,8 @@ <real>2.0</real> <key>SKSquareNoteLineWidth</key> <real>2.0</real> + <key>SKLineNoteLineWidth</key> + <real>2.0</real> <key>SKLineNoteStartLineStyle</key> <integer>0</integer> <key>SKLineNoteEndLineStyle</key> @@ -210,6 +212,7 @@ <string>SKAnchoredNoteIconType</string> <string>SKCircleNoteLineWidth</string> <string>SKSquareNoteLineWidth</string> + <string>SKLineNoteLineWidth</string> <string>SKLineNoteStartLineStyle</string> <string>SKLineNoteEndLineStyle</string> </array> Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-19 08:43:24 UTC (rev 2349) +++ trunk/SKPDFAnnotationNote.m 2007-06-19 09:20:55 UTC (rev 2350) @@ -97,6 +97,26 @@ } +@interface PDFBorder (SKExtensions) +- (id)copyWithZone:(NSZone *)aZone; +@end + +@implementation PDFBorder (SKExtensions) + +- (id)copyWithZone:(NSZone *)aZone { + PDFBorder *copy = [[PDFBorder alloc] init]; + [copy setDashPattern:[self dashPattern]]; + [copy setLineWidth:[self lineWidth]]; + [copy setDashPattern:[self dashPattern]]; + [copy setStyle:[self style]]; + [copy setHorizontalCornerRadius:[self horizontalCornerRadius]]; + [copy setVerticalCornerRadius:[self verticalCornerRadius]]; + return copy; +} + +@end + + @interface PDFAnnotation (PDFAnnotationPrivateDeclarations) - (void)drawWithBox:(CGPDFBox)box inContext:(CGContextRef)context; - (void)setPage:(id)page; @@ -107,6 +127,7 @@ - (void)replacementSetBounds:(NSRect)bounds; - (void)replacementSetContents:(NSString *)contents; - (void)replacementSetColor:(NSColor *)color; +- (void)replacementSetBorder:(PDFBorder *)border; @end @@ -115,11 +136,13 @@ static IMP originalSetBounds = NULL; static IMP originalSetContents = NULL; static IMP originalSetColor = NULL; +static IMP originalSetBorder = NULL; + (void)load { originalSetBounds = OBReplaceMethodImplementationWithSelector(self, @selector(setBounds:), @selector(replacementSetBounds:)); originalSetContents = OBReplaceMethodImplementationWithSelector(self, @selector(setContents:), @selector(replacementSetContents:)); originalSetColor = OBReplaceMethodImplementationWithSelector(self, @selector(setColor:), @selector(replacementSetColor:)); + originalSetBorder = OBReplaceMethodImplementationWithSelector(self, @selector(setBorder:), @selector(replacementSetBorder:)); } - (id)initWithDictionary:(NSDictionary *)dict{ @@ -297,6 +320,19 @@ object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"color", @"key", nil]]; } +- (void)replacementSetBorder:(PDFBorder *)border { + if ([self isNoteAnnotation]) { + PDFBorder *oldBorder = [[self border] copyWithZone:[self zone]]; + [[[self undoManager] prepareWithInvocationTarget:self] setBorder:oldBorder]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + [oldBorder release]; + } + originalSetBorder(self, _cmd, border); + if ([self isNoteAnnotation]) + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"border", @"key", nil]]; +} + - (NSImage *)image { return nil; } - (NSAttributedString *)text { return nil; } @@ -539,33 +575,30 @@ - (BOOL)shouldPrint { return YES; } - (void)setBorderStyle:(PDFBorderStyle)style { - [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setStyle:style]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setStyle:style]; + [self setBorder:border]; + [border release]; } - (void)setLineWidth:(float)width { - [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setLineWidth:width]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setLineWidth:width]; + [self setBorder:border]; + [border release]; } - (void)setDashPattern:(NSArray *)pattern { - [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setDashPattern:pattern]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setDashPattern:pattern]; + [self setBorder:border]; + [border release]; } - (void)setInteriorColor:(NSColor *)color { @@ -621,33 +654,30 @@ - (BOOL)shouldPrint { return YES; } - (void)setBorderStyle:(PDFBorderStyle)style { - [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setStyle:style]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setStyle:style]; + [self setBorder:border]; + [border release]; } - (void)setLineWidth:(float)width { - [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setLineWidth:width]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setLineWidth:width]; + [self setBorder:border]; + [border release]; } - (void)setDashPattern:(NSArray *)pattern { - [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setDashPattern:pattern]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setDashPattern:pattern]; + [self setBorder:border]; + [border release]; } - (void)setInteriorColor:(NSColor *)color { @@ -973,7 +1003,9 @@ size:[[NSUserDefaults standardUserDefaults] floatForKey:SKTextNoteFontSizeKey]]; [super setFont:font]; [super setColor:[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:SKFreeTextNoteColorKey]]]; - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + PDFBorder *border = [[PDFBorder allocWithZone:[self zone]] init]; + [self setBorder:border]; + [border release]; } return self; } @@ -995,33 +1027,30 @@ - (BOOL)shouldPrint { return YES; } - (void)setBorderStyle:(PDFBorderStyle)style { - [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setStyle:style]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setStyle:style]; + [self setBorder:border]; + [border release]; } - (void)setLineWidth:(float)width { - [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setLineWidth:width]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setLineWidth:width]; + [self setBorder:border]; + [border release]; } - (void)setDashPattern:(NSArray *)pattern { - [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setDashPattern:pattern]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setDashPattern:pattern]; + [self setBorder:border]; + [border release]; } - (void)setFont:(NSFont *)font { @@ -1259,6 +1288,10 @@ [super setEndLineStyle:[[NSUserDefaults standardUserDefaults] integerForKey:SKLineNoteEndLineStyleKey]]; [super setStartPoint:NSMakePoint(0.5, 0.5)]; [super setEndPoint:NSMakePoint(NSWidth(bounds) - 0.5, NSHeight(bounds) - 0.5)]; + PDFBorder *border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setLineWidth:[[NSUserDefaults standardUserDefaults] floatForKey:SKLineNoteLineWidthKey]]; + [self setBorder:border]; + [border release]; } return self; } @@ -1281,33 +1314,30 @@ - (BOOL)shouldPrint { return YES; } - (void)setBorderStyle:(PDFBorderStyle)style { - [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setStyle:style]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setStyle:style]; + [self setBorder:border]; + [border release]; } - (void)setLineWidth:(float)width { - [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setLineWidth:width]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setLineWidth:width]; + [self setBorder:border]; + [border release]; } - (void)setDashPattern:(NSArray *)pattern { - [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setDashPattern:pattern]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; + PDFBorder *border = [[self border] copyWithZone:[self zone]]; + if (border == nil) + border = [[PDFBorder allocWithZone:[self zone]] init]; + [border setDashPattern:pattern]; + [self setBorder:border]; + [border release]; } - (void)setStartPoint:(NSPoint)point { Modified: trunk/SKStringConstants.h =================================================================== --- trunk/SKStringConstants.h 2007-06-19 08:43:24 UTC (rev 2349) +++ trunk/SKStringConstants.h 2007-06-19 09:20:55 UTC (rev 2350) @@ -74,6 +74,7 @@ extern NSString *SKAnchoredNoteIconTypeKey; extern NSString *SKCircleNoteLineWidthKey; extern NSString *SKSquareNoteLineWidthKey; +extern NSString *SKLineNoteLineWidthKey; extern NSString *SKLineNoteStartLineStyleKey; extern NSString *SKLineNoteEndLineStyleKey; extern NSString *SKDefaultPDFDisplaySettingsKey; Modified: trunk/SKStringConstants.m =================================================================== --- trunk/SKStringConstants.m 2007-06-19 08:43:24 UTC (rev 2349) +++ trunk/SKStringConstants.m 2007-06-19 09:20:55 UTC (rev 2350) @@ -75,6 +75,7 @@ NSString *SKAnchoredNoteIconTypeKey = @"SKAnchoredNoteIconType"; NSString *SKCircleNoteLineWidthKey = @"SKCircleNoteLineWidth"; NSString *SKSquareNoteLineWidthKey = @"SKSquareNoteLineWidth"; +NSString *SKLineNoteLineWidthKey = @"SKLineNoteLineWidth"; NSString *SKLineNoteStartLineStyleKey = @"SKLineNoteStartLineStyle"; NSString *SKLineNoteEndLineStyleKey = @"SKLineNoteEndLineStyle"; NSString *SKDefaultPDFDisplaySettingsKey = @"SKDefaultPDFDisplaySettings"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-19 08:43:29
|
Revision: 2349 http://skim-app.svn.sourceforge.net/skim-app/?rev=2349&view=rev Author: hofman Date: 2007-06-19 01:43:24 -0700 (Tue, 19 Jun 2007) Log Message: ----------- Change Arrow to Line in note type sheet. Modified Paths: -------------- trunk/Dutch.lproj/NoteTypeSheet.nib/keyedobjects.nib trunk/English.lproj/NoteTypeSheet.nib/keyedobjects.nib trunk/Italian.lproj/NoteTypeSheet.nib/keyedobjects.nib Modified: trunk/Dutch.lproj/NoteTypeSheet.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/NoteTypeSheet.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/NoteTypeSheet.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-06-19 00:30:20
|
Revision: 2348 http://skim-app.svn.sourceforge.net/skim-app/?rev=2348&view=rev Author: hofman Date: 2007-06-18 17:30:18 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Use border property for text note instead of drawing it ourselves. Only set border properties for notes where it is relevant. Modified Paths: -------------- trunk/SKPDFAnnotationNote.h trunk/SKPDFAnnotationNote.m trunk/SKPDFView.m Modified: trunk/SKPDFAnnotationNote.h =================================================================== --- trunk/SKPDFAnnotationNote.h 2007-06-19 00:01:26 UTC (rev 2347) +++ trunk/SKPDFAnnotationNote.h 2007-06-19 00:30:18 UTC (rev 2348) @@ -56,6 +56,10 @@ - (PDFBorderStyle)borderStyle; - (void)setBorderStyle:(PDFBorderStyle)style; +- (float)lineWidth; +- (void)setLineWidth:(float)width; +- (NSArray *)dashPattern; +- (void)setDashPattern:(NSArray *)pattern; - (NSImage *)image; - (NSAttributedString *)text; @@ -83,12 +87,8 @@ - (NSData *)boundsAsQDRect; - (NSString *)fontName; - (float)fontSize; -- (float)lineWidth; -- (void)setLineWidth:(float)width; - (int)asBorderStyle; - (void)setAsBorderStyle:(int)style; -- (NSArray *)dashPattern; -- (void)setDashPattern:(NSArray *)pattern; - (NSData *)startPointAsQDPoint; - (NSData *)endPointAsQDPoint; - (int)asStartLineStyle; Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-19 00:01:26 UTC (rev 2347) +++ trunk/SKPDFAnnotationNote.m 2007-06-19 00:30:18 UTC (rev 2348) @@ -248,16 +248,20 @@ return [[self border] style]; } -- (void)setBorderStyle:(PDFBorderStyle)style { - [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setStyle:style]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; +- (void)setBorderStyle:(PDFBorderStyle)style {} + +- (float)lineWidth { + return [[self border] lineWidth]; } +- (void)setLineWidth:(float)width {} + +- (NSArray *)dashPattern { + return [[self border] dashPattern]; +} + +- (void)setDashPattern:(NSArray *)pattern {} + - (void)replacementSetBounds:(NSRect)bounds { if ([self isNoteAnnotation]) { [[[self undoManager] prepareWithInvocationTarget:self] setBounds:[self bounds]]; @@ -461,20 +465,6 @@ return 0; } -- (float)lineWidth { - return [[self border] lineWidth]; -} - -- (void)setLineWidth:(float)width { - [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setLineWidth:width]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; -} - - (int)asBorderStyle { switch ([self borderStyle]) { case kPDFBorderStyleSolid: return SKASBorderStyleSolid; @@ -498,20 +488,6 @@ [self setBorderStyle:style]; } -- (NSArray *)dashPattern { - return [[self border] dashPattern]; -} - -- (void)setDashPattern:(NSArray *)pattern { - [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; - [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; - if ([self border] == nil) - [self setBorder:[[[PDFBorder alloc] init] autorelease]]; - [[self border] setDashPattern:pattern]; - [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification - object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; -} - - (NSData *)startPointAsQDPoint { return (id)[NSNull null]; } @@ -562,6 +538,36 @@ - (BOOL)shouldPrint { return YES; } +- (void)setBorderStyle:(PDFBorderStyle)style { + [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setStyle:style]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; +} + +- (void)setLineWidth:(float)width { + [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setLineWidth:width]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; +} + +- (void)setDashPattern:(NSArray *)pattern { + [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setDashPattern:pattern]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; +} + - (void)setInteriorColor:(NSColor *)color { [[[self undoManager] prepareWithInvocationTarget:self] setInteriorColor:[self interiorColor]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; @@ -614,6 +620,36 @@ - (BOOL)shouldPrint { return YES; } +- (void)setBorderStyle:(PDFBorderStyle)style { + [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setStyle:style]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; +} + +- (void)setLineWidth:(float)width { + [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setLineWidth:width]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; +} + +- (void)setDashPattern:(NSArray *)pattern { + [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setDashPattern:pattern]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; +} + - (void)setInteriorColor:(NSColor *)color { [[[self undoManager] prepareWithInvocationTarget:self] setInteriorColor:[self interiorColor]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; @@ -937,6 +973,7 @@ size:[[NSUserDefaults standardUserDefaults] floatForKey:SKTextNoteFontSizeKey]]; [super setFont:font]; [super setColor:[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:SKFreeTextNoteColorKey]]]; + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; } return self; } @@ -957,6 +994,36 @@ - (BOOL)shouldPrint { return YES; } +- (void)setBorderStyle:(PDFBorderStyle)style { + [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setStyle:style]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; +} + +- (void)setLineWidth:(float)width { + [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setLineWidth:width]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; +} + +- (void)setDashPattern:(NSArray *)pattern { + [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setDashPattern:pattern]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; +} + - (void)setFont:(NSFont *)font { [[[self undoManager] prepareWithInvocationTarget:self] setFont:[self font]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; @@ -1213,6 +1280,36 @@ - (BOOL)shouldPrint { return YES; } +- (void)setBorderStyle:(PDFBorderStyle)style { + [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setStyle:style]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; +} + +- (void)setLineWidth:(float)width { + [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setLineWidth:width]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; +} + +- (void)setDashPattern:(NSArray *)pattern { + [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + [[self border] setDashPattern:pattern]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; +} + - (void)setStartPoint:(NSPoint)point { [[[self undoManager] prepareWithInvocationTarget:self] setStartPoint:[self startPoint]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-06-19 00:01:26 UTC (rev 2347) +++ trunk/SKPDFView.m 2007-06-19 00:30:18 UTC (rev 2348) @@ -238,27 +238,14 @@ if (allAnnotations) { unsigned int i, count = [allAnnotations count]; - BOOL foundActive = NO; for (i = 0; i < count; i++) { PDFAnnotation *annotation = [allAnnotations objectAtIndex: i]; - if (([annotation isNoteAnnotation] || [[annotation type] isEqualToString:@"Link"]) && [annotation shouldDisplay]) { - if (annotation == activeAnnotation) { - foundActive = YES; - } else if ([[annotation type] isEqualToString:@"FreeText"]) { - NSRect bounds = [annotation bounds]; - NSRect rect = NSInsetRect(NSIntegralRect(bounds), 0.5, 0.5); - float color[4] = { 0.5, 0.5, 0.5, 1.0 }; - CGContextSetStrokeColor(context, color); - CGContextStrokeRectWithWidth(context, *(CGRect *)&rect, 1.0); - } - if ([[annotation type] isEqualToString:@"Link"]) - [(PDFAnnotationLink *)annotation fixRelativeURLIfNeeded]; - } + if ([[annotation type] isEqualToString:@"Link"]) + [(PDFAnnotationLink *)annotation fixRelativeURLIfNeeded]; } - // Draw active annotation last so it is not "painted" over. - if (foundActive) { + if (activeAnnotation) { BOOL isLink = [[activeAnnotation type] isEqualToString:@"Link"]; float lineWidth = isLink ? 2.0 : 1.0; NSRect bounds = [activeAnnotation bounds]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-19 00:01:32
|
Revision: 2347 http://skim-app.svn.sourceforge.net/skim-app/?rev=2347&view=rev Author: hofman Date: 2007-06-18 17:01:26 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Rename arrow images to line Modified Paths: -------------- trunk/SKPDFAnnotationNote.m trunk/Skim.xcodeproj/project.pbxproj Added Paths: ----------- trunk/Images/LineNoteAdorn.tiff trunk/Images/ToolbarLineNote.tiff Removed Paths: ------------- trunk/Images/ArrowNoteAdorn.tiff trunk/Images/ToolbarArrowNote.tiff Deleted: trunk/Images/ArrowNoteAdorn.tiff =================================================================== (Binary files differ) Copied: trunk/Images/LineNoteAdorn.tiff (from rev 2307, trunk/Images/ArrowNoteAdorn.tiff) =================================================================== (Binary files differ) Deleted: trunk/Images/ToolbarArrowNote.tiff =================================================================== (Binary files differ) Copied: trunk/Images/ToolbarLineNote.tiff (from rev 2307, trunk/Images/ToolbarArrowNote.tiff) =================================================================== (Binary files differ) Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-18 23:41:25 UTC (rev 2346) +++ trunk/SKPDFAnnotationNote.m 2007-06-19 00:01:26 UTC (rev 2347) @@ -911,7 +911,7 @@ [properties removeObjectForKey:@"fontSize"]; [properties removeObjectForKey:@"asIconType"]; [properties removeObjectForKey:@"lineWidth"]; - [properties removeObjectForKey:@"borderStyle"]; + [properties removeObjectForKey:@"asBorderStyle"]; [properties removeObjectForKey:@"dashPattern"]; [properties removeObjectForKey:@"startPointAsQDPoint"]; [properties removeObjectForKey:@"endPointAsQDPoint"]; @@ -971,9 +971,6 @@ NSMutableDictionary *properties = [[[super scriptingProperties] mutableCopy] autorelease]; [properties removeObjectForKey:@"richText"]; [properties removeObjectForKey:@"asIconType"]; - [properties removeObjectForKey:@"lineWidth"]; - [properties removeObjectForKey:@"borderStyle"]; - [properties removeObjectForKey:@"dashPattern"]; [properties removeObjectForKey:@"startPointAsQDPoint"]; [properties removeObjectForKey:@"endPointAsQDPoint"]; [properties removeObjectForKey:@"asStartLineStyle"]; @@ -1120,7 +1117,7 @@ [properties removeObjectForKey:@"fontName"]; [properties removeObjectForKey:@"fontSize"]; [properties removeObjectForKey:@"lineWidth"]; - [properties removeObjectForKey:@"borderStyle"]; + [properties removeObjectForKey:@"asBorderStyle"]; [properties removeObjectForKey:@"dashPattern"]; [properties removeObjectForKey:@"startPointAsQDPoint"]; [properties removeObjectForKey:@"endPointAsQDPoint"]; @@ -1282,7 +1279,7 @@ [properties removeObjectForKey:@"fontSize"]; [properties removeObjectForKey:@"asIconType"]; [properties removeObjectForKey:@"lineWidth"]; - [properties removeObjectForKey:@"borderStyle"]; + [properties removeObjectForKey:@"asBorderStyle"]; [properties removeObjectForKey:@"dashPattern"]; [properties removeObjectForKey:@"selectionSpecifier"]; return properties; Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2007-06-18 23:41:25 UTC (rev 2346) +++ trunk/Skim.xcodeproj/project.pbxproj 2007-06-19 00:01:26 UTC (rev 2347) @@ -151,8 +151,8 @@ CE7468820B7F3C0000CBF969 /* zoomOutCursor.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7467550B7F321A00CBF969 /* zoomOutCursor.tiff */; }; CE7469180B7F40B700CBF969 /* Skim.icns in Resources */ = {isa = PBXBuildFile; fileRef = CE7469170B7F40B600CBF969 /* Skim.icns */; }; CE7C20500C259A5D0059E08C /* NSColor_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE7C204E0C259A5D0059E08C /* NSColor_SKExtensions.m */; }; - CE7C5D050BD8062C0011315D /* ArrowNoteAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7C5D040BD8062C0011315D /* ArrowNoteAdorn.tiff */; }; - CE7C5D190BD8086C0011315D /* ToolbarArrowNote.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7C5D180BD8086C0011315D /* ToolbarArrowNote.tiff */; }; + CE7C5D050BD8062C0011315D /* LineNoteAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7C5D040BD8062C0011315D /* LineNoteAdorn.tiff */; }; + CE7C5D190BD8086C0011315D /* ToolbarLineNote.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7C5D180BD8086C0011315D /* ToolbarLineNote.tiff */; }; CE9A87930C0C9E9A004F1F97 /* ProgressSheet.nib in Resources */ = {isa = PBXBuildFile; fileRef = CE9A878D0C0C9E9A004F1F97 /* ProgressSheet.nib */; }; CE9C423C0B8B5633004AD8CF /* PreferenceWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = CE9C42360B8B5633004AD8CF /* PreferenceWindow.nib */; }; CE9DC2E90B9F131900D64F28 /* HighlightNoteAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE9DC2E70B9F131800D64F28 /* HighlightNoteAdorn.tiff */; }; @@ -499,8 +499,8 @@ CE7469170B7F40B600CBF969 /* Skim.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Skim.icns; path = Images/Skim.icns; sourceTree = "<group>"; }; CE7C204D0C259A5D0059E08C /* NSColor_SKExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSColor_SKExtensions.h; sourceTree = "<group>"; }; CE7C204E0C259A5D0059E08C /* NSColor_SKExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSColor_SKExtensions.m; sourceTree = "<group>"; }; - CE7C5D040BD8062C0011315D /* ArrowNoteAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ArrowNoteAdorn.tiff; path = Images/ArrowNoteAdorn.tiff; sourceTree = "<group>"; }; - CE7C5D180BD8086C0011315D /* ToolbarArrowNote.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ToolbarArrowNote.tiff; path = Images/ToolbarArrowNote.tiff; sourceTree = "<group>"; }; + CE7C5D040BD8062C0011315D /* LineNoteAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = LineNoteAdorn.tiff; path = Images/LineNoteAdorn.tiff; sourceTree = "<group>"; }; + CE7C5D180BD8086C0011315D /* ToolbarLineNote.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ToolbarLineNote.tiff; path = Images/ToolbarLineNote.tiff; sourceTree = "<group>"; }; CE87EF690BA9FF5A0027BBDD /* skimhelp.css */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 30; name = skimhelp.css; path = "English.lproj/Skim Help/sty/skimhelp.css"; sourceTree = "<group>"; }; CE9A878E0C0C9E9A004F1F97 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/ProgressSheet.nib; sourceTree = "<group>"; }; CE9A87960C0C9EA3004F1F97 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Dutch; path = Dutch.lproj/ProgressSheet.nib; sourceTree = "<group>"; }; @@ -915,7 +915,7 @@ CE5478B80B33456300F8AFB6 /* BackAdorn.tiff */, CE5478B90B33456300F8AFB6 /* ForwardAdorn.tiff */, CE3A42340B7927D3006B64D3 /* AnchoredNoteAdorn.tiff */, - CE7C5D040BD8062C0011315D /* ArrowNoteAdorn.tiff */, + CE7C5D040BD8062C0011315D /* LineNoteAdorn.tiff */, CE3A42330B7927D3006B64D3 /* CircleNoteAdorn.tiff */, CE9DC2E70B9F131800D64F28 /* HighlightNoteAdorn.tiff */, CE1583280BA073FF00D5B03F /* StrikeOutNoteAdorn.tiff */, @@ -930,7 +930,7 @@ CE4EB8220B7B96D00091F228 /* OutlineViewAdorn.tiff */, CE380C610B837B6100A1B779 /* SnapshotViewAdorn.tiff */, CE4EB8230B7B96D00091F228 /* ThumbnailViewAdorn.tiff */, - CE7C5D180BD8086C0011315D /* ToolbarArrowNote.tiff */, + CE7C5D180BD8086C0011315D /* ToolbarLineNote.tiff */, CE4190C20B94963A00ECF819 /* ToolbarCircleNote.tiff */, CE31AC4D0C02E918003612A9 /* ToolbarCrop.tiff */, CE5478BA0B33456300F8AFB6 /* ToolbarFullScreen.tiff */, @@ -1164,8 +1164,8 @@ CE4F9DEE0BC1BE3A005BE0A1 /* Localizable.strings in Resources */, CE67BB260BC44AC9007B6929 /* ZoomValues.strings in Resources */, CEE1065E0BCBBE1300BF2D3E /* NotesDocument.nib in Resources */, - CE7C5D050BD8062C0011315D /* ArrowNoteAdorn.tiff in Resources */, - CE7C5D190BD8086C0011315D /* ToolbarArrowNote.tiff in Resources */, + CE7C5D050BD8062C0011315D /* LineNoteAdorn.tiff in Resources */, + CE7C5D190BD8086C0011315D /* ToolbarLineNote.tiff in Resources */, CE1E25680BDA61E80011D9DD /* ReadNotesAccessoryView.nib in Resources */, CECBA5910BFCEE260030AB59 /* SelectToolAdorn.tiff in Resources */, CE31AC4E0C02E919003612A9 /* ToolbarCrop.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-06-18 23:41:26
|
Revision: 2346 http://skim-app.svn.sourceforge.net/skim-app/?rev=2346&view=rev Author: hofman Date: 2007-06-18 16:41:25 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Put line end points at integral grid points. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m trunk/SKPDFView.m Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-18 23:20:58 UTC (rev 2345) +++ trunk/SKPDFAnnotationNote.m 2007-06-18 23:41:25 UTC (rev 2346) @@ -1292,26 +1292,24 @@ if ([inQDPointAsData length] == sizeof(Point)) { const Point *qdPoint = (const Point *)[inQDPointAsData bytes]; NSPoint startPoint = NSPointFromPoint(*qdPoint); - startPoint.x += 0.5; - startPoint.y += 0.5; NSRect bounds = [self bounds]; NSPoint endPoint = [self endPoint]; - endPoint.x += NSMinX(bounds); - endPoint.y += NSMinY(bounds); + endPoint.x = roundf(endPoint.x + NSMinX(bounds)); + endPoint.y = roundf(endPoint.y + NSMinY(bounds)); bounds.origin.x = floorf(fmin(startPoint.x, endPoint.x)); bounds.size.width = ceilf(fmax(endPoint.x, startPoint.x)) - NSMinX(bounds); bounds.origin.y = floorf(fmin(startPoint.y, endPoint.y)); bounds.size.height = ceilf(fmax(endPoint.y, startPoint.y)) - NSMinY(bounds); - if (NSWidth(bounds) < 7.0) { - bounds.size.width = 7.0; - bounds.origin.x = floorf(0.5 * (startPoint.x + endPoint.x) - 3.5); + if (NSWidth(bounds) < 8.0) { + bounds.size.width = 8.0; + bounds.origin.x = floorf(0.5 * (startPoint.x + endPoint.x) - 4.0); } - if (NSHeight(bounds) < 7.0) { - bounds.size.height = 7.0; - bounds.origin.y = floorf(0.5 * (startPoint.y + endPoint.y) - 3.5); + if (NSHeight(bounds) < 8.0) { + bounds.size.height = 8.0; + bounds.origin.y = floorf(0.5 * (startPoint.y + endPoint.y) - 4.0); } startPoint.x -= NSMinX(bounds); @@ -1339,26 +1337,24 @@ if ([inQDPointAsData length] == sizeof(Point)) { const Point *qdPoint = (const Point *)[inQDPointAsData bytes]; NSPoint endPoint = NSPointFromPoint(*qdPoint); - endPoint.x += 0.5; - endPoint.y += 0.5; NSRect bounds = [self bounds]; NSPoint startPoint = [self startPoint]; - startPoint.x += NSMinX(bounds); - startPoint.y += NSMinY(bounds); + startPoint.x = roundf(startPoint.x + NSMinX(bounds)); + startPoint.y = roundf(startPoint.y + NSMinY(bounds)); bounds.origin.x = floorf(fmin(startPoint.x, endPoint.x)); bounds.size.width = ceilf(fmax(endPoint.x, startPoint.x)) - NSMinX(bounds); bounds.origin.y = floorf(fmin(startPoint.y, endPoint.y)); bounds.size.height = ceilf(fmax(endPoint.y, startPoint.y)) - NSMinY(bounds); - if (NSWidth(bounds) < 7.0) { - bounds.size.width = 7.0; - bounds.origin.x = floorf(0.5 * (startPoint.x + endPoint.x) - 3.5); + if (NSWidth(bounds) < 8.0) { + bounds.size.width = 8.0; + bounds.origin.x = floorf(0.5 * (startPoint.x + endPoint.x) - 4.0); } - if (NSHeight(bounds) < 7.0) { - bounds.size.height = 7.0; - bounds.origin.y = floorf(0.5 * (startPoint.y + endPoint.y) - 3.5); + if (NSHeight(bounds) < 8.0) { + bounds.size.height = 8.0; + bounds.origin.y = floorf(0.5 * (startPoint.y + endPoint.y) - 4.0); } startPoint.x -= NSMinX(bounds); Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-06-18 23:20:58 UTC (rev 2345) +++ trunk/SKPDFView.m 2007-06-18 23:41:25 UTC (rev 2346) @@ -1761,7 +1761,7 @@ - (NSRect)resizeThumbForRect:(NSRect)rect point:(NSPoint)point { NSRect thumb = rect; - float size = 7.0; + float size = 8.0; thumb.size = NSMakeSize(size, size); @@ -1998,10 +1998,10 @@ NSPoint oldEndPoint = [annotation endPoint]; NSPoint endPoint; NSPoint startPoint = [annotation startPoint]; - startPoint.x += NSMinX(bounds); - startPoint.y += NSMinY(bounds); - oldEndPoint.x += NSMinX(bounds); - oldEndPoint.y += NSMinY(bounds); + startPoint.x = roundf(startPoint.x + NSMinX(bounds)); + startPoint.y = roundf(startPoint.y + NSMinY(bounds)); + oldEndPoint.x = roundf(oldEndPoint.x + NSMinX(bounds)); + oldEndPoint.y = roundf(oldEndPoint.y + NSMinY(bounds)); endPoint = oldEndPoint; // Resize the annotation. @@ -2010,82 +2010,82 @@ if (eventChar == NSRightArrowFunctionKey) { endPoint.x += delta; if (endPoint.x > NSMaxX(pageBounds)) - endPoint.x = NSMaxX(pageBounds) - 0.5; + endPoint.x = NSMaxX(pageBounds); } else if (eventChar == NSLeftArrowFunctionKey) { endPoint.x -= delta; if (endPoint.x < NSMinX(pageBounds)) - endPoint.x = NSMinX(pageBounds) + 0.5; + endPoint.x = NSMinX(pageBounds); } else if (eventChar == NSUpArrowFunctionKey) { endPoint.y += delta; if (endPoint.y > NSMaxY(pageBounds)) - endPoint.y = NSMaxY(pageBounds) - 0.5; + endPoint.y = NSMaxY(pageBounds); } else if (eventChar == NSDownArrowFunctionKey) { endPoint.y -= delta; if (endPoint.y < NSMinY(pageBounds)) - endPoint.y = NSMinY(pageBounds) + 0.5; + endPoint.y = NSMinY(pageBounds); } break; case 90: if (eventChar == NSRightArrowFunctionKey) { endPoint.y += delta; if (endPoint.y > NSMaxY(pageBounds)) - endPoint.y = NSMaxY(pageBounds) - 0.5; + endPoint.y = NSMaxY(pageBounds); } else if (eventChar == NSLeftArrowFunctionKey) { endPoint.y -= delta; if (endPoint.y < NSMinY(pageBounds)) - endPoint.y = NSMinY(pageBounds) + 0.5; + endPoint.y = NSMinY(pageBounds); } else if (eventChar == NSUpArrowFunctionKey) { endPoint.x -= delta; if (endPoint.x < NSMinX(pageBounds)) - endPoint.x = NSMinX(pageBounds) + 0.5; + endPoint.x = NSMinX(pageBounds); } else if (eventChar == NSDownArrowFunctionKey) { endPoint.x += delta; if (endPoint.x > NSMaxX(pageBounds)) - endPoint.x = NSMaxX(pageBounds) - 0.5; + endPoint.x = NSMaxX(pageBounds); } break; case 180: if (eventChar == NSRightArrowFunctionKey) { endPoint.x -= delta; if (endPoint.x < NSMinX(pageBounds)) - endPoint.x = NSMinX(pageBounds) + 0.5; + endPoint.x = NSMinX(pageBounds); } else if (eventChar == NSLeftArrowFunctionKey) { endPoint.x += delta; if (endPoint.x > NSMaxX(pageBounds)) - endPoint.x = NSMaxX(pageBounds) - 0.5; + endPoint.x = NSMaxX(pageBounds); } else if (eventChar == NSUpArrowFunctionKey) { endPoint.y -= delta; if (endPoint.y < NSMinY(pageBounds)) - endPoint.y = NSMinY(pageBounds) + 0.5; + endPoint.y = NSMinY(pageBounds); } else if (eventChar == NSDownArrowFunctionKey) { endPoint.y += delta; if (endPoint.y > NSMaxY(pageBounds)) - endPoint.y = NSMaxY(pageBounds) - 0.5; + endPoint.y = NSMaxY(pageBounds); } break; case 270: if (eventChar == NSRightArrowFunctionKey) { endPoint.y -= delta; if (endPoint.y < NSMinY(pageBounds)) - endPoint.y = NSMinY(pageBounds) + 0.5; + endPoint.y = NSMinY(pageBounds); } else if (eventChar == NSLeftArrowFunctionKey) { endPoint.y += delta; if (endPoint.y > NSMaxY(pageBounds)) - endPoint.y = NSMaxY(pageBounds) - 0.5; + endPoint.y = NSMaxY(pageBounds); } else if (eventChar == NSUpArrowFunctionKey) { endPoint.x += delta; if (endPoint.x > NSMaxX(pageBounds)) - endPoint.x = NSMaxX(pageBounds) - 0.5; + endPoint.x = NSMaxX(pageBounds); } else if (eventChar == NSDownArrowFunctionKey) { endPoint.x -= delta; if (endPoint.x < NSMinX(pageBounds)) - endPoint.x = NSMinX(pageBounds) + 0.5; + endPoint.x = NSMinX(pageBounds); } break; } - endPoint.x = floorf(endPoint.x) + 0.5; - endPoint.y = floorf(endPoint.y) + 0.5; + endPoint.x = floorf(endPoint.x); + endPoint.y = floorf(endPoint.y); if (NSEqualPoints(endPoint, oldEndPoint) == NO) { newBounds.origin.x = floorf(fmin(startPoint.x, endPoint.x)); @@ -2093,13 +2093,13 @@ newBounds.origin.y = floorf(fmin(startPoint.y, endPoint.y)); newBounds.size.height = ceilf(fmax(endPoint.y, startPoint.y)) - NSMinY(newBounds); - if (NSWidth(newBounds) < 7.0) { - newBounds.size.width = 7.0; - newBounds.origin.x = floorf(0.5 * (startPoint.x + endPoint.x) - 3.5); + if (NSWidth(newBounds) < 8.0) { + newBounds.size.width = 8.0; + newBounds.origin.x = floorf(0.5 * (startPoint.x + endPoint.x) - 4.0); } - if (NSHeight(newBounds) < 7.0) { - newBounds.size.height = 7.0; - newBounds.origin.y = floorf(0.5 * (startPoint.y + endPoint.y) - 3.5); + if (NSHeight(newBounds) < 8.0) { + newBounds.size.height = 8.0; + newBounds.origin.y = floorf(0.5 * (startPoint.y + endPoint.y) - 4.0); } startPoint.x -= NSMinX(newBounds); @@ -2424,11 +2424,11 @@ SKPDFAnnotationLine *annotation = (SKPDFAnnotationLine *)activeAnnotation; NSPoint endPoint = wasEndPoint; - endPoint.x += NSMinX(wasBounds); - endPoint.y += NSMinY(wasBounds); + endPoint.x = roundf(endPoint.x + NSMinX(wasBounds)); + endPoint.y = roundf(endPoint.y + NSMinY(wasBounds)); startPoint = wasStartPoint; - startPoint.x += NSMinX(wasBounds); - startPoint.y += NSMinY(wasBounds); + startPoint.x = roundf(startPoint.x + NSMinX(wasBounds)); + startPoint.y = roundf(startPoint.y + NSMinY(wasBounds)); NSPoint *draggedPoint = draggingStartPoint ? &startPoint : &endPoint; // Resize the annotation. @@ -2452,28 +2452,28 @@ } if (draggedPoint->x > NSMaxX(pageBounds)) - draggedPoint->x = NSMaxX(pageBounds) - 0.5; + draggedPoint->x = NSMaxX(pageBounds); else if (draggedPoint->x < NSMinX(pageBounds)) - draggedPoint->x = NSMinX(pageBounds) + 0.5; + draggedPoint->x = NSMinX(pageBounds); if (draggedPoint->y > NSMaxY(pageBounds)) - draggedPoint->y = NSMaxY(pageBounds) - 0.5; + draggedPoint->y = NSMaxY(pageBounds) ; else if (draggedPoint->y < NSMinY(pageBounds)) - draggedPoint->y = NSMinY(pageBounds) + 0.5; - draggedPoint->x = floorf(draggedPoint->x) + 0.5; - draggedPoint->y = floorf(draggedPoint->y) + 0.5; + draggedPoint->y = NSMinY(pageBounds); + draggedPoint->x = floorf(draggedPoint->x); + draggedPoint->y = floorf(draggedPoint->y); newBounds.origin.x = floorf(fmin(startPoint.x, endPoint.x)); newBounds.size.width = ceilf(fmax(endPoint.x, startPoint.x)) - NSMinX(newBounds); newBounds.origin.y = floorf(fmin(startPoint.y, endPoint.y)); newBounds.size.height = ceilf(fmax(endPoint.y, startPoint.y)) - NSMinY(newBounds); - if (NSWidth(newBounds) < 7.0) { - newBounds.size.width = 7.0; - newBounds.origin.x = floorf(0.5 * (startPoint.x + endPoint.x) - 3.5); + if (NSWidth(newBounds) < 8.0) { + newBounds.size.width = 8.0; + newBounds.origin.x = floorf(0.5 * (startPoint.x + endPoint.x) - 4.0); } - if (NSHeight(newBounds) < 7.0) { - newBounds.size.height = 7.0; - newBounds.origin.y = floorf(0.5 * (startPoint.y + endPoint.y) - 3.5); + if (NSHeight(newBounds) < 8.0) { + newBounds.size.height = 8.0; + newBounds.origin.y = floorf(0.5 * (startPoint.y + endPoint.y) - 4.0); } startPoint.x -= NSMinX(newBounds); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 23:20:59
|
Revision: 2345 http://skim-app.svn.sourceforge.net/skim-app/?rev=2345&view=rev Author: hofman Date: 2007-06-18 16:20:58 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Change keyboard shortcut for line note tool. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-06-18 23:14:17 UTC (rev 2344) +++ trunk/SKPDFView.m 2007-06-18 23:20:58 UTC (rev 2345) @@ -758,7 +758,7 @@ [self setAnnotationMode:SKUnderlineNote]; } else if (isPresentation == NO && [self toolMode] == SKNoteToolMode && modifiers == 0 && eventChar == 's') { [self setAnnotationMode:SKStrikeOutNote]; - } else if (isPresentation == NO && [self toolMode] == SKNoteToolMode && modifiers == 0 && eventChar == 'a') { + } else if (isPresentation == NO && [self toolMode] == SKNoteToolMode && modifiers == 0 && eventChar == 'l') { [self setAnnotationMode:SKLineNote]; } else { [super keyDown:theEvent]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 23:14:22
|
Revision: 2344 http://skim-app.svn.sourceforge.net/skim-app/?rev=2344&view=rev Author: hofman Date: 2007-06-18 16:14:17 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Change applescript code for arrow to line. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-18 23:00:34 UTC (rev 2343) +++ trunk/SKPDFAnnotationNote.m 2007-06-18 23:14:17 UTC (rev 2344) @@ -51,7 +51,7 @@ SKASHighlightNote = 'NHil', SKASUnderlineNote = 'NUnd', SKASStrikeOutNote = 'NStr', - SKASLineNote = 'NArr' + SKASLineNote = 'NLin' }; enum { Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-18 23:00:34 UTC (rev 2343) +++ trunk/Skim.sdef 2007-06-18 23:14:17 UTC (rev 2344) @@ -820,7 +820,7 @@ description="Default strike out highlight color."> <cocoa key="strikeOutNote"/> </property> - <property name="line note color" code="CArr" type="RGBA color" + <property name="line note color" code="CLin" type="RGBA color" description="Default line color."> <cocoa key="lineNote"/> </property> @@ -904,7 +904,7 @@ description="Underline highlight."/> <enumerator name="strike out note" code="NStr" description="Strike out highlight."/> - <enumerator name="line note" code="NArr" + <enumerator name="line note" code="NLin" description="Line."/> </enumeration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 23:00:39
|
Revision: 2343 http://skim-app.svn.sourceforge.net/skim-app/?rev=2343&view=rev Author: hofman Date: 2007-06-18 16:00:34 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Make border accessible to all note types and add a border when changing any of its parameters and there is no border. Change applescript keywords for border. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-18 22:44:18 UTC (rev 2342) +++ trunk/SKPDFAnnotationNote.m 2007-06-18 23:00:34 UTC (rev 2343) @@ -129,6 +129,9 @@ NSRect bounds = NSRectFromString([dict objectForKey:@"bounds"]); NSString *contents = [dict objectForKey:@"contents"]; NSColor *color = [dict objectForKey:@"color"]; + NSNumber *lineWidth = [dict objectForKey:@"lineWidth"]; + NSNumber *borderStyle = [dict objectForKey:@"borderStyle"]; + NSArray *dashPattern = [dict objectForKey:@"dashPattern"]; if ([type isEqualToString:@"Note"]) { self = [[SKPDFAnnotationNote alloc] initWithBounds:bounds]; @@ -149,31 +152,13 @@ } else if ([type isEqualToString:@"Circle"]) { self = [[SKPDFAnnotationCircle alloc] initWithBounds:bounds]; NSColor *interiorColor = [dict objectForKey:@"interiorColor"]; - NSNumber *lineWidth = [dict objectForKey:@"lineWidth"]; - NSNumber *borderStyle = [dict objectForKey:@"borderStyle"]; - NSArray *dashPattern = [dict objectForKey:@"dashPattern"]; if (interiorColor) [(SKPDFAnnotationCircle *)self setInteriorColor:interiorColor]; - if (lineWidth) - [[self border] setLineWidth:[lineWidth floatValue]]; - if (borderStyle) - [[self border] setStyle:[lineWidth intValue]]; - if (dashPattern) - [[self border] setDashPattern:dashPattern]; } else if ([type isEqualToString:@"Square"]) { self = [[SKPDFAnnotationSquare alloc] initWithBounds:bounds]; NSColor *interiorColor = [dict objectForKey:@"interiorColor"]; - NSNumber *lineWidth = [dict objectForKey:@"lineWidth"]; - NSNumber *borderStyle = [dict objectForKey:@"borderStyle"]; - NSArray *dashPattern = [dict objectForKey:@"dashPattern"]; if (interiorColor) [(SKPDFAnnotationSquare *)self setInteriorColor:interiorColor]; - if (lineWidth) - [[self border] setLineWidth:[lineWidth floatValue]]; - if (borderStyle) - [[self border] setStyle:[lineWidth intValue]]; - if (dashPattern) - [[self border] setDashPattern:dashPattern]; } else if ([type isEqualToString:@"Highlight"] || [type isEqualToString:@"MarkUp"]) { self = [[SKPDFAnnotationMarkup alloc] initWithBounds:bounds markupType:kPDFMarkupTypeHighlight quadrilateralPointsAsStrings:[dict objectForKey:@"quadrilateralPoints"]]; } else if ([type isEqualToString:@"Underline"]) { @@ -201,6 +186,14 @@ [self setContents:contents]; if (color) [self setColor:color]; + if ((lineWidth || borderStyle || dashPattern) && [self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; + if (lineWidth) + [[self border] setLineWidth:[lineWidth floatValue]]; + if (borderStyle) + [[self border] setStyle:[lineWidth intValue]]; + if (dashPattern) + [[self border] setDashPattern:dashPattern]; return self; } @@ -212,6 +205,11 @@ [dict setValue:[self color] forKey:@"color"]; [dict setValue:NSStringFromRect([self bounds]) forKey:@"bounds"]; [dict setValue:[NSNumber numberWithUnsignedInt:[self pageIndex]] forKey:@"pageIndex"]; + if ([self border]) { + [dict setValue:[NSNumber numberWithFloat:[[self border] lineWidth]] forKey:@"lineWidth"]; + [dict setValue:[NSNumber numberWithInt:[[self border] style]] forKey:@"borderStyle"]; + [dict setValue:[[self border] dashPattern] forKey:@"dashPattern"]; + } return dict; } @@ -253,6 +251,8 @@ - (void)setBorderStyle:(PDFBorderStyle)style { [[[self undoManager] prepareWithInvocationTarget:self] setBorderStyle:style]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; [[self border] setStyle:style]; [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"borderStyle", @"key", nil]]; @@ -468,6 +468,8 @@ - (void)setLineWidth:(float)width { [[[self undoManager] prepareWithInvocationTarget:self] setLineWidth:[self lineWidth]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; [[self border] setLineWidth:width]; [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"lineWidth", @"key", nil]]; @@ -503,6 +505,8 @@ - (void)setDashPattern:(NSArray *)pattern { [[[self undoManager] prepareWithInvocationTarget:self] setDashPattern:[self dashPattern]]; [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + if ([self border] == nil) + [self setBorder:[[[PDFBorder alloc] init] autorelease]]; [[self border] setDashPattern:pattern]; [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"dashPattern", @"key", nil]]; @@ -547,9 +551,6 @@ - (NSDictionary *)dictionaryValue{ NSMutableDictionary *dict = (NSMutableDictionary *)[super dictionaryValue]; [dict setValue:[self interiorColor] forKey:@"interiorColor"]; - [dict setValue:[NSNumber numberWithFloat:[[self border] lineWidth]] forKey:@"lineWidth"]; - [dict setValue:[NSNumber numberWithInt:[[self border] style]] forKey:@"borderStyle"]; - [dict setValue:[[self border] dashPattern] forKey:@"dashPattern"]; return dict; } @@ -602,9 +603,6 @@ - (NSDictionary *)dictionaryValue{ NSMutableDictionary *dict = (NSMutableDictionary *)[super dictionaryValue]; [dict setValue:[self interiorColor] forKey:@"interiorColor"]; - [dict setValue:[NSNumber numberWithFloat:[[self border] lineWidth]] forKey:@"lineWidth"]; - [dict setValue:[NSNumber numberWithInt:[[self border] style]] forKey:@"borderStyle"]; - [dict setValue:[[self border] dashPattern] forKey:@"dashPattern"]; return dict; } Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-18 22:44:18 UTC (rev 2342) +++ trunk/Skim.sdef 2007-06-18 23:00:34 UTC (rev 2343) @@ -652,16 +652,16 @@ description="The fill color of a circle or box."> <cocoa key="interiorColor"/> </property> - <property name="border width" code="LnWd" type="real" - description="The line width of the border a circle or box."> + <property name="line width" code="LnWd" type="real" + description="The line width of the note."> <cocoa key="lineWidth"/> </property> - <property name="border style" code="BdSt" type="note border style" - description="The border style a circle or box."> + <property name="line style" code="LnSt" type="note line style" + description="The line style of the note."> <cocoa key="asBorderStyle"/> </property> - <property name="border dash pattern" code="DshP" - description="The dash pattern of the border a circle or box, a list of numbers."> + <property name="dash pattern" code="DshP" + description="The dash pattern of the border of the note or of the line, a list of numbers."> <cocoa key="dashPattern"/> <type type="real" list="yes"/> </property> @@ -940,17 +940,17 @@ description="Closed arrow line ending."/> </enumeration> - <enumeration name="note border style" code="BrSE"> - <enumerator name="solid border" code="Soli" - description="Solid border."/> - <enumerator name="dashed border" code="Dash" - description="Dashed border."/> - <enumerator name="beveled border" code="Bevl" - description="Beveled border."/> - <enumerator name="inset border" code="Inst" - description="Inset border."/> - <enumerator name="underline border" code="Undl" - description="Underline border."/> + <enumeration name="note line style" code="LnSE"> + <enumerator name="solid line" code="Soli" + description="Solid line."/> + <enumerator name="dashed line" code="Dash" + description="Dashed line."/> + <enumerator name="beveled line" code="Bevl" + description="Beveled line."/> + <enumerator name="inset line" code="Inst" + description="Inset line."/> + <enumerator name="underline line" code="Undl" + description="Underline line."/> </enumeration> <enumeration name="PDF display box" code="BoxE"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 22:44:25
|
Revision: 2342 http://skim-app.svn.sourceforge.net/skim-app/?rev=2342&view=rev Author: hofman Date: 2007-06-18 15:44:18 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Rename Arrow to Line everywhere. It is possible to change the end line style now, so we better be more general. Modified Paths: -------------- trunk/Dutch.lproj/Localizable.strings trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib trunk/Dutch.lproj/PreferenceWindow.nib/keyedobjects.nib trunk/Dutch.lproj/Skim Help/skim.texi trunk/English.lproj/Localizable.strings trunk/English.lproj/MainMenu.nib/keyedobjects.nib trunk/English.lproj/PreferenceWindow.nib/keyedobjects.nib trunk/English.lproj/Skim Help/skim.texi trunk/InitialUserDefaults.plist trunk/Italian.lproj/Localizable.strings trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib trunk/Italian.lproj/PreferenceWindow.nib/keyedobjects.nib trunk/Italian.lproj/Skim Help/skim.texi trunk/NSString_SKExtensions.m trunk/ReleaseNotes.rtf trunk/SKApplicationController.m trunk/SKMainWindowController.m trunk/SKPDFAnnotationNote.m trunk/SKPDFView.h trunk/SKPDFView.m trunk/SKStringConstants.h trunk/SKStringConstants.m trunk/Skim.sdef Modified: trunk/Dutch.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/PreferenceWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/Skim Help/skim.texi =================================================================== --- trunk/Dutch.lproj/Skim Help/skim.texi 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/Dutch.lproj/Skim Help/skim.texi 2007-06-18 22:44:18 UTC (rev 2342) @@ -247,7 +247,7 @@ @item U navigeert door de miniatuurafbeeldingen van de pagina's in het document door te klikken op de desbetreffende miniatuur in het inhoudspaneel. @end itemize @itemize -@item Om naar de volgende pagina te gaan, drukt u op de pijl-omlaagtoets of de Page Down-toets. Om naar de vorige pagina te gaan, drukt u op de pijl-omhoogtoets of de Page Up-toets. +@item Om naar de volgende pagina te gaan, drukt u op de Pijl-Omlaagtoets of de Pagina Omlaag-toets. Om naar de vorige pagina te gaan, drukt u op de Pijl-Omhoogtoets of de Pagina Omhoog-toets. @end itemize @itemize @item Om met de verticale schuifbalk door de verschillende pagina's in de PDF te bladeren, kiest u Weergave > PDF Weergave > Doorlopend. @@ -567,7 +567,7 @@ @heading Zie ook @menu * Gedeelten van een PDF-document markeren:: -* Pijlen aan een PDF-document toevoegen:: +* Lijnen aan een PDF-document toevoegen:: * De kleur van notities en markeringen wijzigen:: * Het lettertype en de lettergrootte van textnotities wijzigen:: @end menu @@ -599,30 +599,30 @@ @heading Zie ook @menu * Notities aan een PDF-document toevoegen:: -* Pijlen aan een PDF-document toevoegen:: +* Lijnen aan een PDF-document toevoegen:: * De kleur van notities en markeringen wijzigen:: @end menu @c ====================================================================================== -@topic Pijlen aan een PDF-document toevoegen +@topic Lijnen aan een PDF-document toevoegen -U kunt uw pijlen toevoegen aan een PDF-document om relaties tussen secties aan te geven. +U kunt uw lijnen toevoegen aan een PDF-document om relaties tussen secties aan te geven. -De pijlen worden bewaard bij het document en zijn zichtbaar voor andere gebruikers van Skim. De pijlen worden niet bewaard in de PDF-data zelf, zodat u de pijlen niet kunt zien in de meeste andere PDF vertoningsprogrammas. +De lijnen worden bewaard bij het document en zijn zichtbaar voor andere gebruikers van Skim. De lijnen worden niet bewaard in de PDF-data zelf, zodat u de lijnen niet kunt zien in de meeste andere PDF vertoningsprogrammas. @box{taskbox} -@heading Om een pijl toe te voegen: +@heading Om een lijn toe te voegen: @enumerate @item Kies Extra's > Tekstfunctie. -@item Kies Notities > Pijl. -@item Sleep de pijl of \x8E\x8En van zijn eindpunten in het document tot deze op de gewenste plaats is en naar de juiste postie wijst. +@item Kies Notities > Lijn. +@item Sleep de lijn of \x8E\x8En van zijn eindpunten in het document tot deze op de gewenste plaats is en naar de juiste postie wijst. @end enumerate @endbox -U kunt pijlen ook toevoegen met behulp van een knop op de knoppenbalk. Om de knop aan de knoppenbalk toe te voegen, kiest u Weergave > 'Pas knoppenbalk aan' en sleept u de knop naar de knoppenbalk. +U kunt lijnen ook toevoegen met behulp van een knop op de knoppenbalk. Om de knop aan de knoppenbalk toe te voegen, kiest u Weergave > 'Pas knoppenbalk aan' en sleept u de knop naar de knoppenbalk. -U kunt pijlen wijzigen en verwijderen. Om een pijl of \x8E\x8En van zijn eindpunten te verplaatsen, kies Extra's > Tekstfunctie, en gebruik de muis om te selecteren en te slepen. Sleep een zwarte vierkantje om een eindpunt te verplaatsen. Om de kleur van de pijl te wijzigen, kies Extra's > 'Toon kleuren'. Om een pijl te verwijderen, kies Extra's > Textfunctie, selecteer de pijl, en druk op de Delete-toets. +U kunt lijnen wijzigen en verwijderen. Om een lijn of \x8E\x8En van zijn eindpunten te verplaatsen, kies Extra's > Tekstfunctie, en gebruik de muis om te selecteren en te slepen. Sleep een zwarte vierkantje om een eindpunt te verplaatsen. Om de kleur van de lijn te wijzigen, kies Extra's > 'Toon kleuren'. Om een lijn te verwijderen, kies Extra's > Textfunctie, selecteer de lijn, en druk op de Delete-toets. @heading Zie ook @menu @@ -636,16 +636,16 @@ @topic De kleur van notities en markeringen wijzigen -In Skim kunt u de kleur van een notitie, markering of pijl die u met Skim heeft aangebracht wijzigen. U kunt ook de standaardkleuren die gebruikt worden voor nieuwe notities, markeringen en pijlen instellen. +In Skim kunt u de kleur van een notitie, markering of lijn die u met Skim heeft aangebracht wijzigen. U kunt ook de standaardkleuren die gebruikt worden voor nieuwe notities, markeringen en lijnen instellen. @box{taskbox} -@heading Om de standaardkleuren voor notities, markeringenen pijlen te wijzigen: +@heading Om de standaardkleuren voor notities, markeringenen lijnen te wijzigen: @itemize -@item Kies Skim > Voorkeuren, selecteer Notities, en klik op een kleur behorende bij de type notitie, markering orfpijl die u wilt veranderen. +@item Kies Skim > Voorkeuren, selecteer Notities, en klik op een kleur behorende bij de type notitie, markering of lijn die u wilt veranderen. @end itemize -@heading Om de kleur van een enkele notitie, markering of pijl te wijzigen: +@heading Om de kleur van een enkele notitie, markering of lijn te wijzigen: @itemize -@item Selecteer de notitie, markering of pijl in de PDF en kies Extra's > Toon kleuren. +@item Selecteer de notitie, markering of lijn in de PDF en kies Extra's > Toon kleuren. @end itemize @endbox @@ -653,7 +653,7 @@ @menu * Notities aan een PDF-document toevoegen:: * Gedeelten van een PDF-document markeren:: -* Pijlen aan een PDF-document toevoegen:: +* Lijnen aan een PDF-document toevoegen:: * Het lettertype en de lettergrootte van textnotities wijzigen:: @end menu @@ -676,7 +676,7 @@ @menu * Notities aan een PDF-document toevoegen:: * Gedeelten van een PDF-document markeren:: -* Pijlen aan een PDF-document toevoegen:: +* Lijnen aan een PDF-document toevoegen:: * De kleur van notities en markeringen wijzigen:: @end menu @@ -888,10 +888,10 @@ @item Om de leesbalk te tonen, kies Weergave > Toon Leesbalk. @end itemize @itemize -@item Om de leesbalk naar de volgende of vorige regel te verplaatsen, houd de Option-toets ingedrukt en druk de pijl-omlaagtoets of pijl-omhoogtoets in. +@item Om de leesbalk naar de volgende of vorige regel te verplaatsen, houd de Option-toets ingedrukt en druk de Lijn-Omlaagtoets of Pijl-Omhoogtoets in. @end itemize @itemize -@item Om de leesbalk naar de volgende of vorige pagina te verplaatsen, houd de Option-toets ingedrukt en druk de pijl-rechtstoets of pijl-linkstoets in. +@item Om de leesbalk naar de volgende of vorige pagina te verplaatsen, houd de Option-toets ingedrukt en druk de Pijl-Rechtstoets of Pijl-Linkstoets in. @end itemize @endbox @@ -961,7 +961,7 @@ @end enumerate @endbox -In presentatiemodus kunt u de pijl-rechtstoets en pijl-linkstoets gebruiken om door de paginas te navigeren. +In presentatiemodus kunt u de Pijl-Rechtstoets en Pijl-Linkstoets gebruiken om door de paginas te navigeren. Als u de muis naar de onderzijde van het scherm beweegt, worden navigatietoetsen getoond. Modified: trunk/English.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/PreferenceWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/Skim Help/skim.texi =================================================================== --- trunk/English.lproj/Skim Help/skim.texi 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/English.lproj/Skim Help/skim.texi 2007-06-18 22:44:18 UTC (rev 2342) @@ -565,7 +565,7 @@ @heading See also @menu * Highlighting sections of a PDF document:: -* Adding arrows to a PDF document:: +* Adding lines to a PDF document:: * Changing the color for notes and highlights:: * Changing the font of text notes:: @end menu @@ -597,30 +597,30 @@ @heading See also @menu * Adding notes to a PDF document:: -* Adding arrows to a PDF document:: +* Adding lines to a PDF document:: * Changing the color for notes and highlights:: @end menu @c ====================================================================================== -@topic Adding arrows to a PDF document +@topic Adding lines to a PDF document -You can add arrows to a PDF document, to highlight relations between sections. +You can add lines to a PDF document, to highlight relations between sections. -The arrows are saved with the document, so also other Skim users can see them. The arrows are not saved in the PDF data itself, therefore other PDF viewers will probably not be able to show the arrows. +The lines are saved with the document, so also other Skim users can see them. The lines are not saved in the PDF data itself, therefore other PDF viewers will probably not be able to show the lines. @box{taskbox} -@heading To add an arrow: +@heading To add a line: @enumerate @item Choose Tools > Text Tool. -@item Choose Notes > Arrow. -@item Drag in the document until the arrow, and drag the end points until it points where you want. +@item Choose Notes > Line. +@item Drag in the document until the line is located where you want, and drag the end points until it points where you want. @end enumerate @endbox -You can also use toolbar buttons to add arrows. To add an arrow button to the toolbar, choose View > Customize Toolbar and drag the button to the toolbar. +You can also use toolbar buttons to add lines. To add a line button to the toolbar, choose View > Customize Toolbar and drag the button to the toolbar. -You can edit or delete the arrow. To move the arrow or its end points, choose Tools > Text Tool, and use the mouse. Drag a black box to move an end point. To change the color used for the arrow, choose Tools > Show Colors. To delete the arrow, choose Tools > Text Tool, select the arrow, and press Delete. +You can edit or delete the line. To move the line or its end points, choose Tools > Text Tool, and use the mouse. Drag a black box to move an end point. To change the color used for the line, choose Tools > Show Colors. To delete the line, choose Tools > Text Tool, select the line, and press Delete. @heading See also @menu @@ -633,16 +633,16 @@ @topic Changing the color for notes and highlights -Skim allows you can change the color of a note, highlight or arrow you have added using Skim. You can also change the default colors that are used for new notes, highlights and arrows. +Skim allows you can change the color of a note, highlight or line you have added using Skim. You can also change the default colors that are used for new notes, highlights and lines. @box{taskbox} -@heading To change the default color for notes, highlights and arrows: +@heading To change the default color for notes, highlights and lines: @itemize -@item Choose Skim > Preferences, select Notes, and click a color for the type of note, highlight or arrow you want to change. +@item Choose Skim > Preferences, select Notes, and click a color for the type of note, highlight or line you want to change. @end itemize -@heading To change the color of a single note, highlight or arrow: +@heading To change the color of a single note, highlight or line: @itemize -@item Select the note, highlight or arrow in the PDF and choose Tools > Show Colors. +@item Select the note, highlight or line in the PDF and choose Tools > Show Colors. @end itemize @endbox @@ -650,7 +650,7 @@ @menu * Adding notes to a PDF document:: * Highlighting sections of a PDF document:: -* Adding arrows to a PDF document:: +* Adding lines to a PDF document:: * Changing the font of text notes:: @end menu @@ -673,7 +673,7 @@ @menu * Adding notes to a PDF document:: * Highlighting sections of a PDF document:: -* Adding arrows to a PDF document:: +* Adding lines to a PDF document:: * Changing the color for notes and highlights:: @end menu @@ -884,10 +884,10 @@ @item To show the reading bar, choose View > Show Reading Bar. @end itemize @itemize -@item To move the reading bar to the next (previous) line, hold down the Option key and press the down arrow (up arrow) key. +@item To move the reading bar to the next (previous) line, hold down the Option key and press the Down Arrow (Up Arrow) key. @end itemize @itemize -@item To move the reading bar to the next (previous) page, hold down the Option key and press the right arrow (left arrow) key. +@item To move the reading bar to the next (previous) page, hold down the Option key and press the Right Arrow (Left Arrow) key. @end itemize @endbox @@ -956,7 +956,7 @@ @end enumerate @endbox -In presentation mode, you can use the Left and Right Arrow buttons to navigate through the pages of the document. +In presentation mode, you can use the Left and Right Line buttons to navigate through the pages of the document. You can show navigation buttons by moving the mouse to the bottom of the screen. Modified: trunk/InitialUserDefaults.plist =================================================================== --- trunk/InitialUserDefaults.plist 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/InitialUserDefaults.plist 2007-06-18 22:44:18 UTC (rev 2342) @@ -116,7 +116,7 @@ BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm ZmZmAQAAAYY= </data> - <key>SKArrowNoteColor</key> + <key>SKLineNoteColor</key> <data> BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm ZmZmAAABAYY= @@ -127,9 +127,9 @@ <real>2.0</real> <key>SKSquareNoteLineWidth</key> <real>2.0</real> - <key>SKArrowNoteStartLineStyle</key> + <key>SKLineNoteStartLineStyle</key> <integer>0</integer> - <key>SKArrowNoteEndLineStyle</key> + <key>SKLineNoteEndLineStyle</key> <integer>4</integer> <key>SKAutoCheckFileUpdate</key> <false/> @@ -204,14 +204,14 @@ <string>SKHighlightNoteColor</string> <string>SKUnderlineNoteColor</string> <string>SKStrikeOutNoteColor</string> - <string>SKArrowNoteColor</string> + <string>SKLineNoteColor</string> <string>SKTextNoteFontName</string> <string>SKTextNoteFontSize</string> <string>SKAnchoredNoteIconType</string> <string>SKCircleNoteLineWidth</string> <string>SKSquareNoteLineWidth</string> - <string>SKArrowNoteStartLineStyle</string> - <string>SKArrowNoteEndLineStyle</string> + <string>SKLineNoteStartLineStyle</string> + <string>SKLineNoteEndLineStyle</string> </array> <key>sync</key> <array> Modified: trunk/Italian.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/PreferenceWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/Skim Help/skim.texi =================================================================== --- trunk/Italian.lproj/Skim Help/skim.texi 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/Italian.lproj/Skim Help/skim.texi 2007-06-18 22:44:18 UTC (rev 2342) @@ -565,7 +565,7 @@ @heading See also @menu * Highlighting sections of a PDF document:: -* Adding arrows to a PDF document:: +* Adding lines to a PDF document:: * Changing the color for notes and highlights:: * Changing the font of text notes:: @end menu @@ -597,30 +597,30 @@ @heading See also @menu * Adding notes to a PDF document:: -* Adding arrows to a PDF document:: +* Adding lines to a PDF document:: * Changing the color for notes and highlights:: @end menu @c ====================================================================================== -@topic Adding arrows to a PDF document +@topic Adding lines to a PDF document -You can add arrows to a PDF document, to highlight relations between sections. +You can add lines to a PDF document, to highlight relations between sections. -The arrows are saved with the document, so also other Skim users can see them. The arrows are not saved in the PDF data itself, therefore other PDF viewers will probably not be able to show the arrows. +The lines are saved with the document, so also other Skim users can see them. The lines are not saved in the PDF data itself, therefore other PDF viewers will probably not be able to show the lines. @box{taskbox} -@heading To add an arrow: +@heading To add a line: @enumerate @item Choose Tools > Text Tool. -@item Choose Notes > Arrow. -@item Drag in the document until the arrow, and drag the end points until it points where you want. +@item Choose Notes > Line. +@item Drag in the document until the line is located where you want, and drag the end points until it points where you want. @end enumerate @endbox -You can also use toolbar buttons to add arrows. To add an arrow button to the toolbar, choose View > Customize Toolbar and drag the button to the toolbar. +You can also use toolbar buttons to add lines. To add a line button to the toolbar, choose View > Customize Toolbar and drag the button to the toolbar. -You can edit or delete the arrow. To move the arrow or its end points, choose Tools > Text Tool, and use the mouse. Drag a black box to move an end point. To change the color used for the arrow, choose Tools > Show Colors. To delete the arrow, choose Tools > Text Tool, select the arrow, and press Delete. +You can edit or delete the line. To move the line or its end points, choose Tools > Text Tool, and use the mouse. Drag a black box to move an end point. To change the color used for the line, choose Tools > Show Colors. To delete the line, choose Tools > Text Tool, select the line, and press Delete. @heading See also @menu @@ -633,16 +633,16 @@ @topic Changing the color for notes and highlights -Skim allows you can change the color of a note, highlight or arrow you have added using Skim. You can also change the default colors that are used for new notes, highlights and arrows. +Skim allows you can change the color of a note, highlight or line you have added using Skim. You can also change the default colors that are used for new notes, highlights and lines. @box{taskbox} -@heading To change the default color for notes, highlights and arrows: +@heading To change the default color for notes, highlights and lines: @itemize -@item Choose Skim > Preferences, select Notes, and click a color for the type of note, highlight or arrow you want to change. +@item Choose Skim > Preferences, select Notes, and click a color for the type of note, highlight or line you want to change. @end itemize -@heading To change the color of a single note, highlight or arrow: +@heading To change the color of a single note, highlight or line: @itemize -@item Select the note, highlight or arrow in the PDF and choose Tools > Show Colors. +@item Select the note, highlight or line in the PDF and choose Tools > Show Colors. @end itemize @endbox @@ -650,7 +650,7 @@ @menu * Adding notes to a PDF document:: * Highlighting sections of a PDF document:: -* Adding arrows to a PDF document:: +* Adding lines to a PDF document:: * Changing the font of text notes:: @end menu @@ -673,7 +673,7 @@ @menu * Adding notes to a PDF document:: * Highlighting sections of a PDF document:: -* Adding arrows to a PDF document:: +* Adding lines to a PDF document:: * Changing the color for notes and highlights:: @end menu @@ -884,10 +884,10 @@ @item To show the reading bar, choose View > Show Reading Bar. @end itemize @itemize -@item To move the reading bar to the next (previous) line, hold down the Option key and press the down arrow (up arrow) key. +@item To move the reading bar to the next (previous) line, hold down the Option key and press the Down Arrow (Up Arrow) key. @end itemize @itemize -@item To move the reading bar to the next (previous) page, hold down the Option key and press the right arrow (left arrow) key. +@item To move the reading bar to the next (previous) page, hold down the Option key and press the Right Arrow (Left Arrow) key. @end itemize @endbox @@ -956,7 +956,7 @@ @end enumerate @endbox -In presentation mode, you can use the Left and Right Arrow buttons to navigate through the pages of the document. +In presentation mode, you can use the Left and Right Line buttons to navigate through the pages of the document. You can show navigation buttons by moving the mouse to the bottom of the screen. Modified: trunk/NSString_SKExtensions.m =================================================================== --- trunk/NSString_SKExtensions.m 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/NSString_SKExtensions.m 2007-06-18 22:44:18 UTC (rev 2342) @@ -232,7 +232,7 @@ else if ([self isEqualToString:@"StrikeOut"]) return NSLocalizedString(@"Strike Out", @"Description for export"); else if ([self isEqualToString:@"Line"]) - return NSLocalizedString(@"Arrow", @"Description for export"); + return NSLocalizedString(@"Line", @"Description for export"); else return self; } Modified: trunk/ReleaseNotes.rtf =================================================================== --- trunk/ReleaseNotes.rtf 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/ReleaseNotes.rtf 2007-06-18 22:44:18 UTC (rev 2342) @@ -176,7 +176,7 @@ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural \ls10\ilvl0\cf0 {\listtext \'a5 }Add support for apple remote control. It can be disabled through the hidden default SKEnableAppleRemote.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls11\ilvl0\cf0 {\listtext \'a5 }Hidden defaults for line ending style of arrows (SKArrowNoteStartLineStyle, SKArrowNoteEndLineStyle).\ +\ls11\ilvl0\cf0 {\listtext \'a5 }Hidden defaults for line ending style of arrows (SKLineNoteStartLineStyle, SKLineNoteEndLineStyle).\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural \ls12\ilvl0\cf0 {\listtext \'a5 }Hidden pref option for reading missing notes from separate .skim file (SKReadMissingNotesFromSkimFileOption). \ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/SKApplicationController.m 2007-06-18 22:44:18 UTC (rev 2342) @@ -463,7 +463,7 @@ [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKHighlightNoteColorKey]], @"highlightNote", [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKUnderlineNoteColorKey]], @"underlineNote", [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKStrikeOutNoteColorKey]], @"strikeOutNote", - [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKArrowNoteColorKey]], @"arrowNote", nil]; + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKLineNoteColorKey]], @"lineNote", nil]; } - (void)setDefaultColors:(NSDictionary *)colorDict { @@ -483,8 +483,8 @@ [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKUnderlineNoteColorKey]; if (color = [colorDict objectForKey:@"strikeOutNote"]) [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKStrikeOutNoteColorKey]; - if (color = [colorDict objectForKey:@"arrowNote"]) - [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKArrowNoteColorKey]; + if (color = [colorDict objectForKey:@"lineNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKLineNoteColorKey]; } @end Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/SKMainWindowController.m 2007-06-18 22:44:18 UTC (rev 2342) @@ -98,7 +98,7 @@ static NSString *SKDocumentToolbarNewNoteItemIdentifier = @"SKDocumentToolbarNewNoteItemIdentifier"; static NSString *SKDocumentToolbarNewCircleNoteItemIdentifier = @"SKDocumentToolbarNewCircleNoteItemIdentifier"; static NSString *SKDocumentToolbarNewMarkupItemIdentifier = @"SKDocumentToolbarNewMarkupItemIdentifier"; -static NSString *SKDocumentToolbarNewArrowItemIdentifier = @"SKDocumentToolbarNewArrowItemIdentifier"; +static NSString *SKDocumentToolbarNewLineItemIdentifier = @"SKDocumentToolbarNewLineItemIdentifier"; static NSString *SKDocumentToolbarInfoItemIdentifier = @"SKDocumentToolbarInfoItemIdentifier"; static NSString *SKDocumentToolbarToolModeItemIdentifier = @"SKDocumentToolbarToolModeItemIdentifier"; static NSString *SKDocumentToolbarDisplayBoxItemIdentifier = @"SKDocumentToolbarDisplayBoxItemIdentifier"; @@ -2196,12 +2196,12 @@ [arrowPath fill]; [noteToolAdornImages[SKStrikeOutNote] unlockFocus]; - noteToolAdornImages[SKArrowNote] = [[NSImage alloc] initWithSize:size]; - [noteToolAdornImages[SKArrowNote] lockFocus]; - [[NSImage imageNamed:@"ArrowNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; + noteToolAdornImages[SKLineNote] = [[NSImage alloc] initWithSize:size]; + [noteToolAdornImages[SKLineNote] lockFocus]; + [[NSImage imageNamed:@"LineNoteAdorn"] compositeToPoint:point operation:NSCompositeCopy]; [color setFill]; [arrowPath fill]; - [noteToolAdornImages[SKArrowNote] unlockFocus]; + [noteToolAdornImages[SKLineNote] unlockFocus]; } [toolModeButton setImage:noteToolAdornImages[[pdfView annotationMode]] forSegment:SKNoteToolMode]; @@ -3300,14 +3300,14 @@ [toolbarItems setObject:item forKey:SKDocumentToolbarNewMarkupItemIdentifier]; [item release]; - item = [[SKToolbarItem alloc] initWithItemIdentifier:SKDocumentToolbarNewArrowItemIdentifier]; - [item setLabels:NSLocalizedString(@"Add Arrow", @"Toolbar item label")]; - [item setToolTip:NSLocalizedString(@"Add New Arrow", @"Tool tip message")]; - [item setTag:SKArrowNote]; + item = [[SKToolbarItem alloc] initWithItemIdentifier:SKDocumentToolbarNewLineItemIdentifier]; + [item setLabels:NSLocalizedString(@"Add Line", @"Toolbar item label")]; + [item setToolTip:NSLocalizedString(@"Add New Line", @"Tool tip message")]; + [item setTag:SKLineNote]; [item setTarget:self]; [item setAction:@selector(createNewNote:)]; - [item setImageNamed:@"ToolbarArrowNote"]; - [toolbarItems setObject:item forKey:SKDocumentToolbarNewArrowItemIdentifier]; + [item setImageNamed:@"ToolbarLineNote"]; + [toolbarItems setObject:item forKey:SKDocumentToolbarNewLineItemIdentifier]; [item release]; [markupPopUpButton setShowsMenuWhenIconClicked:NO]; @@ -3352,9 +3352,9 @@ menuItem = [menu addItemWithTitle:NSLocalizedString(@"Strike Out Tool", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; [menuItem setTarget:self]; [menuItem setTag:SKStrikeOutNote]; - menuItem = [menu addItemWithTitle:NSLocalizedString(@"Arrow Tool", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; + menuItem = [menu addItemWithTitle:NSLocalizedString(@"Line Tool", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; [menuItem setTarget:self]; - [menuItem setTag:SKArrowNote]; + [menuItem setTag:SKLineNote]; menuItem = [[[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:NSLocalizedString(@"Tool Mode", @"Toolbar item label") action:NULL keyEquivalent:@""] autorelease]; [menuItem setSubmenu:menu]; item = [[SKToolbarItem alloc] initWithItemIdentifier:SKDocumentToolbarToolModeItemIdentifier]; @@ -3401,10 +3401,10 @@ [menuItem setTarget:self]; [menuItem setTag:SKStrikeOutNote]; [menuItem setImage:[NSImage imageNamed:@"StrikeOutNoteAdorn"]]; - menuItem = [menu addItemWithTitle:NSLocalizedString(@"Arrow", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; + menuItem = [menu addItemWithTitle:NSLocalizedString(@"Line", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; [menuItem setTarget:self]; - [menuItem setTag:SKArrowNote]; - [menuItem setImage:[NSImage imageNamed:@"ArrowNoteAdorn"]]; + [menuItem setTag:SKLineNote]; + [menuItem setImage:[NSImage imageNamed:@"LineNoteAdorn"]]; [toolModeButton setMenu:menu forSegment:SKNoteToolMode]; menu = [[NSMenu allocWithZone:[NSMenu menuZone]] init]; @@ -3481,7 +3481,7 @@ SKDocumentToolbarNewNoteItemIdentifier, SKDocumentToolbarNewCircleNoteItemIdentifier, SKDocumentToolbarNewMarkupItemIdentifier, - SKDocumentToolbarNewArrowItemIdentifier, nil]; + SKDocumentToolbarNewLineItemIdentifier, nil]; } - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar { @@ -3504,7 +3504,7 @@ SKDocumentToolbarNewNoteItemIdentifier, SKDocumentToolbarNewCircleNoteItemIdentifier, SKDocumentToolbarNewMarkupItemIdentifier, - SKDocumentToolbarNewArrowItemIdentifier, + SKDocumentToolbarNewLineItemIdentifier, SKDocumentToolbarInfoItemIdentifier, SKDocumentToolbarContentsPaneItemIdentifier, SKDocumentToolbarNotesPaneItemIdentifier, @@ -3539,7 +3539,7 @@ return YES; } else if ([identifier isEqualToString:SKDocumentToolbarPresentationItemIdentifier]) { return YES; - } else if ([identifier isEqualToString:SKDocumentToolbarNewNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewCircleNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewArrowItemIdentifier]) { + } else if ([identifier isEqualToString:SKDocumentToolbarNewNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewCircleNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewLineItemIdentifier]) { 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] && [pdfView hideNotes] == NO; Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/SKPDFAnnotationNote.m 2007-06-18 22:44:18 UTC (rev 2342) @@ -51,7 +51,7 @@ SKASHighlightNote = 'NHil', SKASUnderlineNote = 'NUnd', SKASStrikeOutNote = 'NStr', - SKASArrowNote = 'NArr' + SKASLineNote = 'NArr' }; enum { @@ -242,7 +242,7 @@ else if ([[self type] isEqualToString:@"StrikeOut"]) return SKStrikeOutNote; else if ([[self type] isEqualToString:@"Line"]) - return SKArrowNote; + return SKLineNote; return 0; } @@ -369,7 +369,7 @@ self = [[SKPDFAnnotationCircle alloc] initWithBounds:NSMakeRect(100.0, 100.0, 64.0, 64.0)]; else if (type == SKASSquareNote) self = [[SKPDFAnnotationSquare alloc] initWithBounds:NSMakeRect(100.0, 100.0, 64.0, 64.0)]; - else if (type == SKASArrowNote) + else if (type == SKASLineNote) self = [[SKPDFAnnotationLine alloc] initWithBounds:NSMakeRect(100.0, 100.0, 16.0, 16.0)]; } } @@ -411,7 +411,7 @@ else if ([[self type] isEqualToString:@"StrikeOut"]) return SKASStrikeOutNote; else if ([[self type] isEqualToString:@"Line"]) - return SKASArrowNote; + return SKASLineNote; return 0; } @@ -1192,9 +1192,9 @@ - (id)initWithBounds:(NSRect)bounds { if (self = [super initWithBounds:bounds]) { - [super setColor:[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:SKArrowNoteColorKey]]]; - [super setStartLineStyle:[[NSUserDefaults standardUserDefaults] integerForKey:SKArrowNoteStartLineStyleKey]]; - [super setEndLineStyle:[[NSUserDefaults standardUserDefaults] integerForKey:SKArrowNoteEndLineStyleKey]]; + [super setColor:[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:SKLineNoteColorKey]]]; + [super setStartLineStyle:[[NSUserDefaults standardUserDefaults] integerForKey:SKLineNoteStartLineStyleKey]]; + [super setEndLineStyle:[[NSUserDefaults standardUserDefaults] integerForKey:SKLineNoteEndLineStyleKey]]; [super setStartPoint:NSMakePoint(0.5, 0.5)]; [super setEndPoint:NSMakePoint(NSWidth(bounds) - 0.5, NSHeight(bounds) - 0.5)]; } Modified: trunk/SKPDFView.h =================================================================== --- trunk/SKPDFView.h 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/SKPDFView.h 2007-06-18 22:44:18 UTC (rev 2342) @@ -67,7 +67,7 @@ SKHighlightNote, SKUnderlineNote, SKStrikeOutNote, - SKArrowNote + SKLineNote } SKNoteType; @class SKReadingBar; Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/SKPDFView.m 2007-06-18 22:44:18 UTC (rev 2342) @@ -759,7 +759,7 @@ } else if (isPresentation == NO && [self toolMode] == SKNoteToolMode && modifiers == 0 && eventChar == 's') { [self setAnnotationMode:SKStrikeOutNote]; } else if (isPresentation == NO && [self toolMode] == SKNoteToolMode && modifiers == 0 && eventChar == 'a') { - [self setAnnotationMode:SKArrowNote]; + [self setAnnotationMode:SKLineNote]; } else { [super keyDown:theEvent]; } @@ -991,8 +991,8 @@ [item setTag:SKStrikeOutNote]; [item setTarget:self]; - item = [submenu addItemWithTitle:NSLocalizedString(@"Arrow", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; - [item setTag:SKArrowNote]; + item = [submenu addItemWithTitle:NSLocalizedString(@"Line", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; + [item setTag:SKLineNote]; [item setTarget:self]; item = [menu insertItemWithTitle:NSLocalizedString(@"Tools", @"Menu item title") action:NULL keyEquivalent:@"" atIndex:0]; @@ -1064,9 +1064,9 @@ [item setTarget:self]; } - item = [submenu addItemWithTitle:NSLocalizedString(@"Arrow", @"Menu item title") action:@selector(addAnnotationFromMenu:) keyEquivalent:@""]; + item = [submenu addItemWithTitle:NSLocalizedString(@"Line", @"Menu item title") action:@selector(addAnnotationFromMenu:) keyEquivalent:@""]; [item setRepresentedObject:[NSValue valueWithPoint:point]]; - [item setTag:SKArrowNote]; + [item setTag:SKLineNote]; [item setTarget:self]; item = [menu insertItemWithTitle:NSLocalizedString(@"New Note or Highlight", @"Menu item title") action:NULL keyEquivalent:@"" atIndex:0]; @@ -1333,7 +1333,7 @@ } newAnnotation = [[SKPDFAnnotationMarkup alloc] initWithSelection:sel markupType:kPDFMarkupTypeStrikeOut]; break; - case SKArrowNote: + case SKLineNote: newAnnotation = [[SKPDFAnnotationLine alloc] initWithBounds:bounds]; break; } @@ -2329,7 +2329,7 @@ NSPointInRect(mouseDownOnPage, [page boundsForBox:[self displayBox]])) { // add a new annotation immediately, unless this is just a click if (annotationMode == SKAnchoredNote || NSLeftMouseDragged == [[NSApp nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask) untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:NO] type]) { - float width = annotationMode == SKAnchoredNote ? 16.0 : annotationMode == SKArrowNote ? 4.0 : 8.0; + float width = annotationMode == SKAnchoredNote ? 16.0 : annotationMode == SKLineNote ? 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; Modified: trunk/SKStringConstants.h =================================================================== --- trunk/SKStringConstants.h 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/SKStringConstants.h 2007-06-18 22:44:18 UTC (rev 2342) @@ -70,12 +70,12 @@ extern NSString *SKHighlightNoteColorKey; extern NSString *SKUnderlineNoteColorKey; extern NSString *SKStrikeOutNoteColorKey; -extern NSString *SKArrowNoteColorKey; +extern NSString *SKLineNoteColorKey; extern NSString *SKAnchoredNoteIconTypeKey; extern NSString *SKCircleNoteLineWidthKey; extern NSString *SKSquareNoteLineWidthKey; -extern NSString *SKArrowNoteStartLineStyleKey; -extern NSString *SKArrowNoteEndLineStyleKey; +extern NSString *SKLineNoteStartLineStyleKey; +extern NSString *SKLineNoteEndLineStyleKey; extern NSString *SKDefaultPDFDisplaySettingsKey; extern NSString *SKDefaultFullScreenPDFDisplaySettingsKey; extern NSString *SKEnableAppleRemoteKey; Modified: trunk/SKStringConstants.m =================================================================== --- trunk/SKStringConstants.m 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/SKStringConstants.m 2007-06-18 22:44:18 UTC (rev 2342) @@ -71,12 +71,12 @@ NSString *SKHighlightNoteColorKey = @"SKHighlightNoteColor"; NSString *SKUnderlineNoteColorKey = @"SKUnderlineNoteColor"; NSString *SKStrikeOutNoteColorKey = @"SKStrikeOutNoteColor"; -NSString *SKArrowNoteColorKey = @"SKArrowNoteColor"; +NSString *SKLineNoteColorKey = @"SKLineNoteColor"; NSString *SKAnchoredNoteIconTypeKey = @"SKAnchoredNoteIconType"; NSString *SKCircleNoteLineWidthKey = @"SKCircleNoteLineWidth"; NSString *SKSquareNoteLineWidthKey = @"SKSquareNoteLineWidth"; -NSString *SKArrowNoteStartLineStyleKey = @"SKArrowNoteStartLineStyle"; -NSString *SKArrowNoteEndLineStyleKey = @"SKArrowNoteEndLineStyle"; +NSString *SKLineNoteStartLineStyleKey = @"SKLineNoteStartLineStyle"; +NSString *SKLineNoteEndLineStyleKey = @"SKLineNoteEndLineStyle"; NSString *SKDefaultPDFDisplaySettingsKey = @"SKDefaultPDFDisplaySettings"; NSString *SKDefaultFullScreenPDFDisplaySettingsKey = @"SKDefaultFullScreenPDFDisplaySettings"; NSString *SKEnableAppleRemoteKey = @"SKEnableAppleRemote"; Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-18 17:16:10 UTC (rev 2341) +++ trunk/Skim.sdef 2007-06-18 22:44:18 UTC (rev 2342) @@ -666,19 +666,19 @@ <type type="real" list="yes"/> </property> <property name="start point" code="SPnt" type="point" - description="The start point of an arrow (left, top)."> + description="The start point of a line (left, top)."> <cocoa key="startPointAsQDPoint"/> </property> <property name="end point" code="EPnt" type="point" - description="The end point of an arrow (left, top)."> + description="The end point of a line (left, top)."> <cocoa key="endPointAsQDPoint"/> </property> <property name="start line style" code="SLSt" type="line ending style" - description="The start line style of an arrow."> + description="The start line style of a line."> <cocoa key="asStartLineStyle"/> </property> <property name="end line style" code="ELSt" type="line ending style" - description="The end line style of an arrow."> + description="The end line style of a line."> <cocoa key="asEndLineStyle"/> </property> <property name="selection" code="sele" access="r" @@ -820,9 +820,9 @@ description="Default strike out highlight color."> <cocoa key="strikeOutNote"/> </property> - <property name="arrow note color" code="CArr" type="RGBA color" - description="Default arrow color."> - <cocoa key="arrowNote"/> + <property name="line note color" code="CArr" type="RGBA color" + description="Default line color."> + <cocoa key="lineNote"/> </property> </record-type> @@ -904,8 +904,8 @@ description="Underline highlight."/> <enumerator name="strike out note" code="NStr" description="Strike out highlight."/> - <enumerator name="arrow note" code="NArr" - description="Arrow."/> + <enumerator name="line note" code="NArr" + description="Line."/> </enumeration> <enumeration name="icon type" code="ITpE"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 17:16:17
|
Revision: 2341 http://skim-app.svn.sourceforge.net/skim-app/?rev=2341&view=rev Author: hofman Date: 2007-06-18 10:16:10 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Revert last commit, this was a test. Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2007-06-18 17:09:52 UTC (rev 2340) +++ trunk/SKApplicationController.m 2007-06-18 17:16:10 UTC (rev 2341) @@ -52,66 +52,10 @@ #import "NSBezierPath_BDSKExtensions.h" - -@interface SKGetCommand : NSGetCommand -@end - - -@implementation SKGetCommand - -- (id) performDefaultImplementation { - id ret = [super performDefaultImplementation]; - - NSAppleEventDescriptor *rtypDesc = [[self appleEvent] paramDescriptorForKeyword:'rtyp'];NSLog(@"directParameter = %@, evaluatedReceivers = %@",[self directParameter],[self evaluatedReceivers]); - if( rtypDesc ) { // the get command is requesting a coercion (requested type) - NSScriptClassDescription *classDesc = [[NSScriptSuiteRegistry sharedScriptSuiteRegistry] classDescriptionWithAppleEventCode:[rtypDesc typeCodeValue]]; - Class class = NULL; - - if( classDesc ) { // found the requested type in the script suites. - class = NSClassFromString( [classDesc className] ); - } else { // catch some common types that don't have entries in the script suites. - switch( [rtypDesc typeCodeValue] ) { - case 'TEXT': class = [NSString class]; break; - case 'STXT': class = [NSTextStorage class]; break; - case 'nmbr': class = [NSNumber class]; break; - case 'reco': class = [NSDictionary class]; break; - case 'list': class = [NSArray class]; break; - case 'data': class = [NSData class]; break; - } - } - - if ([ret isKindOfClass:[NSAppleEventDescriptor class]]) - ret = [self evaluatedReceivers]; - - if( class && class != [ret class] ) { - id newRet = [[NSScriptCoercionHandler sharedCoercionHandler] coerceValue:ret toClass:class]; - if( newRet ) return newRet; - } - - // account for basic types that wont have a coercion handler but have common methods we can use. - if( class == [NSString class] && [ret respondsToSelector:@selector( stringValue )] ) - return [ret stringValue]; - else if( class == [NSString class] ) - return [ret description]; - else if( [rtypDesc typeCodeValue] == 'long' && [ret respondsToSelector:@selector( intValue )] ) - return [NSNumber numberWithLong:[ret intValue]]; - else if( [rtypDesc typeCodeValue] == 'sing' && [ret respondsToSelector:@selector( floatValue )] ) - return [NSNumber numberWithFloat:[ret floatValue]]; - else if( ( [rtypDesc typeCodeValue] == 'doub' || [rtypDesc typeCodeValue] == 'nmbr' ) && [ret respondsToSelector:@selector( doubleValue )] ) - return [NSNumber numberWithDouble:[ret doubleValue]]; - } - - return ret; -} - -@end - - @implementation SKApplicationController + (void)initialize{ [self setupDefaults]; - [SKGetCommand poseAsClass:[NSGetCommand class]]; } + (void)setupDefaults{ @@ -212,21 +156,8 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:SKEnableAppleRemoteKey]) [[AppleRemote sharedRemote] setDelegate:self]; [self doSpotlightImportIfNeeded]; - - [[NSScriptCoercionHandler sharedCoercionHandler] registerCoercer:[self class] selector:@selector(coerceNote:toClass:) toConvertFromClass:[PDFAnnotation class] toClass:[NSString class]]; - [[NSScriptCoercionHandler sharedCoercionHandler] registerCoercer:[self class] selector:@selector(coerceNote:toClass:) toConvertFromClass:[PDFAnnotation class] toClass:[NSTextStorage class]]; - [[NSScriptCoercionHandler sharedCoercionHandler] registerCoercer:[self class] selector:@selector(coerceNote:toClass:) toConvertFromClass:NSClassFromString(@"SKPDFAnnotationNote") toClass:[NSTextStorage class]]; } -+ (id)coerceNote:(PDFAnnotation *)note toClass:(Class)aClass {NSLog(@"%@",note); - if (aClass == [NSString class]) - return [note contents]; - else if (aClass == [NSTextStorage class]) - return [note textContents]; - else - return nil; -} - - (void)applicationDidBecomeActive:(NSNotification *)aNotification { if ([[NSUserDefaults standardUserDefaults] boolForKey:SKEnableAppleRemoteKey]) [[AppleRemote sharedRemote] setListeningToRemote:YES]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 17:09:53
|
Revision: 2340 http://skim-app.svn.sourceforge.net/skim-app/?rev=2340&view=rev Author: hofman Date: 2007-06-18 10:09:52 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Remove log. Modified Paths: -------------- trunk/SKApplicationController.m Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2007-06-18 16:52:35 UTC (rev 2339) +++ trunk/SKApplicationController.m 2007-06-18 17:09:52 UTC (rev 2340) @@ -52,10 +52,66 @@ #import "NSBezierPath_BDSKExtensions.h" + +@interface SKGetCommand : NSGetCommand +@end + + +@implementation SKGetCommand + +- (id) performDefaultImplementation { + id ret = [super performDefaultImplementation]; + + NSAppleEventDescriptor *rtypDesc = [[self appleEvent] paramDescriptorForKeyword:'rtyp'];NSLog(@"directParameter = %@, evaluatedReceivers = %@",[self directParameter],[self evaluatedReceivers]); + if( rtypDesc ) { // the get command is requesting a coercion (requested type) + NSScriptClassDescription *classDesc = [[NSScriptSuiteRegistry sharedScriptSuiteRegistry] classDescriptionWithAppleEventCode:[rtypDesc typeCodeValue]]; + Class class = NULL; + + if( classDesc ) { // found the requested type in the script suites. + class = NSClassFromString( [classDesc className] ); + } else { // catch some common types that don't have entries in the script suites. + switch( [rtypDesc typeCodeValue] ) { + case 'TEXT': class = [NSString class]; break; + case 'STXT': class = [NSTextStorage class]; break; + case 'nmbr': class = [NSNumber class]; break; + case 'reco': class = [NSDictionary class]; break; + case 'list': class = [NSArray class]; break; + case 'data': class = [NSData class]; break; + } + } + + if ([ret isKindOfClass:[NSAppleEventDescriptor class]]) + ret = [self evaluatedReceivers]; + + if( class && class != [ret class] ) { + id newRet = [[NSScriptCoercionHandler sharedCoercionHandler] coerceValue:ret toClass:class]; + if( newRet ) return newRet; + } + + // account for basic types that wont have a coercion handler but have common methods we can use. + if( class == [NSString class] && [ret respondsToSelector:@selector( stringValue )] ) + return [ret stringValue]; + else if( class == [NSString class] ) + return [ret description]; + else if( [rtypDesc typeCodeValue] == 'long' && [ret respondsToSelector:@selector( intValue )] ) + return [NSNumber numberWithLong:[ret intValue]]; + else if( [rtypDesc typeCodeValue] == 'sing' && [ret respondsToSelector:@selector( floatValue )] ) + return [NSNumber numberWithFloat:[ret floatValue]]; + else if( ( [rtypDesc typeCodeValue] == 'doub' || [rtypDesc typeCodeValue] == 'nmbr' ) && [ret respondsToSelector:@selector( doubleValue )] ) + return [NSNumber numberWithDouble:[ret doubleValue]]; + } + + return ret; +} + +@end + + @implementation SKApplicationController + (void)initialize{ [self setupDefaults]; + [SKGetCommand poseAsClass:[NSGetCommand class]]; } + (void)setupDefaults{ @@ -156,8 +212,21 @@ if ([[NSUserDefaults standardUserDefaults] boolForKey:SKEnableAppleRemoteKey]) [[AppleRemote sharedRemote] setDelegate:self]; [self doSpotlightImportIfNeeded]; + + [[NSScriptCoercionHandler sharedCoercionHandler] registerCoercer:[self class] selector:@selector(coerceNote:toClass:) toConvertFromClass:[PDFAnnotation class] toClass:[NSString class]]; + [[NSScriptCoercionHandler sharedCoercionHandler] registerCoercer:[self class] selector:@selector(coerceNote:toClass:) toConvertFromClass:[PDFAnnotation class] toClass:[NSTextStorage class]]; + [[NSScriptCoercionHandler sharedCoercionHandler] registerCoercer:[self class] selector:@selector(coerceNote:toClass:) toConvertFromClass:NSClassFromString(@"SKPDFAnnotationNote") toClass:[NSTextStorage class]]; } ++ (id)coerceNote:(PDFAnnotation *)note toClass:(Class)aClass {NSLog(@"%@",note); + if (aClass == [NSString class]) + return [note contents]; + else if (aClass == [NSTextStorage class]) + return [note textContents]; + else + return nil; +} + - (void)applicationDidBecomeActive:(NSNotification *)aNotification { if ([[NSUserDefaults standardUserDefaults] boolForKey:SKEnableAppleRemoteKey]) [[AppleRemote sharedRemote] setListeningToRemote:YES]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 16:52:40
|
Revision: 2339 http://skim-app.svn.sourceforge.net/skim-app/?rev=2339&view=rev Author: hofman Date: 2007-06-18 09:52:35 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Remove log. Modified Paths: -------------- trunk/PDFSelection_SKExtensions.m Modified: trunk/PDFSelection_SKExtensions.m =================================================================== --- trunk/PDFSelection_SKExtensions.m 2007-06-18 14:56:57 UTC (rev 2338) +++ trunk/PDFSelection_SKExtensions.m 2007-06-18 16:52:35 UTC (rev 2339) @@ -348,7 +348,6 @@ int lastIndex = NSMaxRange([selection safeRangeAtIndex:[selection safeNumberOfRangesOnPage:lastPage] - 1 onPage:lastPage]) - 1; selection = [[firstPage document] selectionFromPage:firstPage atCharacterIndex:firstIndex toPage:lastPage atCharacterIndex:lastIndex]; } - NSLog(@"%@",selection); return selection ? [selection objectSpecifier] : [NSArray array]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 14:56:59
|
Revision: 2338 http://skim-app.svn.sourceforge.net/skim-app/?rev=2338&view=rev Author: hofman Date: 2007-06-18 07:56:57 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Localize URL. Modified Paths: -------------- trunk/Dutch.lproj/Skim Help/skim.texi Modified: trunk/Dutch.lproj/Skim Help/skim.texi =================================================================== --- trunk/Dutch.lproj/Skim Help/skim.texi 2007-06-18 13:16:14 UTC (rev 2337) +++ trunk/Dutch.lproj/Skim Help/skim.texi 2007-06-18 14:56:57 UTC (rev 2338) @@ -1202,7 +1202,7 @@ @item @uref{http://skim-app.sourceforge.net/wiki/index.php?title=AppleScript, AppleScript pagina op de Skim Wiki} @item @uref{help:runscript=Skim%20Help/scripts/OpenAppDict.scpt string='net.sourceforge.skim-app.skim', Skim woordenboek in Scripteditor} @item @uref{help:anchor='access' bookID=AppleScript Help, AppleScript Help} -@item @uref{http://www.apple.com/macosx/features/applescript/, AppleScript webpagina} +@item @uref{http://www.apple.com/nl/macosx/features/applescript/, AppleScript webpagina} @end multitable @c ====================================================================================== This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 13:16:23
|
Revision: 2337 http://skim-app.svn.sourceforge.net/skim-app/?rev=2337&view=rev Author: hofman Date: 2007-06-18 06:16:14 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Add scripting command for pdfsync. Modified Paths: -------------- trunk/SKDocument.h trunk/SKDocument.m trunk/Skim.sdef Modified: trunk/SKDocument.h =================================================================== --- trunk/SKDocument.h 2007-06-18 13:14:23 UTC (rev 2336) +++ trunk/SKDocument.h 2007-06-18 13:16:14 UTC (rev 2337) @@ -113,6 +113,7 @@ - (id)handleRevertScriptCommand:(NSScriptCommand *)command; - (id)handleGoToScriptCommand:(NSScriptCommand *)command; - (id)handleFindScriptCommand:(NSScriptCommand *)command; +- (id)handleShowTeXScriptCommand:(NSScriptCommand *)command; @end Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-06-18 13:14:23 UTC (rev 2336) +++ trunk/SKDocument.m 2007-06-18 13:16:14 UTC (rev 2337) @@ -1082,6 +1082,32 @@ return specifier ? specifier : [NSArray array]; } +- (id)handleShowTeXScriptCommand:(NSScriptCommand *)command { + NSDictionary *args = [command evaluatedArguments]; + id page = [args objectForKey:@"Page"]; + id pointData = [args objectForKey:@"Point"]; + NSPoint point = NSZeroPoint; + + if ([page isKindOfClass:[PDFPage class]] == NO) + page = [[self pdfView] currentPage]; + if ([pointData isKindOfClass:[NSDate class]] && [pointData length] != sizeof(Point)) { + const Point *qdPoint = (const Point *)[pointData bytes]; + point = NSPointFromPoint(*qdPoint); + } else { + NSRect bounds = [page boundsForBox:[[self pdfView] displayBox]]; + point = NSMakePoint(NSMidX(bounds), NSMidY(bounds)); + } + if (page) { + unsigned int pageIndex = [[page document] indexForPage:page]; + PDFSelection *sel = [page selectionForLineAtPoint:point]; + NSRect rect = sel ? [sel boundsForPage:page] : NSMakeRect(point.x - 20.0, point.y - 5.0, 40.0, 10.0); + + [[self synchronizer] findLineForLocation:point inRect:rect atPageIndex:pageIndex]; + } + + return nil; +} + @end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-18 13:14:23 UTC (rev 2336) +++ trunk/Skim.sdef 2007-06-18 13:16:14 UTC (rev 2337) @@ -127,6 +127,9 @@ <responds-to name="find"> <cocoa method="handleFindScriptCommand:"/> </responds-to> + <responds-to name="show TeX file"> + <cocoa method="handleShowTeXScriptCommand:"/> + </responds-to> <responds-to name="get bounds for"> <cocoa method=""/> </responds-to> @@ -1036,6 +1039,20 @@ </result> </command> + <command name="show TeX file" code="SKIMSTeX" + description="Show the LaTeX source file."> + <direct-parameter type="document" + description="The document to show the TeX source for."/> + <parameter name="from" code="from" type="point" optional="yes" + description="The point from the page to show the TeX line for."> + <cocoa key="Point"/> + </parameter> + <parameter name="at" code="at " type="page" optional="yes" + description="The page to show the TeX line for."> + <cocoa key="Page"/> + </parameter> + </command> + <command name="get bounds for" code="SKIMBnds" description="Get the bounds of a page, note, or selection."> <synonym name="bounds for"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 13:14:24
|
Revision: 2336 http://skim-app.svn.sourceforge.net/skim-app/?rev=2336&view=rev Author: hofman Date: 2007-06-18 06:14:23 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Add help on AppleScript. Modified Paths: -------------- trunk/Dutch.lproj/Skim Help/skim.texi trunk/English.lproj/Skim Help/skim.texi trunk/Italian.lproj/Skim Help/skim.texi Added Paths: ----------- trunk/Dutch.lproj/Skim Help/scripts/ trunk/Dutch.lproj/Skim Help/scripts/OpenAppDict.scpt trunk/English.lproj/Skim Help/scripts/ trunk/English.lproj/Skim Help/scripts/OpenAppDict.scpt trunk/Italian.lproj/Skim Help/scripts/ trunk/Italian.lproj/Skim Help/scripts/OpenAppDict.scpt Added: trunk/Dutch.lproj/Skim Help/scripts/OpenAppDict.scpt =================================================================== (Binary files differ) Property changes on: trunk/Dutch.lproj/Skim Help/scripts/OpenAppDict.scpt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/Dutch.lproj/Skim Help/skim.texi =================================================================== --- trunk/Dutch.lproj/Skim Help/skim.texi 2007-06-18 11:08:12 UTC (rev 2335) +++ trunk/Dutch.lproj/Skim Help/skim.texi 2007-06-18 13:14:23 UTC (rev 2336) @@ -1184,6 +1184,29 @@ @c ====================================================================================== +@topic Taken automatiseren met AppleScript + +Skim is een scriptgeschikt programma. Het reageert op AppleScript commando's die u in staat stellen Skim te automatiseren. +U kunt bijvoorbeeld de kleuren van alle notities of markeringen van een bepaald type veranderen, automatisch markeringen toevoegen of verwijderen, en veel meer. + +@box{taskbox} +@heading Om alle commando's die u met Skim kunt gebruiken te zien: +@enumerate +@item Open het Scripteditor programma. +@item Kies Venster > Bibliotheek of Archief > Open woordenboek@dots{}, en klik op Skim. U moet eventueel aan de lijst Skim toevoegen. +@end enumerate +@endbox + +@heading Open dit voor mij +@multitable {} +@item @uref{http://skim-app.sourceforge.net/wiki/index.php?title=AppleScript, AppleScript pagina op de Skim Wiki} +@item @uref{help:runscript=Skim%20Help/scripts/OpenAppDict.scpt string='net.sourceforge.skim-app.skim', Skim woordenboek in Scripteditor} +@item @uref{help:anchor='access' bookID=AppleScript Help, AppleScript Help} +@item @uref{http://www.apple.com/macosx/features/applescript/, AppleScript webpagina} +@end multitable + +@c ====================================================================================== + @node Meer informatie @chapter Meer informatie @abstract{Vind meer help} Added: trunk/English.lproj/Skim Help/scripts/OpenAppDict.scpt =================================================================== (Binary files differ) Property changes on: trunk/English.lproj/Skim Help/scripts/OpenAppDict.scpt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/English.lproj/Skim Help/skim.texi =================================================================== --- trunk/English.lproj/Skim Help/skim.texi 2007-06-18 11:08:12 UTC (rev 2335) +++ trunk/English.lproj/Skim Help/skim.texi 2007-06-18 13:14:23 UTC (rev 2336) @@ -1178,6 +1178,29 @@ @c ====================================================================================== +@topic Automating tasks with AppleScript + +Skim is a scriptable application. It responds to AppleScript commands that let you automate Skim. +For example, you can change the colors of all notes or highlights of a certain type, automatically add or remove highlights, and much more. + +@box{taskbox} +@heading To see the commands you can use with Skim: +@enumerate +@item Open the Script Editor application. +@item Choose Window > Library or File > Open Dictionary@dots{}, and then click Skim. You may need to add Skim to the list first. +@end enumerate +@endbox + +@heading Open this for me +@multitable {} +@item @uref{http://skim-app.sourceforge.net/wiki/index.php?title=AppleScript, AppleScript page on the Skim Wiki} +@item @uref{help:runscript=Skim%20Help/scripts/OpenAppDict.scpt string='net.sourceforge.skim-app.skim', Skim dictionary in Script Editor} +@item @uref{help:anchor='access' bookID=AppleScript Help, AppleScript Help} +@item @uref{http://www.apple.com/macosx/features/applescript/, AppleScript website} +@end multitable + +@c ====================================================================================== + @node More information @chapter More information @abstract{Getting more help} Added: trunk/Italian.lproj/Skim Help/scripts/OpenAppDict.scpt =================================================================== (Binary files differ) Property changes on: trunk/Italian.lproj/Skim Help/scripts/OpenAppDict.scpt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/Italian.lproj/Skim Help/skim.texi =================================================================== --- trunk/Italian.lproj/Skim Help/skim.texi 2007-06-18 11:08:12 UTC (rev 2335) +++ trunk/Italian.lproj/Skim Help/skim.texi 2007-06-18 13:14:23 UTC (rev 2336) @@ -1178,6 +1178,29 @@ @c ====================================================================================== +@topic Automating tasks with AppleScript + +Skim is a scriptable application. It responds to AppleScript commands that let you automate Skim. +For example, you can change the colors of all notes or highlights of a certain type, automatically add or remove highlights, and much more. + +@box{taskbox} +@heading To see the commands you can use with Skim: +@enumerate +@item Open the Script Editor application. +@item Choose Window > Library or File > Open Dictionary@dots{}, and then click Skim. You may need to add Skim to the list first. +@end enumerate +@endbox + +@heading Open this for me +@multitable {} +@item @uref{http://skim-app.sourceforge.net/wiki/index.php?title=AppleScript, AppleScript page on the Skim Wiki} +@item @uref{help:runscript=Skim%20Help/scripts/OpenAppDict.scpt string='net.sourceforge.skim-app.skim', Skim dictionary in Script Editor} +@item @uref{help:anchor='access' bookID=AppleScript Help, AppleScript Help} +@item @uref{http://www.apple.com/macosx/features/applescript/, AppleScript website} +@end multitable + +@c ====================================================================================== + @node More information @chapter More information @abstract{Getting more help} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 11:08:15
|
Revision: 2335 http://skim-app.svn.sourceforge.net/skim-app/?rev=2335&view=rev Author: hofman Date: 2007-06-18 04:08:12 -0700 (Mon, 18 Jun 2007) Log Message: ----------- remove log Modified Paths: -------------- trunk/SKPDFAnnotationNote.m Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-18 09:31:18 UTC (rev 2334) +++ trunk/SKPDFAnnotationNote.m 2007-06-18 11:08:12 UTC (rev 2335) @@ -1291,7 +1291,7 @@ } - (void)setStartPointAsQDPoint:(NSData *)inQDPointAsData { - if ([inQDPointAsData length] == sizeof(Point)) {log_method(); + if ([inQDPointAsData length] == sizeof(Point)) { const Point *qdPoint = (const Point *)[inQDPointAsData bytes]; NSPoint startPoint = NSPointFromPoint(*qdPoint); startPoint.x += 0.5; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 09:58:19
|
Revision: 2334 http://skim-app.svn.sourceforge.net/skim-app/?rev=2334&view=rev Author: hofman Date: 2007-06-18 02:31:18 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Modify some applescript support for border / line ending style and document attributes. Modified Paths: -------------- trunk/SKInfoWindowController.m trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/SKInfoWindowController.m =================================================================== --- trunk/SKInfoWindowController.m 2007-06-18 08:17:03 UTC (rev 2333) +++ trunk/SKInfoWindowController.m 2007-06-18 09:31:18 UTC (rev 2334) @@ -157,7 +157,7 @@ [dictionary setValue:SKFileSizeStringForFileURL([doc fileURL], &physicalSize, &logicalSize) forKey:@"FileSize"]; [dictionary setValue:[NSNumber numberWithUnsignedLongLong:physicalSize] forKey:@"PhysicalSize"]; [dictionary setValue:[NSNumber numberWithUnsignedLongLong:logicalSize] forKey:@"LogicalSize"]; - [dictionary setValue:[[info valueForKey:@"KeyWords"] componentsJoinedByString:@" "] forKey:@"KeywordsString"]; + [dictionary setValue:[[dictionary valueForKey:@"KeyWords"] componentsJoinedByString:@" "] forKey:@"KeywordsString"]; } } return dictionary; Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-18 08:17:03 UTC (rev 2333) +++ trunk/SKPDFAnnotationNote.m 2007-06-18 09:31:18 UTC (rev 2334) @@ -78,7 +78,7 @@ SKASBorderStyleDashed = 'Dash', SKASBorderStyleBeveled = 'Bevl', SKASBorderStyleInset = 'Inst', - SKASBorderStyleUnderline = 'undl' + SKASBorderStyleUnderline = 'Undl' }; NSString *SKAnnotationWillChangeNotification = @"SKAnnotationWillChangeNotification"; Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-18 08:17:03 UTC (rev 2333) +++ trunk/Skim.sdef 2007-06-18 09:31:18 UTC (rev 2334) @@ -734,7 +734,7 @@ <cocoa key="Title"/> </property> <property name="author" code="Auth" type="text" - description="The autohor."> + description="The author."> <cocoa key="Author"/> </property> <property name="subject" code="Subj" type="text" @@ -778,10 +778,14 @@ <cocoa key="LogicalSize"/> </property> <property name="keywords" code="Keyw" - description="The keywords."> + description="The list of keywords."> <cocoa key="Keywords"/> <type type="text" list="yes"/> </property> + <property name="keywords string" code="KywS" type="text" + description="The keywords as a string."> + <cocoa key="KeywordsString"/> + </property> </record-type> <record-type name="note colors" code="NClr"> @@ -919,30 +923,30 @@ </enumeration> <enumeration name="line ending style" code="LESE"> - <enumerator name="none" code="LSNo" + <enumerator name="no line ending" code="LSNo" description="No line ending."/> - <enumerator name="square" code="LSSq" + <enumerator name="square line ending" code="LSSq" description="Square line ending."/> - <enumerator name="circle" code="LSCi" + <enumerator name="circle line ending" code="LSCi" description="Circle line ending."/> - <enumerator name="diamond" code="LSDi" + <enumerator name="diamond line ending" code="LSDi" description="Diamond line ending."/> - <enumerator name="open arrow" code="LSOA" + <enumerator name="open arrow line ending" code="LSOA" description="Open arrow line ending."/> - <enumerator name="closed arrow" code="LSCA" + <enumerator name="closed arrow line ending" code="LSCA" description="Closed arrow line ending."/> </enumeration> <enumeration name="note border style" code="BrSE"> - <enumerator name="solid" code="Soli" + <enumerator name="solid border" code="Soli" description="Solid border."/> - <enumerator name="dashed" code="Dash" + <enumerator name="dashed border" code="Dash" description="Dashed border."/> - <enumerator name="beveled" code="Bevl" + <enumerator name="beveled border" code="Bevl" description="Beveled border."/> - <enumerator name="inset" code="Inst" + <enumerator name="inset border" code="Inst" description="Inset border."/> - <enumerator name="underline" code="undl" + <enumerator name="underline border" code="Undl" description="Underline border."/> </enumeration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-18 08:17:07
|
Revision: 2333 http://skim-app.svn.sourceforge.net/skim-app/?rev=2333&view=rev Author: hofman Date: 2007-06-18 01:17:03 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Add AppleScript support for interior color of a circle or square note. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-17 23:34:37 UTC (rev 2332) +++ trunk/SKPDFAnnotationNote.m 2007-06-18 08:17:03 UTC (rev 2333) @@ -148,9 +148,12 @@ [(SKPDFAnnotationFreeText *)self setFont:font]; } else if ([type isEqualToString:@"Circle"]) { self = [[SKPDFAnnotationCircle alloc] initWithBounds:bounds]; + NSColor *interiorColor = [dict objectForKey:@"interiorColor"]; NSNumber *lineWidth = [dict objectForKey:@"lineWidth"]; NSNumber *borderStyle = [dict objectForKey:@"borderStyle"]; NSArray *dashPattern = [dict objectForKey:@"dashPattern"]; + if (interiorColor) + [(SKPDFAnnotationCircle *)self setInteriorColor:interiorColor]; if (lineWidth) [[self border] setLineWidth:[lineWidth floatValue]]; if (borderStyle) @@ -159,9 +162,12 @@ [[self border] setDashPattern:dashPattern]; } else if ([type isEqualToString:@"Square"]) { self = [[SKPDFAnnotationSquare alloc] initWithBounds:bounds]; + NSColor *interiorColor = [dict objectForKey:@"interiorColor"]; NSNumber *lineWidth = [dict objectForKey:@"lineWidth"]; NSNumber *borderStyle = [dict objectForKey:@"borderStyle"]; NSArray *dashPattern = [dict objectForKey:@"dashPattern"]; + if (interiorColor) + [(SKPDFAnnotationSquare *)self setInteriorColor:interiorColor]; if (lineWidth) [[self border] setLineWidth:[lineWidth floatValue]]; if (borderStyle) @@ -293,6 +299,8 @@ - (NSArray *)texts { return nil; } +- (NSColor *)interiorColor { return nil; } + - (BOOL)isNoteAnnotation { return NO; } - (BOOL)isMarkupAnnotation { return NO; } @@ -408,7 +416,7 @@ } - (int)asIconType { - return kPDFTextAnnotationIconNote; + return SKASTextAnnotationIconNote; } - (id)textContents; @@ -538,6 +546,7 @@ - (NSDictionary *)dictionaryValue{ NSMutableDictionary *dict = (NSMutableDictionary *)[super dictionaryValue]; + [dict setValue:[self interiorColor] forKey:@"interiorColor"]; [dict setValue:[NSNumber numberWithFloat:[[self border] lineWidth]] forKey:@"lineWidth"]; [dict setValue:[NSNumber numberWithInt:[[self border] style]] forKey:@"borderStyle"]; [dict setValue:[[self border] dashPattern] forKey:@"dashPattern"]; @@ -552,6 +561,14 @@ - (BOOL)shouldPrint { return YES; } +- (void)setInteriorColor:(NSColor *)color { + [[[self undoManager] prepareWithInvocationTarget:self] setInteriorColor:[self interiorColor]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + [super setInteriorColor:color]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"interiorColor", @"key", nil]]; +} + #pragma mark Scripting support - (NSDictionary *)scriptingProperties { @@ -584,6 +601,7 @@ - (NSDictionary *)dictionaryValue{ NSMutableDictionary *dict = (NSMutableDictionary *)[super dictionaryValue]; + [dict setValue:[self interiorColor] forKey:@"interiorColor"]; [dict setValue:[NSNumber numberWithFloat:[[self border] lineWidth]] forKey:@"lineWidth"]; [dict setValue:[NSNumber numberWithInt:[[self border] style]] forKey:@"borderStyle"]; [dict setValue:[[self border] dashPattern] forKey:@"dashPattern"]; @@ -598,6 +616,14 @@ - (BOOL)shouldPrint { return YES; } +- (void)setInteriorColor:(NSColor *)color { + [[[self undoManager] prepareWithInvocationTarget:self] setInteriorColor:[self interiorColor]]; + [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")]; + [super setInteriorColor:color]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKAnnotationDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"interiorColor", @"key", nil]]; +} + #pragma mark Scripting support - (NSDictionary *)scriptingProperties { Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-17 23:34:37 UTC (rev 2332) +++ trunk/Skim.sdef 2007-06-18 08:17:03 UTC (rev 2333) @@ -629,10 +629,6 @@ description="The bounding rectangle of the note (left, top, right, bottom)."> <cocoa key="boundsAsQDRect"/> </property> - <property name="extended text" code="XTxt" type="rich text" - description="The rich extended text of an anchored note."> - <cocoa key="richText"/> - </property> <property name="font name" code="FntN" type="text" description="The font name of a text note."> <cocoa key="fontName"/> @@ -641,10 +637,18 @@ description="The font size in points of a text note."> <cocoa key="fontSize"/> </property> + <property name="extended text" code="XTxt" type="rich text" + description="The rich extended text of an anchored note."> + <cocoa key="richText"/> + </property> <property name="icon" code="iimg" type="icon type" description="The icon type of an anchored note."> <cocoa key="asIconType"/> </property> + <property name="interior color" code="IClr" type="RGBA color" + description="The fill color of a circle or box."> + <cocoa key="interiorColor"/> + </property> <property name="border width" code="LnWd" type="real" description="The line width of the border a circle or box."> <cocoa key="lineWidth"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |