Revision: 15511 http://sourceforge.net/p/skim-app/code/15511 Author: hofman Date: 2025-06-20 16:32:17 +0000 (Fri, 20 Jun 2025) Log Message: ----------- separate accessor for left status or subtitle
Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2025-06-20 16:22:44 UTC (rev 15510) +++ trunk/SKMainWindowController.m 2025-06-20 16:32:17 UTC (rev 15511) @@ -658,20 +658,21 @@ #pragma mark UI updating +- (NSString *)pageStatus { + if ([pdfView document]) + return [NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @"Status message"), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; + return @""; +} + - (void)updateSubtitle { - if (@available(macOS 11.0, *)) { - NSString *subtitle = @""; - if ([pdfView document]) - subtitle = [NSString stringWithFormat:NSLocalizedString(@"Page %ld of %ld", @""), (long)([[[self pdfView] currentPage] pageIndex] + 1), (long)[[pdfView document] pageCount]]; - [([self interactionMode] == SKPresentationMode ? savedNormalWindow : [self window]) setSubtitle:subtitle]; - } else { + if (@available(macOS 11.0, *)) + [([self interactionMode] == SKPresentationMode ? savedNormalWindow : [self window]) setSubtitle:[self pageStatus]]; + 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]; + [[statusBar leftField] setStringValue:[self pageStatus]]; } #define CM_PER_POINT 0.035277778 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit