ui_togglebutton(obj, .icon = "format-text-italic", .varname = "note_textnote_emphasis", .onchange = action_textnote_style_emphasis);
ui_togglebutton(obj, .icon = "format-text-underline", .varname = "note_textnote_underline", .onchange = action_textnote_style_underline);
ui_togglebutton(obj, .label = "code", .varname = "note_textnote_code", .onchange = action_textnote_style_code);
- ui_button(obj, .icon = "view-list-bullet", .onclick = action_textnote_insertlist);
- ui_button(obj, .icon = "view-list-ordered");
+ ui_button(obj, .icon = "view-list-bullet", .onclick = action_textnote_insertlist, .onclickdata = ACTION_DATA_INSERT_LIST_UNORDERED);
+ ui_button(obj, .icon = "view-list-ordered", .onclick = action_textnote_insertlist, .onclickdata = ACTION_DATA_INSERT_LIST_ORDERED);
ui_button(obj, .icon = "insert-image");
ui_button(obj, .icon = "insert-link");
}
if(event->set) {
return;
}
+ intptr_t ordered = (intptr_t)userdata;
MainWindow *window = event->window;
NotebookModel *notebook = window->current_notebook;
if(notebook && notebook->current_note && notebook->current_note->model) {
- note_insert_list(notebook->current_note->model, FALSE);
+ note_insert_list(notebook->current_note->model, (UiBool)ordered);
}
}