From d9ccc816110d832bdcee49a58111be74c135bd66 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Mon, 20 Jul 2026 01:38:09 +0000 Subject: [PATCH 61/71] feat(macos): About menu item MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the standard "About Contour" item at the top of the application menu (About / separator / Quit), wired to a placeholder NSAlert with the app name and version. The text is a placeholder to be edited; the point is a present, conventionally-placed About item. No blocks/ARC — gcc-4.2-safe. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01AeG2jwYMX5gdvvtUnx3PJa --- src/contour_macos/main.mm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/contour_macos/main.mm b/src/contour_macos/main.mm index fc74a3b1..17aefcf2 100644 --- a/src/contour_macos/main.mm +++ b/src/contour_macos/main.mm @@ -14,6 +14,7 @@ // Application delegate: owns the terminal windows and the menu bar, quits on last-window-close. @interface ContourAppDelegate: NSObject - (void)newWindow:(id)sender; +- (void)showAbout:(id)sender; @end @implementation ContourAppDelegate @@ -96,6 +97,19 @@ [self openTerminalWindow]; } +- (void)showAbout:(id)sender +{ + (void) sender; + // Placeholder About box. Edit the strings freely; the point is a standard, present menu item. + NSAlert* alert = [[NSAlert alloc] init]; + [alert setMessageText:@"Contour"]; + [alert setInformativeText:@"Contour terminal, version 0.7.0 (Cocoa fork for macOS PowerPC).\n\n" + @"A native AppKit frontend to the Contour terminal engine."]; + [alert addButtonWithTitle:@"OK"]; + [alert runModal]; + [alert release]; +} + - (void)applicationDidFinishLaunching:(NSNotification*)note { (void) note; @@ -151,6 +165,11 @@ static void installMainMenu(NSApplication* app, ContourAppDelegate* delegate) [menubar addItem:appItem]; NSMenu* appMenu = [[NSMenu alloc] init]; [appItem setSubmenu:appMenu]; + NSMenuItem* aboutItem = [appMenu addItemWithTitle:@"About Contour" + action:@selector(showAbout:) + keyEquivalent:@""]; + [aboutItem setTarget:delegate]; + [appMenu addItem:[NSMenuItem separatorItem]]; [appMenu addItemWithTitle:@"Quit contour" action:@selector(terminate:) keyEquivalent:@"q"]; [appMenu release]; [appItem release];