]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
added --notags to whiptail (#117468)
authorhavill <havill>
Wed, 7 Apr 2004 19:53:26 +0000 (19:53 +0000)
committerhavill <havill>
Wed, 7 Apr 2004 19:53:26 +0000 (19:53 +0000)
dialogboxes.c
dialogboxes.h
whiptail.c

index 5e58a1aab222af2a954f47d83cd0f5217318a6a2..d2b220968fb81c2768f30b606c5ea26d9d2558b5 100644 (file)
@@ -209,6 +209,10 @@ int listBox(const char * text, int height, int width, poptContext optCon,
     if (numItems == 0)
        return DLG_ERROR;
 
+    if (flags & FLAG_NOTAGS) {
+           maxTagWidth = 0;
+    }
+
     form = newtForm(NULL, NULL, 0);
 
     tb = textbox(height - 4 - buttonHeight - listHeight, width - 2,
@@ -303,6 +307,7 @@ int checkList(const char * text, int height, int width, poptContext optCon,
        numBoxes++;
     }
 
+       
     form = newtForm(NULL, NULL, 0);
 
     tb = textbox(height - 3 - buttonHeight - listHeight, width - 2,
index 456ab632b4ee8f86631c8dacaed11d4f52d6ea55..27f072c301d25e7099ca435f4cf4b29060e0e292 100644 (file)
@@ -11,6 +11,7 @@
 #define FLAG_NOCANCEL          (1 << 1)
 #define FLAG_SCROLL_TEXT       (1 << 2)
 #define FLAG_DEFAULT_NO        (1 << 3)
+#define FLAG_NOTAGS            (1 << 5)
 
 #define DLG_ERROR              -1
 #define DLG_OKAY               0
index f658a7b45c031fe18f5cf55c5e4af320663501ee..368a605c4673bd635964c87246da938acb4ac8d2 100644 (file)
@@ -42,6 +42,7 @@ int main(int argc, const char ** argv) {
     int fd = -1;
     int needSpace = 0;
     int noCancel = 0;
+    int noTags = 0;
     int noItem = 0;
     int clear = 0;
     int scrollText = 0;
@@ -67,6 +68,7 @@ int main(int argc, const char ** argv) {
            { "msgbox", '\0', 0, 0, OPT_MSGBOX },
            { "nocancel", '\0', 0, &noCancel, 0 },
            { "noitem", '\0', 0, &noItem, 0 },
+           { "notags", '\0', 0, &noTags, 0 },
            { "radiolist", '\0', 0, 0, OPT_RADIOLIST },
            { "scrolltext", '\0', 0, &scrollText, 0 },
            { "separate-output", '\0', 0, &separateOutput, 0 },
@@ -163,6 +165,7 @@ int main(int argc, const char ** argv) {
 
     if (noCancel) flags |= FLAG_NOCANCEL;
     if (noItem) flags |= FLAG_NOITEM;
+    if (noTags) flags |= FLAG_NOTAGS;
     if (scrollText) flags |= FLAG_SCROLL_TEXT;
     if (defaultNo) flags |= FLAG_DEFAULT_NO;