1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-18 08:02:48 +00:00
freebsd-ports/net/omnitty/files/patch-menu.c
Tobias Kortkamp f0f35ca44f net/omnitty: Add abililty to "toggle" tagged machines
We often need to do "something" to about half the machines, then
do "something else" to the other half.  So add a hack to toggle the
"tagged" status of the machines.

This is implemented by means of the F1 menu; the command characters
"o" and "O" can toggle the "tagged" status of the machines.

PR:		211682
Submitted by:	maintainer
2018-08-09 12:25:08 +00:00

27 lines
918 B
C

--- menu.c.orig 2005-10-25 22:04:01 UTC
+++ menu.c
@@ -29,11 +29,13 @@
#include "help.h"
#define MENU_LINES 12
-#define MENU_COLS 38
+#define MENU_COLS 45
#define MENU_CONTENTS \
"{[h]} online help\n" \
"{[r]} rename machine\n" \
+ "{[o]} toggle tag all machines (live only)\n" \
+ "{[O]} toggle tag all machines (live & dead)\n" \
"{[t]} tag all machines (live only)\n" \
"{[T]} tag all machines (live & dead)\n" \
"{[u]} untag all machines\n" \
@@ -100,6 +102,8 @@ void menu_show() {
}
break;
+ case 'o': machmgr_toggle_tag_all(true); break;
+ case 'O': machmgr_toggle_tag_all(false); break;
case 't': machmgr_tag_all(true); break;
case 'T': machmgr_tag_all(false); break;
case 'u': machmgr_untag_all(); break;