Skip to content

Instantly share code, notes, and snippets.

@Kentzo
Created February 8, 2010 13:56
Show Gist options
  • Select an option

  • Save Kentzo/298152 to your computer and use it in GitHub Desktop.

Select an option

Save Kentzo/298152 to your computer and use it in GitHub Desktop.
NSDocumentController* documentContr = [NSDocumentController sharedDocumentController];
NSWindowController* windowContr = [[[documentContr documents] objectAtIndex:0] browserWindowController];
NSWindow* window = [windowContr window];
NSToolbar* toolbar = [window toolbar];
[toolbar insertItemWithItemIdentifier:[[SWMPluginController sharedInstance] toolbarButtonIdentifier]
atIndex:[[SWMPluginController sharedInstance] toolbarButtonIndex]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment