From ff94d28b85f497345858eaa438fa7e9f5b0d9c70 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 3 May 2014 15:02:51 +0200 Subject: [PATCH] improve error messages for i3-internal workspace names --- src/commands.c | 6 +++--- src/workspace.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/commands.c b/src/commands.c index 2ff3ee1e..201c76e8 100644 --- a/src/commands.c +++ b/src/commands.c @@ -484,7 +484,7 @@ void cmd_move_con_to_workspace_back_and_forth(I3_CMD) { */ void cmd_move_con_to_workspace_name(I3_CMD, char *name) { if (strncasecmp(name, "__", strlen("__")) == 0) { - LOG("You cannot switch to the i3 internal workspaces.\n"); + LOG("You cannot move containers to i3-internal workspaces (\"%s\").\n", name); ysuccess(false); return; } @@ -999,7 +999,7 @@ void cmd_workspace_back_and_forth(I3_CMD) { */ void cmd_workspace_name(I3_CMD, char *name) { if (strncasecmp(name, "__", strlen("__")) == 0) { - LOG("You cannot switch to the i3 internal workspaces.\n"); + LOG("You cannot switch to the i3-internal workspaces (\"%s\").\n", name); ysuccess(false); return; } @@ -1868,7 +1868,7 @@ void cmd_scratchpad_show(I3_CMD) { */ void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name) { if (strncasecmp(new_name, "__", strlen("__")) == 0) { - LOG("You cannot switch to the i3 internal workspaces.\n"); + LOG("Cannot rename workspace to \"%s\": names starting with __ are i3-internal.", new_name); ysuccess(false); return; } diff --git a/src/workspace.c b/src/workspace.c index 5f8ec0bc..99c2166a 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -143,7 +143,7 @@ Con *create_workspace_on_output(Output *output, Con *content) { if (*target == '"') target++; if (strncasecmp(target, "__", strlen("__")) == 0) { - LOG("Cannot create workspace. '__' is a reserved prefix.\n"); + LOG("Cannot create workspace \"%s\". Names starting with __ are i3-internal.\n", target); continue; } FREE(ws->name); -- 2.39.5