Add a function to allow users to reboot the IME.
- By terminating the IME, the IME gets restarted immediately.
This commit is contained in:
parent
4f518c6c4f
commit
56f5c52ce2
|
@ -167,6 +167,9 @@ static double FindHighestScore(const vector<NodeAnchor>& nodes, double epsilon)
|
||||||
[menu addItemWithTitle:NSLocalizedString(@"vChewing Preferences", @"") action:@selector(showPreferences:) keyEquivalent:@""];
|
[menu addItemWithTitle:NSLocalizedString(@"vChewing Preferences", @"") action:@selector(showPreferences:) keyEquivalent:@""];
|
||||||
[menu addItemWithTitle:NSLocalizedString(@"Check for Updates…", @"") action:@selector(checkForUpdate:) keyEquivalent:@""];
|
[menu addItemWithTitle:NSLocalizedString(@"Check for Updates…", @"") action:@selector(checkForUpdate:) keyEquivalent:@""];
|
||||||
[menu addItemWithTitle:NSLocalizedString(@"About vChewing…", @"") action:@selector(showAbout:) keyEquivalent:@""];
|
[menu addItemWithTitle:NSLocalizedString(@"About vChewing…", @"") action:@selector(showAbout:) keyEquivalent:@""];
|
||||||
|
if (optionKeyPressed) {
|
||||||
|
[menu addItemWithTitle:NSLocalizedString(@"Reboot vChewing…", @"") action:@selector(selfTerminate:) keyEquivalent:@""];
|
||||||
|
}
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1525,6 +1528,12 @@ NS_INLINE size_t max(size_t a, size_t b) { return a > b ? a : b; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)selfTerminate:(id)sender
|
||||||
|
{
|
||||||
|
NSLog(@"vChewing App self-terminated on request.");
|
||||||
|
[NSApplication.sharedApplication terminate:nil];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)checkForUpdate:(id)sender
|
- (void)checkForUpdate:(id)sender
|
||||||
{
|
{
|
||||||
[(AppDelegate *)[[NSApplication sharedApplication] delegate] checkForUpdateForced:YES];
|
[(AppDelegate *)[[NSApplication sharedApplication] delegate] checkForUpdateForced:YES];
|
||||||
|
|
|
@ -35,3 +35,4 @@
|
||||||
"Maximum 15 candidate keys allowed." = "Maximum 15 candidate keys allowed.";
|
"Maximum 15 candidate keys allowed." = "Maximum 15 candidate keys allowed.";
|
||||||
"⚠︎ Phrase replacement mode enabled, interfering user phrase entry." = "⚠︎ Phrase replacement mode enabled, interfering user phrase entry.";
|
"⚠︎ Phrase replacement mode enabled, interfering user phrase entry." = "⚠︎ Phrase replacement mode enabled, interfering user phrase entry.";
|
||||||
"NT351 BPMF EMU" = "NT351 Per-Char Select Mode";
|
"NT351 BPMF EMU" = "NT351 Per-Char Select Mode";
|
||||||
|
"Reboot vChewing…" = "Reboot vChewing…";
|
||||||
|
|
|
@ -35,3 +35,4 @@
|
||||||
"Maximum 15 candidate keys allowed." = "言選り用キー陣列には最多15つキー登録できます。";
|
"Maximum 15 candidate keys allowed." = "言選り用キー陣列には最多15つキー登録できます。";
|
||||||
"⚠︎ Phrase replacement mode enabled, interfering user phrase entry." = "⚠︎ 言葉置換機能稼働中、新添付言葉にも影響。";
|
"⚠︎ Phrase replacement mode enabled, interfering user phrase entry." = "⚠︎ 言葉置換機能稼働中、新添付言葉にも影響。";
|
||||||
"NT351 BPMF EMU" = "全候補入力モード";
|
"NT351 BPMF EMU" = "全候補入力モード";
|
||||||
|
"Reboot vChewing…" = "入力アプリ再起動…";
|
||||||
|
|
|
@ -35,3 +35,4 @@
|
||||||
"Maximum 15 candidate keys allowed." = "选字键最多只能指定十五个。";
|
"Maximum 15 candidate keys allowed." = "选字键最多只能指定十五个。";
|
||||||
"⚠︎ Phrase replacement mode enabled, interfering user phrase entry." = "⚠︎ 语汇置换功能已启用,会波及语汇自订。";
|
"⚠︎ Phrase replacement mode enabled, interfering user phrase entry." = "⚠︎ 语汇置换功能已启用,会波及语汇自订。";
|
||||||
"NT351 BPMF EMU" = "模拟逐字选字输入";
|
"NT351 BPMF EMU" = "模拟逐字选字输入";
|
||||||
|
"Reboot vChewing…" = "重新启动输入法…";
|
||||||
|
|
|
@ -35,3 +35,4 @@
|
||||||
"Maximum 15 candidate keys allowed." = "選字鍵最多只能指定十五個。";
|
"Maximum 15 candidate keys allowed." = "選字鍵最多只能指定十五個。";
|
||||||
"⚠︎ Phrase replacement mode enabled, interfering user phrase entry." = "⚠︎ 語彙置換功能已啟用,會波及語彙自訂。";
|
"⚠︎ Phrase replacement mode enabled, interfering user phrase entry." = "⚠︎ 語彙置換功能已啟用,會波及語彙自訂。";
|
||||||
"NT351 BPMF EMU" = "模擬逐字選字輸入";
|
"NT351 BPMF EMU" = "模擬逐字選字輸入";
|
||||||
|
"Reboot vChewing…" = "重新啟動輸入法…";
|
||||||
|
|
Loading…
Reference in New Issue