Add missing newlines on IPC messages.
SVN revision: 42288
This commit is contained in:
parent
f657a6ad1e
commit
42ad2b8836
|
@ -2270,7 +2270,7 @@ BackgroundSet1(const char *name, const char *params)
|
|||
0, 0, 0, NULL, 0, 0, 0, 0, 0);
|
||||
if (!bg)
|
||||
{
|
||||
IpcPrintf("Error: could not create background '%s'.", name);
|
||||
IpcPrintf("Error: could not create background '%s'\n", name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -2345,7 +2345,7 @@ BackgroundSet1(const char *name, const char *params)
|
|||
}
|
||||
else
|
||||
{
|
||||
IpcPrintf("Error: unknown background value type '%s'.", type);
|
||||
IpcPrintf("Error: unknown background value type '%s'\n", type);
|
||||
}
|
||||
autosave();
|
||||
}
|
||||
|
@ -2469,7 +2469,7 @@ BackgroundsIpc(const char *params)
|
|||
IpcPrintf("%s\n", buf);
|
||||
}
|
||||
else
|
||||
IpcPrintf("Error: background '%s' does not exist.", prm);
|
||||
IpcPrintf("Error: background '%s' does not exist\n", prm);
|
||||
}
|
||||
else if (!strcmp(cmd, "use"))
|
||||
{
|
||||
|
@ -2493,7 +2493,7 @@ BackgroundsIpc(const char *params)
|
|||
IpcPrintf("%s\n", buf);
|
||||
}
|
||||
else
|
||||
IpcPrintf("Error: background '%s' does not exist.", prm);
|
||||
IpcPrintf("Error: background '%s' does not exist\n", prm);
|
||||
}
|
||||
else if (!strncmp(cmd, "xset", 2))
|
||||
{
|
||||
|
|
5
src/fx.c
5
src/fx.c
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2009 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -980,9 +981,9 @@ FxIpc(const char *params)
|
|||
else if (!strcmp(word2, "off"))
|
||||
FX_Op(word1, FX_OP_STOP);
|
||||
else if (!strcmp(word2, "?"))
|
||||
IpcPrintf("%s: %s", word1, FX_IsOn(word1) ? "on" : "off");
|
||||
IpcPrintf("%s: %s\n", word1, FX_IsOn(word1) ? "on" : "off");
|
||||
else
|
||||
IpcPrintf("Error: unknown mode specified");
|
||||
IpcPrintf("Error: unknown mode specified\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
38
src/groups.c
38
src/groups.c
|
@ -1098,7 +1098,7 @@ IPC_GroupInfo(const char *params)
|
|||
if (group)
|
||||
GroupShow(group);
|
||||
else
|
||||
IpcPrintf("Error: no such group: %s", params);
|
||||
IpcPrintf("Error: no such group: %s\n", params);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1119,7 +1119,7 @@ IPC_GroupOps(const char *params)
|
|||
|
||||
if (!params)
|
||||
{
|
||||
IpcPrintf("Error: no window specified");
|
||||
IpcPrintf("Error: no window specified\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1130,48 +1130,48 @@ IPC_GroupOps(const char *params)
|
|||
|
||||
if (!operation[0])
|
||||
{
|
||||
IpcPrintf("Error: no operation specified");
|
||||
IpcPrintf("Error: no operation specified\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ewin = EwinFindByExpr(windowid);
|
||||
if (!ewin)
|
||||
{
|
||||
IpcPrintf("Error: no such window: %s", windowid);
|
||||
IpcPrintf("Error: no such window: %s\n", windowid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strcmp(operation, "start"))
|
||||
{
|
||||
BuildWindowGroup(&ewin, 1, -1);
|
||||
IpcPrintf("start %8x", win);
|
||||
IpcPrintf("start %8x\n", win);
|
||||
}
|
||||
else if (!strcmp(operation, "add"))
|
||||
{
|
||||
group = GroupFind2(groupid);
|
||||
AddEwinToGroup(ewin, group);
|
||||
IpcPrintf("add %8x", win);
|
||||
IpcPrintf("add %8x\n", win);
|
||||
}
|
||||
else if (!strcmp(operation, "del"))
|
||||
{
|
||||
group = GroupFind2(groupid);
|
||||
RemoveEwinFromGroup(ewin, group);
|
||||
IpcPrintf("del %8x", win);
|
||||
IpcPrintf("del %8x\n", win);
|
||||
}
|
||||
else if (!strcmp(operation, "break"))
|
||||
{
|
||||
group = GroupFind2(groupid);
|
||||
BreakWindowGroup(ewin, group);
|
||||
IpcPrintf("break %8x", win);
|
||||
IpcPrintf("break %8x\n", win);
|
||||
}
|
||||
else if (!strcmp(operation, "showhide"))
|
||||
{
|
||||
ShowHideWinGroups(ewin, -1, SET_TOGGLE);
|
||||
IpcPrintf("showhide %8x", win);
|
||||
IpcPrintf("showhide %8x\n", win);
|
||||
}
|
||||
else
|
||||
{
|
||||
IpcPrintf("Error: no such operation: %s", operation);
|
||||
IpcPrintf("Error: no such operation: %s\n", operation);
|
||||
return;
|
||||
}
|
||||
GroupsSave();
|
||||
|
@ -1188,7 +1188,7 @@ IPC_Group(const char *params)
|
|||
|
||||
if (!params)
|
||||
{
|
||||
IpcPrintf("Error: no group specified");
|
||||
IpcPrintf("Error: no group specified\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1197,20 +1197,20 @@ IPC_Group(const char *params)
|
|||
|
||||
if (!operation[0])
|
||||
{
|
||||
IpcPrintf("Error: no operation specified");
|
||||
IpcPrintf("Error: no operation specified\n");
|
||||
return;
|
||||
}
|
||||
|
||||
group = GroupFind2(groupid);
|
||||
if (!group)
|
||||
{
|
||||
IpcPrintf("Error: no such group: %s", groupid);
|
||||
IpcPrintf("Error: no such group: %s\n", groupid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!param1[0])
|
||||
{
|
||||
IpcPrintf("Error: no mode specified");
|
||||
IpcPrintf("Error: no mode specified\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1222,11 +1222,11 @@ IPC_Group(const char *params)
|
|||
|
||||
if (onoff == -1 && strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("Error: unknown mode specified");
|
||||
IpcPrintf("Error: unknown mode specified\n");
|
||||
}
|
||||
else if (!strcmp(operation, "num_members"))
|
||||
{
|
||||
IpcPrintf("num_members: %d", group->num_members);
|
||||
IpcPrintf("num_members: %d\n", group->num_members);
|
||||
onoff = -1;
|
||||
}
|
||||
else if (!strcmp(operation, "iconify"))
|
||||
|
@ -1280,14 +1280,14 @@ IPC_Group(const char *params)
|
|||
}
|
||||
else
|
||||
{
|
||||
IpcPrintf("Error: no such operation: %s", operation);
|
||||
IpcPrintf("Error: no such operation: %s\n", operation);
|
||||
onoff = -1;
|
||||
}
|
||||
|
||||
if (onoff == 1)
|
||||
IpcPrintf("%s: on", operation);
|
||||
IpcPrintf("%s: on\n", operation);
|
||||
else if (onoff == 0)
|
||||
IpcPrintf("%s: off", operation);
|
||||
IpcPrintf("%s: off\n", operation);
|
||||
}
|
||||
|
||||
#if ENABLE_DIALOGS
|
||||
|
|
48
src/ipc.c
48
src/ipc.c
|
@ -108,9 +108,9 @@ SetEwinBoolean(const char *txt, char *item, const char *value, int set)
|
|||
else if (!strcmp(value, "off"))
|
||||
vnew = 0;
|
||||
else if (!strcmp(value, "?"))
|
||||
IpcPrintf("%s: %s", txt, (vold) ? "on" : "off");
|
||||
IpcPrintf("%s: %s\n", txt, (vold) ? "on" : "off");
|
||||
else
|
||||
IpcPrintf("Error: %s", value);
|
||||
IpcPrintf("Error: %s\n", value);
|
||||
|
||||
if (vnew != vold)
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ IPC_Screen(const char *params)
|
|||
static void
|
||||
IPC_Nop(const char *params __UNUSED__)
|
||||
{
|
||||
IpcPrintf("nop");
|
||||
IpcPrintf("nop\n");
|
||||
}
|
||||
|
||||
/* Should be elsewhere */
|
||||
|
@ -438,18 +438,18 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
{
|
||||
default:
|
||||
/* We should not get here */
|
||||
IpcPrintf("Error: unknown operation");
|
||||
IpcPrintf("Error: unknown operation\n");
|
||||
return;
|
||||
|
||||
case EWIN_OP_BORDER:
|
||||
if (!param1[0])
|
||||
{
|
||||
IpcPrintf("Error: no border specified");
|
||||
IpcPrintf("Error: no border specified\n");
|
||||
goto done;
|
||||
}
|
||||
if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("window border: %s", BorderGetName(ewin->border));
|
||||
IpcPrintf("window border: %s\n", BorderGetName(ewin->border));
|
||||
goto done;
|
||||
}
|
||||
EwinOpSetBorder(ewin, OPSRC_USER, param1);
|
||||
|
@ -458,12 +458,12 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
case EWIN_OP_TITLE:
|
||||
if (!prm[0])
|
||||
{
|
||||
IpcPrintf("Error: no title specified");
|
||||
IpcPrintf("Error: no title specified\n");
|
||||
goto done;
|
||||
}
|
||||
if (!strcmp(prm, "?"))
|
||||
{
|
||||
IpcPrintf("title: %s", EwinGetIcccmName(ewin));
|
||||
IpcPrintf("title: %s\n", EwinGetIcccmName(ewin));
|
||||
goto done;
|
||||
}
|
||||
HintsSetWindowName(EwinGetClientWin(ewin), prm);
|
||||
|
@ -502,7 +502,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
case EWIN_OP_FOCUS:
|
||||
if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("focused: %s", (ewin == GetFocusEwin())? "yes" : "no");
|
||||
IpcPrintf("focused: %s\n", (ewin == GetFocusEwin())? "yes" : "no");
|
||||
goto done;
|
||||
}
|
||||
EwinOpActivate(ewin, OPSRC_USER, 1);
|
||||
|
@ -511,7 +511,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
case EWIN_OP_DESK:
|
||||
if (!param1[0])
|
||||
{
|
||||
IpcPrintf("Error: no desktop supplied");
|
||||
IpcPrintf("Error: no desktop supplied\n");
|
||||
goto done;
|
||||
}
|
||||
if (!strncmp(param1, "next", 1))
|
||||
|
@ -524,7 +524,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
}
|
||||
else if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("window desk: %d", EoGetDeskNum(ewin));
|
||||
IpcPrintf("window desk: %d\n", EoGetDeskNum(ewin));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -535,12 +535,12 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
case EWIN_OP_AREA:
|
||||
if (!param1[0])
|
||||
{
|
||||
IpcPrintf("Error: no area supplied");
|
||||
IpcPrintf("Error: no area supplied\n");
|
||||
goto done;
|
||||
}
|
||||
if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("window area: %d %d", ewin->area_x, ewin->area_y);
|
||||
IpcPrintf("window area: %d %d\n", ewin->area_x, ewin->area_y);
|
||||
}
|
||||
else if (!strcmp(param1, "move"))
|
||||
{
|
||||
|
@ -561,7 +561,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
case EWIN_OP_MOVE:
|
||||
if (!param1[0])
|
||||
{
|
||||
IpcPrintf("Error: no coords supplied");
|
||||
IpcPrintf("Error: no coords supplied\n");
|
||||
goto done;
|
||||
}
|
||||
if (!strcmp(param1, "ptr"))
|
||||
|
@ -574,11 +574,11 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
}
|
||||
else if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("window location: %d %d", EoGetX(ewin), EoGetY(ewin));
|
||||
IpcPrintf("window location: %d %d\n", EoGetX(ewin), EoGetY(ewin));
|
||||
}
|
||||
else if (!strcmp(param1, "??"))
|
||||
{
|
||||
IpcPrintf("client location: %d %d",
|
||||
IpcPrintf("client location: %d %d\n",
|
||||
EoGetX(ewin) + ewin->border->border.left,
|
||||
EoGetY(ewin) + ewin->border->border.top);
|
||||
}
|
||||
|
@ -614,11 +614,11 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
}
|
||||
else if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("window size: %d %d", ewin->client.w, ewin->client.h);
|
||||
IpcPrintf("window size: %d %d\n", ewin->client.w, ewin->client.h);
|
||||
}
|
||||
else if (!strcmp(param1, "??"))
|
||||
{
|
||||
IpcPrintf("frame size: %d %d", EoGetW(ewin), EoGetH(ewin));
|
||||
IpcPrintf("frame size: %d %d\n", EoGetW(ewin), EoGetH(ewin));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -678,7 +678,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
case EWIN_OP_LAYER:
|
||||
if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("window layer: %d", EoGetLayer(ewin));
|
||||
IpcPrintf("window layer: %d\n", EoGetLayer(ewin));
|
||||
goto done;
|
||||
}
|
||||
val = atoi(param1);
|
||||
|
@ -697,7 +697,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
a = OpacityToPercent(ewin->ewmh.opacity);
|
||||
if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("opacity: %u", a);
|
||||
IpcPrintf("opacity: %u\n", a);
|
||||
goto done;
|
||||
}
|
||||
b = a;
|
||||
|
@ -721,7 +721,7 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
|
|||
a = OpacityToPercent(ewin->props.focused_opacity);
|
||||
if (!strcmp(param1, "?"))
|
||||
{
|
||||
IpcPrintf("focused_opacity: %u", a);
|
||||
IpcPrintf("focused_opacity: %u\n", a);
|
||||
goto done;
|
||||
}
|
||||
b = a;
|
||||
|
@ -866,7 +866,7 @@ IPC_WinOps(const char *params)
|
|||
|
||||
if (!params)
|
||||
{
|
||||
IpcPrintf("Error: no window specified");
|
||||
IpcPrintf("Error: no window specified\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -877,14 +877,14 @@ IPC_WinOps(const char *params)
|
|||
|
||||
if (!operation[0])
|
||||
{
|
||||
IpcPrintf("Error: no operation specified");
|
||||
IpcPrintf("Error: no operation specified\n");
|
||||
return;
|
||||
}
|
||||
|
||||
wop = EwinOpFind(operation);
|
||||
if (!wop)
|
||||
{
|
||||
IpcPrintf("Error: unknown operation");
|
||||
IpcPrintf("Error: unknown operation\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue