Changeset 2771 in MondoRescue for branches/2.2.9/mondo/src/common/newt-specific.c
- Timestamp:
- Apr 22, 2011, 1:49:03 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/newt-specific.c
r2769 r2771 1361 1361 1362 1362 1363 1364 1365 /** 1366 * Ask the user which compression type they would like to use. 1367 * The choices are "bzip2", "gzip", "lzo". NULL for exit 1368 */ 1369 char *which_compression_type() { 1370 1371 /*@ char ************************************************************ */ 1372 char *output = NULL; 1373 1374 1375 /*@ newt ************************************************************ */ 1376 1377 newtComponent b1; 1378 newtComponent b2; 1379 newtComponent b3; 1380 //newtComponent b4; 1381 newtComponent b5; 1382 newtComponent b_res; 1383 newtComponent myForm; 1384 1385 newtDrawRootText(18, 0, WELCOME_STRING); 1386 newtPushHelpLine 1387 (" Please specify the type of compression that you want."); 1388 newtCenteredWindow(34, 13, "Type of compression?"); 1389 b1 = newtButton(4, 1, "bzip2"); 1390 b2 = newtButton(18, 1, "gzip"); 1391 b3 = newtButton(4, 5, "lzo"); 1392 //b4 = newtButton(18, 5, "lzma"); 1393 b5 = newtButton(4, 9, " Exit "); 1394 myForm = newtForm(NULL, NULL, 0); 1395 newtFormAddComponents(myForm, b1, b3, b2, b5, NULL); 1396 b_res = newtRunForm(myForm); 1397 newtFormDestroy(myForm); 1398 newtPopWindow(); 1399 if (b_res == b1) { 1400 mr_asprintf(&output, "%s", "bzip2"); 1401 } else if (b_res == b2) { 1402 mr_asprintf(&output, "%s", "gzip"); 1403 } else if (b_res == b3) { 1404 mr_asprintf(&output, "%s", "lzo"); 1405 //} else if (b_res == b4) { 1406 //mr_asprintf(&output, "%s", "lzma"); 1407 } 1408 newtPopHelpLine(); 1409 return(output); 1410 } 1363 1411 1364 1412
Note:
See TracChangeset
for help on using the changeset viewer.