Support UpdateContextMenus. Submenus are now *menu.Menu. Tidy up++

This commit is contained in:
Lea Anthony
2021-01-08 06:28:51 +11:00
parent 2a69786d7e
commit fbee9ba240
14 changed files with 133 additions and 92 deletions

View File

@@ -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))
}