diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-14 11:44:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 11:44:18 -0500 |
commit | 15cd8b6a86295a445a1037afd0028b1226a14c82 (patch) | |
tree | 56332b9c150459beb5aef94605372ef179ec8854 /sway/commands/bar/id.c | |
parent | 64ef9366733d6d332a24897f72eba90ba2adca1e (diff) | |
parent | 2a684cad5fc8e12a8e47a7fd00e2b7c66b43afb0 (diff) |
Merge pull request #3403 from mstoeckl/ipcleanup
Remove 'input' field of IPC command return json
Diffstat (limited to 'sway/commands/bar/id.c')
-rw-r--r-- | sway/commands/bar/id.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands/bar/id.c b/sway/commands/bar/id.c index 35509459..bef3023b 100644 --- a/sway/commands/bar/id.c +++ b/sway/commands/bar/id.c @@ -12,15 +12,15 @@ struct cmd_results *bar_cmd_id(int argc, char **argv) { const char *name = argv[0]; const char *oldname = config->current_bar->id; if (strcmp(name, oldname) == 0) { - return cmd_results_new(CMD_SUCCESS, NULL, NULL); // NOP + return cmd_results_new(CMD_SUCCESS, NULL); // NOP } else if (strcmp(name, "id") == 0) { - return cmd_results_new(CMD_INVALID, "id", "id cannot be 'id'"); + return cmd_results_new(CMD_INVALID, "id cannot be 'id'"); } // check if id is used by a previously defined bar for (int i = 0; i < config->bars->length; ++i) { struct bar_config *find = config->bars->items[i]; if (strcmp(name, find->id) == 0 && config->current_bar != find) { - return cmd_results_new(CMD_FAILURE, "id", + return cmd_results_new(CMD_FAILURE, "Id '%s' already defined for another bar. Id unchanged (%s).", name, oldname); } @@ -31,5 +31,5 @@ struct cmd_results *bar_cmd_id(int argc, char **argv) { // free old bar id free(config->current_bar->id); config->current_bar->id = strdup(name); - return cmd_results_new(CMD_SUCCESS, NULL, NULL); + return cmd_results_new(CMD_SUCCESS, NULL); } |