mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Every menu item is created with a path (File > Save). The functions are stored in a hash from (menu item path -> action) on the window. When an AtomMenuItem is selected, it looks up the action on the current window based on its path.
15 lines
323 B
Objective-C
15 lines
323 B
Objective-C
#import "AtomMenuItem.h"
|
|
|
|
@implementation AtomMenuItem
|
|
|
|
@synthesize global = global_, itemPath = path_;
|
|
|
|
- initWithTitle:(NSString *)title itemPath:(NSString *)itemPath {
|
|
self = [super initWithTitle:title action:@selector(performActionForMenuItem:) keyEquivalent:@""];
|
|
self.itemPath = itemPath;
|
|
return self;
|
|
}
|
|
|
|
|
|
@end
|