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.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to