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.



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

Reply via email to