Skip to content

Commit

Permalink
chore: remove left-overs
Browse files Browse the repository at this point in the history
  • Loading branch information
lessp committed Aug 11, 2020
1 parent b7a2043 commit 66609d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Native/dune
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
image_cocoa
shell shell_cocoa shell_gtk shell_win32
locale locale_cocoa locale_win32
tray tray_cocoa
tray
utilities
ReveryAppDelegate ReveryAppDelegate_func
ReveryProgressBar)
Expand Down
7 changes: 2 additions & 5 deletions src/Native/tray.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,21 @@ CAMLprim value revery_makeTrayHandle(value imagePath_v) {
CAMLlocal1(result);

#ifdef USE_COCOA
const char *imagePath;

NSStatusItem *statusItem = [NSStatusBar.systemStatusBar statusItemWithLength:NSVariableStatusItemLength];

if (imagePath_v != Val_none) {
const char *imagePath = String_val(Some_val(imagePath_v));

NSStatusItem *statusItem = [NSStatusBar.systemStatusBar statusItemWithLength:NSVariableStatusItemLength];

NSImage *nsImage = revery_makeImageFromAbsolutePath(imagePath);

statusItem.button.image = nsImage;

UNUSED(imagePath);
}

result = caml_alloc(1, Abstract_tag);
Store_field(result, 0, (long)statusItem);

UNUSED(imagePath);
CAMLreturn(result);
#elif USE_WIN32
result = caml_alloc(sizeof(NULL), Abstract_tag);
Expand Down

0 comments on commit 66609d7

Please sign in to comment.