* Invert the count'th line (curr) in the given window. */ ARGSUSED*/
| 192 | */ |
| 193 | /*ARGSUSED*/ |
| 194 | static void |
| 195 | invert_line(struct xwindow *wp, x11_menu_item *curr, int which, long how_many) |
| 196 | { |
| 197 | Arg args[2]; |
| 198 | |
| 199 | nhUse(which); |
| 200 | reset_menu_count(wp->menu_information); |
| 201 | /* invert selection unless explicitly choosing the preselected |
| 202 | entry of a PICK_ONE menu */ |
| 203 | if (wp->menu_information->how != PICK_ONE || !curr->preselected) |
| 204 | curr->selected = !curr->selected; |
| 205 | curr->preselected = FALSE; |
| 206 | if (curr->selected) { |
| 207 | curr->str[2] = (how_many != -1) ? '#' : '+'; |
| 208 | XtSetArg(args[0], nhStr(XtNlabel), curr->str); |
| 209 | XtSetValues(curr->w, args, ONE); |
| 210 | curr->pick_count = how_many; |
| 211 | } else { |
| 212 | curr->str[2] = '-'; |
| 213 | XtSetArg(args[0], nhStr(XtNlabel), curr->str); |
| 214 | XtSetValues(curr->w, args, ONE); |
| 215 | curr->pick_count = -1L; |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | static XEvent fake_perminv_event; |
| 220 |
no test coverage detected