Use applicationShouldTerminate to control whether application should quit.
This commit is contained in:
parent
6362e60a7b
commit
adacc2bcf9
5 changed files with 33 additions and 19 deletions
|
@ -11,11 +11,12 @@
|
|||
namespace atom {
|
||||
|
||||
void Browser::Terminate() {
|
||||
is_quiting_ = true;
|
||||
[[AtomApplication sharedApplication] terminate:nil];
|
||||
}
|
||||
|
||||
void Browser::Focus() {
|
||||
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
|
||||
[[AtomApplication sharedApplication] activateIgnoringOtherApps:YES];
|
||||
}
|
||||
|
||||
std::string Browser::GetVersion() {
|
||||
|
@ -24,4 +25,8 @@ std::string Browser::GetVersion() {
|
|||
return base::SysNSStringToUTF8(version);
|
||||
}
|
||||
|
||||
void Browser::CancelQuit() {
|
||||
[[AtomApplication sharedApplication] replyToApplicationShouldTerminate:NO];
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue