/[smeserver]/rpms/whiptail/sme8/newt-0.51.5.patch.2006100300
ViewVC logotype

Annotation of /rpms/whiptail/sme8/newt-0.51.5.patch.2006100300

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Jun 12 21:25:13 2007 UTC (17 years, 4 months ago) by slords
Branch: MAIN
CVS Tags: whiptail-0_51_5-9_el5_sme, HEAD
Import on branch sme8 of package whiptail-0.51.5-9.el5.sme.src.rpm

1 slords 1.1 Only in newt-0.51.5: config.h
2     Only in newt-0.51.5: config.log
3     Only in newt-0.51.5: config.status
4     diff -ru newt-0.51.5.orig/dialogboxes.c newt-0.51.5/dialogboxes.c
5     --- newt-0.51.5.orig/dialogboxes.c 2006-10-03 14:26:48.052081000 -0400
6     +++ newt-0.51.5/dialogboxes.c 2006-10-03 14:55:05.083400000 -0400
7     @@ -161,7 +161,7 @@
8     }
9    
10     int listBox(const char * text, int height, int width, poptContext optCon,
11     - char * left, char * right, int flags, const char ** result) {
12     + char * left, char * right, int flags, const char ** result, char * def) {
13     newtComponent form, okay, tb, answer, listBox;
14     newtComponent cancel = NULL;
15     const char * arg;
16     @@ -228,6 +228,10 @@
17     for (i = 0; i < numItems; i++) {
18     sprintf(buf, format, itemInfo[i].tag, itemInfo[i].text);
19     newtListboxAddEntry(listBox, buf, (void *) i);
20     + if (!strcmp(def, itemInfo[i].tag))
21     + {
22     + newtListboxSetCurrent(listBox, i);
23     + }
24     }
25    
26     newtFormAddComponents(form, tb, listBox, NULL);
27     diff -ru newt-0.51.5.orig/dialogboxes.h newt-0.51.5/dialogboxes.h
28     --- newt-0.51.5.orig/dialogboxes.h 2006-10-03 14:26:48.062082000 -0400
29     +++ newt-0.51.5/dialogboxes.h 2006-10-03 14:54:35.302668000 -0400
30     @@ -22,7 +22,7 @@
31     int useRadio, char * left, char * right,
32     int flags, const char *** selections);
33     int listBox(const char * text, int height, int width, poptContext optCon,
34     - char * left, char * right, int flags, const char ** result);
35     + char * left, char * right, int flags, const char ** result, char * def);
36     int inputBox(const char * text, int height, int width, poptContext optCon,
37     char * left, char * right, int flags, const char ** result);
38     int gauge(const char * text, int height, int width, poptContext optCon, int fd,
39     Only in newt-0.51.5: Makefile
40     Only in newt-0.51.5: shared
41     diff -ru newt-0.51.5.orig/whiptail.c newt-0.51.5/whiptail.c
42     --- newt-0.51.5.orig/whiptail.c 2006-10-03 14:26:48.082081000 -0400
43     +++ newt-0.51.5/whiptail.c 2006-10-03 14:59:14.911307000 -0400
44     @@ -56,8 +56,10 @@
45     char * backtitle = NULL;
46     char * left = "Cancel";
47     char * right = "Ok";
48     + char * def_item = "";
49     struct poptOption optionsTable[] = {
50     { "backtitle", '\0', POPT_ARG_STRING, &backtitle, 0 },
51     + { "default-item", '\0', POPT_ARG_STRING, &def_item, 0 },
52     { "checklist", '\0', 0, 0, OPT_CHECKLIST },
53     { "clear", '\0', 0, &clear, 0 },
54     { "defaultno", '\0', 0, &defaultNo, 0 },
55     @@ -194,7 +196,7 @@
56     break;
57    
58     case MODE_MENU:
59     - rc = listBox(text, height, width, optCon, left, right, flags, &result);
60     + rc = listBox(text, height, width, optCon, left, right, flags, &result, def_item);
61     if (!rc) fprintf(stderr, "%s", result);
62     break;
63    
64     diff -ru newt-0.51.5.orig/whiptcl.c newt-0.51.5/whiptcl.c
65     --- newt-0.51.5.orig/whiptcl.c 2006-10-03 14:26:48.092082000 -0400
66     +++ newt-0.51.5/whiptcl.c 2006-10-03 14:53:44.961340000 -0400
67     @@ -205,7 +205,7 @@
68     break;
69    
70     case MODE_MENU:
71     - rc = listBox(text, height, width, optCon, left, right, flags, &result);
72     + rc = listBox(text, height, width, optCon, left, right, flags, &result, "");
73     if (!rc) {
74     interp->result = strdup(result);
75     interp->freeProc = TCL_DYNAMIC;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed