]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
changed simple windows to use button bars
authorewt <ewt>
Wed, 24 Sep 1997 16:02:17 +0000 (16:02 +0000)
committerewt <ewt>
Wed, 24 Sep 1997 16:02:17 +0000 (16:02 +0000)
windows.c

index d2e58ec4521dfea0ccc3d4f78b11db5cb51ccf62..bda888f35a7c46b1043812a724ce503b266bd59b 100644 (file)
--- a/windows.c
+++ b/windows.c
@@ -31,18 +31,14 @@ static int newtvwindow(char * title, char * button1, char * button2,
     }
     free(buf);
 
-    b1 = newtButton(-1, -1, button1);
     t = newtTextbox(-1, -1, width, height, NEWT_TEXTBOX_WRAP);
     newtTextboxSetText(t, flowedText);
     free(flowedText);
 
     if (button2) {
-       b2 = newtButton(-1, -1, button2);
-       buttonGrid = newtCreateGrid(2, 1);
-       newtGridSetField(buttonGrid, 1, 0, NEWT_GRID_COMPONENT, b2, 
-                        1, 0, 0, 0, 0, 0);
+       buttonGrid = newtButtonBar(button1, &b1, button2, &b2, NULL);
     } else {
-       buttonGrid = newtCreateGrid(1, 1);
+       buttonGrid = newtButtonBar(button1, &b1, NULL);
     }
 
     newtGridSetField(buttonGrid, 0, 0, NEWT_GRID_COMPONENT, b1,