Fixed default menu items
This commit is contained in:
@@ -195,6 +195,8 @@ nm_config_t *nm_config_parse(char **err_out) {
|
|||||||
it->action = action;
|
it->action = action;
|
||||||
action->arg = strdup("See .adds/nm/doc for instructions on how to customize this menu.");
|
action->arg = strdup("See .adds/nm/doc for instructions on how to customize this menu.");
|
||||||
action->act = NM_ACTION(dbg_toast);
|
action->act = NM_ACTION(dbg_toast);
|
||||||
|
action->on_failure = true;
|
||||||
|
action->on_success = true;
|
||||||
nm_config_push_menu_item(&cfg, it);
|
nm_config_push_menu_item(&cfg, it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ __attribute__((constructor)) void nm_init() {
|
|||||||
items[0]->action = calloc(1, sizeof(nm_menu_action_t));
|
items[0]->action = calloc(1, sizeof(nm_menu_action_t));
|
||||||
items[0]->action->arg = strdup(err);
|
items[0]->action->arg = strdup(err);
|
||||||
items[0]->action->act = NM_ACTION(dbg_msg);
|
items[0]->action->act = NM_ACTION(dbg_msg);
|
||||||
|
items[0]->action->on_failure = true;
|
||||||
|
items[0]->action->on_success = true;
|
||||||
|
|
||||||
free(err);
|
free(err);
|
||||||
} else if (!(items = nm_config_get_menu(cfg, &items_n))) {
|
} else if (!(items = nm_config_get_menu(cfg, &items_n))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user