Skip to content

Instantly share code, notes, and snippets.

View altimac's full-sized avatar

Aurélien altimac

View GitHub Profile
@franciscoadasme
franciscoadasme / gist:1008620
Created June 5, 2011 03:40
How to show a custom title bar icon in NSWindow
// Force to show a titlebar icon
[window setRepresentedURL:[NSURL URLWithString:@"WindowTitle"]];
// Set our custom icon
[[window standardWindowButton:NSWindowDocumentIconButton] setImage:[NSImage imageNamed:@"imagename"]];
...
// Implement window delegate method to prevent to popup document (which do not exist) path menu when cmd+clicked
- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
{