Revision: 15530
          http://sourceforge.net/p/skim-app/code/15530
Author:   hofman
Date:     2025-06-23 16:04:00 +0000 (Mon, 23 Jun 2025)
Log Message:
-----------
Insert Scripts menu and tweak main menu items in applicationWillFinishLaunching

Modified Paths:
--------------
    trunk/SKApplicationController.m

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2025-06-23 15:51:41 UTC (rev 15529)
+++ trunk/SKApplicationController.m     2025-06-23 16:04:00 UTC (rev 15530)
@@ -154,17 +154,6 @@
     [[NSUserDefaultsController sharedUserDefaultsController] 
setInitialValues:[initialValuesDict 
dictionaryWithValuesForKeys:resettableUserDefaultsKeys]];
 }
 
-- (void)awakeFromNib {
-    NSMenu *menu = [[[NSApp mainMenu] itemAtIndex:VIEW_MENU_INDEX] submenu];
-    for (NSMenuItem *menuItem in [menu itemArray]) {
-        if ([menuItem action] == @selector(changeLeftSidePaneState:) || 
[menuItem action] == @selector(changeRightSidePaneState:) || [menuItem action] 
== @selector(changeFindPaneState:))
-            [menuItem setIndentationLevel:1];
-    }
-    
-    // this creates the script menu if needed
-    (void)[NSApp scriptMenu];
-}
-
 - (void)registerCurrentDocuments:(id)timerOrNotification {
     [[NSUserDefaults standardUserDefaults] setObject:[[NSApp orderedDocuments] 
valueForKey:CURRENTDOCUMENTSETUP_KEY] forKey:SKLastOpenFileNamesKey];
     BOOL forced = timerOrNotification == nil;
@@ -203,6 +192,15 @@
     [PDFPage setUsesSequentialPageNumbering:[[NSUserDefaults 
standardUserDefaults] boolForKey:SKSequentialPageNumberingKey]];
     [sud addObserver:self forKeyPath:SKSequentialPageNumberingKey options:0 
context:&SKApplicationControllerDefaultsObservationContext];
     
+    NSMenu *menu = [[[NSApp mainMenu] itemAtIndex:VIEW_MENU_INDEX] submenu];
+    for (NSMenuItem *menuItem in [menu itemArray]) {
+        if ([menuItem action] == @selector(changeLeftSidePaneState:) || 
[menuItem action] == @selector(changeRightSidePaneState:) || [menuItem action] 
== @selector(changeFindPaneState:))
+            [menuItem setIndentationLevel:1];
+    }
+    
+    // this creates the script menu if needed
+    (void)[NSApp scriptMenu];
+    
     if ([sud integerForKey:SKReopenLastOpenFilesKey] == SKReopenAlways || [sud 
boolForKey:SKIsRelaunchKey]) {
         // just remove this in case opening the last open files crashes the 
app after a relaunch
         if ([sud objectForKey:SKIsRelaunchKey]) {

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