add item name to illegal position response

This commit is contained in:
Felix Kratz 2023-01-04 18:46:03 +01:00
parent 0465c8dfdb
commit 6ed736a542

View file

@ -179,14 +179,15 @@ static void handle_domain_add(FILE* rsp, struct token domain, char* message) {
struct bar_item* bar_item = bar_manager_create_item(&g_bar_manager);
if (!bar_item_set_type(bar_item, command.text)) {
respond(rsp, "[?] Add ('%s'): Invalid type '%s', assuming 'item'\n",
respond(rsp, "[?] Add %s: Invalid type '%s', assuming 'item'\n",
name.text,
command.text );
}
if (!bar_item_set_position(bar_item, position.text)
&& bar_item->type != BAR_COMPONENT_GROUP) {
respond(rsp, "[!] Add: Illegal position '%s'\n", position.text);
respond(rsp, "[!] Add %s: Illegal position '%s'\n", name.text,
position.text);
bar_manager_remove_item(&g_bar_manager, bar_item);
return;
}