How could I add a button to the Apple Mail's toolbar?
As i understand, I need to "swizzle" some methods of the MessageViewer class (this is the first responder window of the Mail.app). Thanks to several open source Mail plugins, I managed to implement a basic plugin that can display windows, sheets, react on events.. I also managed to get a class dump of the Mail.app that lists all of the classes/methods of the Mail.app.
I've seen several people claimed to have implemented this, also a free Mail Archive plugin adds a button to the toolbar..
Could you point me in the right direction?
Thank you!
I'm not sure what your problem is.
BetterDictionary is a Dictionary.app plugin I wrote a while back. Check out
-(void) initToolbarItems
method to see how I've done it (how the app gets there?+(void)load --> -(id)init --> -(void)initToolbarItems
).