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
(63) |
Nov
(52) |
Dec
|
|
From: <ho...@us...> - 2025-07-03 09:14:00
|
Revision: 15590
http://sourceforge.net/p/skim-app/code/15590
Author: hofman
Date: 2025-07-03 09:13:55 +0000 (Thu, 03 Jul 2025)
Log Message:
-----------
move joining notes bby shift-mousedown to separate method
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 16:23:14 UTC (rev 15589)
+++ trunk/SKPDFView.m 2025-07-03 09:13:55 UTC (rev 15590)
@@ -2398,6 +2398,58 @@
[[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
}
+- (PDFAnnotation *)joinAnnotationToCurrentAnnotation:(PDFAnnotation *)annotation {
+ PDFAnnotation *newAnnotation = nil;
+ PDFPage *page = [currentAnnotation page];
+ if ([currentAnnotation isMarkup]) {
+ NSString *type = [currentAnnotation type];
+ PDFSelection *sel = [currentAnnotation selection];
+ PDFSelection *newSel = [annotation selection];
+ BOOL copyText = [[NSUserDefaults standardUserDefaults] integerForKey:SKDisableUpdateContentsFromEnclosedTextKey] < 2;
+ NSString *string1 = [currentAnnotation string];
+ NSString *string2 = [annotation string];
+ NSString *string = nil;
+ if ([string1 length] > 0 && [string2 length] > 0) {
+ if ([sel safeIndexOfFirstCharacterOnPage:page] > (copyText ? [newSel safeIndexOfLastCharacterOnPage:page] : [newSel safeIndexOfFirstCharacterOnPage:page]))
+ string = [NSString stringWithFormat:@"%@ %@", string2, string1];
+ else if (copyText == NO || [newSel safeIndexOfFirstCharacterOnPage:page] > [sel safeIndexOfLastCharacterOnPage:page])
+ string = [NSString stringWithFormat:@"%@ %@", string1, string2];
+ }
+ [sel addSelection:newSel];
+ if (string == nil) {
+ if (copyText)
+ string = [sel cleanedString];
+ else if ([string1 length])
+ string = string1;
+ else if ([string2 length])
+ string = string2;
+ }
+
+ newAnnotation = [PDFAnnotation newSkimNoteWithSelection:sel forType:type];
+ if ([string length] > 0)
+ [newAnnotation setString:string];
+ } else if ([currentAnnotation isInk]) {
+ NSMutableArray *paths = [[currentAnnotation pagePaths] mutableCopy];
+ [paths addObjectsFromArray:[annotation pagePaths]];
+ NSString *string1 = [currentAnnotation string];
+ NSString *string2 = [annotation string];
+
+ newAnnotation = [PDFAnnotation newSkimNoteWithPaths:paths];
+ if ([string1 length] > 0 || [string2 length] > 0)
+ [newAnnotation setString:[string2 length] == 0 ? string1 : [string1 length] == 0 ? string2 : [NSString stringWithFormat:@"%@ %@", string1, string2]];
+ [newAnnotation setBorder:[currentAnnotation border]];
+ } else {
+ return nil;
+ }
+ [newAnnotation setColor:[currentAnnotation color]];
+ [newAnnotation registerUserName];
+ [[self document] removeAnnotation:currentAnnotation];
+ [[self document] removeAnnotation:annotation];
+ [[self document] addAnnotation:newAnnotation toPage:page];
+ [[self undoManager] setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
+ return newAnnotation;
+}
+
- (BOOL)addAnnotationWithType:(SKNoteType)annotationType selection:(PDFSelection *)selection page:(PDFPage *)page bounds:(NSRect)bounds {
PDFAnnotation *newAnnotation = nil;
NSArray *newAnnotations = nil;
@@ -3778,11 +3830,9 @@
PDFPage *newActivePage = [self pageAndPoint:&point forEvent:theEvent nearest:YES];
if (newActivePage) { // newActivePage should never be nil, but just to be sure
- if (newActivePage != [currentAnnotation page]) {
+ if (newActivePage != [currentAnnotation page])
// move the annotation to the new page
[[self document] moveAnnotation:currentAnnotation toPage:newActivePage];
- [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")];
- }
NSRect newBounds = [currentAnnotation bounds];
newBounds.origin = SKIntegralPoint(SKSubstractPoints(point, offset));
@@ -4173,54 +4223,7 @@
// don't drag markup notes or in freehand tool mode, unless the note was previously selected, so we can select text or draw freehand strokes
newCurrentAnnotation = nil;
} else if ((modifiers & NSEventModifierFlagShift) && currentAnnotation != newCurrentAnnotation && [[currentAnnotation page] isEqual:[newCurrentAnnotation page]] && [[currentAnnotation type] isEqualToString:[newCurrentAnnotation type]]) {
- PDFAnnotation *newAnnotation = nil;
- if ([currentAnnotation isMarkup]) {
- NSString *type = [currentAnnotation type];
- PDFSelection *sel = [currentAnnotation selection];
- PDFSelection *newSel = [newCurrentAnnotation selection];
- BOOL copyText = [[NSUserDefaults standardUserDefaults] integerForKey:SKDisableUpdateContentsFromEnclosedTextKey] < 2;
- NSString *string1 = [currentAnnotation string];
- NSString *string2 = [newCurrentAnnotation string];
- NSString *string = nil;
- if ([string1 length] > 0 && [string2 length] > 0) {
- if ([sel safeIndexOfFirstCharacterOnPage:page] > (copyText ? [newSel safeIndexOfLastCharacterOnPage:page] : [newSel safeIndexOfFirstCharacterOnPage:page]))
- string = [NSString stringWithFormat:@"%@ %@", string2, string1];
- else if (copyText == NO || [newSel safeIndexOfFirstCharacterOnPage:page] > [sel safeIndexOfLastCharacterOnPage:page])
- string = [NSString stringWithFormat:@"%@ %@", string1, string2];
- }
- [sel addSelection:newSel];
- if (string == nil) {
- if (copyText)
- string = [sel cleanedString];
- else if ([string1 length])
- string = string1;
- else if ([string2 length])
- string = string2;
- }
-
- newAnnotation = [PDFAnnotation newSkimNoteWithSelection:sel forType:type];
- if ([string length] > 0)
- [newAnnotation setString:string];
- } else if ([currentAnnotation isInk]) {
- NSMutableArray *paths = [[currentAnnotation pagePaths] mutableCopy];
- [paths addObjectsFromArray:[newCurrentAnnotation pagePaths]];
- NSString *string1 = [currentAnnotation string];
- NSString *string2 = [newCurrentAnnotation string];
-
- newAnnotation = [PDFAnnotation newSkimNoteWithPaths:paths];
- if ([string1 length] > 0 || [string2 length] > 0)
- [newAnnotation setString:[string2 length] == 0 ? string1 : [string1 length] == 0 ? string2 : [NSString stringWithFormat:@"%@ %@", string1, string2]];
- [newAnnotation setBorder:[currentAnnotation border]];
- }
- if (newAnnotation) {
- [newAnnotation setColor:[currentAnnotation color]];
- [newAnnotation registerUserName];
- [[self document] removeAnnotation:currentAnnotation];
- [[self document] removeAnnotation:newCurrentAnnotation];
- [[self document] addAnnotation:newAnnotation toPage:page];
- [[self undoManager] setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
- newCurrentAnnotation = newAnnotation;
- }
+ newCurrentAnnotation = [self joinAnnotationToCurrentAnnotation:newCurrentAnnotation] ?: newCurrentAnnotation;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 16:23:16
|
Revision: 15589
http://sourceforge.net/p/skim-app/code/15589
Author: hofman
Date: 2025-07-02 16:23:14 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
convenience method to add multiple notes
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 15:45:37 UTC (rev 15588)
+++ trunk/SKPDFView.m 2025-07-02 16:23:14 UTC (rev 15589)
@@ -208,6 +208,7 @@
- (void)beginNewUndoGroupIfNeeded;
- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page select:(BOOL)shouldSelect;
+- (void)addAnnotations:(NSArray *)annotationsAndPages;
- (void)removeAnnotation:(PDFAnnotation *)annotation;
- (void)stopPacer;
@@ -1243,25 +1244,14 @@
} else if ([newAnnotations count] > 0) {
+ NSMutableArray *newAnnotationsAndPages = [NSMutableArray array];
page = [self currentPage];
-
- [self commitEditing];
- [self beginNewUndoGroupIfNeeded];
-
for (PDFAnnotation *newAnnotation in newAnnotations) {
-
[newAnnotation setBounds:SKConstrainRect([newAnnotation bounds], [page boundsForBox:[self displayBox]])];
-
- [newAnnotation registerUserName];
- [[self document] addAnnotation:newAnnotation toPage:page];
-
+ [newAnnotationsAndPages addObject:@[newAnnotation, page]];
}
+ [self addAnnotations:newAnnotationsAndPages];
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
-
- if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:[newAnnotations lastObject]];
-
} else {
id str = nil;
@@ -2389,6 +2379,20 @@
[self setCurrentAnnotation:annotation];
}
+- (void)addAnnotations:(NSArray *)annotationsAndPages {
+ PDFAnnotation *annotation = nil;
+ [self commitEditing];
+ [self beginNewUndoGroupIfNeeded];
+ for (NSArray *annotationAndPage in annotationsAndPages) {
+ annotation = [annotationAndPage firstObject];
+ [annotation registerUserName];
+ [[self document] addAnnotation:annotation toPage:[annotationAndPage lastObject]];
+ }
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
+ [self setCurrentAnnotation:annotation];
+}
+
- (void)removeAnnotation:(PDFAnnotation *)annotation {
[[self document] removeAnnotation:annotation];
[[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
@@ -2454,23 +2458,10 @@
if ([newAnnotations count] > 0) {
- [self commitEditing];
- [self beginNewUndoGroupIfNeeded];
+ for (NSArray *annotationAndPage in newAnnotations)
+ [[annotationAndPage firstObject] setString:text ?: @""];
+ [self addAnnotations:newAnnotations];
- for (NSArray *annotationAndPage in newAnnotations) {
- newAnnotation = [annotationAndPage firstObject];
- page = [annotationAndPage lastObject];
- if ([text length] > 0 || [newAnnotation string] == nil)
- [newAnnotation setString:text ?: @""];
- [newAnnotation registerUserName];
- [[self document] addAnnotation:newAnnotation toPage:page];
- }
-
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
-
- if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:newAnnotation];
-
return YES;
} else if (newAnnotation) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 15:45:39
|
Revision: 15588
http://sourceforge.net/p/skim-app/code/15588
Author: hofman
Date: 2025-07-02 15:45:37 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
first remove currentAnnotation so addUndoGroupIfNeeded is called implicitly
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 15:36:37 UTC (rev 15587)
+++ trunk/SKPDFView.m 2025-07-02 15:45:37 UTC (rev 15588)
@@ -4224,9 +4224,8 @@
if (newAnnotation) {
[newAnnotation setColor:[currentAnnotation color]];
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeeded];
+ [[self document] removeAnnotation:currentAnnotation];
[[self document] removeAnnotation:newCurrentAnnotation];
- [[self document] removeAnnotation:currentAnnotation];
[[self document] addAnnotation:newAnnotation toPage:page];
[[self undoManager] setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
newCurrentAnnotation = newAnnotation;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 15:36:39
|
Revision: 15587
http://sourceforge.net/p/skim-app/code/15587
Author: hofman
Date: 2025-07-02 15:36:37 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
don't set undo action name when joining to freehand note
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 15:29:16 UTC (rev 15586)
+++ trunk/SKPDFView.m 2025-07-02 15:36:37 UTC (rev 15587)
@@ -4364,7 +4364,7 @@
[annotation setColor:[currentAnnotation color]];
[annotation setBorder:[currentAnnotation border]];
[annotation setString:[currentAnnotation string]];
- [self removeAnnotation:currentAnnotation];
+ [[self document] removeAnnotation:currentAnnotation];
[self addAnnotation:annotation toPage:page select:YES];
} else {
PDFAnnotation *annotation = [PDFAnnotation newSkimNoteWithPaths:@[bezierPath]];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 15:29:18
|
Revision: 15586
http://sourceforge.net/p/skim-app/code/15586
Author: hofman
Date: 2025-07-02 15:29:16 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
separately add new freehand note or joined freehand note
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 14:21:22 UTC (rev 15585)
+++ trunk/SKPDFView.m 2025-07-02 15:29:16 UTC (rev 15586)
@@ -4359,25 +4359,17 @@
[NSEvent setMouseCoalescingEnabled:wasMouseCoalescingEnabled];
if (bezierPath) {
- NSMutableArray *paths = [[NSMutableArray alloc] init];
- if (currentAnnotation)
- [paths addObjectsFromArray:[currentAnnotation pagePaths]];
- [paths addObject:bezierPath];
-
- PDFAnnotation *annotation = [PDFAnnotation newSkimNoteWithPaths:paths];
if (currentAnnotation) {
+ PDFAnnotation *annotation = [PDFAnnotation newSkimNoteWithPaths:[[currentAnnotation pagePaths] arrayByAddingObject:bezierPath]];
[annotation setColor:[currentAnnotation color]];
[annotation setBorder:[currentAnnotation border]];
[annotation setString:[currentAnnotation string]];
+ [self removeAnnotation:currentAnnotation];
+ [self addAnnotation:annotation toPage:page select:YES];
+ } else {
+ PDFAnnotation *annotation = [PDFAnnotation newSkimNoteWithPaths:@[bezierPath]];
+ [self addAnnotation:annotation toPage:page select:([theEvent modifierFlags] & (NSEventModifierFlagShift | NSEventModifierFlagCapsLock)) != 0];
}
- [self addAnnotation:annotation toPage:page select:NO];
-
- if (currentAnnotation) {
- [self removeCurrentAnnotation:nil];
- [self setCurrentAnnotation:annotation];
- } else if (([theEvent modifierFlags] & (NSEventModifierFlagShift | NSEventModifierFlagCapsLock))) {
- [self setCurrentAnnotation:annotation];
- }
} else if (([theEvent modifierFlags] & NSEventModifierFlagCapsLock)) {
[self setCurrentAnnotation:nil];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 14:21:24
|
Revision: 15585
http://sourceforge.net/p/skim-app/code/15585
Author: hofman
Date: 2025-07-02 14:21:22 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
Include reisterUserName in addAnnotation:toPage:select:
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 14:13:45 UTC (rev 15584)
+++ trunk/SKPDFView.m 2025-07-02 14:21:22 UTC (rev 15585)
@@ -1239,7 +1239,6 @@
PDFAnnotation *newAnnotation = [newAnnotations firstObject];
page = [self currentPage];
[newAnnotation setBounds:SKConstrainRect([newAnnotation bounds], [page boundsForBox:[self displayBox]])];
- [newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page select:YES];
} else if ([newAnnotations count] > 0) {
@@ -1326,7 +1325,6 @@
[newAnnotation setString:str];
}
- [newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page select:YES];
} else if (isPlainText == NO) {
@@ -1365,7 +1363,6 @@
if ([text length] > 0)
[newAnnotation setString:text];
- [newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page select:YES];
} else {
@@ -2307,7 +2304,6 @@
[(SKNPDFAnnotationNote *)newAnnotation setImage:image];
[(SKNPDFAnnotationNote *)newAnnotation setExtendedIconType:kSKNPDFTextAnnotationIconImage];
- [newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page select:YES];
performedDrag = YES;
@@ -2384,6 +2380,7 @@
#pragma mark Annotation management
- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page select:(BOOL)shouldSelect {
+ [annotation registerUserName];
[self commitEditing];
[self beginNewUndoGroupIfNeeded];
[[self document] addAnnotation:annotation toPage:page];
@@ -2485,7 +2482,6 @@
}
if ([newAnnotation string] == nil)
[newAnnotation setString:@""];
- [newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page select:YES];
return YES;
@@ -4178,7 +4174,6 @@
[NSApp willDragMouse]) {
// select a new copy of the annotation
PDFAnnotation *newAnnotation = [PDFAnnotation newSkimNoteWithProperties:[newCurrentAnnotation SkimNoteProperties]];
- [newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page select:NO];
newCurrentAnnotation = newAnnotation;
} else if (([newCurrentAnnotation isMarkup] ||
@@ -4375,7 +4370,6 @@
[annotation setBorder:[currentAnnotation border]];
[annotation setString:[currentAnnotation string]];
}
- [annotation registerUserName];
[self addAnnotation:annotation toPage:page select:NO];
if (currentAnnotation) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 14:13:46
|
Revision: 15584
http://sourceforge.net/p/skim-app/code/15584
Author: hofman
Date: 2025-07-02 14:13:45 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
register user name
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 09:41:48 UTC (rev 15583)
+++ trunk/SKPDFView.m 2025-07-02 14:13:45 UTC (rev 15584)
@@ -1236,9 +1236,10 @@
if ([newAnnotations count] == 1) {
+ PDFAnnotation *newAnnotation = [newAnnotations firstObject];
page = [self currentPage];
- PDFAnnotation *newAnnotation = [newAnnotations firstObject];
[newAnnotation setBounds:SKConstrainRect([newAnnotation bounds], [page boundsForBox:[self displayBox]])];
+ [newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page select:YES];
} else if ([newAnnotations count] > 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 09:41:50
|
Revision: 15583
http://sourceforge.net/p/skim-app/code/15583
Author: hofman
Date: 2025-07-02 09:41:48 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
simplify pasting single copied annotation
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 09:35:17 UTC (rev 15582)
+++ trunk/SKPDFView.m 2025-07-02 09:41:48 UTC (rev 15583)
@@ -1234,10 +1234,17 @@
if (isPlainText == NO)
newAnnotations = [pboard readObjectsForClasses:@[[PDFAnnotation class]] options:options];
- if ([newAnnotations count] > 0) {
+ if ([newAnnotations count] == 1) {
page = [self currentPage];
+ PDFAnnotation *newAnnotation = [newAnnotations firstObject];
+ [newAnnotation setBounds:SKConstrainRect([newAnnotation bounds], [page boundsForBox:[self displayBox]])];
+ [self addAnnotation:newAnnotation toPage:page select:YES];
+ } else if ([newAnnotations count] > 0) {
+
+ page = [self currentPage];
+
[self commitEditing];
[self beginNewUndoGroupIfNeeded];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 09:35:19
|
Revision: 15582
http://sourceforge.net/p/skim-app/code/15582
Author: hofman
Date: 2025-07-02 09:35:17 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
Handle undo gouping and undo action name for adding multiple notes by itself. Make current annotation after adding in convenience method.
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-02 08:49:06 UTC (rev 15581)
+++ trunk/SKPDFView.m 2025-07-02 09:35:17 UTC (rev 15582)
@@ -207,7 +207,7 @@
- (void)beginNewUndoGroupIfNeeded;
-- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page;
+- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page select:(BOOL)shouldSelect;
- (void)removeAnnotation:(PDFAnnotation *)annotation;
- (void)stopPacer;
@@ -1238,15 +1238,20 @@
page = [self currentPage];
+ [self commitEditing];
+ [self beginNewUndoGroupIfNeeded];
+
for (PDFAnnotation *newAnnotation in newAnnotations) {
[newAnnotation setBounds:SKConstrainRect([newAnnotation bounds], [page boundsForBox:[self displayBox]])];
[newAnnotation registerUserName];
- [self addAnnotation:newAnnotation toPage:page];
+ [[self document] addAnnotation:newAnnotation toPage:page];
}
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:[newAnnotations lastObject]];
@@ -1314,10 +1319,7 @@
}
[newAnnotation registerUserName];
- [self addAnnotation:newAnnotation toPage:page];
-
- if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:newAnnotation];
+ [self addAnnotation:newAnnotation toPage:page select:YES];
} else if (isPlainText == NO) {
@@ -1356,10 +1358,7 @@
[newAnnotation setString:text];
[newAnnotation registerUserName];
- [self addAnnotation:newAnnotation toPage:page];
-
- if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:newAnnotation];
+ [self addAnnotation:newAnnotation toPage:page select:YES];
} else {
@@ -2301,10 +2300,7 @@
[(SKNPDFAnnotationNote *)newAnnotation setExtendedIconType:kSKNPDFTextAnnotationIconImage];
[newAnnotation registerUserName];
- [self addAnnotation:newAnnotation toPage:page];
-
- if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:newAnnotation];
+ [self addAnnotation:newAnnotation toPage:page select:YES];
performedDrag = YES;
}
@@ -2379,11 +2375,13 @@
#pragma mark Annotation management
-- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page {
+- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page select:(BOOL)shouldSelect {
[self commitEditing];
[self beginNewUndoGroupIfNeeded];
[[self document] addAnnotation:annotation toPage:page];
[[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ if (shouldSelect && (toolMode == SKToolModeText || toolMode == SKToolModeNote))
+ [self setCurrentAnnotation:annotation];
}
- (void)removeAnnotation:(PDFAnnotation *)annotation {
@@ -2451,6 +2449,9 @@
if ([newAnnotations count] > 0) {
+ [self commitEditing];
+ [self beginNewUndoGroupIfNeeded];
+
for (NSArray *annotationAndPage in newAnnotations) {
newAnnotation = [annotationAndPage firstObject];
page = [annotationAndPage lastObject];
@@ -2457,9 +2458,11 @@
if ([text length] > 0 || [newAnnotation string] == nil)
[newAnnotation setString:text ?: @""];
[newAnnotation registerUserName];
- [self addAnnotation:newAnnotation toPage:page];
+ [[self document] addAnnotation:newAnnotation toPage:page];
}
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2475,10 +2478,7 @@
if ([newAnnotation string] == nil)
[newAnnotation setString:@""];
[newAnnotation registerUserName];
- [self addAnnotation:newAnnotation toPage:page];
-
- if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:newAnnotation];
+ [self addAnnotation:newAnnotation toPage:page select:YES];
return YES;
} else {
@@ -4171,7 +4171,7 @@
// select a new copy of the annotation
PDFAnnotation *newAnnotation = [PDFAnnotation newSkimNoteWithProperties:[newCurrentAnnotation SkimNoteProperties]];
[newAnnotation registerUserName];
- [self addAnnotation:newAnnotation toPage:page];
+ [self addAnnotation:newAnnotation toPage:page select:NO];
newCurrentAnnotation = newAnnotation;
} else if (([newCurrentAnnotation isMarkup] ||
(isInk && (newCurrentAnnotation != currentAnnotation || (modifiers & (NSEventModifierFlagShift | NSEventModifierFlagCapsLock))))) &&
@@ -4368,7 +4368,7 @@
[annotation setString:[currentAnnotation string]];
}
[annotation registerUserName];
- [self addAnnotation:annotation toPage:page];
+ [self addAnnotation:annotation toPage:page select:NO];
if (currentAnnotation) {
[self removeCurrentAnnotation:nil];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-02 08:49:07
|
Revision: 15581
http://sourceforge.net/p/skim-app/code/15581
Author: hofman
Date: 2025-07-02 08:49:06 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
get page once
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-01 17:36:56 UTC (rev 15580)
+++ trunk/SKPDFView.m 2025-07-02 08:49:06 UTC (rev 15581)
@@ -1236,14 +1236,12 @@
if ([newAnnotations count] > 0) {
+ page = [self currentPage];
+
for (PDFAnnotation *newAnnotation in newAnnotations) {
- NSRect bounds = [newAnnotation bounds];
- page = [self currentPage];
- bounds = SKConstrainRect(bounds, [page boundsForBox:[self displayBox]]);
+ [newAnnotation setBounds:SKConstrainRect([newAnnotation bounds], [page boundsForBox:[self displayBox]])];
- [newAnnotation setBounds:bounds];
-
[newAnnotation registerUserName];
[self addAnnotation:newAnnotation toPage:page];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-01 17:36:58
|
Revision: 15580
http://sourceforge.net/p/skim-app/code/15580
Author: hofman
Date: 2025-07-01 17:36:56 +0000 (Tue, 01 Jul 2025)
Log Message:
-----------
don't check for annotation when already dragged
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-01 17:35:17 UTC (rev 15579)
+++ trunk/SKPDFView.m 2025-07-01 17:36:56 UTC (rev 15580)
@@ -4067,12 +4067,12 @@
if ([theEvent type] == NSEventTypeLeftMouseUp) {
break;
} else if ([theEvent type] == NSEventTypeLeftMouseDragged) {
- if (currentAnnotation == nil) {
- [self addAnnotationWithType:noteType selection:nil page:page bounds:SKRectFromCenterAndSquareSize(originalBounds.origin, 0.0)];
+ if (draggedAnnotation == NO) {
+ if (currentAnnotation == nil)
+ [self addAnnotationWithType:noteType selection:nil page:page bounds:SKRectFromCenterAndSquareSize(originalBounds.origin, 0.0)];
+ else
+ [self beginNewUndoGroupIfNeeded];
draggedAnnotation = YES;
- } else if (draggedAnnotation == NO) {
- [self beginNewUndoGroupIfNeeded];
- draggedAnnotation = YES;
}
lastMouseEvent = theEvent;
} else if (currentAnnotation == nil) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-01 17:35:20
|
Revision: 15579
http://sourceforge.net/p/skim-app/code/15579
Author: hofman
Date: 2025-07-01 17:35:17 +0000 (Tue, 01 Jul 2025)
Log Message:
-----------
only may be adding new undo group at begin of a drag and not adding a new note
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-01 09:04:23 UTC (rev 15578)
+++ trunk/SKPDFView.m 2025-07-01 17:35:17 UTC (rev 15579)
@@ -4069,13 +4069,15 @@
} else if ([theEvent type] == NSEventTypeLeftMouseDragged) {
if (currentAnnotation == nil) {
[self addAnnotationWithType:noteType selection:nil page:page bounds:SKRectFromCenterAndSquareSize(originalBounds.origin, 0.0)];
+ draggedAnnotation = YES;
+ } else if (draggedAnnotation == NO) {
+ [self beginNewUndoGroupIfNeeded];
+ draggedAnnotation = YES;
}
lastMouseEvent = theEvent;
- draggedAnnotation = YES;
} else if (currentAnnotation == nil) {
continue;
}
- [self beginNewUndoGroupIfNeeded];
if (resizeHandle == 0)
[self doMoveAnnotationWithEvent:lastMouseEvent offset:offset];
else if (isLine)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-01 09:04:25
|
Revision: 15578
http://sourceforge.net/p/skim-app/code/15578
Author: hofman
Date: 2025-07-01 09:04:23 +0000 (Tue, 01 Jul 2025)
Log Message:
-----------
explicitly commit before starting new undo group in the one case we need to
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-01 09:02:36 UTC (rev 15577)
+++ trunk/SKPDFView.m 2025-07-01 09:04:23 UTC (rev 15578)
@@ -205,7 +205,7 @@
- (void)editTextNoteWithEvent:(NSEvent *)theEvent;
- (BOOL)isEditingAnnotation:(PDFAnnotation *)annotation;
-- (void)beginNewUndoGroupIfNeededWithCommit:(BOOL)commit;
+- (void)beginNewUndoGroupIfNeeded;
- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page;
- (void)removeAnnotation:(PDFAnnotation *)annotation;
@@ -2382,7 +2382,8 @@
#pragma mark Annotation management
- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page {
- [self beginNewUndoGroupIfNeededWithCommit:YES];
+ [self commitEditing];
+ [self beginNewUndoGroupIfNeeded];
[[self document] addAnnotation:annotation toPage:page];
[[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
}
@@ -2780,9 +2781,7 @@
return success;
}
-- (void)beginNewUndoGroupIfNeededWithCommit:(BOOL)commit {
- if (commit)
- [self commitEditing];
+- (void)beginNewUndoGroupIfNeeded {
if (wantsNewUndoGroup) {
NSUndoManager *undoManger = [self undoManager];
if ([undoManger groupingLevel] > 0) {
@@ -3094,7 +3093,7 @@
if (currentAnnotation == annotation) {
[self setCurrentAnnotation:nil];
- [self beginNewUndoGroupIfNeededWithCommit:NO];
+ [self beginNewUndoGroupIfNeeded];
}
[self updatedAnnotation:annotation];
@@ -4076,7 +4075,7 @@
} else if (currentAnnotation == nil) {
continue;
}
- [self beginNewUndoGroupIfNeededWithCommit:NO];
+ [self beginNewUndoGroupIfNeeded];
if (resizeHandle == 0)
[self doMoveAnnotationWithEvent:lastMouseEvent offset:offset];
else if (isLine)
@@ -4222,7 +4221,7 @@
if (newAnnotation) {
[newAnnotation setColor:[currentAnnotation color]];
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:NO];
+ [self beginNewUndoGroupIfNeeded];
[[self document] removeAnnotation:newCurrentAnnotation];
[[self document] removeAnnotation:currentAnnotation];
[[self document] addAnnotation:newAnnotation toPage:page];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-01 09:02:38
|
Revision: 15577
http://sourceforge.net/p/skim-app/code/15577
Author: hofman
Date: 2025-07-01 09:02:36 +0000 (Tue, 01 Jul 2025)
Log Message:
-----------
don't bother committing when joining notes, as the active note is not a text note
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-30 08:54:37 UTC (rev 15576)
+++ trunk/SKPDFView.m 2025-07-01 09:02:36 UTC (rev 15577)
@@ -4222,7 +4222,7 @@
if (newAnnotation) {
[newAnnotation setColor:[currentAnnotation color]];
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:YES];
+ [self beginNewUndoGroupIfNeededWithCommit:NO];
[[self document] removeAnnotation:newCurrentAnnotation];
[[self document] removeAnnotation:currentAnnotation];
[[self document] addAnnotation:newAnnotation toPage:page];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-30 08:54:40
|
Revision: 15576
http://sourceforge.net/p/skim-app/code/15576
Author: hofman
Date: 2025-06-30 08:54:37 +0000 (Mon, 30 Jun 2025)
Log Message:
-----------
Tag for release
Added Paths:
-----------
tags/REL_1_7_11/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-30 08:53:31
|
Revision: 15575
http://sourceforge.net/p/skim-app/code/15575
Author: hofman
Date: 2025-06-30 08:53:27 +0000 (Mon, 30 Jun 2025)
Log Message:
-----------
Update version numbers for release
Modified Paths:
--------------
trunk/Info.plist
trunk/Skim.xcodeproj/project.pbxproj
Modified: trunk/Info.plist
===================================================================
--- trunk/Info.plist 2025-06-29 17:43:18 UTC (rev 15574)
+++ trunk/Info.plist 2025-06-30 08:53:27 UTC (rev 15575)
@@ -310,7 +310,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.7.10</string>
+ <string>1.7.11</string>
<key>CFBundleSignature</key>
<string>SKim</string>
<key>CFBundleURLTypes</key>
Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj 2025-06-29 17:43:18 UTC (rev 15574)
+++ trunk/Skim.xcodeproj/project.pbxproj 2025-06-30 08:53:27 UTC (rev 15575)
@@ -3809,7 +3809,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = CE17EE460E24ED7C00DE06EA /* Skim-App.xcconfig */;
buildSettings = {
- CURRENT_PROJECT_VERSION = 162;
+ CURRENT_PROJECT_VERSION = 163;
};
name = Debug;
};
@@ -3817,7 +3817,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = CE17EE460E24ED7C00DE06EA /* Skim-App.xcconfig */;
buildSettings = {
- CURRENT_PROJECT_VERSION = 162;
+ CURRENT_PROJECT_VERSION = 163;
};
name = Release;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 17:43:20
|
Revision: 15574
http://sourceforge.net/p/skim-app/code/15574
Author: hofman
Date: 2025-06-29 17:43:18 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
remove annotations directly from page when joining
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-29 17:36:22 UTC (rev 15573)
+++ trunk/SKPDFView.m 2025-06-29 17:43:18 UTC (rev 15574)
@@ -4220,11 +4220,11 @@
[newAnnotation setBorder:[currentAnnotation border]];
}
if (newAnnotation) {
- [self beginNewUndoGroupIfNeededWithCommit:YES];
[newAnnotation setColor:[currentAnnotation color]];
[newAnnotation registerUserName];
- [self removeAnnotation:newCurrentAnnotation];
- [self removeCurrentAnnotation:nil];
+ [self beginNewUndoGroupIfNeededWithCommit:YES];
+ [[self document] removeAnnotation:newCurrentAnnotation];
+ [[self document] removeAnnotation:currentAnnotation];
[[self document] addAnnotation:newAnnotation toPage:page];
[[self undoManager] setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
newCurrentAnnotation = newAnnotation;
@@ -4395,8 +4395,7 @@
for (PDFAnnotation *annotation in annotations) {
if ([annotation isSkimNote] && [annotation hitTest:point] && [self isEditingAnnotation:annotation] == NO) {
- [[self document] removeAnnotation:annotation];
- [[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
+ [self removeAnnotation:annotation];
break;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 17:36:25
|
Revision: 15573
http://sourceforge.net/p/skim-app/code/15573
Author: hofman
Date: 2025-06-29 17:36:22 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
convenience methods to add and remove annotation with undo acttion name
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-29 17:22:07 UTC (rev 15572)
+++ trunk/SKPDFView.m 2025-06-29 17:36:22 UTC (rev 15573)
@@ -207,6 +207,9 @@
- (void)beginNewUndoGroupIfNeededWithCommit:(BOOL)commit;
+- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page;
+- (void)removeAnnotation:(PDFAnnotation *)annotation;
+
- (void)stopPacer;
- (void)updatePacer;
@@ -1233,8 +1236,6 @@
if ([newAnnotations count] > 0) {
- [self beginNewUndoGroupIfNeededWithCommit:YES];
-
for (PDFAnnotation *newAnnotation in newAnnotations) {
NSRect bounds = [newAnnotation bounds];
@@ -1244,10 +1245,9 @@
[newAnnotation setBounds:bounds];
[newAnnotation registerUserName];
- [[self document] addAnnotation:newAnnotation toPage:page];
+ [self addAnnotation:newAnnotation toPage:page];
}
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:[newAnnotations lastObject]];
@@ -1316,9 +1316,7 @@
}
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:YES];
- [[self document] addAnnotation:newAnnotation toPage:page];
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [self addAnnotation:newAnnotation toPage:page];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -1360,9 +1358,7 @@
[newAnnotation setString:text];
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:YES];
- [[self document] addAnnotation:newAnnotation toPage:page];
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [self addAnnotation:newAnnotation toPage:page];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2307,9 +2303,7 @@
[(SKNPDFAnnotationNote *)newAnnotation setExtendedIconType:kSKNPDFTextAnnotationIconImage];
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:YES];
- [[self document] addAnnotation:newAnnotation toPage:page];
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [self addAnnotation:newAnnotation toPage:page];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2387,6 +2381,17 @@
#pragma mark Annotation management
+- (void)addAnnotation:(PDFAnnotation *)annotation toPage:(PDFPage *)page {
+ [self beginNewUndoGroupIfNeededWithCommit:YES];
+ [[self document] addAnnotation:annotation toPage:page];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+}
+
+- (void)removeAnnotation:(PDFAnnotation *)annotation {
+ [[self document] removeAnnotation:annotation];
+ [[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
+}
+
- (BOOL)addAnnotationWithType:(SKNoteType)annotationType selection:(PDFSelection *)selection page:(PDFPage *)page bounds:(NSRect)bounds {
PDFAnnotation *newAnnotation = nil;
NSArray *newAnnotations = nil;
@@ -2446,7 +2451,6 @@
}
if ([newAnnotations count] > 0) {
- [self beginNewUndoGroupIfNeededWithCommit:YES];
for (NSArray *annotationAndPage in newAnnotations) {
newAnnotation = [annotationAndPage firstObject];
@@ -2454,9 +2458,8 @@
if ([text length] > 0 || [newAnnotation string] == nil)
[newAnnotation setString:text ?: @""];
[newAnnotation registerUserName];
- [[self document] addAnnotation:newAnnotation toPage:page];
+ [self addAnnotation:newAnnotation toPage:page];
}
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2463,7 +2466,6 @@
return YES;
} else if (newAnnotation) {
- [self beginNewUndoGroupIfNeededWithCommit:YES];
if (annotationType != SKNoteTypeLine && annotationType != SKNoteTypeInk) {
if ([text length] > 0)
@@ -2474,8 +2476,7 @@
if ([newAnnotation string] == nil)
[newAnnotation setString:@""];
[newAnnotation registerUserName];
- [[self document] addAnnotation:newAnnotation toPage:page];
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [self addAnnotation:newAnnotation toPage:page];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2669,19 +2670,14 @@
}
- (void)removeCurrentAnnotation:(id)sender{
- if ([currentAnnotation isSkimNote]) {
- [[self document] removeAnnotation:currentAnnotation];
- [[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
- }
+ if ([currentAnnotation isSkimNote])
+ [self removeAnnotation:currentAnnotation];
}
- (void)removeThisAnnotation:(id)sender{
PDFAnnotation *annotation = [sender representedObject];
-
- if (annotation) {
- [[self document] removeAnnotation:annotation];
- [[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
- }
+ if (annotation)
+ [self removeAnnotation:annotation];
}
- (void)editThisAnnotation:(id)sender {
@@ -4176,9 +4172,7 @@
// select a new copy of the annotation
PDFAnnotation *newAnnotation = [PDFAnnotation newSkimNoteWithProperties:[newCurrentAnnotation SkimNoteProperties]];
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:YES];
- [[self document] addAnnotation:newAnnotation toPage:page];
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [self addAnnotation:newAnnotation toPage:page];
newCurrentAnnotation = newAnnotation;
} else if (([newCurrentAnnotation isMarkup] ||
(isInk && (newCurrentAnnotation != currentAnnotation || (modifiers & (NSEventModifierFlagShift | NSEventModifierFlagCapsLock))))) &&
@@ -4229,7 +4223,7 @@
[self beginNewUndoGroupIfNeededWithCommit:YES];
[newAnnotation setColor:[currentAnnotation color]];
[newAnnotation registerUserName];
- [[self document] removeAnnotation:newCurrentAnnotation];
+ [self removeAnnotation:newCurrentAnnotation];
[self removeCurrentAnnotation:nil];
[[self document] addAnnotation:newAnnotation toPage:page];
[[self undoManager] setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
@@ -4375,9 +4369,7 @@
[annotation setString:[currentAnnotation string]];
}
[annotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:NO];
- [[self document] addAnnotation:annotation toPage:page];
- [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [self addAnnotation:annotation toPage:page];
if (currentAnnotation) {
[self removeCurrentAnnotation:nil];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 17:22:09
|
Revision: 15572
http://sourceforge.net/p/skim-app/code/15572
Author: hofman
Date: 2025-06-29 17:22:07 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
set undo action name
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-29 17:20:41 UTC (rev 15571)
+++ trunk/SKPDFView.m 2025-06-29 17:22:07 UTC (rev 15572)
@@ -2678,8 +2678,10 @@
- (void)removeThisAnnotation:(id)sender{
PDFAnnotation *annotation = [sender representedObject];
- if (annotation)
+ if (annotation) {
[[self document] removeAnnotation:annotation];
+ [[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
+ }
}
- (void)editThisAnnotation:(id)sender {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 17:20:43
|
Revision: 15571
http://sourceforge.net/p/skim-app/code/15571
Author: hofman
Date: 2025-06-29 17:20:41 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
revert last commit
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-29 17:19:38 UTC (rev 15570)
+++ trunk/SKPDFView.m 2025-06-29 17:20:41 UTC (rev 15571)
@@ -2459,7 +2459,7 @@
[[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:[newAnnotations lastObject]];
+ [self setCurrentAnnotation:newAnnotation];
return YES;
} else if (newAnnotation) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 17:19:41
|
Revision: 15570
http://sourceforge.net/p/skim-app/code/15570
Author: hofman
Date: 2025-06-29 17:19:38 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
set actually added note as current note
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-29 17:16:00 UTC (rev 15569)
+++ trunk/SKPDFView.m 2025-06-29 17:19:38 UTC (rev 15570)
@@ -2459,7 +2459,7 @@
[[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:newAnnotation];
+ [self setCurrentAnnotation:[newAnnotations lastObject]];
return YES;
} else if (newAnnotation) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 17:16:04
|
Revision: 15569
http://sourceforge.net/p/skim-app/code/15569
Author: hofman
Date: 2025-06-29 17:16:00 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
begin undo group once and set current note once when pasting note
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-29 17:12:02 UTC (rev 15568)
+++ trunk/SKPDFView.m 2025-06-29 17:16:00 UTC (rev 15569)
@@ -1233,6 +1233,8 @@
if ([newAnnotations count] > 0) {
+ [self beginNewUndoGroupIfNeededWithCommit:YES];
+
for (PDFAnnotation *newAnnotation in newAnnotations) {
NSRect bounds = [newAnnotation bounds];
@@ -1242,16 +1244,14 @@
[newAnnotation setBounds:bounds];
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:YES];
[[self document] addAnnotation:newAnnotation toPage:page];
- if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:newAnnotation];
-
}
-
[[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
+ [self setCurrentAnnotation:[newAnnotations lastObject]];
+
} else {
id str = nil;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 17:12:05
|
Revision: 15568
http://sourceforge.net/p/skim-app/code/15568
Author: hofman
Date: 2025-06-29 17:12:02 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
no need for convenience method
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-29 16:38:51 UTC (rev 15567)
+++ trunk/SKPDFView.m 2025-06-29 17:12:02 UTC (rev 15568)
@@ -937,10 +937,6 @@
return undoManager;
}
-- (void)setUndoActionName:(NSString *)actionName {
- [[self undoManager] setActionName:actionName];
-}
-
- (BOOL)canSelectNote {
return hideNotes == NO && (toolMode == SKToolModeText || toolMode == SKToolModeNote) && [[self document] allowsNotes];
}
@@ -1254,7 +1250,7 @@
}
- [self setUndoActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
} else {
@@ -1322,7 +1318,7 @@
[newAnnotation registerUserName];
[self beginNewUndoGroupIfNeededWithCommit:YES];
[[self document] addAnnotation:newAnnotation toPage:page];
- [self setUndoActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -1366,7 +1362,7 @@
[newAnnotation registerUserName];
[self beginNewUndoGroupIfNeededWithCommit:YES];
[[self document] addAnnotation:newAnnotation toPage:page];
- [self setUndoActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2313,7 +2309,7 @@
[newAnnotation registerUserName];
[self beginNewUndoGroupIfNeededWithCommit:YES];
[[self document] addAnnotation:newAnnotation toPage:page];
- [self setUndoActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2460,7 +2456,7 @@
[newAnnotation registerUserName];
[[self document] addAnnotation:newAnnotation toPage:page];
}
- [self setUndoActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2479,7 +2475,7 @@
[newAnnotation setString:@""];
[newAnnotation registerUserName];
[[self document] addAnnotation:newAnnotation toPage:page];
- [self setUndoActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
[self setCurrentAnnotation:newAnnotation];
@@ -2675,7 +2671,7 @@
- (void)removeCurrentAnnotation:(id)sender{
if ([currentAnnotation isSkimNote]) {
[[self document] removeAnnotation:currentAnnotation];
- [self setUndoActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
}
}
@@ -3795,7 +3791,7 @@
if (newActivePage != [currentAnnotation page]) {
// move the annotation to the new page
[[self document] moveAnnotation:currentAnnotation toPage:newActivePage];
- [self setUndoActionName:NSLocalizedString(@"Edit Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Edit Note", @"Undo action name")];
}
NSRect newBounds = [currentAnnotation bounds];
@@ -4180,7 +4176,7 @@
[newAnnotation registerUserName];
[self beginNewUndoGroupIfNeededWithCommit:YES];
[[self document] addAnnotation:newAnnotation toPage:page];
- [self setUndoActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
newCurrentAnnotation = newAnnotation;
} else if (([newCurrentAnnotation isMarkup] ||
(isInk && (newCurrentAnnotation != currentAnnotation || (modifiers & (NSEventModifierFlagShift | NSEventModifierFlagCapsLock))))) &&
@@ -4234,7 +4230,7 @@
[[self document] removeAnnotation:newCurrentAnnotation];
[self removeCurrentAnnotation:nil];
[[self document] addAnnotation:newAnnotation toPage:page];
- [self setUndoActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Join Notes", @"Undo action name")];
newCurrentAnnotation = newAnnotation;
}
}
@@ -4379,7 +4375,7 @@
[annotation registerUserName];
[self beginNewUndoGroupIfNeededWithCommit:NO];
[[self document] addAnnotation:annotation toPage:page];
- [self setUndoActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
if (currentAnnotation) {
[self removeCurrentAnnotation:nil];
@@ -4406,7 +4402,7 @@
for (PDFAnnotation *annotation in annotations) {
if ([annotation isSkimNote] && [annotation hitTest:point] && [self isEditingAnnotation:annotation] == NO) {
[[self document] removeAnnotation:annotation];
- [self setUndoActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
+ [[self undoManager] setActionName:NSLocalizedString(@"Remove Note", @"Undo action name")];
break;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 16:38:54
|
Revision: 15567
http://sourceforge.net/p/skim-app/code/15567
Author: hofman
Date: 2025-06-29 16:38:51 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
observe view changes only when we care about it
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2025-06-29 16:20:01 UTC (rev 15566)
+++ trunk/SKMainWindowController_UI.m 2025-06-29 16:38:51 UTC (rev 15567)
@@ -138,6 +138,7 @@
@interface SKMainWindowController (UIPrivate)
- (void)changeColorProperty:(id)sender;
+- (void)handleNoteViewFrameDidChangeNotification:(NSNotification *)notification;
@end
#pragma mark -
@@ -1199,10 +1200,15 @@
- (void)toggleAutoResizeNoteRows:(id)sender {
mwcFlags.autoResizeNoteRows = (0 == mwcFlags.autoResizeNoteRows);
- if (mwcFlags.autoResizeNoteRows)
+ if (mwcFlags.autoResizeNoteRows) {
[self resetNoteRowHeights];
- else
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNoteViewFrameDidChangeNotification:)
+ name:NSViewFrameDidChangeNotification object:[rightSideController.noteOutlineView enclosingScrollView]];
+ } else {
[self autoSizeNoteRows:nil];
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSViewFrameDidChangeNotification object:[rightSideController.noteOutlineView enclosingScrollView]];
+ }
}
- (void)menuNeedsUpdate:(NSMenu *)menu {
@@ -2110,9 +2116,6 @@
name:SKPDFViewCurrentAnnotationChangedNotification object:pdfView];
[nc addObserver:self selector:@selector(handleReadingBarDidChangeNotification:)
name:SKPDFViewReadingBarDidChangeNotification object:pdfView];
- // View
- [nc addObserver:self selector:@selector(handleNoteViewFrameDidChangeNotification:)
- name:NSViewFrameDidChangeNotification object:[rightSideController.noteOutlineView enclosingScrollView]];
// UndoManager
NSUndoManager *undoManager = [[self document] undoManager];
[nc addObserver:self selector:@selector(observeUndoManagerCheckpoint:)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-06-29 16:20:02
|
Revision: 15566
http://sourceforge.net/p/skim-app/code/15566
Author: hofman
Date: 2025-06-29 16:20:01 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
reuse variable
Modified Paths:
--------------
trunk/NSDocument_SKExtensions.m
Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m 2025-06-29 16:10:02 UTC (rev 15565)
+++ trunk/NSDocument_SKExtensions.m 2025-06-29 16:20:01 UTC (rev 15566)
@@ -135,14 +135,14 @@
}
NSWindow *window = [self primaryWindow];
- if (window)
+ if (window) {
[setup setObject:NSStringFromRect([window frame]) forKey:SKDocumentSetupWindowFrameKey];
+
+ NSString *tabs = [window tabIndexesInWindows:[[NSApp orderedDocuments] valueForKey:@"primaryWindow"]];
+ if (tabs)
+ [setup setObject:tabs forKey:SKDocumentSetupTabsKey];
+ }
- NSArray *windows = [[NSApp orderedDocuments] valueForKey:@"primaryWindow"];
- NSString *tabs = [[self primaryWindow] tabIndexesInWindows:windows];
- if (tabs)
- [setup setObject:tabs forKey:SKDocumentSetupTabsKey];
-
return setup;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|