This commit is contained in:
parent
17a4cb6b5c
commit
711d7ed6cd
4 changed files with 16 additions and 3 deletions
|
|
@ -642,3 +642,12 @@ fn get_env(name: &str, uid: &str) -> String {
|
|||
"".to_owned()
|
||||
}
|
||||
}
|
||||
|
||||
#[link(name = "gtk-3")]
|
||||
extern "C" {
|
||||
fn gtk_main_quit();
|
||||
}
|
||||
|
||||
pub fn quit_gui() {
|
||||
unsafe { gtk_main_quit() };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ pub fn is_installed() -> bool {
|
|||
false
|
||||
}
|
||||
|
||||
fn quit_gui() {
|
||||
pub fn quit_gui() {
|
||||
use cocoa::appkit::NSApp;
|
||||
unsafe {
|
||||
let () = msg_send!(NSApp(), terminate: nil);
|
||||
|
|
|
|||
|
|
@ -1091,3 +1091,7 @@ oLink.Save
|
|||
allow_err!(std::fs::remove_file(shortcut));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn quit_gui() {
|
||||
unsafe { PostQuitMessage(0) };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue