~ubuntu-branches/ubuntu/lucid/newt/lucid

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
diff -ruN newt-0.51.6-old/dialogboxes.c newt-0.51.6/dialogboxes.c
--- newt-0.51.6-old/dialogboxes.c	2004-03-09 15:01:24.000000000 +0000
+++ newt-0.51.6/dialogboxes.c	2004-03-09 15:26:47.000000000 +0000
@@ -215,6 +215,10 @@
     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,
@@ -309,6 +313,11 @@
 	numBoxes++;
     }
 
+	
+    if (flags & FLAG_NOTAGS) {
+	    maxTagWidth = 0;
+    }
+
     form = newtForm(NULL, NULL, 0);
 
     tb = textbox(height - 3 - buttonHeight - listHeight, width - 2,
diff -ruN newt-0.51.6-old/dialogboxes.h newt-0.51.6/dialogboxes.h
--- newt-0.51.6-old/dialogboxes.h	2003-01-03 20:54:45.000000000 +0000
+++ newt-0.51.6/dialogboxes.h	2004-03-09 15:01:24.000000000 +0000
@@ -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
diff -ruN newt-0.51.6-old/whiptail.c newt-0.51.6/whiptail.c
--- newt-0.51.6-old/whiptail.c	2004-03-09 15:01:24.000000000 +0000
+++ newt-0.51.6/whiptail.c	2004-03-09 15:01:24.000000000 +0000
@@ -45,6 +45,7 @@
     int fd = -1;
     int needSpace = 0;
     int noCancel = 0;
+    int noTags = 0;
     int noItem = 0;
     int clear = 0;
     int scrollText = 0;
@@ -70,6 +71,7 @@
 	    { "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 },
@@ -170,6 +172,7 @@
 
     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;