ipc: change 'orientation' to human readable string instead of raw integer value

This commit is contained in:
Michael Stapelberg
2011-01-07 20:48:01 +01:00
parent 23b4271e1c
commit 186d2c7bfa
2 changed files with 16 additions and 6 deletions

View File

@ -178,7 +178,17 @@ void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
y(integer, con->type);
ystr("orientation");
y(integer, con->orientation);
switch (con->orientation) {
case NO_ORIENTATION:
ystr("none");
break;
case HORIZ:
ystr("horizontal");
break;
case VERT:
ystr("vertical");
break;
}
ystr("percent");
y(double, con->percent);