Revision: 14117
http://sourceforge.net/p/skim-app/code/14117
Author: hofman
Date: 2024-03-20 15:41:16 +0000 (Wed, 20 Mar 2024)
Log Message:
-----------
Hide find pane state menu items in View menu when not searching to clean up the
View menu
Modified Paths:
--------------
trunk/SKApplicationController.m
trunk/SKMainWindowController_UI.m
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2024-03-19 14:51:47 UTC (rev 14116)
+++ trunk/SKApplicationController.m 2024-03-20 15:41:16 UTC (rev 14117)
@@ -311,6 +311,8 @@
[[SKDownloadController sharedDownloadController] showWindow:self];
}
+- (IBAction)changeFindPaneState:(id)sender {}
+
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
SEL action = [menuItem action];
if (action == @selector(orderFrontLineInspector:)) {
@@ -325,6 +327,9 @@
else
[menuItem setTitle:NSLocalizedString(@"Show Note Type", @"Menu
item title")];
return YES;
+ } else if (action == @selector(changeFindPaneState:)) {
+ [menuItem setHidden:YES];
+ return NO;
}
return YES;
}
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2024-03-19 14:51:47 UTC (rev 14116)
+++ trunk/SKMainWindowController_UI.m 2024-03-20 15:41:16 UTC (rev 14117)
@@ -1859,7 +1859,8 @@
return [self interactionMode] != SKPresentationMode;
} else if (action == @selector(changeFindPaneState:)) {
[menuItem setState:((SKFindPaneState)mwcFlags.findPaneState ==
(SKFindPaneState)[menuItem tag] && [self displaysFindPane]) ?
NSControlStateValueOn : NSControlStateValueOff];
- return [[self searchString] length] > 0;
+ [menuItem setHidden:[[self searchString] length] == 0];
+ return [[self searchString] length] > 0;
} else if (action == @selector(toggleOverview:)) {
if ([self hasOverview])
[menuItem setTitle:NSLocalizedString(@"Hide Overview", @"Menu item
title")];
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