Updated tray icon

This commit is contained in:
Lea Anthony
2020-12-16 08:55:46 +11:00
parent a1f9d9ca06
commit 34ac62e4ac
8 changed files with 341 additions and 26 deletions

View File

@@ -16,6 +16,7 @@ extern void WebviewIsTransparent(void *);
extern void SetWindowBackgroundIsTranslucent(void *);
extern void SetMenu(void *, const char *);
extern void SetTray(void *, const char *);
extern void SetContextMenus(void *, const char *);
*/
import "C"
import (
@@ -111,5 +112,15 @@ func (a *Application) processPlatformSettings() error {
C.SetTray(a.app, a.string2CString(string(trayMenuJSON)))
}
// Process context menus
contextMenus := options.GetContextMenus(a.config)
if contextMenus != nil {
contextMenusJSON, err := json.Marshal(contextMenus)
if err != nil {
return err
}
C.SetContextMenus(a.app, a.string2CString(string(contextMenusJSON)))
}
return nil
}