From 27a67152ffc9deb9d0f95074028a4e51435796c4 Mon Sep 17 00:00:00 2001 From: Ryan Cabanas Date: Fri, 15 May 2026 21:29:29 -0400 Subject: [PATCH] fix(mac): correct Finder service method name to openInGittyup - The @implementation block referenced openInGitAhead (the legacy GitAhead method name) while the @interface declared openInGittyup, causing the "Open in Gittyup" Finder service to never be registered. Consequently, couldn't use "Services > Open in Gittyup" to open a repo from a Finder window. - Also add ObjC language block to .clang-format so clang-format accepts .mm files without error. --- .clang-format | 3 ++- src/app/Application_mac.mm | 16 +++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.clang-format b/.clang-format index f32eb4b47..0ba785e2d 100644 --- a/.clang-format +++ b/.clang-format @@ -175,4 +175,5 @@ WhitespaceSensitiveMacros: - NS_SWIFT_NAME - CF_SWIFT_NAME ... - +--- +Language: ObjC diff --git a/src/app/Application_mac.mm b/src/app/Application_mac.mm index a4c42b1f4..0c34a192b 100644 --- a/src/app/Application_mac.mm +++ b/src/app/Application_mac.mm @@ -9,20 +9,19 @@ #include "Application.h" #include "ui/MainWindow.h" -#include #import +#include @interface Launcher : NSObject - (void)openInGittyup:(NSPasteboard *)pboard - userData:(NSString *)userData - error:(NSString **)error; + userData:(NSString *)userData + error:(NSString **)error; @end @implementation Launcher -- (void)openInGitAhead:(NSPasteboard *)pboard - userData:(NSString *)userData - error:(NSString **)error -{ +- (void)openInGittyup:(NSPasteboard *)pboard + userData:(NSString *)userData + error:(NSString **)error { NSArray *classes = [NSArray arrayWithObject:[NSURL class]]; NSDictionary *options = [NSDictionary dictionary]; NSArray *urls = [pboard readObjectsForClasses:classes options:options]; @@ -32,8 +31,7 @@ - (void)openInGitAhead:(NSPasteboard *)pboard } @end -void Application::registerService() -{ +void Application::registerService() { Launcher *launcher = [[Launcher alloc] init]; [[NSApplication sharedApplication] setServicesProvider:launcher]; }