Start work on a login command

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-06-07 18:15:11 -07:00
co-authored by Nathan Sobo
parent 3a932cc9bf
commit db3e01a12c
9 changed files with 178 additions and 12 deletions
+10
View File
@@ -449,6 +449,16 @@ impl platform::Platform for MacPlatform {
}
}
}
fn open_url(&self, url: &str) {
unsafe {
let url = NSURL::alloc(nil)
.initWithString_(ns_string(url))
.autorelease();
let workspace: id = msg_send![class!(NSWorkspace), sharedWorkspace];
msg_send![workspace, openURL: url]
}
}
}
unsafe fn get_foreground_platform(object: &mut Object) -> &MacForegroundPlatform {
+2
View File
@@ -121,6 +121,8 @@ impl super::Platform for Platform {
fn read_from_clipboard(&self) -> Option<ClipboardItem> {
self.current_clipboard_item.lock().clone()
}
fn open_url(&self, _: &str) {}
}
impl Window {