diff options
| author | joesis | 2017-09-13 10:04:13 +0800 | 
|---|---|---|
| committer | GitHub | 2017-09-13 10:04:13 +0800 | 
| commit | 40b1000abc857c428c25f62b3c6ac3eb2153419b (patch) | |
| tree | af0a0d8e9dedddfccf711a351c4e137ba554d36f /systray_darwin.m | |
| parent | 060c06f22e631c46a2d738532bc81c37b0f31595 (diff) | |
| parent | 08b17442ff81cef0de40133da66c4130f47654e6 (diff) | |
| download | systray-40b1000abc857c428c25f62b3c6ac3eb2153419b.tar.bz2 | |
Merge pull request #32 from getlantern/issue881
Added separator functionality
Diffstat (limited to 'systray_darwin.m')
| -rw-r--r-- | systray_darwin.m | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/systray_darwin.m b/systray_darwin.m index 3a28c73..200d793 100644 --- a/systray_darwin.m +++ b/systray_darwin.m @@ -108,6 +108,11 @@    }  } +- (void) add_separator:(NSNumber*) menuId +{ +  [menu addItem: [NSMenuItem separatorItem]]; +} +  - (void) hide_menu_item:(NSNumber*) menuId  {    NSMenuItem* menuItem; @@ -178,6 +183,11 @@ void add_or_update_menu_item(int menuId, char* title, char* tooltip, short disab    runInMainThread(@selector(add_or_update_menu_item:), (id)item);  } +void add_separator(int menuId) { +  NSNumber *mId = [NSNumber numberWithInt:menuId]; +  runInMainThread(@selector(add_separator:), (id)mId); +} +  void hide_menu_item(int menuId) {    NSNumber *mId = [NSNumber numberWithInt:menuId];    runInMainThread(@selector(hide_menu_item:), (id)mId); | 
