Add set_keyring_label (#64)
This commit is contained in:
@@ -1129,6 +1129,12 @@ impl App {
|
||||
self.platform.set_gpu_requirements(requirements);
|
||||
}
|
||||
|
||||
/// Sets the label applied to credentials stored in the system keyring.
|
||||
/// Call before writing credentials. Only Linux/FreeBSD apply the label.
|
||||
pub fn set_keyring_label(&self, label: impl Into<SharedString>) {
|
||||
self.platform.set_keyring_label(label.into());
|
||||
}
|
||||
|
||||
/// Returns a handle to the window that is currently focused at the platform level, if one exists.
|
||||
pub fn active_window(&self) -> Option<AnyWindowHandle> {
|
||||
self.platform.active_window()
|
||||
|
||||
@@ -248,6 +248,10 @@ pub trait Platform: 'static {
|
||||
/// `gpui_wgpu::WgpuDeviceRequirements`.
|
||||
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
||||
fn set_gpu_requirements(&self, _requirements: Box<dyn std::any::Any>) {}
|
||||
|
||||
/// Sets the label applied to credentials stored in the system keyring.
|
||||
/// Only Linux/FreeBSD use this label.
|
||||
fn set_keyring_label(&self, _label: SharedString) {}
|
||||
}
|
||||
|
||||
/// A handle to a platform's display, e.g. a monitor or laptop screen.
|
||||
|
||||
Reference in New Issue
Block a user