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
(42) |
Dec
|
|
From: <ho...@us...> - 2025-10-24 22:13:01
|
Revision: 15706
http://sourceforge.net/p/skim-app/code/15706
Author: hofman
Date: 2025-10-24 22:13:00 +0000 (Fri, 24 Oct 2025)
Log Message:
-----------
get limits only when they are needed, get them from documentview framr
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2025-10-24 22:04:20 UTC (rev 15705)
+++ trunk/SKBasePDFView.m 2025-10-24 22:13:00 UTC (rev 15706)
@@ -395,7 +395,6 @@
NSScrollView *scrollView;
NSClipView *clipView = nil;
NSRect bounds = NSZeroRect;
- CGFloat bottom = 0.0;
PDFPage *page = nil;
// Apple scrolls by too much, so correct for it
@@ -403,8 +402,6 @@
scrollView = [self scrollView];
clipView = [[self scrollView] contentView];
bounds = [clipView bounds];
- NSView *docView = [self documentView];
- bottom = NSMinY([docView convertRect:[docView bounds] toView:clipView]);
} else if (([self displayMode] & kPDFDisplaySinglePageContinuous) == 0) {
page = [self currentPage];
}
@@ -415,6 +412,7 @@
// check whether our assumptions are still correct
if (clipView && [clipView isFlipped] == NO && NSMinY([clipView bounds]) < NSMinY(bounds)) {
CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
+ CGFloat bottom = NSMinY([[scrollView documentView] frame]);
bounds.origin.y = fmax(bottom, NSMinY(bounds) - (height < 10.0 ? height : height < 20.0 ? 10.0 : height - 10.0));
[clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
@@ -429,7 +427,6 @@
NSScrollView *scrollView;
NSClipView *clipView = nil;
NSRect bounds = NSZeroRect;
- CGFloat top = 0.0;
PDFPage *page = nil;
// Apple scrolls by too much, so correct for it
@@ -437,8 +434,6 @@
scrollView = [self scrollView];
clipView = [scrollView contentView];
bounds = [clipView bounds];
- NSView *docView = [self documentView];
- top = NSMaxY([docView convertRect:[docView bounds] toView:clipView]);
} else if (([self displayMode] & kPDFDisplaySinglePageContinuous) == 0) {
page = [self currentPage];
}
@@ -449,6 +444,7 @@
// check whether our assumptions are still correct
if (clipView && [clipView isFlipped] == NO && NSMinY([clipView bounds]) > NSMinY(bounds)) {
CGFloat height = NSHeight(bounds) - [clipView contentInsets].top;
+ CGFloat top = NSMaxY([[scrollView documentView] frame]);
bounds.origin.y = fmin(top - height, NSMinY(bounds) + (height < 10.0 ? height : height < 20.0 ? 10.0 : height - 10.0));
[clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-24 22:04:21
|
Revision: 15705
http://sourceforge.net/p/skim-app/code/15705
Author: hofman
Date: 2025-10-24 22:04:20 +0000 (Fri, 24 Oct 2025)
Log Message:
-----------
get lipview once
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2025-10-24 18:21:11 UTC (rev 15704)
+++ trunk/SKBasePDFView.m 2025-10-24 22:04:20 UTC (rev 15705)
@@ -401,7 +401,6 @@
// Apple scrolls by too much, so correct for it
if (hasVerticalLayout(self)) {
scrollView = [self scrollView];
- clipView = [scrollView contentView];
clipView = [[self scrollView] contentView];
bounds = [clipView bounds];
NSView *docView = [self documentView];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-24 18:21:15
|
Revision: 15704
http://sourceforge.net/p/skim-app/code/15704
Author: hofman
Date: 2025-10-24 18:21:11 +0000 (Fri, 24 Oct 2025)
Log Message:
-----------
add some comments
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2025-10-24 18:07:24 UTC (rev 15703)
+++ trunk/SKBasePDFView.m 2025-10-24 18:21:11 UTC (rev 15704)
@@ -390,6 +390,7 @@
[super goToDestination:destination];
}
+// this is bound to PageDown in PDFView
- (void)scrollPageUp:(id)sender {
NSScrollView *scrollView;
NSClipView *clipView = nil;
@@ -419,10 +420,12 @@
[clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
} else if (page && [[self currentPage] pageIndex] > [page pageIndex]) {
+ // Apple scrolls to the bottom of the next page rather than the top
[self verticallyScrollToTop];
}
}
+// this is bound to PageUp in PDFView
- (void)scrollPageDown:(id)sender {
NSScrollView *scrollView;
NSClipView *clipView = nil;
@@ -451,20 +454,25 @@
[clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
} else if (page && [[self currentPage] pageIndex] < [page pageIndex]) {
+ // Apple scrolls to the top of the next page rather than the bottom
[self verticallyScrollToBottom];
}
}
+// this is bound to ArrowDown in PDFView
- (void)scrollLineUp:(id)sender {
PDFPage *page = ([self displayMode] & kPDFDisplaySinglePageContinuous) ? nil : [self currentPage];
[super scrollLineUp:sender];
+ // Apple scrolls to the bottom of the next page rather than the top
if (page && [[self currentPage] pageIndex] > [page pageIndex])
[self verticallyScrollToTop];
}
+// this is bound to ArrowUp in PDFView
- (void)scrollLineDown:(id)sender {
PDFPage *page = ([self displayMode] & kPDFDisplaySinglePageContinuous) ? nil : [self currentPage];
[super scrollLineDown:sender];
+ // Apple scrolls to the top of the next page rather than the bottom
if (page && [[self currentPage] pageIndex] < [page pageIndex])
[self verticallyScrollToBottom];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-24 18:07:26
|
Revision: 15703
http://sourceforge.net/p/skim-app/code/15703
Author: hofman
Date: 2025-10-24 18:07:24 +0000 (Fri, 24 Oct 2025)
Log Message:
-----------
use contentInsets from clipView, fix offset in flipped case
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2025-10-24 17:30:53 UTC (rev 15702)
+++ trunk/SKBasePDFView.m 2025-10-24 18:07:24 UTC (rev 15703)
@@ -268,12 +268,10 @@
- (void)verticallyScrollToTop {
NSScrollView *scrollView = [self scrollView];
- CGFloat inset = [scrollView contentInsets].top;
NSClipView *clipView = [scrollView contentView];
NSRect bounds = [clipView bounds];
- NSView *docView = [scrollView documentView];
- NSRect docRect = [docView convertRect:[docView bounds] toView:clipView];
- inset = [self convertSize:NSMakeSize(0.0, inset) toView:clipView].height;
+ CGFloat inset = [clipView contentInsets].top;
+ NSRect docRect = [[scrollView documentView] frame];
if (NSHeight(docRect) <= NSHeight(bounds) - inset)
return;
if ([clipView isFlipped])
@@ -286,16 +284,14 @@
- (void)verticallyScrollToBottom {
NSScrollView *scrollView = [self scrollView];
- CGFloat inset = [scrollView contentInsets].top;
NSClipView *clipView = [scrollView contentView];
NSRect bounds = [clipView bounds];
- NSView *docView = [scrollView documentView];
- NSRect docRect = [docView convertRect:[docView bounds] toView:clipView];
- inset = [self convertSize:NSMakeSize(0.0, inset) toView:clipView].height;
+ CGFloat inset = [clipView contentInsets].top;
+ NSRect docRect = [[scrollView documentView] frame];
if (NSHeight(docRect) <= NSHeight(bounds) - inset)
return;
if ([clipView isFlipped])
- bounds.origin.y = NSMaxY(docRect) - NSHeight(bounds) - inset;
+ bounds.origin.y = NSMaxY(docRect) - NSHeight(bounds);
else
bounds.origin.y = NSMinY(docRect);
[clipView scrollToPoint:bounds.origin];
@@ -412,7 +408,7 @@
} else if (([self displayMode] & kPDFDisplaySinglePageContinuous) == 0) {
page = [self currentPage];
}
-
+
// always call super, as it also updates the current page
[super scrollPageUp:sender];
@@ -433,7 +429,7 @@
NSRect bounds = NSZeroRect;
CGFloat top = 0.0;
PDFPage *page = nil;
-
+
// Apple scrolls by too much, so correct for it
if (hasVerticalLayout(self)) {
scrollView = [self scrollView];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-24 17:30:54
|
Revision: 15702
http://sourceforge.net/p/skim-app/code/15702
Author: hofman
Date: 2025-10-24 17:30:53 +0000 (Fri, 24 Oct 2025)
Log Message:
-----------
Fix page navigation through scrolling, scroll to top of next page for Page/Line Down and to bottom of previous page for Page/Line Up (which are strangely bound to the opposite actions in PDFView)
Modified Paths:
--------------
trunk/SKBasePDFView.m
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2025-10-23 16:50:47 UTC (rev 15701)
+++ trunk/SKBasePDFView.m 2025-10-24 17:30:53 UTC (rev 15702)
@@ -266,6 +266,42 @@
[scrollView reflectScrolledClipView:clipView];
}
+- (void)verticallyScrollToTop {
+ NSScrollView *scrollView = [self scrollView];
+ CGFloat inset = [scrollView contentInsets].top;
+ NSClipView *clipView = [scrollView contentView];
+ NSRect bounds = [clipView bounds];
+ NSView *docView = [scrollView documentView];
+ NSRect docRect = [docView convertRect:[docView bounds] toView:clipView];
+ inset = [self convertSize:NSMakeSize(0.0, inset) toView:clipView].height;
+ if (NSHeight(docRect) <= NSHeight(bounds) - inset)
+ return;
+ if ([clipView isFlipped])
+ bounds.origin.y = NSMinY(docRect) - inset;
+ else
+ bounds.origin.y = NSMaxY(docRect) - NSHeight(bounds) + inset;
+ [clipView scrollToPoint:bounds.origin];
+ [scrollView reflectScrolledClipView:clipView];
+}
+
+- (void)verticallyScrollToBottom {
+ NSScrollView *scrollView = [self scrollView];
+ CGFloat inset = [scrollView contentInsets].top;
+ NSClipView *clipView = [scrollView contentView];
+ NSRect bounds = [clipView bounds];
+ NSView *docView = [scrollView documentView];
+ NSRect docRect = [docView convertRect:[docView bounds] toView:clipView];
+ inset = [self convertSize:NSMakeSize(0.0, inset) toView:clipView].height;
+ if (NSHeight(docRect) <= NSHeight(bounds) - inset)
+ return;
+ if ([clipView isFlipped])
+ bounds.origin.y = NSMaxY(docRect) - NSHeight(bounds) - inset;
+ else
+ bounds.origin.y = NSMinY(docRect);
+ [clipView scrollToPoint:bounds.origin];
+ [scrollView reflectScrolledClipView:clipView];
+}
+
- (void)goToPreviousPage:(id)sender {
if (hasHorizontalLayout(self) && [self canGoToPreviousPage]) {
PDFDocument *doc = [self document];
@@ -363,6 +399,7 @@
NSClipView *clipView = nil;
NSRect bounds = NSZeroRect;
CGFloat bottom = 0.0;
+ PDFPage *page = nil;
// Apple scrolls by too much, so correct for it
if (hasVerticalLayout(self)) {
@@ -372,6 +409,8 @@
bounds = [clipView bounds];
NSView *docView = [self documentView];
bottom = NSMinY([docView convertRect:[docView bounds] toView:clipView]);
+ } else if (([self displayMode] & kPDFDisplaySinglePageContinuous) == 0) {
+ page = [self currentPage];
}
// always call super, as it also updates the current page
@@ -383,6 +422,8 @@
bounds.origin.y = fmax(bottom, NSMinY(bounds) - (height < 10.0 ? height : height < 20.0 ? 10.0 : height - 10.0));
[clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
+ } else if (page && [[self currentPage] pageIndex] > [page pageIndex]) {
+ [self verticallyScrollToTop];
}
}
@@ -391,6 +432,7 @@
NSClipView *clipView = nil;
NSRect bounds = NSZeroRect;
CGFloat top = 0.0;
+ PDFPage *page = nil;
// Apple scrolls by too much, so correct for it
if (hasVerticalLayout(self)) {
@@ -399,6 +441,8 @@
bounds = [clipView bounds];
NSView *docView = [self documentView];
top = NSMaxY([docView convertRect:[docView bounds] toView:clipView]);
+ } else if (([self displayMode] & kPDFDisplaySinglePageContinuous) == 0) {
+ page = [self currentPage];
}
// always call super, as it also updates the current page
@@ -410,7 +454,23 @@
bounds.origin.y = fmin(top - height, NSMinY(bounds) + (height < 10.0 ? height : height < 20.0 ? 10.0 : height - 10.0));
[clipView scrollToPoint:bounds.origin];
[scrollView reflectScrolledClipView:clipView];
+ } else if (page && [[self currentPage] pageIndex] < [page pageIndex]) {
+ [self verticallyScrollToBottom];
}
}
+- (void)scrollLineUp:(id)sender {
+ PDFPage *page = ([self displayMode] & kPDFDisplaySinglePageContinuous) ? nil : [self currentPage];
+ [super scrollLineUp:sender];
+ if (page && [[self currentPage] pageIndex] > [page pageIndex])
+ [self verticallyScrollToTop];
+}
+
+- (void)scrollLineDown:(id)sender {
+ PDFPage *page = ([self displayMode] & kPDFDisplaySinglePageContinuous) ? nil : [self currentPage];
+ [super scrollLineDown:sender];
+ if (page && [[self currentPage] pageIndex] < [page pageIndex])
+ [self verticallyScrollToBottom];
+}
+
@end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-23 16:50:48
|
Revision: 15701
http://sourceforge.net/p/skim-app/code/15701
Author: hofman
Date: 2025-10-23 16:50:47 +0000 (Thu, 23 Oct 2025)
Log Message:
-----------
find recently closed bookmarks only when popuplating its submenu
Modified Paths:
--------------
trunk/SKBookmarkController.m
Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m 2025-10-23 16:31:28 UTC (rev 15700)
+++ trunk/SKBookmarkController.m 2025-10-23 16:50:47 UTC (rev 15701)
@@ -624,6 +624,13 @@
}
- (SKBookmark *)closedDocumentsBookmark {
+ if ([recentDocuments count] > [[[NSDocumentController sharedDocumentController] documents] count])
+ return [[SKBookmark alloc] initFolderWithChildren:nil label:NSLocalizedString(@"Recently Closed", @"Menu item title")];
+ else
+ return nil;
+}
+
+- (NSArray *)closedDocumentBookmarks {
NSArray *openFileURLs = [[[NSDocumentController sharedDocumentController] documents] valueForKey:@"fileURL"];
NSMutableArray *closedBms = [NSMutableArray array];
for (SKBookmark *aBm in recentDocuments) {
@@ -631,9 +638,7 @@
if (fileURL && ([closedBms count] > 0 || [openFileURLs containsObject:fileURL] == NO))
[closedBms addObject:aBm];
}
- if ([closedBms count] > 0)
- return [[SKBookmark alloc] initFolderWithChildren:closedBms label:NSLocalizedString(@"Recently Closed", @"Menu item title")];
- return nil;
+ return closedBms;
}
- (SKBookmark *)currentDocumentBookmark {
@@ -698,6 +703,10 @@
if ([bookmark isKindOfClass:[SKBookmark class]]) {
NSArray *bookmarks = [bookmark children];
+ if (tag == SKBookmarkTagClosedDocuments && [bookmarks count] == 0) {
+ bookmarks = [self closedDocumentBookmarks];
+ [bookmark insertChildren:bookmarks atIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [bookmarks count])]];
+ }
if (tag == SKBookmarkTagBookmarksMenu) {
NSInteger i = [menu numberOfItems];
while (i-- > 0 && ([[menu itemAtIndex:i] isSeparatorItem] || [[menu itemAtIndex:i] representedObject]))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-23 16:31:30
|
Revision: 15700
http://sourceforge.net/p/skim-app/code/15700
Author: hofman
Date: 2025-10-23 16:31:28 +0000 (Thu, 23 Oct 2025)
Log Message:
-----------
use tags for special bookmark items that are not yet in use
Modified Paths:
--------------
trunk/SKBookmarkController.m
Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m 2025-10-20 16:25:15 UTC (rev 15699)
+++ trunk/SKBookmarkController.m 2025-10-23 16:31:28 UTC (rev 15700)
@@ -656,7 +656,7 @@
}
enum {
- SKBookmarkTagBookmarksMenu = 1,
+ SKBookmarkTagBookmarksMenu = 10,
SKBookmarkTagPreviousSession,
SKBookmarkTagClosedDocuments,
SKBookmarkTagCurrentDocument,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-20 16:25:18
|
Revision: 15699
http://sourceforge.net/p/skim-app/code/15699
Author: hofman
Date: 2025-10-20 16:25:15 +0000 (Mon, 20 Oct 2025)
Log Message:
-----------
combine class extnsions
Modified Paths:
--------------
trunk/SKBookmarkController.m
Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m 2025-10-20 16:23:15 UTC (rev 15698)
+++ trunk/SKBookmarkController.m 2025-10-20 16:25:15 UTC (rev 15699)
@@ -105,9 +105,6 @@
- (void)endEditing;
- (void)startObservingBookmarks:(NSArray *)newBookmarks;
- (void)stopObservingBookmarks:(NSArray *)oldBookmarks;
-@end
-
-@interface SKBookmarkController ()
@property (nonatomic, readonly) NSUndoManager *undoManager;
@end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-20 16:23:19
|
Revision: 15698
http://sourceforge.net/p/skim-app/code/15698
Author: hofman
Date: 2025-10-20 16:23:15 +0000 (Mon, 20 Oct 2025)
Log Message:
-----------
use class extensions instead of Private category
Modified Paths:
--------------
trunk/SKBookmarkController.m
trunk/SKConversionProgressController.m
trunk/SKDisplayPreferences.m
trunk/SKInfoWindowController.m
trunk/SKMainDocument.m
trunk/SKMainToolbarController.m
trunk/SKMainTouchBarController.m
trunk/SKMainWindowController.m
trunk/SKNoteOutlineView.m
trunk/SKNoteToolbarController.m
trunk/SKNoteTypeSheetController.m
trunk/SKNoteWindowController.m
trunk/SKPDFView.m
trunk/SKSecondaryPDFView.m
trunk/SKSnapshotPDFView.m
trunk/SKSnapshotWindow.m
trunk/SKSyncDot.m
trunk/SKTypeSelectHelper.m
Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKBookmarkController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -98,7 +98,7 @@
static inline NSLayoutConstraint *trailingConstraint(NSView *view);
-@interface SKBookmarkController (SKPrivate)
+@interface SKBookmarkController ()
- (void)setupToolbar;
- (void)saveBookmarksData;
- (void)handleApplicationWillTerminateNotification:(NSNotification *)notification;
Modified: trunk/SKConversionProgressController.m
===================================================================
--- trunk/SKConversionProgressController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKConversionProgressController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -66,7 +66,7 @@
SKConversionFailed = 1
};
-@interface SKConversionProgressController (Private)
+@interface SKConversionProgressController ()
- (NSData *)newPDFDataFromURL:(NSURL *)aURL orData:(NSData *)aData ofType:(NSString *)aFileType error:(NSError **)outError;
- (void)conversionCompleted;
- (void)conversionStarted;
Modified: trunk/SKDisplayPreferences.m
===================================================================
--- trunk/SKDisplayPreferences.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKDisplayPreferences.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -52,7 +52,7 @@
static char SKDisplayPreferencesDefaultsObservationContext;
static char SKDisplayPreferencesColorSwatchObservationContext;
-@interface SKDisplayPreferences (Private)
+@interface SKDisplayPreferences ()
- (void)updateBackgroundColors;
@end
Modified: trunk/SKInfoWindowController.m
===================================================================
--- trunk/SKInfoWindowController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKInfoWindowController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -65,7 +65,7 @@
#define LABEL_COLUMN_ID @"label"
#define VALUE_COLUMN_ID @"value"
-@interface SKInfoWindowController (SKPrivate)
+@interface SKInfoWindowController ()
- (void)handleViewFrameDidChangeNotification:(NSNotification *)notification;
- (void)handleWindowDidBecomeMainNotification:(NSNotification *)notification;
- (void)handleWindowDidResignMainNotification:(NSNotification *)notification;
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKMainDocument.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -147,7 +147,7 @@
- (NSString *)passwordUsedForUnlocking;
@end
-@interface SKMainDocument (SKPrivate)
+@interface SKMainDocument ()
- (void)tryToUnlockDocument:(PDFDocument *)document;
Modified: trunk/SKMainToolbarController.m
===================================================================
--- trunk/SKMainToolbarController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKMainToolbarController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -140,7 +140,7 @@
#pragma mark -
-@interface SKMainToolbarController (SKPrivate)
+@interface SKMainToolbarController ()
- (void)handleColorSwatchFrameChangedNotification:(NSNotification *)notification;
- (void)updateColorsMenu:(NSMenu *)menu;
- (void)updatePaneItemToolTips;
Modified: trunk/SKMainTouchBarController.m
===================================================================
--- trunk/SKMainTouchBarController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKMainTouchBarController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -65,7 +65,7 @@
static NSString *noteToolImageNames[] = {@"TouchBarTextNotePopover", @"TouchBarAnchoredNotePopover", @"TouchBarCircleNotePopover", @"TouchBarSquareNotePopover", @"TouchBarHighlightNotePopover", @"TouchBarUnderlineNotePopover", @"TouchBarStrikeOutNotePopover", @"TouchBarLineNotePopover", @"TouchBarInkNotePopover"};
-@interface SKMainTouchBarController (SKPrivate)
+@interface SKMainTouchBarController ()
- (void)chooseColor:(id)sender;
- (void)goToPreviousNextPage:(id)sender;
@@ -78,7 +78,6 @@
- (void)togglePresentation:(id)sender;
- (void)registerForNotifications;
-- (void)unregisterForNotifications;
- (void)handlePageChangedNotification:(NSNotification *)notification;
- (void)handleToolModeChangedNotification:(NSNotification *)notification;
- (void)handleAnnotationModeChangedNotification:(NSNotification *)notification;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKMainWindowController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -182,7 +182,7 @@
#pragma mark -
-@interface SKMainWindowController (SKPrivate)
+@interface SKMainWindowController ()
- (void)cleanup;
Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKNoteOutlineView.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -56,7 +56,7 @@
#define RESIZE_EDGE_HEIGHT 5.0
-@interface SKNoteOutlineView (SKPrivate)
+@interface SKNoteOutlineView ()
@end
@implementation SKNoteOutlineView
Modified: trunk/SKNoteToolbarController.m
===================================================================
--- trunk/SKNoteToolbarController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKNoteToolbarController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -53,7 +53,7 @@
static char SKToolbarObservationContext;
-@interface SKNoteToolbarController (SKPrivate)
+@interface SKNoteToolbarController ()
- (void)updateSizeMode;
@end
Modified: trunk/SKNoteTypeSheetController.m
===================================================================
--- trunk/SKNoteTypeSheetController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKNoteTypeSheetController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -44,7 +44,7 @@
#define NOTETYPES_COUNT ([noteTypeMenu numberOfItems] - 3)
-@interface SKNoteTypeSheetController (Private)
+@interface SKNoteTypeSheetController ()
- (void)toggleDisplayNoteType:(id)sender;
- (void)displayAllNoteTypes:(id)sender;
- (void)selectNoteTypes:(id)sender;
Modified: trunk/SKNoteWindowController.m
===================================================================
--- trunk/SKNoteWindowController.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKNoteWindowController.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -78,7 +78,7 @@
#pragma mark -
-@interface SKNoteWindowController (SKPrivate)
+@interface SKNoteWindowController ()
+ (void)handleApplicationWillTerminate:(NSNotification *)notification;
- (void)handlePageLabelsChangedNotification:(NSNotification *)notification;
@end
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKPDFView.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -189,12 +189,10 @@
@end
@interface SKPDFView () <SKReadingBarDelegate, SKLayerDelegate, SKTextNoteEditorDelegate>
+
@property (strong) SKReadingBar *readingBar;
@property (strong) SKSyncDot *syncDot;
-@end
-@interface SKPDFView (Private)
-
- (void)editTextNoteWithEvent:(NSEvent *)theEvent;
- (BOOL)isEditingAnnotation:(PDFAnnotation *)annotation;
@@ -227,7 +225,6 @@
- (void)doResizeReadingBarWithEvent:(NSEvent *)theEvent;
- (void)doMarqueeZoomWithEvent:(NSEvent *)theEvent;
- (BOOL)doDragMouseWithEvent:(NSEvent *)theEvent;
-- (BOOL)doDragTextWithEvent:(NSEvent *)theEvent;
- (void)setCursorForMouse:(NSEvent *)theEvent;
- (void)showHelpMenu;
Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKSecondaryPDFView.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -57,7 +57,7 @@
- (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard types:(NSArray *)types;
@end
-@interface SKSecondaryPDFView (SKPrivate)
+@interface SKSecondaryPDFView ()
- (void)reloadPagePopUpButton;
- (void)makeControls;
Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKSnapshotPDFView.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -51,7 +51,7 @@
#import "SKPDFView.h"
-@interface SKSnapshotPDFView (SKPrivate)
+@interface SKSnapshotPDFView ()
- (void)resetAutoFitRectIfNeeded;
Modified: trunk/SKSnapshotWindow.m
===================================================================
--- trunk/SKSnapshotWindow.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKSnapshotWindow.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -40,7 +40,7 @@
#import "SKSnapshotWindowController.h"
-@interface NSWindow (SKPrivate)
+@interface NSWindow (SKPrivateDeclarations)
- (id)_updateButtonsForModeChanged;
@end
Modified: trunk/SKSyncDot.m
===================================================================
--- trunk/SKSyncDot.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKSyncDot.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -41,7 +41,7 @@
#import "NSShadow_SKExtensions.h"
-@interface SKSyncDot (SKPrivate)
+@interface SKSyncDot ()
- (void)finish;
- (void)animate;
@end
Modified: trunk/SKTypeSelectHelper.m
===================================================================
--- trunk/SKTypeSelectHelper.m 2025-10-16 15:39:04 UTC (rev 15697)
+++ trunk/SKTypeSelectHelper.m 2025-10-20 16:23:15 UTC (rev 15698)
@@ -49,7 +49,7 @@
#pragma mark -
-@interface SKTypeSelectHelper (SKPrivate)
+@interface SKTypeSelectHelper ()
- (NSTextView *)editor;
- (void)searchWithEvent:(NSEvent *)keyEvent;
- (void)repeatSearch;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-16 15:39:06
|
Revision: 15697
http://sourceforge.net/p/skim-app/code/15697
Author: hofman
Date: 2025-10-16 15:39:04 +0000 (Thu, 16 Oct 2025)
Log Message:
-----------
remove unused ivar
Modified Paths:
--------------
trunk/SKFindController.h
Modified: trunk/SKFindController.h
===================================================================
--- trunk/SKFindController.h 2025-10-16 15:34:06 UTC (rev 15696)
+++ trunk/SKFindController.h 2025-10-16 15:39:04 UTC (rev 15697)
@@ -49,7 +49,6 @@
NSButton *doneButton;
NSSegmentedControl *navigationButton;
NSLayoutConstraint *topConstraint;
- NSObjectController *ownerController;
NSString *findString;
NSInteger lastChangeCount;
BOOL didChange;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-16 15:34:08
|
Revision: 15696
http://sourceforge.net/p/skim-app/code/15696
Author: hofman
Date: 2025-10-16 15:34:06 +0000 (Thu, 16 Oct 2025)
Log Message:
-----------
mainController is not an IBOutlet
Modified Paths:
--------------
trunk/SKMainToolbarController.h
trunk/SKSideViewController.h
Modified: trunk/SKMainToolbarController.h
===================================================================
--- trunk/SKMainToolbarController.h 2025-10-09 16:27:06 UTC (rev 15695)
+++ trunk/SKMainToolbarController.h 2025-10-16 15:34:06 UTC (rev 15696)
@@ -95,12 +95,13 @@
NSMutableDictionary<NSString *, NSToolbarItem *> *toolbarItems;
}
-@property (nonatomic, nullable, weak) IBOutlet SKMainWindowController *mainController;
@property (nonatomic, nullable, strong) IBOutlet NSSegmentedControl *backForwardButton, *previousNextPageButton, *previousPageButton, *nextPageButton, *previousNextFirstLastPageButton, *zoomInOutButton, *zoomInActualOutButton, *zoomActualButton, *zoomFitButton, *zoomSelectionButton, *autoScalesButton, *rotateLeftButton, *rotateRightButton, *rotateLeftRightButton, *cropButton, *fullScreenButton, *presentationButton, *leftPaneButton, *rightPaneButton, *splitPDFButton, *toolModeButton, *textNoteButton, *circleNoteButton, *markupNoteButton, *lineNoteButton, *singleTwoUpButton, *continuousButton, *displayModeButton, *displayDirectionButton, *displaysRTLButton, *bookModeButton, *pageBreaksButton, *displayBoxButton, *infoButton, *colorsButton, *fontsButton, *linesButton, *printButton, *noteButton, *notesButton, *pacerButton, *shareButton;
@property (nonatomic, nullable, strong) IBOutlet NSTextField *pageNumberField, *scaleField, *pacerSpeedField;
@property (nonatomic, nullable, strong) IBOutlet SKColorSwatch *colorSwatch;
@property (nonatomic, nullable, strong) IBOutlet NSStepper *pacerSpeedStepper;
+@property (nonatomic, nullable, weak) SKMainWindowController *mainController;
+
- (void)setupToolbar;
- (void)registerForNotifications;
Modified: trunk/SKSideViewController.h
===================================================================
--- trunk/SKSideViewController.h 2025-10-09 16:27:06 UTC (rev 15695)
+++ trunk/SKSideViewController.h 2025-10-16 15:34:06 UTC (rev 15696)
@@ -53,7 +53,6 @@
BOOL isAnimating;
}
-@property (nonatomic, nullable, weak) IBOutlet SKMainWindowController *mainController;
@property (nonatomic, nullable, strong) IBOutlet SKTopBarView *topBar;
@property (nonatomic, nullable, strong) IBOutlet NSLayoutConstraint *topConstraint;
@property (nonatomic, nullable, strong) IBOutlet NSSegmentedControl *button, *alternateButton;
@@ -60,6 +59,8 @@
@property (nonatomic, nullable, strong) IBOutlet NSSearchField *searchField;
@property (nonatomic, nullable, strong) IBOutlet NSView *currentView;
+@property (nonatomic, nullable, weak) SKMainWindowController *mainController;
+
@property (nonatomic) CGFloat topInset;
@property (weak, nonatomic, readonly) NSArray<NSTableView *> *tableViews;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-09 16:27:09
|
Revision: 15695
http://sourceforge.net/p/skim-app/code/15695
Author: hofman
Date: 2025-10-09 16:27:06 +0000 (Thu, 09 Oct 2025)
Log Message:
-----------
make attachment emailer a subclass of NSSharingService, rathr than faking one
Modified Paths:
--------------
trunk/SKAttachmentEmailer.h
trunk/SKAttachmentEmailer.m
trunk/SKShareMenuController.m
Modified: trunk/SKAttachmentEmailer.h
===================================================================
--- trunk/SKAttachmentEmailer.h 2025-10-09 15:34:18 UTC (rev 15694)
+++ trunk/SKAttachmentEmailer.h 2025-10-09 16:27:06 UTC (rev 15695)
@@ -40,36 +40,16 @@
NS_ASSUME_NONNULL_BEGIN
-@protocol SKAttachmentEmailerDelegate;
-@interface SKAttachmentEmailer : NSObject {
+@interface SKAttachmentEmailer : NSSharingService {
NSString *mailAppID;
- __weak id<SKAttachmentEmailerDelegate> delegate;
NSString *subject;
}
+- (instancetype)init NS_DESIGNATED_INITIALIZER;
+
@property (nonatomic, readonly) BOOL permissionToComposeMessage;
-@property (nonatomic, readonly) NSString *title;
-@property (nonatomic, readonly) NSImage *image;
-@property (nonatomic, nullable, weak) id<SKAttachmentEmailerDelegate> delegate;
-
-@property (nonatomic, nullable, strong) NSString *subject;
-
-- (BOOL)canPerformWithItems:(NSArray *)items;
-- (void)performWithItems:(NSArray *)items;
-
@end
-#pragma mark -
-
-@protocol SKAttachmentEmailerDelegate <NSObject>
-
-@optional
-
-- (void)sharingService:(id)sharingService didShareItems:(NSArray *)items;
-- (void)sharingService:(id)sharingService didFailToShareItems:(NSArray *)items error:(NSError *)error;
-
-@end
-
NS_ASSUME_NONNULL_END
Modified: trunk/SKAttachmentEmailer.m
===================================================================
--- trunk/SKAttachmentEmailer.m 2025-10-09 15:34:18 UTC (rev 15694)
+++ trunk/SKAttachmentEmailer.m 2025-10-09 16:27:06 UTC (rev 15695)
@@ -46,30 +46,39 @@
@implementation SKAttachmentEmailer
-@synthesize delegate, subject;
-@dynamic title, image;
-
- (instancetype)init {
- self = [super init];
+ NSURL *appURL = [[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:[NSURL URLWithString:@"mailto://"]];
+ NSString *appID = nil;
+ if (appURL)
+ appID = [[NSBundle bundleWithURL:appURL] bundleIdentifier];
+ else
+ appID = @"com.apple.Mail";
+ if ([@"com.microsoft.entourage" isCaseInsensitiveEqual:appID] == NO &&
+ [@"com.microsoft.outlook" isCaseInsensitiveEqual:appID] == NO &&
+ [@"com.barebones.mailsmith" isCaseInsensitiveEqual:appID] == NO &&
+ [@"com.mailplaneapp.Mailplane" isCaseInsensitiveEqual:appID] == NO &&
+ [@"com.postbox-inc.postboxexpress" isCaseInsensitiveEqual:appID] == NO &&
+ [@"com.postbox-inc.postbox" isCaseInsensitiveEqual:appID] == NO &&
+ [@"com.apple.Mail" isCaseInsensitiveEqual:appID] == NO)
+ appID = @"com.apple.Mail";
+ NSString *appPath = [[[NSWorkspace sharedWorkspace] URLForApplicationWithBundleIdentifier:appID] path];
+ NSString *title = [[[NSFileManager defaultManager] displayNameAtPath:appPath] stringByDeletingPathExtension];
+ NSImage *image = [NSImage imageWithSize:NSMakeSize(16.0, 16.0) drawingHandler:^(NSRect dstRect){
+ NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:appPath];
+ [icon drawInRect:dstRect];
+ return YES;
+ }];
+ self = [super initWithTitle:title image:image alternateImage:nil handler:^{}];
if (self) {
- NSURL *appURL = [[NSWorkspace sharedWorkspace] URLForApplicationToOpenURL:[NSURL URLWithString:@"mailto://"]];
- if (appURL)
- mailAppID = [[NSBundle bundleWithURL:appURL] bundleIdentifier];
- else
- mailAppID = @"com.apple.Mail";
- if ([@"com.microsoft.entourage" isCaseInsensitiveEqual:mailAppID] == NO &&
- [@"com.microsoft.outlook" isCaseInsensitiveEqual:mailAppID] == NO &&
- [@"com.barebones.mailsmith" isCaseInsensitiveEqual:mailAppID] == NO &&
- [@"com.mailplaneapp.Mailplane" isCaseInsensitiveEqual:mailAppID] == NO &&
- [@"com.postbox-inc.postboxexpress" isCaseInsensitiveEqual:mailAppID] == NO &&
- [@"com.postbox-inc.postbox" isCaseInsensitiveEqual:mailAppID] == NO &&
- [@"com.apple.Mail" isCaseInsensitiveEqual:mailAppID] == NO) {
- mailAppID = @"com.apple.Mail";
- }
+ mailAppID = appID;
}
return self;
}
+- (instancetype)initWithTitle:(NSString *)title image:(NSImage *)image alternateImage:(NSImage *)alternateImage handler:(void (^)(void))block {
+ return [self init];
+}
+
- (BOOL)permissionToComposeMessage {
#if !SDK_BEFORE_10_14
if (@available(macOS 10.14, *)) {
@@ -80,21 +89,6 @@
return YES;
}
-- (NSString *)title {
- NSString *appPath = [[[NSWorkspace sharedWorkspace] URLForApplicationWithBundleIdentifier:mailAppID] path];
- return [[[NSFileManager defaultManager] displayNameAtPath:appPath] stringByDeletingPathExtension];
-}
-
-- (NSImage *)image {
- NSString *appPath = [[[NSWorkspace sharedWorkspace] URLForApplicationWithBundleIdentifier:mailAppID] path];
- NSImage *image = [NSImage imageWithSize:NSMakeSize(16.0, 16.0) drawingHandler:^(NSRect dstRect){
- NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:appPath];
- [icon drawInRect:dstRect];
- return YES;
- }];
- return image;
-}
-
- (BOOL)canPerformWithItems:(NSArray *)items {
return [items count] == 1 && [[items firstObject] isKindOfClass:[NSURL class]] && [[items firstObject] isFileURL];
}
@@ -159,6 +153,8 @@
static dispatch_queue_t queue = NULL;
if (queue == NULL)
queue = dispatch_queue_create("net.sourceforge.skim-app.queue.NSAppleScript", DISPATCH_QUEUE_SERIAL);
+ if ([[self delegate] respondsToSelector:@selector(sharingService:willShareItems:)])
+ [[self delegate] sharingService:(id)self willShareItems:items];
dispatch_async(queue, ^{
NSDictionary *errorDict = nil;
BOOL success = [script compileAndReturnError:&errorDict];
Modified: trunk/SKShareMenuController.m
===================================================================
--- trunk/SKShareMenuController.m 2025-10-09 15:34:18 UTC (rev 15694)
+++ trunk/SKShareMenuController.m 2025-10-09 16:27:06 UTC (rev 15695)
@@ -81,7 +81,7 @@
[menu addItemWithTitle:NSLocalizedString(@"No Document", @"Menu item title") action:NULL keyEquivalent:@""];
} else {
for (NSSharingService *service in services) {
- NSMenuItem *item = [menu addItemWithTitle:[service title] action:@selector(share:) target:doc];
+ NSMenuItem *item = [menu addItemWithTitle:[service menuItemTitle] action:@selector(share:) target:doc];
[item setRepresentedObject:service];
[item setImage:[service image]];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-09 15:34:20
|
Revision: 15694
http://sourceforge.net/p/skim-app/code/15694
Author: hofman
Date: 2025-10-09 15:34:18 +0000 (Thu, 09 Oct 2025)
Log Message:
-----------
override designated initializer
Modified Paths:
--------------
trunk/SKImageToolTipWindow.m
Modified: trunk/SKImageToolTipWindow.m
===================================================================
--- trunk/SKImageToolTipWindow.m 2025-10-09 15:29:21 UTC (rev 15693)
+++ trunk/SKImageToolTipWindow.m 2025-10-09 15:34:18 UTC (rev 15694)
@@ -68,9 +68,9 @@
return sharedToolTipWindow;
}
-- (instancetype)init {
+- (instancetype)initWithContentRect:(NSRect)contentRect {
if (sharedToolTipWindow) NSLog(@"Attempt to allocate second instance of %@", self);
- self = [self initWithContentRect:NSZeroRect];
+ self = [super initWithContentRect:contentRect];
if (self) {
[self setHidesOnDeactivate:NO];
[self setIgnoresMouseEvents:YES];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-09 15:29:22
|
Revision: 15693
http://sourceforge.net/p/skim-app/code/15693
Author: hofman
Date: 2025-10-09 15:29:21 +0000 (Thu, 09 Oct 2025)
Log Message:
-----------
implement all designated initializers of button cell subclasses
Modified Paths:
--------------
trunk/SKFontWell.m
Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m 2025-10-08 14:47:43 UTC (rev 15692)
+++ trunk/SKFontWell.m 2025-10-09 15:29:21 UTC (rev 15693)
@@ -396,13 +396,21 @@
}
- (instancetype)initTextCell:(NSString *)aString {
- self = [super initTextCell:aString];
+ self = [super initTextCell:aString];
if (self) {
- [self commonInit];
- }
- return self;
+ [self commonInit];
+ }
+ return self;
}
+- (instancetype)initImageCell:(NSImage *)anImage {
+ self = [super initImageCell:anImage];
+ if (self) {
+ [self commonInit];
+ }
+ return self;
+}
+
- (instancetype)initWithCoder:(NSCoder *)decoder {
self = [super initWithCoder:decoder];
if (self) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-08 14:47:46
|
Revision: 15692
http://sourceforge.net/p/skim-app/code/15692
Author: hofman
Date: 2025-10-08 14:47:43 +0000 (Wed, 08 Oct 2025)
Log Message:
-----------
allow nil parent undomanager
Modified Paths:
--------------
trunk/SKChainedUndoManager.h
trunk/SKChainedUndoManager.m
Modified: trunk/SKChainedUndoManager.h
===================================================================
--- trunk/SKChainedUndoManager.h 2025-10-08 14:26:06 UTC (rev 15691)
+++ trunk/SKChainedUndoManager.h 2025-10-08 14:47:43 UTC (rev 15692)
@@ -43,8 +43,7 @@
@interface SKChainedUndoManager : NSUndoManager {
NSUndoManager *nextUndoManager;
}
-- (instancetype)initWithNextUndoManager:(NSUndoManager *)undoManager NS_DESIGNATED_INITIALIZER;
-- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithNextUndoManager:(nullable NSUndoManager *)undoManager NS_DESIGNATED_INITIALIZER;
@end
NS_ASSUME_NONNULL_END
Modified: trunk/SKChainedUndoManager.m
===================================================================
--- trunk/SKChainedUndoManager.m 2025-10-08 14:26:06 UTC (rev 15691)
+++ trunk/SKChainedUndoManager.m 2025-10-08 14:47:43 UTC (rev 15692)
@@ -49,6 +49,10 @@
return self;
}
+- (instancetype)init {
+ return [self initWithNextUndoManager:nil];
+}
+
- (NSString *)redoMenuItemTitle {
return [nextUndoManager canRedo] ? [nextUndoManager redoMenuItemTitle] : [super redoMenuItemTitle];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-08 14:26:07
|
Revision: 15691
http://sourceforge.net/p/skim-app/code/15691
Author: hofman
Date: 2025-10-08 14:26:06 +0000 (Wed, 08 Oct 2025)
Log Message:
-----------
return type of initWithFileName: is nullable
Modified Paths:
--------------
trunk/SKPDFSynchronizer.h
Modified: trunk/SKPDFSynchronizer.h
===================================================================
--- trunk/SKPDFSynchronizer.h 2025-10-08 14:05:42 UTC (rev 15690)
+++ trunk/SKPDFSynchronizer.h 2025-10-08 14:26:06 UTC (rev 15691)
@@ -93,7 +93,7 @@
@protocol SKSyncParser <NSObject>
-- (instancetype)initWithFileName:(NSString *)fileName;
+- (nullable instancetype)initWithFileName:(NSString *)fileName;
@property (nonatomic, nullable, readonly) NSString *syncFileName;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-08 14:05:45
|
Revision: 15690
http://sourceforge.net/p/skim-app/code/15690
Author: hofman
Date: 2025-10-08 14:05:42 +0000 (Wed, 08 Oct 2025)
Log Message:
-----------
remove test log
Modified Paths:
--------------
trunk/SKApplicationController.m
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2025-10-08 14:03:36 UTC (rev 15689)
+++ trunk/SKApplicationController.m 2025-10-08 14:05:42 UTC (rev 15690)
@@ -222,7 +222,6 @@
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
- NSLog(@"%@", [[NSFileManager defaultManager] uniqueChewableItemsDirectoryURL]);
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
if (didReopen == NO && [sud integerForKey:SKReopenLastOpenFilesKey] == SKReopenOnDefaultLaunch && [[[aNotification userInfo] objectForKey:NSApplicationLaunchIsDefaultLaunchKey] boolValue])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-08 14:03:39
|
Revision: 15689
http://sourceforge.net/p/skim-app/code/15689
Author: hofman
Date: 2025-10-08 14:03:36 +0000 (Wed, 08 Oct 2025)
Log Message:
-----------
Make initWithContentRect: and initWithView: designated initializers for bborderless and HUD windows resp.
Modified Paths:
--------------
trunk/SKAnimatedBorderlessWindow.h
trunk/SKAnimatedBorderlessWindow.m
trunk/SKNavigationWindow.h
trunk/SKNavigationWindow.m
Modified: trunk/SKAnimatedBorderlessWindow.h
===================================================================
--- trunk/SKAnimatedBorderlessWindow.h 2025-10-08 09:43:15 UTC (rev 15688)
+++ trunk/SKAnimatedBorderlessWindow.h 2025-10-08 14:03:36 UTC (rev 15689)
@@ -45,7 +45,7 @@
NSTimeInterval autoHideTimeInterval;
}
-- (instancetype)initWithContentRect:(NSRect)contentRect;
+- (instancetype)initWithContentRect:(NSRect)contentRect NS_DESIGNATED_INITIALIZER;
@property (nonatomic) CGFloat defaultAlphaValue;
@property (nonatomic) NSTimeInterval autoHideTimeInterval;
Modified: trunk/SKAnimatedBorderlessWindow.m
===================================================================
--- trunk/SKAnimatedBorderlessWindow.m 2025-10-08 09:43:15 UTC (rev 15688)
+++ trunk/SKAnimatedBorderlessWindow.m 2025-10-08 14:03:36 UTC (rev 15689)
@@ -52,7 +52,7 @@
@synthesize defaultAlphaValue, autoHideTimeInterval;
@dynamic fadeInDuration, fadeOutDuration;
-- (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)style backing:(NSBackingStoreType)backingStoreType defer:(BOOL)flag {
+- (instancetype)initWithContentRect:(NSRect)contentRect {
self = [super initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO];
if (self) {
defaultAlphaValue = ALPHA_VALUE;
@@ -68,8 +68,8 @@
return self;
}
-- (instancetype)initWithContentRect:(NSRect)contentRect {
- return [self initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO];
+- (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)style backing:(NSBackingStoreType)backingStoreType defer:(BOOL)flag {
+ return [self initWithContentRect:contentRect];
}
- (void)dealloc {
Modified: trunk/SKNavigationWindow.h
===================================================================
--- trunk/SKNavigationWindow.h 2025-10-08 09:43:15 UTC (rev 15688)
+++ trunk/SKNavigationWindow.h 2025-10-08 14:03:36 UTC (rev 15689)
@@ -59,7 +59,8 @@
SKNavigationButton *closeButton;
SKNavigationToolTipWindow *toolTipWindow;
}
-- (instancetype)initWithView:(SKPresentationView *)pdfView;
+- (instancetype)initWithView:(SKPresentationView *)pdfView NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithContentRect:(NSRect)contentRect NS_UNAVAILABLE;
- (void)handleAutoScalesChangedNotification:(NSNotification *)notification;
- (void)handlePageChangedNotification:(NSNotification *)notification;
- (SKNavigationToolTipWindow *)toolTipWindowCreating:(BOOL)create;
@@ -72,7 +73,8 @@
NSSegmentedControl *drawButton;
NSSegmentedControl *closeButton;
}
-- (instancetype)initWithView:(SKPresentationView *)pdfView;
+- (instancetype)initWithView:(SKPresentationView *)pdfView NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithContentRect:(NSRect)contentRect NS_UNAVAILABLE;
- (void)selectCursorStyle:(NSInteger)style;
- (void)removeShadow:(BOOL)removeShadow;
@end
Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m 2025-10-08 09:43:15 UTC (rev 15688)
+++ trunk/SKNavigationWindow.m 2025-10-08 14:03:36 UTC (rev 15689)
@@ -74,7 +74,7 @@
@implementation SKHUDWindow
- (instancetype)initWithContentRect:(NSRect)contentRect {
- self = [self initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO];
+ self = [super initWithContentRect:contentRect];
if (self) {
[self setIgnoresMouseEvents:NO];
[self setDisplaysWhenScreenProfileChanges:YES];
@@ -144,7 +144,7 @@
NSScreen *screen = [[presentationView window] screen] ?: [NSScreen mainScreen];
CGFloat width = 5 * BUTTON_WIDTH + 3 * SEP_WIDTH + 2 * BUTTON_MARGIN;
NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 0.5 * width, NSMinY([screen frame]) + WINDOW_OFFSET, width, BUTTON_HEIGHT + 2 * BUTTON_MARGIN);
- self = [self initWithContentRect:contentRect];
+ self = [super initWithContentRect:contentRect];
if (self) {
[self setLevel:[[presentationView window] level]];
@@ -256,8 +256,8 @@
- (instancetype)initWithView:(SKPresentationView *)presentationView {
NSScreen *screen = [[presentationView window] screen] ?: [NSScreen mainScreen];
- NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 212.0, NSMinY([screen frame]) + WINDOW_OFFSET, 424.0, 38.0);
- self = [self initWithContentRect:contentRect];
+ NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 300.0, NSMinY([screen frame]) + WINDOW_OFFSET, 600.0, 38.0);
+ self = [super initWithContentRect:contentRect];
if (self) {
[self setLevel:[[presentationView window] level]];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-08 09:43:18
|
Revision: 15688
http://sourceforge.net/p/skim-app/code/15688
Author: hofman
Date: 2025-10-08 09:43:15 +0000 (Wed, 08 Oct 2025)
Log Message:
-----------
Default initialization in designated initializer of window, as we cannot call super in convenience initializers.
Modified Paths:
--------------
trunk/SKAnimatedBorderlessWindow.m
trunk/SKApplicationController.m
trunk/SKNavigationWindow.h
trunk/SKNavigationWindow.m
Modified: trunk/SKAnimatedBorderlessWindow.m
===================================================================
--- trunk/SKAnimatedBorderlessWindow.m 2025-10-07 15:56:59 UTC (rev 15687)
+++ trunk/SKAnimatedBorderlessWindow.m 2025-10-08 09:43:15 UTC (rev 15688)
@@ -52,15 +52,14 @@
@synthesize defaultAlphaValue, autoHideTimeInterval;
@dynamic fadeInDuration, fadeOutDuration;
-- (instancetype)initWithContentRect:(NSRect)contentRect {
- self = [self initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO];
+- (instancetype)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)style backing:(NSBackingStoreType)backingStoreType defer:(BOOL)flag {
+ self = [super initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO];
if (self) {
defaultAlphaValue = ALPHA_VALUE;
autoHideTimeInterval = AUTO_HIDE_TIME_INTERVAL;
-
+ [self setAlphaValue:[self defaultAlphaValue]];
[self setBackgroundColor:[NSColor clearColor]];
- [self setOpaque:NO];
- [self setAlphaValue:[self defaultAlphaValue]];
+ [self setOpaque:NO];
[self setReleasedWhenClosed:NO];
[self setHidesOnDeactivate:NO];
[self setAnimationBehavior:NSWindowAnimationBehaviorNone];
@@ -69,6 +68,10 @@
return self;
}
+- (instancetype)initWithContentRect:(NSRect)contentRect {
+ return [self initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO];
+}
+
- (void)dealloc {
[self stopAnimation];
}
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2025-10-07 15:56:59 UTC (rev 15687)
+++ trunk/SKApplicationController.m 2025-10-08 09:43:15 UTC (rev 15688)
@@ -222,6 +222,7 @@
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification{
+ NSLog(@"%@", [[NSFileManager defaultManager] uniqueChewableItemsDirectoryURL]);
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
if (didReopen == NO && [sud integerForKey:SKReopenLastOpenFilesKey] == SKReopenOnDefaultLaunch && [[[aNotification userInfo] objectForKey:NSApplicationLaunchIsDefaultLaunchKey] boolValue])
Modified: trunk/SKNavigationWindow.h
===================================================================
--- trunk/SKNavigationWindow.h 2025-10-07 15:56:59 UTC (rev 15687)
+++ trunk/SKNavigationWindow.h 2025-10-08 09:43:15 UTC (rev 15688)
@@ -44,7 +44,6 @@
@class SKPresentationView, SKNavigationToolTipView, SKNavigationButton;
@interface SKHUDWindow : SKAnimatedBorderlessWindow
-- (instancetype)initWithView:(SKPresentationView *)pdfView;
- (void)showForWindow:(NSWindow *)window;
- (void)handleParentWindowDidResizeNotification:(NSNotification *)notification;
@end
@@ -60,6 +59,7 @@
SKNavigationButton *closeButton;
SKNavigationToolTipWindow *toolTipWindow;
}
+- (instancetype)initWithView:(SKPresentationView *)pdfView;
- (void)handleAutoScalesChangedNotification:(NSNotification *)notification;
- (void)handlePageChangedNotification:(NSNotification *)notification;
- (SKNavigationToolTipWindow *)toolTipWindowCreating:(BOOL)create;
@@ -72,6 +72,7 @@
NSSegmentedControl *drawButton;
NSSegmentedControl *closeButton;
}
+- (instancetype)initWithView:(SKPresentationView *)pdfView;
- (void)selectCursorStyle:(NSInteger)style;
- (void)removeShadow:(BOOL)removeShadow;
@end
Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m 2025-10-07 15:56:59 UTC (rev 15687)
+++ trunk/SKNavigationWindow.m 2025-10-08 09:43:15 UTC (rev 15688)
@@ -73,16 +73,11 @@
@implementation SKHUDWindow
-- (instancetype)initWithView:(SKPresentationView *)presentationView {
- NSScreen *screen = [[presentationView window] screen] ?: [NSScreen mainScreen];
- CGFloat width = 5 * BUTTON_WIDTH + 3 * SEP_WIDTH + 2 * BUTTON_MARGIN;
- NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 0.5 * width, NSMinY([screen frame]) + WINDOW_OFFSET, width, BUTTON_HEIGHT + 2 * BUTTON_MARGIN);
- self = [self initWithContentRect:contentRect];
+- (instancetype)initWithContentRect:(NSRect)contentRect {
+ self = [self initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO];
if (self) {
-
[self setIgnoresMouseEvents:NO];
[self setDisplaysWhenScreenProfileChanges:YES];
- [self setLevel:[[presentationView window] level]];
[self setMovableByWindowBackground:YES];
contentRect.origin = NSZeroPoint;
@@ -97,7 +92,6 @@
if (@available(macOS 10.14, *))
[self setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]];
-
}
return self;
}
@@ -147,8 +141,12 @@
@implementation SKNavigationWindow
- (instancetype)initWithView:(SKPresentationView *)presentationView {
- self = [super initWithView:presentationView];
+ NSScreen *screen = [[presentationView window] screen] ?: [NSScreen mainScreen];
+ CGFloat width = 5 * BUTTON_WIDTH + 3 * SEP_WIDTH + 2 * BUTTON_MARGIN;
+ NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 0.5 * width, NSMinY([screen frame]) + WINDOW_OFFSET, width, BUTTON_HEIGHT + 2 * BUTTON_MARGIN);
+ self = [self initWithContentRect:contentRect];
if (self) {
+ [self setLevel:[[presentationView window] level]];
NSRect rect = NSMakeRect(BUTTON_MARGIN, BUTTON_MARGIN, BUTTON_WIDTH, BUTTON_HEIGHT);
previousButton = [[SKNavigationButton alloc] initWithFrame:rect];
@@ -257,8 +255,11 @@
@implementation SKCursorStyleWindow
- (instancetype)initWithView:(SKPresentationView *)presentationView {
- self = [super initWithView:presentationView];
+ NSScreen *screen = [[presentationView window] screen] ?: [NSScreen mainScreen];
+ NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 212.0, NSMinY([screen frame]) + WINDOW_OFFSET, 424.0, 38.0);
+ self = [self initWithContentRect:contentRect];
if (self) {
+ [self setLevel:[[presentationView window] level]];
NSRect rect;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-07 15:57:01
|
Revision: 15687
http://sourceforge.net/p/skim-app/code/15687
Author: hofman
Date: 2025-10-07 15:56:59 +0000 (Tue, 07 Oct 2025)
Log Message:
-----------
sharing service name is optional
Modified Paths:
--------------
trunk/Skim.sdef
Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef 2025-10-07 15:46:39 UTC (rev 15686)
+++ trunk/Skim.sdef 2025-10-07 15:56:59 UTC (rev 15687)
@@ -605,10 +605,10 @@
<command name="share" code="SKIMShar"
description="Share a document using a service.">
- <direct-parameter type="document" optional="yes"
+ <direct-parameter type="document"
description="The document to share."/>
- <parameter name="using" code="Usng" type="text"
- description="The name of the service to use.">
+ <parameter name="using" code="Usng" type="text" optional="yes"
+ description="The name of the service to use. Composes an email when missing.">
<cocoa key="Service"/>
</parameter>
</command>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-07 15:46:41
|
Revision: 15686
http://sourceforge.net/p/skim-app/code/15686
Author: hofman
Date: 2025-10-07 15:46:39 +0000 (Tue, 07 Oct 2025)
Log Message:
-----------
make service name optional in share command, default to mail
Modified Paths:
--------------
trunk/NSDocument_SKExtensions.m
trunk/SKMainDocument.m
trunk/Skim.sdef
Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m 2025-10-07 15:26:04 UTC (rev 15685)
+++ trunk/NSDocument_SKExtensions.m 2025-10-07 15:46:39 UTC (rev 15686)
@@ -430,12 +430,6 @@
}
- (void)handleShareScriptCommand:(NSScriptCommand *)command {
- NSString *name = [[command evaluatedArguments] objectForKey:@"Service"];
- if (name == nil) {
- [command setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
- return;
- }
-
NSURL *fileURL = [self fileURL];
if (fileURL == nil) {
NSBeep();
@@ -442,14 +436,20 @@
return;
}
- NSArray *services = [NSSharingService sharingServicesForItems:@[fileURL]];
- NSUInteger i = [[services valueForKey:@"title"] indexOfObject:name];
- if (i == NSNotFound) {
- NSBeep();
- return;
+ NSSharingService *service = nil;
+ NSString *name = [[command evaluatedArguments] objectForKey:@"Service"];
+ if (name == nil) {
+ service = [NSSharingService sharingServiceNamed:NSSharingServiceNameComposeEmail];
+ } else {
+ NSArray *services = [NSSharingService sharingServicesForItems:@[fileURL]];
+ NSUInteger i = [[services valueForKey:@"title"] indexOfObject:name];
+ if (i == NSNotFound) {
+ NSBeep();
+ return;
+ }
+ service = [services objectAtIndex:i];
}
- NSSharingService *service = [services objectAtIndex:i];
[service setSubject:[self displayName]];
[service performWithItems:@[fileURL]];
}
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2025-10-07 15:26:04 UTC (rev 15685)
+++ trunk/SKMainDocument.m 2025-10-07 15:46:39 UTC (rev 15686)
@@ -2190,12 +2190,6 @@
}
- (void)handleShareScriptCommand:(NSScriptCommand *)command {
- NSString *name = [[command evaluatedArguments] objectForKey:@"Service"];
- if (name == nil) {
- [command setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
- return;
- }
-
NSURL *fileURL = [self fileURL];
if (fileURL == nil) {
NSBeep();
@@ -2202,16 +2196,21 @@
return;
}
- NSArray *services = [NSSharingService sharingServicesForItems:@[fileURL]];
- NSUInteger i = [[services valueForKey:@"title"] indexOfObject:name];
- if (i == NSNotFound) {
- NSBeep();
- return;
+ NSSharingService *service = nil;
+ NSString *name = [[command evaluatedArguments] objectForKey:@"Service"];
+ if (name == nil) {
+ service = [NSSharingService sharingServiceNamed:NSSharingServiceNameComposeEmail];
+ } else {
+ NSArray *services = [NSSharingService sharingServicesForItems:@[fileURL]];
+ NSUInteger i = [[services valueForKey:@"title"] indexOfObject:name];
+ if (i == NSNotFound) {
+ NSBeep();
+ return;
+ }
+ service = [services objectAtIndex:i];
}
- NSSharingService *service = [services objectAtIndex:i];
BOOL shouldArchive = ([self hasNotes] || [[self presentationOptions] count] > 0);
-
NSString *typeName = [self fileType];
if (shouldArchive == NO && [typeName isEqualToString:SKDocumentTypePDFBundle])
typeName = SKDocumentTypePDF;
Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef 2025-10-07 15:26:04 UTC (rev 15685)
+++ trunk/Skim.sdef 2025-10-07 15:46:39 UTC (rev 15686)
@@ -605,7 +605,7 @@
<command name="share" code="SKIMShar"
description="Share a document using a service.">
- <direct-parameter type="document"
+ <direct-parameter type="document" optional="yes"
description="The document to share."/>
<parameter name="using" code="Usng" type="text"
description="The name of the service to use.">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-07 14:48:21
|
Revision: 15684
http://sourceforge.net/p/skim-app/code/15684
Author: hofman
Date: 2025-10-07 14:48:18 +0000 (Tue, 07 Oct 2025)
Log Message:
-----------
Add a share script command
Modified Paths:
--------------
trunk/NSDocument_SKExtensions.h
trunk/NSDocument_SKExtensions.m
trunk/SKMainDocument.m
trunk/Skim.sdef
Modified: trunk/NSDocument_SKExtensions.h
===================================================================
--- trunk/NSDocument_SKExtensions.h 2025-10-04 15:48:35 UTC (rev 15683)
+++ trunk/NSDocument_SKExtensions.h 2025-10-07 14:48:18 UTC (rev 15684)
@@ -138,6 +138,7 @@
- (void)handleShowTeXScriptCommand:(NSScriptCommand *)command;
- (void)handleConvertNotesScriptCommand:(NSScriptCommand *)command;
- (void)handleReadNotesScriptCommand:(NSScriptCommand *)command;
+- (void)handleShareScriptCommand:(NSScriptCommand *)command;
@end
Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m 2025-10-04 15:48:35 UTC (rev 15683)
+++ trunk/NSDocument_SKExtensions.m 2025-10-07 14:48:18 UTC (rev 15684)
@@ -429,4 +429,29 @@
[command setScriptErrorString:@"Notes document does not understand the 'read notes' command."];
}
+- (void)handleShareScriptCommand:(NSScriptCommand *)command {
+ NSString *name = [[command evaluatedArguments] objectForKey:@"Service"];
+ if (name == nil) {
+ [command setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
+ return;
+ }
+
+ NSURL *fileURL = [self fileURL];
+ if (fileURL == nil) {
+ NSBeep();
+ return;
+ }
+
+ NSArray *services = [NSSharingService sharingServicesForItems:@[fileURL]];
+ NSUInteger i = [[services valueForKey:@"name"] indexOfObject:name];
+ if (i == NSNotFound) {
+ NSBeep();
+ return;
+ }
+
+ NSSharingService *service = [services objectAtIndex:i];
+ [service setSubject:[self displayName]];
+ [service performWithItems:@[fileURL]];
+}
+
@end
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2025-10-04 15:48:35 UTC (rev 15683)
+++ trunk/SKMainDocument.m 2025-10-07 14:48:18 UTC (rev 15684)
@@ -2189,4 +2189,78 @@
}
}
+- (void)handleShareScriptCommand:(NSScriptCommand *)command {
+ NSString *name = [[command evaluatedArguments] objectForKey:@"Service"];
+ if (name == nil) {
+ [command setScriptErrorNumber:NSRequiredArgumentsMissingScriptError];
+ return;
+ }
+
+ NSURL *fileURL = [self fileURL];
+ if (fileURL == nil) {
+ NSBeep();
+ return;
+ }
+
+ NSArray *services = [NSSharingService sharingServicesForItems:@[fileURL]];
+ NSUInteger i = [[services valueForKey:@"name"] indexOfObject:name];
+ if (i == NSNotFound) {
+ NSBeep();
+ return;
+ }
+
+ NSSharingService *service = [services objectAtIndex:i];
+ BOOL shouldArchive = ([self hasNotes] || [[self presentationOptions] count] > 0);
+
+ NSString *typeName = [self fileType];
+ if (shouldArchive == NO && [typeName isEqualToString:SKDocumentTypePDFBundle])
+ typeName = SKDocumentTypePDF;
+
+ NSString *typeExt = [self fileNameExtensionForType:typeName saveOperation:NSAutosaveElsewhereOperation];
+ NSString *targetExt = shouldArchive ? @"tgz" : typeExt;
+ NSString *targetFileName = [fileURL lastPathComponentReplacingPathExtension:targetExt];
+ if (targetFileName == nil)
+ targetFileName = [[self displayName] stringByAppendingPathExtension:targetExt];
+
+ NSURL *targetDirURL = [[NSFileManager defaultManager] uniqueChewableItemsDirectoryURL];
+ NSURL *targetFileURL = [targetDirURL URLByAppendingPathComponent:targetFileName isDirectory:NO];
+ NSURL *tmpURL = nil;
+ fileURL = targetFileURL;
+
+ if (shouldArchive) {
+ tmpURL = [[NSFileManager defaultManager] URLForDirectory:NSItemReplacementDirectory inDomain:NSUserDomainMask appropriateForURL:targetFileURL create:YES error:NULL];
+ fileURL = [[tmpURL URLByAppendingPathComponent:targetFileName isDirectory:NO] URLReplacingPathExtension:typeExt];
+ }
+
+ if ([self writeSafelyToURL:fileURL ofType:typeName forSaveOperation:NSAutosaveElsewhereOperation error:NULL] == NO) {
+ NSBeep();
+ return;
+ }
+
+ if (shouldArchive) {
+ NSTask *task = [self taskForWritingArchiveAtURL:targetFileURL fromURL:fileURL];
+ [service setSubject:[self displayName]];
+
+ [SKFileShare shareURL:targetFileURL
+ preparedByTask:task
+ usingService:service
+ completionHandler:^(BOOL success){
+ NSFileManager *fm = [NSFileManager defaultManager];
+ [fm removeItemAtURL:tmpURL error:NULL];
+ if (success == NO) {
+ [fm removeItemAtURL:targetDirURL error:NULL];
+ NSBeep();
+ }
+ }];
+ } else {
+ NSArray *items = @[targetFileURL];
+ if ([service canPerformWithItems:items]) {
+ [service setSubject:[self displayName]];
+ [service performWithItems:items];
+ } else {
+ [[NSFileManager defaultManager] removeItemAtURL:targetDirURL error:NULL];
+ }
+ }
+}
+
@end
Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef 2025-10-04 15:48:35 UTC (rev 15683)
+++ trunk/Skim.sdef 2025-10-07 14:48:18 UTC (rev 15684)
@@ -603,6 +603,16 @@
</parameter>
</command>
+ <command name="share" code="SKIMShar"
+ description="Share a document using a service.">
+ <direct-parameter type="document"
+ description="The document to share."/>
+ <parameter name="using" code="Usng" type="text"
+ description="The name of the service to use.">
+ <cocoa key="Service"/>
+ </parameter>
+ </command>
+
<class-extension extends="item" hidden="yes"
description="A scriptable object.">
<cocoa class="NSObject"/>
@@ -763,6 +773,9 @@
<responds-to name="edit">
<cocoa method="handleEditScriptCommand:"/>
</responds-to>
+ <responds-to name="share">
+ <cocoa method="handleShareScriptCommand:"/>
+ </responds-to>
</class-extension>
<class-extension extends="window"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-04 15:48:36
|
Revision: 15683
http://sourceforge.net/p/skim-app/code/15683
Author: hofman
Date: 2025-10-04 15:48:35 +0000 (Sat, 04 Oct 2025)
Log Message:
-----------
make init designated initializer of singleton bookmark controller and make sure every initializer returns th shared instance
Modified Paths:
--------------
trunk/SKBookmarkController.h
trunk/SKBookmarkController.m
Modified: trunk/SKBookmarkController.h
===================================================================
--- trunk/SKBookmarkController.h 2025-10-02 17:02:55 UTC (rev 15682)
+++ trunk/SKBookmarkController.h 2025-10-04 15:48:35 UTC (rev 15683)
@@ -65,6 +65,8 @@
BOOL appIsTerminating;
}
+- (instancetype)init NS_DESIGNATED_INITIALIZER;
+
@property (class, nonatomic, readonly) SKBookmarkController *sharedBookmarkController;
@property (nonatomic, nullable, strong) IBOutlet SKOutlineView *outlineView;
Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m 2025-10-02 17:02:55 UTC (rev 15682)
+++ trunk/SKBookmarkController.m 2025-10-04 15:48:35 UTC (rev 15683)
@@ -146,7 +146,7 @@
return sharedBookmarkController ?: [super allocWithZone:zone];
}
-- (instancetype)initWithWindow:(NSWindow *)window {
+- (instancetype)init {
if (sharedBookmarkController == nil) {
self = [super initWithWindow:nil];
if (self) {
@@ -183,6 +183,16 @@
return self;
}
+- (instancetype)initWithWindow:(NSWindow *)window {
+ return [self init];
+}
+
+- (instancetype)initWithCoder:(NSCoder *)coder {
+ return [self init];
+}
+
+- (void)encodeWithCoder:(NSCoder *)coder {}
+
- (void)dealloc {
[self stopObservingBookmarks:@[bookmarkRoot]];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-02 17:02:57
|
Revision: 15682
http://sourceforge.net/p/skim-app/code/15682
Author: hofman
Date: 2025-10-02 17:02:55 +0000 (Thu, 02 Oct 2025)
Log Message:
-----------
make loupe controller an NSWindowController
Modified Paths:
--------------
trunk/SKLoupeController.h
trunk/SKLoupeController.m
Modified: trunk/SKLoupeController.h
===================================================================
--- trunk/SKLoupeController.h 2025-10-02 16:54:33 UTC (rev 15681)
+++ trunk/SKLoupeController.h 2025-10-02 17:02:55 UTC (rev 15682)
@@ -42,8 +42,7 @@
@class PDFView;
-@interface SKLoupeController : NSObject <CALayerDelegate> {
- NSWindow *window;
+@interface SKLoupeController : NSWindowController <CALayerDelegate> {
CALayer *layer;
__weak PDFView *pdfView;
CGFloat magnification;
@@ -51,7 +50,8 @@
}
- (instancetype)initWithPDFView:(PDFView *)aPdfView NS_DESIGNATED_INITIALIZER;
-- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithWindow:(nullable NSWindow *)window NS_UNAVAILABLE;
+- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
@property (nonatomic) CGFloat magnification;
@property (nonatomic) NSInteger level;
Modified: trunk/SKLoupeController.m
===================================================================
--- trunk/SKLoupeController.m 2025-10-02 16:54:33 UTC (rev 15681)
+++ trunk/SKLoupeController.m 2025-10-02 17:02:55 UTC (rev 15682)
@@ -57,7 +57,7 @@
#define SKLargeMagnificationHeightKey @"SKLargeMagnificationHeight"
@interface SKLoupeController ()
-- (void)makeWindow;
++ (NSWindow *)makeWindowForView:(NSView *)pdfView;
- (void)handlePDFContentViewFrameChangedNotification:(NSNotification *)notification;
@end
@@ -66,12 +66,15 @@
@synthesize magnification, level;
- (instancetype)initWithPDFView:(PDFView *)aPdfView {
- self = [super init];
+ NSWindow *window = [[self class] makeWindowForView:aPdfView];
+ self = [super initWithWindow:window];
if (self) {
pdfView = aPdfView;
- [self makeWindow];
magnification = 0.0;
level = 0;
+ layer = [[window contentView] layer];
+ [layer setDelegate:self];
+ [self updateColorFilters];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handlePDFContentViewFrameChangedNotification:)
name:NSViewBoundsDidChangeNotification object:[[pdfView scrollView] contentView]];
@@ -83,8 +86,8 @@
[layer setDelegate:nil];
}
-- (void)makeWindow {
- layer = [[CALayer alloc] init];
++ (NSWindow *)makeWindowForView:(NSView *)pdfView {
+ CALayer *layer = [[CALayer alloc] init];
[layer setCornerRadius:LOUPE_RADIUS];
[layer setMasksToBounds:YES];
[layer setActions:@{@"contents":[NSNull null]}];
@@ -95,13 +98,12 @@
[layer setBorderWidth:LOUPE_BORDER_WIDTH];
CGColorRelease(borderColor);
}
- [layer setDelegate:self];
- window = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[pdfView convertRectToScreen:[pdfView bounds]]];
+ NSWindow *window = [[SKAnimatedBorderlessWindow alloc] initWithContentRect:[pdfView convertRectToScreen:[pdfView bounds]]];
[[window contentView] setLayer:layer];
[[window contentView] setWantsLayer:YES];
[window setHasShadow:YES];
- [self updateColorFilters];
+ return window;
}
- (void)handlePDFContentViewFrameChangedNotification:(NSNotification *)notification {
@@ -110,6 +112,7 @@
- (void)updateBackgroundColor {
if (@available(macOS 10.14, *)) {
+ NSWindow *window = [self window];
BOOL hasBackgroundView = NO;
NSView *loupeView = [window contentView];
if ([[loupeView subviews] count] > 0) {
@@ -161,6 +164,7 @@
}
- (void)updateColorFilters {
+ NSWindow *window = [self window];
[[window contentView] setContentFilters:SKColorEffectFilters()];
if (@available(macOS 10.14, *)) {
if ([[NSUserDefaults standardUserDefaults] boolForKey:SKInvertColorsInDarkModeKey])
@@ -191,6 +195,7 @@
magRect = NSIntegralRect(SKRectFromCenterAndSize(mouseLoc, magSize));
}
+ NSWindow *window = [self window];
NSView *loupeView = [window contentView];
if (@available(macOS 10.14, *))
loupeView = [[loupeView subviews] firstObject] ?: loupeView;
@@ -212,6 +217,7 @@
}
- (void)updateContents {
+ NSWindow *window = [self window];
if ([window parentWindow]) {
if (level > 2 && NSEqualSizes([window frame].size, [pdfView visibleContentRect].size) == NO)
[self update];
@@ -221,6 +227,7 @@
}
- (BOOL)hide {
+ NSWindow *window = [self window];
if ([window parentWindow] == nil)
return NO;
// show cursor
@@ -236,7 +243,7 @@
if (NSPointInRect(mouseLoc, [pdfView visibleContentRect]) == NO)
return;
- NSRect magRect = [pdfView convertRectFromScreen:[window frame]];
+ NSRect magRect = [pdfView convertRectFromScreen:[[self window] frame]];
CGFloat scaleFactor = [pdfView scaleFactor];
CGColorRef shadowColor = NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-10-02 16:54:36
|
Revision: 15681
http://sourceforge.net/p/skim-app/code/15681
Author: hofman
Date: 2025-10-02 16:54:33 +0000 (Thu, 02 Oct 2025)
Log Message:
-----------
remove a log
Modified Paths:
--------------
trunk/SKBookmarkController.m
Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m 2025-10-02 16:32:25 UTC (rev 15680)
+++ trunk/SKBookmarkController.m 2025-10-02 16:54:33 UTC (rev 15681)
@@ -681,7 +681,7 @@
SKBookmark *bookmark = nil;
NSInteger tag = 0;
- if (supermenu == [NSApp mainMenu]) {log_method();
+ if (supermenu == [NSApp mainMenu]) {
bookmark = [self bookmarkRoot];
tag = SKBookmarkTagBookmarksMenu;
} else if (idx >= 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|