You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(23) |
Apr
(254) |
May
(252) |
Jun
(209) |
Jul
(198) |
Aug
(192) |
Sep
(207) |
Oct
(120) |
Nov
(179) |
Dec
(52) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(48) |
Feb
(69) |
Mar
(129) |
Apr
(250) |
May
(113) |
Jun
(177) |
Jul
(228) |
Aug
(155) |
Sep
(218) |
Oct
(185) |
Nov
(109) |
Dec
(88) |
2009 |
Jan
(83) |
Feb
(39) |
Mar
(70) |
Apr
(47) |
May
(48) |
Jun
(67) |
Jul
(61) |
Aug
(97) |
Sep
(221) |
Oct
(141) |
Nov
(70) |
Dec
(61) |
2010 |
Jan
(45) |
Feb
(76) |
Mar
(178) |
Apr
(106) |
May
(57) |
Jun
(32) |
Jul
(64) |
Aug
(98) |
Sep
(96) |
Oct
(19) |
Nov
(34) |
Dec
(117) |
2011 |
Jan
(55) |
Feb
(48) |
Mar
(64) |
Apr
(21) |
May
(39) |
Jun
(53) |
Jul
(99) |
Aug
(56) |
Sep
(39) |
Oct
(26) |
Nov
(19) |
Dec
(69) |
2012 |
Jan
(17) |
Feb
(40) |
Mar
(17) |
Apr
|
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(10) |
Sep
(10) |
Oct
(38) |
Nov
(48) |
Dec
(70) |
2013 |
Jan
(43) |
Feb
(47) |
Mar
(39) |
Apr
(37) |
May
(25) |
Jun
(6) |
Jul
(20) |
Aug
(49) |
Sep
(33) |
Oct
(34) |
Nov
(75) |
Dec
(6) |
2014 |
Jan
(32) |
Feb
(10) |
Mar
(17) |
Apr
|
May
|
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(4) |
Oct
(23) |
Nov
(80) |
Dec
(48) |
2015 |
Jan
(80) |
Feb
(50) |
Mar
(58) |
Apr
(20) |
May
(11) |
Jun
(16) |
Jul
(24) |
Aug
(27) |
Sep
(56) |
Oct
(30) |
Nov
(16) |
Dec
(6) |
2016 |
Jan
(31) |
Feb
(14) |
Mar
(23) |
Apr
(17) |
May
(40) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(32) |
Oct
(36) |
Nov
(23) |
Dec
(9) |
2017 |
Jan
(37) |
Feb
(23) |
Mar
(65) |
Apr
(22) |
May
(6) |
Jun
(3) |
Jul
|
Aug
|
Sep
(3) |
Oct
(22) |
Nov
(63) |
Dec
(71) |
2018 |
Jan
(83) |
Feb
(21) |
Mar
(35) |
Apr
(44) |
May
(14) |
Jun
(12) |
Jul
(8) |
Aug
(18) |
Sep
(10) |
Oct
(145) |
Nov
(144) |
Dec
(76) |
2019 |
Jan
(18) |
Feb
(28) |
Mar
(5) |
Apr
(208) |
May
(291) |
Jun
(158) |
Jul
(27) |
Aug
(8) |
Sep
(10) |
Oct
(83) |
Nov
(41) |
Dec
(31) |
2020 |
Jan
(16) |
Feb
(46) |
Mar
(100) |
Apr
(78) |
May
(69) |
Jun
(71) |
Jul
(28) |
Aug
(131) |
Sep
(176) |
Oct
(89) |
Nov
(147) |
Dec
(19) |
2021 |
Jan
(19) |
Feb
(25) |
Mar
(91) |
Apr
(98) |
May
(14) |
Jun
(44) |
Jul
(8) |
Aug
(3) |
Sep
(38) |
Oct
(57) |
Nov
(97) |
Dec
(74) |
2022 |
Jan
(89) |
Feb
(47) |
Mar
(15) |
Apr
(50) |
May
(54) |
Jun
(56) |
Jul
(80) |
Aug
(12) |
Sep
(11) |
Oct
(60) |
Nov
(48) |
Dec
(4) |
2023 |
Jan
(75) |
Feb
(49) |
Mar
(84) |
Apr
(24) |
May
(13) |
Jun
(74) |
Jul
(32) |
Aug
(66) |
Sep
(50) |
Oct
(38) |
Nov
(105) |
Dec
(181) |
2024 |
Jan
(21) |
Feb
(49) |
Mar
(77) |
Apr
(84) |
May
(20) |
Jun
(71) |
Jul
(53) |
Aug
(33) |
Sep
(54) |
Oct
(124) |
Nov
(151) |
Dec
(73) |
2025 |
Jan
(61) |
Feb
(17) |
Mar
(136) |
Apr
(72) |
May
(200) |
Jun
(238) |
Jul
(91) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ho...@us...> - 2025-03-14 15:18:47
|
Revision: 14972 http://sourceforge.net/p/skim-app/code/14972 Author: hofman Date: 2025-03-14 15:18:34 +0000 (Fri, 14 Mar 2025) Log Message: ----------- combine validation of add note toolbar items Modified Paths: -------------- trunk/SKMainToolbarController.m Modified: trunk/SKMainToolbarController.m =================================================================== --- trunk/SKMainToolbarController.m 2025-03-13 23:28:38 UTC (rev 14971) +++ trunk/SKMainToolbarController.m 2025-03-14 15:18:34 UTC (rev 14972) @@ -974,14 +974,8 @@ return [mainController.pdfView.document isLocked] == NO && [mainController hasOverview] == NO; } else if ([identifier isEqualToString:SKDocumentToolbarToolModeItemIdentifier]) { return [mainController hasOverview] == NO; - } else if ([identifier isEqualToString:SKDocumentToolbarNewTextNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewCircleNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewLineItemIdentifier]) { + } else if ([identifier isEqualToString:SKDocumentToolbarNewTextNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewCircleNoteItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewLineItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewMarkupItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewLineItemIdentifier] || [identifier isEqualToString:SKDocumentToolbarNewNoteItemIdentifier]) { return [mainController hasOverview] == NO && [mainController.pdfView canSelectNote]; - } else if ([identifier isEqualToString:SKDocumentToolbarNewMarkupItemIdentifier]) { - return [mainController hasOverview] == NO && [mainController.pdfView canSelectNote]; - } else if ([identifier isEqualToString:SKDocumentToolbarNewLineItemIdentifier]) { - return [mainController hasOverview] == NO && [mainController.pdfView canSelectNote]; - } else if ([identifier isEqualToString:SKDocumentToolbarNewNoteItemIdentifier]) { - return [mainController hasOverview] == NO && [mainController.pdfView canSelectNote]; } else if ([identifier isEqualToString:SKDocumentToolbarFullScreenItemIdentifier]) { return [mainController canEnterFullscreen] || [mainController canExitFullscreen]; } else if ([identifier isEqualToString:SKDocumentToolbarPresentationItemIdentifier]) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-13 23:28:51
|
Revision: 14971 http://sourceforge.net/p/skim-app/code/14971 Author: hofman Date: 2025-03-13 23:28:38 +0000 (Thu, 13 Mar 2025) Log Message: ----------- default to icon-only toolbar Modified Paths: -------------- trunk/SKMainToolbarController.m Modified: trunk/SKMainToolbarController.m =================================================================== --- trunk/SKMainToolbarController.m 2025-03-13 16:55:16 UTC (rev 14970) +++ trunk/SKMainToolbarController.m 2025-03-13 23:28:38 UTC (rev 14971) @@ -166,7 +166,7 @@ // Set up toolbar properties: Allow customization, give a default display mode, and remember state in user defaults [toolbar setAllowsUserCustomization:YES]; [toolbar setAutosavesConfiguration:YES]; - [toolbar setDisplayMode:NSToolbarDisplayModeDefault]; + [toolbar setDisplayMode:NSToolbarDisplayModeIconOnly]; // We are the delegate [toolbar setDelegate:self]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-13 16:55:24
|
Revision: 14970 http://sourceforge.net/p/skim-app/code/14970 Author: hofman Date: 2025-03-13 16:55:16 +0000 (Thu, 13 Mar 2025) Log Message: ----------- code alignment Modified Paths: -------------- trunk/SKMainToolbarController.m Modified: trunk/SKMainToolbarController.m =================================================================== --- trunk/SKMainToolbarController.m 2025-03-13 16:37:10 UTC (rev 14969) +++ trunk/SKMainToolbarController.m 2025-03-13 16:55:16 UTC (rev 14970) @@ -622,20 +622,20 @@ [item setView:displayDirectionButton]; [item setMenuFormRepresentation:menuItem]; - } else if ([identifier isEqualToString:SKDocumentToolbarDisplayDirectionItemIdentifier]) { - - menuItem = [[NSMenuItem alloc] initWithSubmenuAndTitle:NSLocalizedString(@"Direction", @"Toolbar item label")]; - menu = [menuItem submenu]; - [menu addItemWithTitle:NSLocalizedString(@"Vertical", @"Menu item title") action:@selector(changeDisplayDirection:) target:mainController tag:0]; - [menu addItemWithTitle:NSLocalizedString(@"Horizontal", @"Menu item title") action:@selector(changeDisplayDirection:) target:mainController tag:1]; - - [item setLabels:NSLocalizedString(@"Direction", @"Toolbar item label")]; - [item setToolTip:NSLocalizedString(@"Direction", @"Tool tip message")]; - [displayDirectionButton setHelp:NSLocalizedString(@"Vertical", @"Tool tip message") forSegment:0]; - [displayDirectionButton setHelp:NSLocalizedString(@"Horizontal", @"Tool tip message") forSegment:1]; - [item setView:displayDirectionButton]; - [item setMenuFormRepresentation:menuItem]; - + } else if ([identifier isEqualToString:SKDocumentToolbarDisplayDirectionItemIdentifier]) { + + menuItem = [[NSMenuItem alloc] initWithSubmenuAndTitle:NSLocalizedString(@"Direction", @"Toolbar item label")]; + menu = [menuItem submenu]; + [menu addItemWithTitle:NSLocalizedString(@"Vertical", @"Menu item title") action:@selector(changeDisplayDirection:) target:mainController tag:0]; + [menu addItemWithTitle:NSLocalizedString(@"Horizontal", @"Menu item title") action:@selector(changeDisplayDirection:) target:mainController tag:1]; + + [item setLabels:NSLocalizedString(@"Direction", @"Toolbar item label")]; + [item setToolTip:NSLocalizedString(@"Direction", @"Tool tip message")]; + [displayDirectionButton setHelp:NSLocalizedString(@"Vertical", @"Tool tip message") forSegment:0]; + [displayDirectionButton setHelp:NSLocalizedString(@"Horizontal", @"Tool tip message") forSegment:1]; + [item setView:displayDirectionButton]; + [item setMenuFormRepresentation:menuItem]; + } else if ([identifier isEqualToString:SKDocumentToolbarDisplaysRTLItemIdentifier]) { menuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Right to Left", @"Menu item title") action:@selector(toggleDisplaysRTL:) target:mainController]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-13 16:37:22
|
Revision: 14969 http://sourceforge.net/p/skim-app/code/14969 Author: hofman Date: 2025-03-13 16:37:10 +0000 (Thu, 13 Mar 2025) Log Message: ----------- Set subtitle of snapshot window instead of modifyin the title on 11.0+ Modified Paths: -------------- trunk/SKMainWindowController.m trunk/SKSnapshotWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-13 16:28:06 UTC (rev 14968) +++ trunk/SKMainWindowController.m 2025-03-13 16:37:10 UTC (rev 14969) @@ -680,7 +680,7 @@ - (void)updateSubtitle { if (@available(macOS 11.0, *)) { if ([pdfView document]) - [[self window] setSubtitle:[NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @"Status message"), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]]; + [[self window] setSubtitle:[NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @""), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]]; else [[self window] setSubtitle:@""]; } else { Modified: trunk/SKSnapshotWindowController.m =================================================================== --- trunk/SKSnapshotWindowController.m 2025-03-13 16:28:06 UTC (rev 14968) +++ trunk/SKSnapshotWindowController.m 2025-03-13 16:37:10 UTC (rev 14969) @@ -127,9 +127,19 @@ } - (NSString *)windowTitleForDocumentDisplayName:(NSString *)displayName { - return [displayName stringByAppendingEmDashAndString:[NSString stringWithFormat:NSLocalizedString(@"Page %@", @""), [self pageLabel]]]; + if (@available(macOS 11.0, *)) + return displayName; + else + return [displayName stringByAppendingEmDashAndString:[NSString stringWithFormat:NSLocalizedString(@"Page %@", @""), [self pageLabel]]]; } +- (void)updateSubtitle { + if (@available(macOS 11.0, *)) + [[self window] setSubtitle:[NSString stringWithFormat:NSLocalizedString(@"Page %@", @""), [self pageLabel]]]; + else + [self synchronizeWindowTitleWithDocumentName]; +} + - (void)updateString { NSMutableString *mutableString = [NSMutableString string]; NSRect rect = [pdfView visibleContentRect]; @@ -372,7 +382,7 @@ - (void)setPageLabel:(NSString *)newPageLabel { if (pageLabel != newPageLabel) { pageLabel = newPageLabel; - [self synchronizeWindowTitleWithDocumentName]; + [self updateSubtitle]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-13 16:28:22
|
Revision: 14968 http://sourceforge.net/p/skim-app/code/14968 Author: hofman Date: 2025-03-13 16:28:06 +0000 (Thu, 13 Mar 2025) Log Message: ----------- Set subtitle of main window instead of modifyin the title on 11.0+ Modified Paths: -------------- trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKMainWindowController_FullScreen.m trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2025-03-12 23:20:29 UTC (rev 14967) +++ trunk/SKMainWindowController.h 2025-03-13 16:28:06 UTC (rev 14968) @@ -326,6 +326,7 @@ - (NSDictionary<NSString *, id> *)currentPDFSettings; - (void)applyOptions:(NSDictionary<NSString *, id> *)options; +- (void)updateSubtitle; - (void)updateLeftStatus; - (void)updateRightStatus; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-12 23:20:29 UTC (rev 14967) +++ trunk/SKMainWindowController.m 2025-03-13 16:28:06 UTC (rev 14968) @@ -677,6 +677,17 @@ #pragma mark UI updating +- (void)updateSubtitle { + if (@available(macOS 11.0, *)) { + if ([pdfView document]) + [[self window] setSubtitle:[NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @"Status message"), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]]; + else + [[self window] setSubtitle:@""]; + } else { + [self synchronizeWindowTitleWithDocumentName]; + } +} + - (void)updateLeftStatus { NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @"Status message"), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; [[statusBar leftField] setStringValue:message]; Modified: trunk/SKMainWindowController_FullScreen.m =================================================================== --- trunk/SKMainWindowController_FullScreen.m 2025-03-12 23:20:29 UTC (rev 14967) +++ trunk/SKMainWindowController_FullScreen.m 2025-03-13 16:28:06 UTC (rev 14968) @@ -525,7 +525,7 @@ }]; // the page number may have changed - [self synchronizeWindowTitleWithDocumentName]; + [self updateSubtitle]; } - (BOOL)canEnterFullscreen { Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2025-03-12 23:20:29 UTC (rev 14967) +++ trunk/SKMainWindowController_UI.m 2025-03-13 16:28:06 UTC (rev 14968) @@ -231,10 +231,9 @@ #pragma mark NSWindow delegate protocol - (NSString *)windowTitleForDocumentDisplayName:(NSString *)displayName { - if ([pdfView document]) + if (@available(macOS 11.0, *)) {} else if ([pdfView document]) return [NSString stringWithFormat:NSLocalizedString(@"%@ (page %ld of %ld)", @"Window title format"), displayName, (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; - else - return displayName; + return displayName; } - (void)windowDidBecomeMain:(NSNotification *)notification { @@ -2004,7 +2003,7 @@ if (beforeMarkedPage.pageIndex != NSNotFound && [[pdfView currentPage] pageIndex] != markedPage.pageIndex) beforeMarkedPage.pageIndex = NSNotFound; - [self synchronizeWindowTitleWithDocumentName]; + [self updateSubtitle]; [self updateLeftStatus]; if ([[NSUserDefaults standardUserDefaults] boolForKey:SKDisplayPageBoundsKey]) [self updateRightStatus]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-12 23:20:41
|
Revision: 14967 http://sourceforge.net/p/skim-app/code/14967 Author: hofman Date: 2025-03-12 23:20:29 +0000 (Wed, 12 Mar 2025) Log Message: ----------- override respondsToSelector in base pdfview Modified Paths: -------------- trunk/SKBasePDFView.m trunk/SKPDFView.m trunk/SKSecondaryPDFView.m trunk/SKSnapshotPDFView.m Modified: trunk/SKBasePDFView.m =================================================================== --- trunk/SKBasePDFView.m 2025-03-12 23:16:23 UTC (rev 14966) +++ trunk/SKBasePDFView.m 2025-03-12 23:20:29 UTC (rev 14967) @@ -190,6 +190,10 @@ } } +- (BOOL)respondsToSelector:(SEL)aSelector { + return aSelector != @selector(printDocument:) && [super respondsToSelector:aSelector]; +} + #pragma mark Bug fixes - (void)setDocument:(PDFDocument *)document { Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2025-03-12 23:16:23 UTC (rev 14966) +++ trunk/SKPDFView.m 2025-03-12 23:20:29 UTC (rev 14967) @@ -1442,10 +1442,6 @@ // we don't want to steal the printDocument: action from the responder chain - (void)printDocument:(id)sender{} -- (BOOL)respondsToSelector:(SEL)aSelector { - return aSelector != @selector(printDocument:) && [super respondsToSelector:aSelector]; -} - - (BOOL)canZoomIn { return [[self document] isLocked] == NO && [super canZoomIn]; } Modified: trunk/SKSecondaryPDFView.m =================================================================== --- trunk/SKSecondaryPDFView.m 2025-03-12 23:16:23 UTC (rev 14966) +++ trunk/SKSecondaryPDFView.m 2025-03-12 23:20:29 UTC (rev 14967) @@ -530,10 +530,6 @@ // we don't want to steal the printDocument: action from the responder chain - (void)printDocument:(id)sender{} -- (BOOL)respondsToSelector:(SEL)aSelector { - return aSelector != @selector(printDocument:) && [super respondsToSelector:aSelector]; -} - - (NSMenu *)menuForEvent:(NSEvent *)theEvent { static NSSet *selectionActions = nil; if (selectionActions == nil) Modified: trunk/SKSnapshotPDFView.m =================================================================== --- trunk/SKSnapshotPDFView.m 2025-03-12 23:16:23 UTC (rev 14966) +++ trunk/SKSnapshotPDFView.m 2025-03-12 23:20:29 UTC (rev 14967) @@ -499,10 +499,6 @@ // we don't want to steal the printDocument: action from the responder chain - (void)printDocument:(id)sender{} -- (BOOL)respondsToSelector:(SEL)aSelector { - return aSelector != @selector(printDocument:) && [super respondsToSelector:aSelector]; -} - - (NSMenu *)menuForEvent:(NSEvent *)theEvent { static NSSet *selectionActions = nil; if (selectionActions == nil) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-12 23:16:31
|
Revision: 14966 http://sourceforge.net/p/skim-app/code/14966 Author: hofman Date: 2025-03-12 23:16:23 +0000 (Wed, 12 Mar 2025) Log Message: ----------- no need to reject toolbar customization Modified Paths: -------------- trunk/SKStaticToolbarWindow.m Modified: trunk/SKStaticToolbarWindow.m =================================================================== --- trunk/SKStaticToolbarWindow.m 2025-03-12 23:12:47 UTC (rev 14965) +++ trunk/SKStaticToolbarWindow.m 2025-03-12 23:16:23 UTC (rev 14966) @@ -42,7 +42,7 @@ @implementation SKStaticToolbarWindow - (BOOL)respondsToSelector:(SEL)aSelector { - return aSelector != @selector(toggleToolbarShown:) && aSelector != @selector(runToolbarCustomizationPalette:) && [super respondsToSelector:aSelector]; + return aSelector != @selector(toggleToolbarShown:) && [super respondsToSelector:aSelector]; } @end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-12 23:12:54
|
Revision: 14965 http://sourceforge.net/p/skim-app/code/14965 Author: hofman Date: 2025-03-12 23:12:47 +0000 (Wed, 12 Mar 2025) Log Message: ----------- toolbar button does not exist for a long time Modified Paths: -------------- trunk/SKPreferenceController.m Modified: trunk/SKPreferenceController.m =================================================================== --- trunk/SKPreferenceController.m 2025-03-12 23:11:36 UTC (rev 14964) +++ trunk/SKPreferenceController.m 2025-03-12 23:12:47 UTC (rev 14965) @@ -159,7 +159,6 @@ [toolbar setVisible:YES]; [toolbar setDelegate:self]; [window setToolbar:toolbar]; - [window setShowsToolbarButton:NO]; [contentView setWantsLayer:YES]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-12 23:11:43
|
Revision: 14964 http://sourceforge.net/p/skim-app/code/14964 Author: hofman Date: 2025-03-12 23:11:36 +0000 (Wed, 12 Mar 2025) Log Message: ----------- don't set toolbar size mode, ignored Modified Paths: -------------- trunk/SKDownloadController.m Modified: trunk/SKDownloadController.m =================================================================== --- trunk/SKDownloadController.m 2025-03-11 15:26:30 UTC (rev 14963) +++ trunk/SKDownloadController.m 2025-03-12 23:11:36 UTC (rev 14964) @@ -533,8 +533,7 @@ [toolbar setAllowsUserCustomization:NO]; [toolbar setAutosavesConfiguration:NO]; [toolbar setDisplayMode:NSToolbarDisplayModeIconOnly]; - [toolbar setSizeMode:NSToolbarSizeModeSmall]; - + // We are the delegate [toolbar setDelegate:self]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-11 15:26:36
|
Revision: 14963 http://sourceforge.net/p/skim-app/code/14963 Author: hofman Date: 2025-03-11 15:26:30 +0000 (Tue, 11 Mar 2025) Log Message: ----------- move enum value to comment Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-11 15:12:56 UTC (rev 14962) +++ trunk/SKMainWindowController.m 2025-03-11 15:26:30 UTC (rev 14963) @@ -330,8 +330,9 @@ // Set up the window - enum { SKTBCompact = 1, SKTBBesideTitle = 2, SKTBReplacingTitle = 4, SKTBTabsReplacingTitle = 6}; + enum { SKTBCompact = 1<<0, SKTBBesideTitle = 1<<1, SKTBReplacingTitle = 1<<2}; // hidden pref for toolbar position relative to title, 0-7 + // SKTBBesideTitle | SKTBReplacingTitle = tab bar replacing title NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; if (@available(macOS 11.0, *)) { [window setToolbarStyle:placement <= SKTBCompact ? NSWindowToolbarStyleExpanded : (placement & SKTBCompact) ? NSWindowToolbarStyleUnifiedCompact : NSWindowToolbarStyleUnified]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-11 15:13:02
|
Revision: 14962 http://sourceforge.net/p/skim-app/code/14962 Author: hofman Date: 2025-03-11 15:12:56 +0000 (Tue, 11 Mar 2025) Log Message: ----------- Interpret beside + replacing title bits in hidden pref to hide title for tab bar Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-11 10:27:36 UTC (rev 14961) +++ trunk/SKMainWindowController.m 2025-03-11 15:12:56 UTC (rev 14962) @@ -330,16 +330,18 @@ // Set up the window - // hidden pref for toolbar position relative to title: - // 0 = below, 1 = compact, 2 = beside, 3 = beside compact, 4 = replacing, 5 = replacing compact + enum { SKTBCompact = 1, SKTBBesideTitle = 2, SKTBReplacingTitle = 4, SKTBTabsReplacingTitle = 6}; + // hidden pref for toolbar position relative to title, 0-7 NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; if (@available(macOS 11.0, *)) { - [window setToolbarStyle:placement == 0 ? NSWindowToolbarStyleExpanded : (placement & 1) ? NSWindowToolbarStyleUnifiedCompact : NSWindowToolbarStyleUnified]; + [window setToolbarStyle:placement <= SKTBCompact ? NSWindowToolbarStyleExpanded : (placement & SKTBCompact) ? NSWindowToolbarStyleUnifiedCompact : NSWindowToolbarStyleUnified]; + if (placement == SKTBCompact) + [[window toolbar] setDisplayMode:NSToolbarDisplayModeIconOnly]; + } else if ((placement & SKTBCompact)) { + [[window toolbar] setDisplayMode:NSToolbarDisplayModeIconOnly]; } - if (placement == 1) - [(SKMainWindow *)window setAutoTitleVisibility:SKWindowTitleHiddenForTabBar]; - else if (placement > 3) - [(SKMainWindow *)window setAutoTitleVisibility:SKWindowTitleHiddenForToolbar]; + if ((placement & SKTBReplacingTitle)) + [(SKMainWindow *)window setAutoTitleVisibility:(placement & SKTBBesideTitle) ? SKWindowTitleHiddenForTabBar : SKWindowTitleHiddenForToolbar]; // for animations [[window contentView] setWantsLayer:YES]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-11 10:27:48
|
Revision: 14961 http://sourceforge.net/p/skim-app/code/14961 Author: hofman Date: 2025-03-11 10:27:36 +0000 (Tue, 11 Mar 2025) Log Message: ----------- let eaqch window decide for itself how to update when toggling toolbar Modified Paths: -------------- trunk/SKMainWindow.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-11 10:09:31 UTC (rev 14960) +++ trunk/SKMainWindow.m 2025-03-11 10:27:36 UTC (rev 14961) @@ -121,12 +121,17 @@ [super setDelegate:newDelegate]; } -- (void)setTabBarLayoutAttribute:(NSLayoutAttribute)layoutAttribute { - NSTitlebarAccessoryViewController *tabBarController = [[self titlebarAccessoryViewControllers] firstObject]; - if (tabBarController && [tabBarController layoutAttribute] != layoutAttribute) { - [super removeTitlebarAccessoryViewControllerAtIndex:0]; - [tabBarController setLayoutAttribute:layoutAttribute]; - [super addTitlebarAccessoryViewController:tabBarController]; +- (void)updateForToolbarVisibility:(BOOL)toolbarIsVisible { + if (autoTitleVisibility == SKWindowTitleHiddenForTabBar) { + NSLayoutAttribute layoutAttribute = toolbarIsVisible ? NSLayoutAttributeBottom : NSLayoutAttributeTop; + NSTitlebarAccessoryViewController *tabBarController = [[self titlebarAccessoryViewControllers] firstObject]; + if (tabBarController && [tabBarController layoutAttribute] != layoutAttribute) { + [super removeTitlebarAccessoryViewControllerAtIndex:0]; + [tabBarController setLayoutAttribute:layoutAttribute]; + [super addTitlebarAccessoryViewController:tabBarController]; + } + } else if (autoTitleVisibility == SKWindowTitleHiddenForToolbar) { + [self setTitleVisibility:toolbarIsVisible ? NSWindowTitleHidden : NSWindowTitleVisible]; } } @@ -133,33 +138,21 @@ - (void)setAutoTitleVisibility:(SKAutoWindowTitleVisibility)visibility { if (autoTitleVisibility != visibility) { autoTitleVisibility = visibility; - if (autoTitleVisibility == SKWindowTitleHiddenForTabBar) { - if ([[self titlebarAccessoryViewControllers] count]) { - [self setTitleVisibility:NSWindowTitleHidden]; - [self setTabBarLayoutAttribute:[[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom]; - } - } else if (autoTitleVisibility == SKWindowTitleHiddenForToolbar) { - if ([[self toolbar] isVisible]) - [self setTitleVisibility:NSWindowTitleHidden]; - } + if (autoTitleVisibility) + [self updateForToolbarVisibility:[[self toolbar] isVisible]]; + if (autoTitleVisibility == SKWindowTitleHiddenForTabBar && [[self titlebarAccessoryViewControllers] count]) + [self setTitleVisibility:NSWindowTitleHidden]; } } - (void)toggleToolbarShown:(id)sender { - if (autoTitleVisibility == SKWindowTitleHiddenForTabBar) { - NSLayoutAttribute layoutAttribute = [[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom; + if (autoTitleVisibility) { + BOOL willBeVisible = [[self toolbar] isVisible] == NO; NSString *identifier = [[self toolbar] identifier]; for (NSWindow *window in [NSApp windows]) { - if ([[[window toolbar] identifier] isEqualToString:identifier] && [window isKindOfClass:[SKMainWindow class]] && [(SKMainWindow *)window autoTitleVisibility] == autoTitleVisibility) - [(SKMainWindow *)window setTabBarLayoutAttribute:layoutAttribute]; + if ([[[window toolbar] identifier] isEqualToString:identifier] && [window respondsToSelector:@selector(updateForToolbarVisibility:)]) + [(SKMainWindow *)window updateForToolbarVisibility:willBeVisible]; } - } else if (autoTitleVisibility == SKWindowTitleHiddenForToolbar) { - NSWindowTitleVisibility visibility = [[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden; - NSString *identifier = [[self toolbar] identifier]; - for (NSWindow *window in [NSApp windows]) { - if ([[[window toolbar] identifier] isEqualToString:identifier] && [window isKindOfClass:[SKMainWindow class]] && [(SKMainWindow *)window autoTitleVisibility] == autoTitleVisibility) - [window setTitleVisibility:visibility]; - } } [super toggleToolbarShown:sender]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-11 10:09:33
|
Revision: 14960 http://sourceforge.net/p/skim-app/code/14960 Author: hofman Date: 2025-03-11 10:09:31 +0000 (Tue, 11 Mar 2025) Log Message: ----------- Support toolbar placement also for 10.15-, as this can be supported. NSLayoutAttributeTop is also supported on 10.13+ according to the header, and the toolbar is moved into the title bar when the title is hidden. A toolbar beside the title and compact toolbar styles will not be supported on early versions. Modified Paths: -------------- trunk/SKMainWindow.m trunk/SKMainWindowController.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-10 17:21:21 UTC (rev 14959) +++ trunk/SKMainWindow.m 2025-03-11 10:09:31 UTC (rev 14960) @@ -146,38 +146,34 @@ } - (void)toggleToolbarShown:(id)sender { - if (@available(macOS 11.0, *)) { - if (autoTitleVisibility == SKWindowTitleHiddenForTabBar) { - NSLayoutAttribute layoutAttribute = [[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom; - NSString *identifier = [[self toolbar] identifier]; - for (NSWindow *window in [NSApp windows]) { - if ([[[window toolbar] identifier] isEqualToString:identifier] && [window isKindOfClass:[SKMainWindow class]] && [(SKMainWindow *)window autoTitleVisibility] == autoTitleVisibility) - [(SKMainWindow *)window setTabBarLayoutAttribute:layoutAttribute]; - } - } else if (autoTitleVisibility == SKWindowTitleHiddenForToolbar) { - NSWindowTitleVisibility visibility = [[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden; - NSString *identifier = [[self toolbar] identifier]; - for (NSWindow *window in [NSApp windows]) { - if ([[[window toolbar] identifier] isEqualToString:identifier] && [window isKindOfClass:[SKMainWindow class]] && [(SKMainWindow *)window autoTitleVisibility] == autoTitleVisibility) - [window setTitleVisibility:visibility]; - } + if (autoTitleVisibility == SKWindowTitleHiddenForTabBar) { + NSLayoutAttribute layoutAttribute = [[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom; + NSString *identifier = [[self toolbar] identifier]; + for (NSWindow *window in [NSApp windows]) { + if ([[[window toolbar] identifier] isEqualToString:identifier] && [window isKindOfClass:[SKMainWindow class]] && [(SKMainWindow *)window autoTitleVisibility] == autoTitleVisibility) + [(SKMainWindow *)window setTabBarLayoutAttribute:layoutAttribute]; } + } else if (autoTitleVisibility == SKWindowTitleHiddenForToolbar) { + NSWindowTitleVisibility visibility = [[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden; + NSString *identifier = [[self toolbar] identifier]; + for (NSWindow *window in [NSApp windows]) { + if ([[[window toolbar] identifier] isEqualToString:identifier] && [window isKindOfClass:[SKMainWindow class]] && [(SKMainWindow *)window autoTitleVisibility] == autoTitleVisibility) + [window setTitleVisibility:visibility]; + } } [super toggleToolbarShown:sender]; } - (void)addTitlebarAccessoryViewController:(NSTitlebarAccessoryViewController *)childViewController { - if (@available(macOS 11.0, *)) { - if ([self autoTitleVisibility] == SKWindowTitleHiddenForTabBar) { - [self setTitleVisibility:NSWindowTitleHidden]; - if ([[self toolbar] isVisible] == NO) { - [childViewController setLayoutAttribute:NSLayoutAttributeTop]; - NSURL *url = [self representedURL]; - [self setRepresentedURL:nil]; - [self setRepresentedURL:url]; - } else { - [childViewController setLayoutAttribute:NSLayoutAttributeBottom]; - } + if ([self autoTitleVisibility] == SKWindowTitleHiddenForTabBar) { + [self setTitleVisibility:NSWindowTitleHidden]; + if ([[self toolbar] isVisible] == NO) { + [childViewController setLayoutAttribute:NSLayoutAttributeTop]; + NSURL *url = [self representedURL]; + [self setRepresentedURL:nil]; + [self setRepresentedURL:url]; + } else { + [childViewController setLayoutAttribute:NSLayoutAttributeBottom]; } } [super addTitlebarAccessoryViewController:childViewController]; @@ -185,14 +181,12 @@ - (void)removeTitlebarAccessoryViewControllerAtIndex:(NSInteger)index { [super removeTitlebarAccessoryViewControllerAtIndex:index]; - if (@available(macOS 11.0, *)) { - if ([self autoTitleVisibility] == SKWindowTitleHiddenForTabBar) { - [self setTitleVisibility:NSWindowTitleVisible]; - if ([[self toolbar] isVisible] == NO) { - NSURL *url = [self representedURL]; - [self setRepresentedURL:nil]; - [self setRepresentedURL:url]; - } + if ([self autoTitleVisibility] == SKWindowTitleHiddenForTabBar) { + [self setTitleVisibility:NSWindowTitleVisible]; + if ([[self toolbar] isVisible] == NO) { + NSURL *url = [self representedURL]; + [self setRepresentedURL:nil]; + [self setRepresentedURL:url]; } } } Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-10 17:21:21 UTC (rev 14959) +++ trunk/SKMainWindowController.m 2025-03-11 10:09:31 UTC (rev 14960) @@ -330,16 +330,16 @@ // Set up the window + // hidden pref for toolbar position relative to title: + // 0 = below, 1 = compact, 2 = beside, 3 = beside compact, 4 = replacing, 5 = replacing compact + NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; if (@available(macOS 11.0, *)) { - // hidden pref for toolbar position relative to title: - // 0 = below, 1 = compact, 2 = beside, 3 = beside compact, 4 = replacing, 5 = replacing compact - NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; [window setToolbarStyle:placement == 0 ? NSWindowToolbarStyleExpanded : (placement & 1) ? NSWindowToolbarStyleUnifiedCompact : NSWindowToolbarStyleUnified]; - if (placement == 1) - [(SKMainWindow *)window setAutoTitleVisibility:SKWindowTitleHiddenForTabBar]; - else if (placement > 3) - [(SKMainWindow *)window setAutoTitleVisibility:SKWindowTitleHiddenForToolbar]; } + if (placement == 1) + [(SKMainWindow *)window setAutoTitleVisibility:SKWindowTitleHiddenForTabBar]; + else if (placement > 3) + [(SKMainWindow *)window setAutoTitleVisibility:SKWindowTitleHiddenForToolbar]; // for animations [[window contentView] setWantsLayer:YES]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-10 17:21:33
|
Revision: 14959 http://sourceforge.net/p/skim-app/code/14959 Author: hofman Date: 2025-03-10 17:21:21 +0000 (Mon, 10 Mar 2025) Log Message: ----------- check whether other windows have the same title visibility setting before changing Modified Paths: -------------- trunk/SKMainWindow.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-10 16:56:19 UTC (rev 14958) +++ trunk/SKMainWindow.m 2025-03-10 17:21:21 UTC (rev 14959) @@ -151,7 +151,7 @@ NSLayoutAttribute layoutAttribute = [[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom; NSString *identifier = [[self toolbar] identifier]; for (NSWindow *window in [NSApp windows]) { - if ([[[window toolbar] identifier] isEqualToString:identifier] && [window respondsToSelector:@selector(setTabBarLayoutAttribute:)]) + if ([[[window toolbar] identifier] isEqualToString:identifier] && [window isKindOfClass:[SKMainWindow class]] && [(SKMainWindow *)window autoTitleVisibility] == autoTitleVisibility) [(SKMainWindow *)window setTabBarLayoutAttribute:layoutAttribute]; } } else if (autoTitleVisibility == SKWindowTitleHiddenForToolbar) { @@ -158,7 +158,7 @@ NSWindowTitleVisibility visibility = [[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden; NSString *identifier = [[self toolbar] identifier]; for (NSWindow *window in [NSApp windows]) { - if ([[[window toolbar] identifier] isEqualToString:identifier]) + if ([[[window toolbar] identifier] isEqualToString:identifier] && [window isKindOfClass:[SKMainWindow class]] && [(SKMainWindow *)window autoTitleVisibility] == autoTitleVisibility) [window setTitleVisibility:visibility]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-10 16:56:27
|
Revision: 14958 http://sourceforge.net/p/skim-app/code/14958 Author: hofman Date: 2025-03-10 16:56:19 +0000 (Mon, 10 Mar 2025) Log Message: ----------- property for window to decide when to hode its title based on extra title views, instead of using defult value that can change Modified Paths: -------------- trunk/SKMainWindow.h trunk/SKMainWindow.m trunk/SKMainWindowController.m trunk/SKStringConstants.h trunk/SKStringConstants.m Modified: trunk/SKMainWindow.h =================================================================== --- trunk/SKMainWindow.h 2025-03-10 10:25:36 UTC (rev 14957) +++ trunk/SKMainWindow.h 2025-03-10 16:56:19 UTC (rev 14958) @@ -40,6 +40,12 @@ NS_ASSUME_NONNULL_BEGIN +typedef NS_ENUM(NSInteger, SKAutoWindowTitleVisibility) { + SKWindowTitleVisible, + SKWindowTitleHiddenForToolbar, + SKWindowTitleHiddenForTabBar +}; + @protocol SKMainWindowDelegate <NSWindowDelegate> @optional - (void)window:(NSWindow *)window willSendEvent:(NSEvent *)event; @@ -54,6 +60,8 @@ @property (nullable, weak) id<SKMainWindowDelegate> delegate; +@property (nonatomic) SKAutoWindowTitleVisibility autoTitleVisibility;; + @end NS_ASSUME_NONNULL_END Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-10 10:25:36 UTC (rev 14957) +++ trunk/SKMainWindow.m 2025-03-10 16:56:19 UTC (rev 14958) @@ -40,12 +40,11 @@ #import "SKImageToolTipWindow.h" #import "NSResponder_SKExtensions.h" #import "NSEvent_SKExtensions.h" -#import "SKStringConstants.h" @implementation SKMainWindow -@synthesize disableConstrainedFrame; +@synthesize disableConstrainedFrame, autoTitleVisibility; @dynamic windowFrame, delegate; + (id)defaultAnimationForKey:(NSString *)key { @@ -131,10 +130,24 @@ } } +- (void)setAutoTitleVisibility:(SKAutoWindowTitleVisibility)visibility { + if (autoTitleVisibility != visibility) { + autoTitleVisibility = visibility; + if (autoTitleVisibility == SKWindowTitleHiddenForTabBar) { + if ([[self titlebarAccessoryViewControllers] count]) { + [self setTitleVisibility:NSWindowTitleHidden]; + [self setTabBarLayoutAttribute:[[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom]; + } + } else if (autoTitleVisibility == SKWindowTitleHiddenForToolbar) { + if ([[self toolbar] isVisible]) + [self setTitleVisibility:NSWindowTitleHidden]; + } + } +} + - (void)toggleToolbarShown:(id)sender { if (@available(macOS 11.0, *)) { - NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; - if (placement == 1) { + if (autoTitleVisibility == SKWindowTitleHiddenForTabBar) { NSLayoutAttribute layoutAttribute = [[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom; NSString *identifier = [[self toolbar] identifier]; for (NSWindow *window in [NSApp windows]) { @@ -141,7 +154,7 @@ if ([[[window toolbar] identifier] isEqualToString:identifier] && [window respondsToSelector:@selector(setTabBarLayoutAttribute:)]) [(SKMainWindow *)window setTabBarLayoutAttribute:layoutAttribute]; } - } else if (placement > 3) { + } else if (autoTitleVisibility == SKWindowTitleHiddenForToolbar) { NSWindowTitleVisibility visibility = [[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden; NSString *identifier = [[self toolbar] identifier]; for (NSWindow *window in [NSApp windows]) { @@ -155,7 +168,7 @@ - (void)addTitlebarAccessoryViewController:(NSTitlebarAccessoryViewController *)childViewController { if (@available(macOS 11.0, *)) { - if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 1) { + if ([self autoTitleVisibility] == SKWindowTitleHiddenForTabBar) { [self setTitleVisibility:NSWindowTitleHidden]; if ([[self toolbar] isVisible] == NO) { [childViewController setLayoutAttribute:NSLayoutAttributeTop]; @@ -173,7 +186,7 @@ - (void)removeTitlebarAccessoryViewControllerAtIndex:(NSInteger)index { [super removeTitlebarAccessoryViewControllerAtIndex:index]; if (@available(macOS 11.0, *)) { - if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 1) { + if ([self autoTitleVisibility] == SKWindowTitleHiddenForTabBar) { [self setTitleVisibility:NSWindowTitleVisible]; if ([[self toolbar] isVisible] == NO) { NSURL *url = [self representedURL]; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-10 10:25:36 UTC (rev 14957) +++ trunk/SKMainWindowController.m 2025-03-10 16:56:19 UTC (rev 14958) @@ -184,6 +184,8 @@ #define SKDisableSearchBarBlurringKey @"SKDisableSearchBarBlurring" +#define SKToolbarPlacementKey @"SKToolbarPlacement" + #pragma mark - @interface SKMainWindowController (SKPrivate) @@ -333,8 +335,10 @@ // 0 = below, 1 = compact, 2 = beside, 3 = beside compact, 4 = replacing, 5 = replacing compact NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; [window setToolbarStyle:placement == 0 ? NSWindowToolbarStyleExpanded : (placement & 1) ? NSWindowToolbarStyleUnifiedCompact : NSWindowToolbarStyleUnified]; - if (placement > 3 && [[window toolbar] isVisible]) - [window setTitleVisibility:NSWindowTitleHidden]; + if (placement == 1) + [(SKMainWindow *)window setAutoTitleVisibility:SKWindowTitleHiddenForTabBar]; + else if (placement > 3) + [(SKMainWindow *)window setAutoTitleVisibility:SKWindowTitleHiddenForToolbar]; } // for animations Modified: trunk/SKStringConstants.h =================================================================== --- trunk/SKStringConstants.h 2025-03-10 10:25:36 UTC (rev 14957) +++ trunk/SKStringConstants.h 2025-03-10 16:56:19 UTC (rev 14958) @@ -149,6 +149,5 @@ extern NSString *SKSepiaToneKey; extern NSString *SKWhitePointKey; extern NSString *SKPresentationInkNoteColorKey; -extern NSString *SKToolbarPlacementKey; NS_ASSUME_NONNULL_END Modified: trunk/SKStringConstants.m =================================================================== --- trunk/SKStringConstants.m 2025-03-10 10:25:36 UTC (rev 14957) +++ trunk/SKStringConstants.m 2025-03-10 16:56:19 UTC (rev 14958) @@ -149,4 +149,3 @@ NSString *SKSepiaToneKey = @"SKSepiaTone"; NSString *SKWhitePointKey = @"SKWhitePoint"; NSString *SKPresentationInkNoteColorKey = @"SKPresentationInkNoteColor"; -NSString *SKToolbarPlacementKey = @"SKToolbarPlacement"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-10 10:25:38
|
Revision: 14957 http://sourceforge.net/p/skim-app/code/14957 Author: hofman Date: 2025-03-10 10:25:36 +0000 (Mon, 10 Mar 2025) Log Message: ----------- just make sure we get the right kind of window Modified Paths: -------------- trunk/SKMainWindow.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-10 10:12:59 UTC (rev 14956) +++ trunk/SKMainWindow.m 2025-03-10 10:25:36 UTC (rev 14957) @@ -138,7 +138,7 @@ NSLayoutAttribute layoutAttribute = [[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom; NSString *identifier = [[self toolbar] identifier]; for (NSWindow *window in [NSApp windows]) { - if ([[[window toolbar] identifier] isEqualToString:identifier]) + if ([[[window toolbar] identifier] isEqualToString:identifier] && [window respondsToSelector:@selector(setTabBarLayoutAttribute:)]) [(SKMainWindow *)window setTabBarLayoutAttribute:layoutAttribute]; } } else if (placement > 3) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-10 10:13:06
|
Revision: 14956 http://sourceforge.net/p/skim-app/code/14956 Author: hofman Date: 2025-03-10 10:12:59 +0000 (Mon, 10 Mar 2025) Log Message: ----------- propagate changes to all windows with the same toolbar when toolbar is toggled with some custom toolbar placements Modified Paths: -------------- trunk/SKMainWindow.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-09 23:42:55 UTC (rev 14955) +++ trunk/SKMainWindow.m 2025-03-10 10:12:59 UTC (rev 14956) @@ -136,12 +136,18 @@ NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; if (placement == 1) { NSLayoutAttribute layoutAttribute = [[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom; - for (SKMainWindow *window in [self tabbedWindows] ?: @[self]) - [window setTabBarLayoutAttribute:layoutAttribute]; + NSString *identifier = [[self toolbar] identifier]; + for (NSWindow *window in [NSApp windows]) { + if ([[[window toolbar] identifier] isEqualToString:identifier]) + [(SKMainWindow *)window setTabBarLayoutAttribute:layoutAttribute]; + } } else if (placement > 3) { NSWindowTitleVisibility visibility = [[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden; - for (NSWindow *window in [self tabbedWindows] ?: @[self]) - [window setTitleVisibility:visibility]; + NSString *identifier = [[self toolbar] identifier]; + for (NSWindow *window in [NSApp windows]) { + if ([[[window toolbar] identifier] isEqualToString:identifier]) + [window setTitleVisibility:visibility]; + } } } [super toggleToolbarShown:sender]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-09 23:43:03
|
Revision: 14955 http://sourceforge.net/p/skim-app/code/14955 Author: hofman Date: 2025-03-09 23:42:55 +0000 (Sun, 09 Mar 2025) Log Message: ----------- make sure tab bar controller has the correct layout attribute when added Modified Paths: -------------- trunk/SKMainWindow.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-09 19:17:03 UTC (rev 14954) +++ trunk/SKMainWindow.m 2025-03-09 23:42:55 UTC (rev 14955) @@ -156,6 +156,8 @@ NSURL *url = [self representedURL]; [self setRepresentedURL:nil]; [self setRepresentedURL:url]; + } else { + [childViewController setLayoutAttribute:NSLayoutAttributeBottom]; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-09 19:17:15
|
Revision: 14954 http://sourceforge.net/p/skim-app/code/14954 Author: hofman Date: 2025-03-09 19:17:03 +0000 (Sun, 09 Mar 2025) Log Message: ----------- always change title visibility when adding or removing tab bar controller in compact mode Modified Paths: -------------- trunk/SKMainWindow.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-09 18:46:38 UTC (rev 14953) +++ trunk/SKMainWindow.m 2025-03-09 19:17:03 UTC (rev 14954) @@ -149,12 +149,14 @@ - (void)addTitlebarAccessoryViewController:(NSTitlebarAccessoryViewController *)childViewController { if (@available(macOS 11.0, *)) { - if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 1 && [[self toolbar] isVisible] == NO) { - [childViewController setLayoutAttribute:NSLayoutAttributeTop]; + if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 1) { [self setTitleVisibility:NSWindowTitleHidden]; - NSURL *url = [self representedURL]; - [self setRepresentedURL:nil]; - [self setRepresentedURL:url]; + if ([[self toolbar] isVisible] == NO) { + [childViewController setLayoutAttribute:NSLayoutAttributeTop]; + NSURL *url = [self representedURL]; + [self setRepresentedURL:nil]; + [self setRepresentedURL:url]; + } } } [super addTitlebarAccessoryViewController:childViewController]; @@ -163,11 +165,13 @@ - (void)removeTitlebarAccessoryViewControllerAtIndex:(NSInteger)index { [super removeTitlebarAccessoryViewControllerAtIndex:index]; if (@available(macOS 11.0, *)) { - if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 1 && [[self toolbar] isVisible] == NO) { + if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 1) { [self setTitleVisibility:NSWindowTitleVisible]; - NSURL *url = [self representedURL]; - [self setRepresentedURL:nil]; - [self setRepresentedURL:url]; + if ([[self toolbar] isVisible] == NO) { + NSURL *url = [self representedURL]; + [self setRepresentedURL:nil]; + [self setRepresentedURL:url]; + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-09 18:46:50
|
Revision: 14953 http://sourceforge.net/p/skim-app/code/14953 Author: hofman Date: 2025-03-09 18:46:38 +0000 (Sun, 09 Mar 2025) Log Message: ----------- Add option for hidden pref to move either the tab bar or the toolbar in the title bar, hiding the title when the tab bar is visible, for a very compact title bar. Modified Paths: -------------- trunk/SKMainWindow.m trunk/SKMainWindowController.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-07 22:52:16 UTC (rev 14952) +++ trunk/SKMainWindow.m 2025-03-09 18:46:38 UTC (rev 14953) @@ -122,12 +122,54 @@ [super setDelegate:newDelegate]; } +- (void)setTabBarLayoutAttribute:(NSLayoutAttribute)layoutAttribute { + NSTitlebarAccessoryViewController *tabBarController = [[self titlebarAccessoryViewControllers] firstObject]; + if (tabBarController && [tabBarController layoutAttribute] != layoutAttribute) { + [super removeTitlebarAccessoryViewControllerAtIndex:0]; + [tabBarController setLayoutAttribute:layoutAttribute]; + [super addTitlebarAccessoryViewController:tabBarController]; + } +} + - (void)toggleToolbarShown:(id)sender { if (@available(macOS 11.0, *)) { - if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] > 2) - [self setTitleVisibility:[[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden]; + NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; + if (placement == 1) { + NSLayoutAttribute layoutAttribute = [[self toolbar] isVisible] ? NSLayoutAttributeTop : NSLayoutAttributeBottom; + for (SKMainWindow *window in [self tabbedWindows] ?: @[self]) + [window setTabBarLayoutAttribute:layoutAttribute]; + } else if (placement > 3) { + NSWindowTitleVisibility visibility = [[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden; + for (NSWindow *window in [self tabbedWindows] ?: @[self]) + [window setTitleVisibility:visibility]; + } } [super toggleToolbarShown:sender]; } +- (void)addTitlebarAccessoryViewController:(NSTitlebarAccessoryViewController *)childViewController { + if (@available(macOS 11.0, *)) { + if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 1 && [[self toolbar] isVisible] == NO) { + [childViewController setLayoutAttribute:NSLayoutAttributeTop]; + [self setTitleVisibility:NSWindowTitleHidden]; + NSURL *url = [self representedURL]; + [self setRepresentedURL:nil]; + [self setRepresentedURL:url]; + } + } + [super addTitlebarAccessoryViewController:childViewController]; +} + +- (void)removeTitlebarAccessoryViewControllerAtIndex:(NSInteger)index { + [super removeTitlebarAccessoryViewControllerAtIndex:index]; + if (@available(macOS 11.0, *)) { + if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 1 && [[self toolbar] isVisible] == NO) { + [self setTitleVisibility:NSWindowTitleVisible]; + NSURL *url = [self representedURL]; + [self setRepresentedURL:nil]; + [self setRepresentedURL:url]; + } + } +} + @end Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-07 22:52:16 UTC (rev 14952) +++ trunk/SKMainWindowController.m 2025-03-09 18:46:38 UTC (rev 14953) @@ -330,10 +330,10 @@ if (@available(macOS 11.0, *)) { // hidden pref for toolbar position relative to title: - // 0 = below, 1 = beside, 2 = beside compact, 3 = replacing, 4 = replacing compact + // 0 = below, 1 = compact, 2 = beside, 3 = beside compact, 4 = replacing, 5 = replacing compact NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; - [window setToolbarStyle:placement == 0 ? NSWindowToolbarStyleExpanded : (placement % 2) ? NSWindowToolbarStyleUnified : NSWindowToolbarStyleUnifiedCompact]; - if (placement > 2 && [[window toolbar] isVisible]) + [window setToolbarStyle:placement == 0 ? NSWindowToolbarStyleExpanded : (placement & 1) ? NSWindowToolbarStyleUnifiedCompact : NSWindowToolbarStyleUnified]; + if (placement > 3 && [[window toolbar] isVisible]) [window setTitleVisibility:NSWindowTitleHidden]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-07 22:52:27
|
Revision: 14952 http://sourceforge.net/p/skim-app/code/14952 Author: hofman Date: 2025-03-07 22:52:16 +0000 (Fri, 07 Mar 2025) Log Message: ----------- single setting of toolbar style Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-07 22:22:01 UTC (rev 14951) +++ trunk/SKMainWindowController.m 2025-03-07 22:52:16 UTC (rev 14952) @@ -332,19 +332,9 @@ // hidden pref for toolbar position relative to title: // 0 = below, 1 = beside, 2 = beside compact, 3 = replacing, 4 = replacing compact NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; - if (placement == 0) { - [window setToolbarStyle:NSWindowToolbarStyleExpanded]; - } else if (placement == 2) { - [window setToolbarStyle:NSWindowToolbarStyleUnifiedCompact]; - } else if (placement == 3) { - [window setToolbarStyle:NSWindowToolbarStyleUnified]; - if ([[window toolbar] isVisible]) - [window setTitleVisibility:NSWindowTitleHidden]; - } else if (placement == 4) { - [window setToolbarStyle:NSWindowToolbarStyleUnifiedCompact]; - if ([[window toolbar] isVisible]) - [window setTitleVisibility:NSWindowTitleHidden]; - } + [window setToolbarStyle:placement == 0 ? NSWindowToolbarStyleExpanded : (placement % 2) ? NSWindowToolbarStyleUnified : NSWindowToolbarStyleUnifiedCompact]; + if (placement > 2 && [[window toolbar] isVisible]) + [window setTitleVisibility:NSWindowTitleHidden]; } // for animations This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-07 22:22:14
|
Revision: 14951 http://sourceforge.net/p/skim-app/code/14951 Author: hofman Date: 2025-03-07 22:22:01 +0000 (Fri, 07 Mar 2025) Log Message: ----------- Add two hidden pref options for toolbar placement with compact unified toolbar Modified Paths: -------------- trunk/SKMainWindow.m trunk/SKMainWindowController.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-07 17:24:59 UTC (rev 14950) +++ trunk/SKMainWindow.m 2025-03-07 22:22:01 UTC (rev 14951) @@ -124,7 +124,7 @@ - (void)toggleToolbarShown:(id)sender { if (@available(macOS 11.0, *)) { - if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 2) + if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] > 2) [self setTitleVisibility:[[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden]; } [super toggleToolbarShown:sender]; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-07 17:24:59 UTC (rev 14950) +++ trunk/SKMainWindowController.m 2025-03-07 22:22:01 UTC (rev 14951) @@ -329,14 +329,21 @@ // Set up the window if (@available(macOS 11.0, *)) { - // hidden pref: 0 = below title, 1 = beside title, 2 = replacing title + // hidden pref for toolbar position relative to title: + // 0 = below, 1 = beside, 2 = beside compact, 3 = replacing, 4 = replacing compact NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; if (placement == 0) { [window setToolbarStyle:NSWindowToolbarStyleExpanded]; - } else if (placement == 2) { + } else if (placement == 2) { + [window setToolbarStyle:NSWindowToolbarStyleUnifiedCompact]; + } else if (placement == 3) { [window setToolbarStyle:NSWindowToolbarStyleUnified]; if ([[window toolbar] isVisible]) [window setTitleVisibility:NSWindowTitleHidden]; + } else if (placement == 4) { + [window setToolbarStyle:NSWindowToolbarStyleUnifiedCompact]; + if ([[window toolbar] isVisible]) + [window setTitleVisibility:NSWindowTitleHidden]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-07 17:25:12
|
Revision: 14950 http://sourceforge.net/p/skim-app/code/14950 Author: hofman Date: 2025-03-07 17:24:59 +0000 (Fri, 07 Mar 2025) Log Message: ----------- change comment Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-07 17:22:30 UTC (rev 14949) +++ trunk/SKMainWindowController.m 2025-03-07 17:24:59 UTC (rev 14950) @@ -329,7 +329,7 @@ // Set up the window if (@available(macOS 11.0, *)) { - // hidden pref: 0 = expanded, 1 = unified, 2 = title hidden + // hidden pref: 0 = below title, 1 = beside title, 2 = replacing title NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; if (placement == 0) { [window setToolbarStyle:NSWindowToolbarStyleExpanded]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-07 17:22:36
|
Revision: 14949 http://sourceforge.net/p/skim-app/code/14949 Author: hofman Date: 2025-03-07 17:22:30 +0000 (Fri, 07 Mar 2025) Log Message: ----------- only hide title for replacing toolbar on 11.0+ Modified Paths: -------------- trunk/SKMainWindow.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-07 17:08:28 UTC (rev 14948) +++ trunk/SKMainWindow.m 2025-03-07 17:22:30 UTC (rev 14949) @@ -123,8 +123,10 @@ } - (void)toggleToolbarShown:(id)sender { - if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 2) - [self setTitleVisibility:[[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden]; + if (@available(macOS 11.0, *)) { + if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 2) + [self setTitleVisibility:[[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden]; + } [super toggleToolbarShown:sender]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2025-03-07 17:08:40
|
Revision: 14948 http://sourceforge.net/p/skim-app/code/14948 Author: hofman Date: 2025-03-07 17:08:28 +0000 (Fri, 07 Mar 2025) Log Message: ----------- Add a hidden preference for the placement of the toolbar: below, beside, or replacing the title Modified Paths: -------------- trunk/SKMainWindow.m trunk/SKMainWindowController.m trunk/SKStringConstants.h trunk/SKStringConstants.m Modified: trunk/SKMainWindow.m =================================================================== --- trunk/SKMainWindow.m 2025-03-07 09:59:13 UTC (rev 14947) +++ trunk/SKMainWindow.m 2025-03-07 17:08:28 UTC (rev 14948) @@ -40,6 +40,7 @@ #import "SKImageToolTipWindow.h" #import "NSResponder_SKExtensions.h" #import "NSEvent_SKExtensions.h" +#import "SKStringConstants.h" @implementation SKMainWindow @@ -121,4 +122,10 @@ [super setDelegate:newDelegate]; } +- (void)toggleToolbarShown:(id)sender { + if ([[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey] == 2) + [self setTitleVisibility:[[self toolbar] isVisible] ? NSWindowTitleVisible : NSWindowTitleHidden]; + [super toggleToolbarShown:sender]; +} + @end Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-03-07 09:59:13 UTC (rev 14947) +++ trunk/SKMainWindowController.m 2025-03-07 17:08:28 UTC (rev 14948) @@ -328,8 +328,17 @@ // Set up the window - if (@available(macOS 11.0, *)) - [window setToolbarStyle:NSWindowToolbarStyleExpanded]; + if (@available(macOS 11.0, *)) { + // hidden pref: 0 = expanded, 1 = unified, 2 = title hidden + NSInteger placement = [[NSUserDefaults standardUserDefaults] integerForKey:SKToolbarPlacementKey]; + if (placement == 0) { + [window setToolbarStyle:NSWindowToolbarStyleExpanded]; + } else if (placement == 2) { + [window setToolbarStyle:NSWindowToolbarStyleUnified]; + if ([[window toolbar] isVisible]) + [window setTitleVisibility:NSWindowTitleHidden]; + } + } // for animations [[window contentView] setWantsLayer:YES]; Modified: trunk/SKStringConstants.h =================================================================== --- trunk/SKStringConstants.h 2025-03-07 09:59:13 UTC (rev 14947) +++ trunk/SKStringConstants.h 2025-03-07 17:08:28 UTC (rev 14948) @@ -149,5 +149,6 @@ extern NSString *SKSepiaToneKey; extern NSString *SKWhitePointKey; extern NSString *SKPresentationInkNoteColorKey; +extern NSString *SKToolbarPlacementKey; NS_ASSUME_NONNULL_END Modified: trunk/SKStringConstants.m =================================================================== --- trunk/SKStringConstants.m 2025-03-07 09:59:13 UTC (rev 14947) +++ trunk/SKStringConstants.m 2025-03-07 17:08:28 UTC (rev 14948) @@ -149,3 +149,4 @@ NSString *SKSepiaToneKey = @"SKSepiaTone"; NSString *SKWhitePointKey = @"SKWhitePoint"; NSString *SKPresentationInkNoteColorKey = @"SKPresentationInkNoteColor"; +NSString *SKToolbarPlacementKey = @"SKToolbarPlacement"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |