ipcMain.on('p3x-onenote-action-bookmark-result', function (event, data) {
//console.log('p3x-onenote-action-bookmark-result', data)
const bookmarks = global.p3x.onenote.conf.get('bookmarks') || []
if (data.opts.edit !== true) {
bookmarks.push(data.model)
} else {
if (data.delete === true) {
bookmarks.splice(data.opts.index, 1);
} else {
bookmarks[data.opts.index] = data.model
}
}
global.p3x.onenote.conf.set('bookmarks', bookmarks)
global.p3x.onenote.mainMenu();
global.p3x.onenote.mainTray()
})