Revision: 13706
          http://sourceforge.net/p/skim-app/code/13706
Author:   hofman
Date:     2023-10-30 10:20:48 +0000 (Mon, 30 Oct 2023)
Log Message:
-----------
Add Preferences to window items title for preferences window. Add document 
windows at end of windows menu.

Modified Paths:
--------------
    trunk/SKApplication.m
    trunk/de.lproj/Localizable.strings
    trunk/en.lproj/Localizable.strings
    trunk/es.lproj/Localizable.strings
    trunk/fr.lproj/Localizable.strings
    trunk/it.lproj/Localizable.strings
    trunk/ja.lproj/Localizable.strings
    trunk/nl.lproj/Localizable.strings
    trunk/pl.lproj/Localizable.strings
    trunk/ru.lproj/Localizable.strings
    trunk/zh_CN.lproj/Localizable.strings
    trunk/zh_TW.lproj/Localizable.strings

Modified: trunk/SKApplication.m
===================================================================
--- trunk/SKApplication.m       2023-10-29 23:26:39 UTC (rev 13705)
+++ trunk/SKApplication.m       2023-10-30 10:20:48 UTC (rev 13706)
@@ -42,7 +42,10 @@
 #import "NSDocument_SKExtensions.h"
 #import "NSEvent_SKExtensions.h"
 #import "SKDownloadController.h"
+#import "SKPreferenceController.h"
 
+#define EM_DASH_CHARACTER (unichar)0x2014
+
 NSString *SKApplicationStartsTerminatingNotification = 
@"SKApplicationStartsTerminatingNotification";
 
 @implementation SKApplication
@@ -138,6 +141,9 @@
     if ([toSort count] > 1)
         [toSort sortUsingDescriptors:@[[[[NSSortDescriptor alloc] 
initWithKey:@"title" ascending:YES selector:@selector(caseInsensitiveCompare:)] 
autorelease]]];
     
+    for (item in auxItems)
+        [windowsMenu addItem:item];
+    
     for (item in mainItems) {
         [windowsMenu addItem:item];
         NSDocument *doc = [[[item target] windowController] document];
@@ -156,9 +162,6 @@
                 [windowsMenu addItem:item];
         }
     }
-    
-    for (item in auxItems)
-        [windowsMenu addItem:item];
 }
 
 - (void)addWindowsItem:(NSWindow *)aWindow title:(NSString *)aString 
filename:(BOOL)isFilename {
@@ -165,6 +168,9 @@
     if ([[aWindow windowController] class] == [SKDownloadController class])
         return;
     
+    if ([[aWindow windowController] class] == [SKPreferenceController class])
+        aString = [NSString stringWithFormat:@"%@ %C %@", 
NSLocalizedString(@"Preferences", @"Window description"), EM_DASH_CHARACTER, 
aString];
+    
     [super addWindowsItem:aWindow title:aString filename:isFilename];
     
     [self reorganizeWindowsItem:aWindow];
@@ -171,6 +177,12 @@
 }
 
 - (void)changeWindowsItem:(NSWindow *)aWindow title:(NSString *)aString 
filename:(BOOL)isFilename {
+    if ([[aWindow windowController] class] == [SKDownloadController class])
+        return;
+    
+    if ([[aWindow windowController] class] == [SKPreferenceController class])
+        aString = [NSString stringWithFormat:@"%@ %C %@", 
NSLocalizedString(@"Preferences", @"Window description"), EM_DASH_CHARACTER, 
aString];
+    
     [super changeWindowsItem:aWindow title:aString filename:isFilename];
     
     [self reorganizeWindowsItem:aWindow];

Modified: trunk/de.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/en.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/es.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/fr.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/it.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/ja.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/nl.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/pl.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/ru.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/zh_CN.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/zh_TW.lproj/Localizable.strings
===================================================================
(Binary files differ)

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to