mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Support UpdateContextMenus. Submenus are now *menu.Menu. Tidy up++
This commit is contained in:
@@ -233,10 +233,10 @@ func (c *Client) UpdateContextMenus(contextMenus *menu.ContextMenus) {
|
||||
return
|
||||
}
|
||||
// Process the menu
|
||||
contextMenusJSON, err := json.Marshal(contextMenus)
|
||||
contextMenusJSON, err := processContextMenus(contextMenus)
|
||||
if err != nil {
|
||||
c.app.logger.Error("Error processing updated Context Menus: %s", err.Error())
|
||||
c.app.logger.Error("Error processing updated Context Menu: %s", err.Error())
|
||||
return
|
||||
}
|
||||
C.UpdateContextMenus(c.app.app, c.app.string2CString(string(contextMenusJSON)))
|
||||
C.UpdateContextMenus(c.app.app, c.app.string2CString(contextMenusJSON))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user