mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Updated tray icon
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user