* This assumes several things: * + Status has only 2 lines * + That both lines are updated in succession in line order. * + We didn't set stringInPlace on the widget. */
| 1261 | * + We didn't set stringInPlace on the widget. |
| 1262 | */ |
| 1263 | void |
| 1264 | adjust_status_fancy(struct xwindow *wp, const char *str) |
| 1265 | { |
| 1266 | Arg args[2]; |
| 1267 | Cardinal num_args; |
| 1268 | |
| 1269 | if (!wp->status_information) { |
| 1270 | update_fancy_status(TRUE); |
| 1271 | return; |
| 1272 | } |
| 1273 | |
| 1274 | if (wp->cursy == 0) { |
| 1275 | clear_text_buffer(&wp->status_information->text); |
| 1276 | append_text_buffer(&wp->status_information->text, str, FALSE); |
| 1277 | return; |
| 1278 | } |
| 1279 | append_text_buffer(&wp->status_information->text, str, FALSE); |
| 1280 | |
| 1281 | /* Set new buffer as text. */ |
| 1282 | num_args = 0; |
| 1283 | XtSetArg(args[num_args], XtNstring, |
| 1284 | wp->status_information->text.text); num_args++; |
| 1285 | XtSetValues(wp->w, args, num_args); |
| 1286 | } |
| 1287 | |
| 1288 | /* Fancy ================================================================== */ |
| 1289 | extern const char *const hu_stat[]; /* from eat.c */ |
no test coverage detected