YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: remove redundant 'Quit screenpipe' from dock menu
Louis Beaumontb3dc080ca461
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rsindex dc707fec0..e6d8d29df 100755--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs@@ -121,13 +121,6 @@ fn setup_dock_menu(app_handle: AppHandle) {}}}- extern "C" fn quit_app(_this: &Object, _sel: Sel, _sender: id) {- unsafe {- if let Some(ref app) = DOCK_APP_HANDLE {- app.exit(0);- }- }- }extern "C" fn dock_menu(_this: &Object, _sel: Sel, _sender: id) -> id {unsafe {let menu: id = msg_send![class!(NSMenu), new];@@ -150,19 +143,7 @@ fn setup_dock_menu(app_handle: AppHandle) {let _: () = msg_send![item, setTarget: _this];let _: () = msg_send![menu, addItem: item];- // Separator- let sep: id = msg_send![class!(NSMenuItem), separatorItem];- let _: () = msg_send![menu, addItem: sep];-- // "Quit"- let title = NSString::alloc(nil).init_str("Quit screenpipe");- let action = sel!(quitApp:);- let key = NSString::alloc(nil).init_str("");- let item: id = msg_send![class!(NSMenuItem), alloc];- let item: id = msg_send![item, initWithTitle:title action:action keyEquivalent:key];- let _: () = msg_send![item, setTarget: _this];- let _: () = msg_send![menu, addItem: item];-+ // Note: macOS adds native "Quit" to dock menu automaticallymenu}}@@ -172,7 +153,6 @@ fn setup_dock_menu(app_handle: AppHandle) {let mut decl = objc::declare::ClassDecl::new("ScreenpipeDockMenuDelegate", superclass).unwrap();decl.add_method(sel!(showScreenpipe:), show_screenpipe as extern "C" fn(&Object, Sel, id));decl.add_method(sel!(openSettings:), open_settings as extern "C" fn(&Object, Sel, id));- decl.add_method(sel!(quitApp:), quit_app as extern "C" fn(&Object, Sel, id));decl.add_method(sel!(applicationDockMenu:), dock_menu as extern "C" fn(&Object, Sel, id) -> id);let delegate_class = decl.register();@@ -200,7 +180,7 @@ fn setup_dock_menu(app_handle: AppHandle) {);// Also add the action methodslet void_encoding = b"v:@\0".as_ptr() as *const std::ffi::c_char;- for sel_name in &[sel!(showScreenpipe:), sel!(openSettings:), sel!(quitApp:)] {+ for sel_name in &[sel!(showScreenpipe:), sel!(openSettings:)] {let m = objc::runtime::class_getInstanceMethod(object_getClass(delegate) as *const _,*sel_name,