Pref // Bind Options to Menu Option Visibility.

- The "Reload User Phrases" menu command will not show unless either the Alt key gets pressed or the autoreload of user phrases data is checked Enabled in the Preferences window.
This commit is contained in:
ShikiSuen 2022-01-29 22:25:36 +08:00
parent b5c0df39b5
commit ba95197d85
1 changed files with 4 additions and 2 deletions

View File

@ -163,8 +163,10 @@ static double FindHighestScore(const vector<NodeAnchor>& nodes, double epsilon)
[menu addItemWithTitle:NSLocalizedString(@"Edit Phrase Replacement Table", @"") action:@selector(openPhraseReplacement:) keyEquivalent:@""];
}
[menu addItemWithTitle:NSLocalizedString(@"Reload User Phrases", @"") action:@selector(reloadUserPhrases:) keyEquivalent:@""];
if (optionKeyPressed || !Preferences.shouldAutoReloadUserDataFiles) {
[menu addItemWithTitle:NSLocalizedString(@"Reload User Phrases", @"") action:@selector(reloadUserPhrases:) keyEquivalent:@""];
}
[menu addItem:[NSMenuItem separatorItem]]; // ------------------------------
[menu addItemWithTitle:NSLocalizedString(@"vChewing Preferences", @"") action:@selector(showPreferences:) keyEquivalent:@""];