Changeset 541 in MondoRescue for branches/stable/mondo/mondo/common/newt-specific.c
- Timestamp:
- May 13, 2006, 8:47:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/common/newt-specific.c
r502 r541 118 118 #include "libmondo-tools-EXT.h" 119 119 #include "libmondo-fork-EXT.h" 120 #include "newt-specific-EXT.h" 120 #include "libmondo-gui-EXT.h" 121 #include "lib-common-externs.h" 121 122 122 123 /*@unused@*/ … … 226 227 tmp[i - 1] = '\0'; 227 228 } 228 if (strstr( _("yesYES"), tmp)) {229 if (strstr("yesYES", tmp)) { 229 230 paranoid_free(tmp); 230 231 return (TRUE); 231 } else if (strstr( _("NOno"), tmp)) {232 } else if (strstr("NOno", tmp)) { 232 233 paranoid_free(tmp); 233 234 return (FALSE); … … 235 236 system("sync"); 236 237 printf 237 ( _("Please enter either YES or NO (or yes or no, or y or n, or...)\n"));238 ("Please enter either YES or NO (or yes or no, or y or n, or...)\n"); 238 239 } 239 240 } 240 241 } else { 241 242 paranoid_free(tmp); 242 return (popup_with_buttons(prompt, _("Yes"), _("No")));243 return (popup_with_buttons(prompt, "Yes", "No")); 243 244 } 244 245 } … … 272 273 tmp[i - 1] = '\0'; 273 274 } 274 if (strstr( _("okOKOkYESyes"), tmp)) {275 if (strstr("okOKOkYESyes", tmp)) { 275 276 paranoid_free(tmp); 276 277 return (TRUE); … … 281 282 } else { 282 283 paranoid_free(tmp); 283 return (popup_with_buttons(prompt, _(" Okay "), _("Cancel")));284 return (popup_with_buttons(prompt, " Okay ", "Cancel")); 284 285 } 285 286 } … … 425 426 ("gzip -9c /var/log/mondo-archive.log > /tmp/MA.log.gz 2> /dev/null"); 426 427 printf 427 ( _("If you require technical support, please contact the mailing list.\n"));428 printf( _("See http://www.mondorescue.org for details.\n"));428 ("If you require technical support, please contact the mailing list.\n"); 429 printf("See http://www.mondorescue.org for details.\n"); 429 430 printf 430 ( _("The list's members can help you, if you attach that file to your e-mail.\n"));431 printf( _("Log file: %s\n"), MONDO_LOGFILE);431 ("The list's members can help you, if you attach that file to your e-mail.\n"); 432 printf("Log file: %s\n", MONDO_LOGFILE); 432 433 if (does_file_exist("/tmp/MA.log.gz")) { 433 434 printf 434 ( _("FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n"));435 } 436 printf( _("Mondo has aborted.\n"));435 ("FYI, I have gzipped the log and saved it to /tmp/MA.log.gz\n"); 436 } 437 printf("Mondo has aborted.\n"); 437 438 register_pid(0, "mondo"); // finish() does this too, FYI 438 439 if (!g_main_pid) { … … 489 490 // system("clear"); 490 491 // iamhere("Finished calling newtFinished"); 491 printf( _("Execution run ended; result=%d\n"), signal);492 printf( _("Type 'less %s' to see the output log\n"), MONDO_LOGFILE);492 printf("Execution run ended; result=%d\n", signal); 493 printf("Type 'less %s' to see the output log\n", MONDO_LOGFILE); 493 494 free_libmondo_global_strings(); 494 495 exit(signal); … … 782 783 while (((ch = getchar()) != '\n') && (ch != EOF)); 783 784 } else { 784 (void) popup_with_buttons(prompt, _(" OK "), "");785 (void) popup_with_buttons(prompt, " OK ", ""); 785 786 } 786 787 } … … 842 843 #endif 843 844 ); 844 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, _(" OK "));845 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, _("Cancel"));845 b_1 = newtButton(6, newtTextboxGetNumLines(text) + 4, " OK "); 846 b_2 = newtButton(18, newtTextboxGetNumLines(text) + 4, "Cancel"); 846 847 // newtOpenWindow (8, 5, 54, newtTextboxGetNumLines (text) + 9, title); 847 848 newtCenteredWindow(54, newtTextboxGetNumLines(text) + 9, title); … … 930 931 } 931 932 // newtOpenWindow (25, 5, 46, newtTextboxGetNumLines (text) + 7, "Alert"); 932 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, _("Alert"));933 newtCenteredWindow(46, newtTextboxGetNumLines(text) + 7, "Alert"); 933 934 myForm = newtForm(NULL, NULL, 0); 934 935 newtFormAddComponents(myForm, text, b_1, b_2, NULL); … … 996 997 newtCls(); 997 998 newtPushHelpLine 998 ( _("Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed."));999 ("Welcome to Mondo Rescue, by Hugo Rabson and the Internet. All rights reversed."); 999 1000 /* newtDrawRootText(28,0,"Welcome to Mondo Rescue"); */ 1000 1001 newtDrawRootText(18, 0, WELCOME_STRING); … … 1074 1075 g_isoform_old_progress = percentage; 1075 1076 sprintf(timeline_str, 1076 _("%2ld:%02ld taken %2ld:%02ld remaining"),1077 "%2ld:%02ld taken %2ld:%02ld remaining", 1077 1078 time_taken / 60, time_taken % 60, time_remaining / 60, 1078 1079 time_remaining % 60); 1079 1080 if (percentage < 3) { 1080 sprintf(pcline_str, _(" Working"));1081 sprintf(pcline_str, " Working"); 1081 1082 for (j = 0; j < g_mysterious_dot_counter; j++) { 1082 1083 strcat(pcline_str, "."); … … 1088 1089 special_dot_char(g_mysterious_dot_counter)); 1089 1090 } else { 1090 sprintf(pcline_str, _(" %3d%% done %3d%% to go"),1091 sprintf(pcline_str, " %3d%% done %3d%% to go", 1091 1092 percentage, 100 - percentage); 1092 1093 } … … 1234 1235 1235 1236 if (g_text_mode) { 1236 printf( _("---progress-form---1--- %s%s"), blurb1, "\r\n");1237 printf( _("---progress-form---2--- %s%s"), blurb2, "\r\n");1238 printf( _("---progress-form---3--- %s%s"), blurb3, "\r\n");1239 printf( _("---progress-form---E---\n"));1237 printf("---progress-form---1--- %s\r\n", blurb1); 1238 printf("---progress-form---2--- %s\r\n", blurb2); 1239 printf("---progress-form---3--- %s\r\n", blurb3); 1240 printf("---progress-form---E---\n"); 1240 1241 sprintf(taskprogress, "TASK: ["); 1241 1242 for (i = 0; i < percentage; i += 5) { … … 1246 1247 } 1247 1248 if (percentage > 100) { 1248 log_msg(2, _("percentage = %d"), percentage);1249 log_msg(2, "percentage = %d", percentage); 1249 1250 } 1250 1251 sprintf(taskprogress + strlen(taskprogress), 1251 1252 "] %3d%c", percentage, '%'); 1252 1253 sprintf(taskprogress + strlen(taskprogress), 1253 _(" done; %2ld:%02ld to go"),1254 " done; %2ld:%02ld to go", 1254 1255 time_remaining / 60, time_remaining % 60); 1255 printf( _("---progress-form---4--- %s\r\n"), taskprogress);1256 printf("---progress-form---4--- %s\r\n", taskprogress); 1256 1257 } else { 1257 1258 center_string(blurb1, 54); … … 1329 1330 if (g_text_mode) { 1330 1331 for (backup_type = none; backup_type == none;) { 1331 printf( _("Backup type ("));1332 printf("Backup type ("); 1332 1333 for (i = 0; possible_responses[i]; i++) { 1333 1334 printf("%c%s", (i == 0) ? '\0' : ' ', … … 1351 1352 if (restoring) { 1352 1353 strcpy(title_sz, 1353 _("Please choose the backup media from which you want to read data."));1354 strcpy(minimsg_sz, _("Read from:"));1354 "Please choose the backup media from which you want to read data."); 1355 strcpy(minimsg_sz, "Read from:"); 1355 1356 } else { 1356 1357 strcpy(title_sz, 1357 _("Please choose the backup media to which you want to archive data."));1358 strcpy(minimsg_sz, _("Backup to:"));1358 "Please choose the backup media to which you want to archive data."); 1359 strcpy(minimsg_sz, "Backup to:"); 1359 1360 } 1360 1361 newtPushHelpLine(title_sz); 1361 1362 // newtOpenWindow (23, 3, 34, 17, minimsg_sz); 1362 1363 newtCenteredWindow(34, 17, minimsg_sz); 1363 b1 = newtButton(1, 1, _("CD-R disks "));1364 b2 = newtButton(17, 1, _("CD-RW disks"));1365 b3 = newtButton(1, 9, _("Tape drive "));1366 b4 = newtButton(17, 5, _("CD streamer"));1367 b5 = newtButton(1, 5, _(" DVD disks "));1368 b6 = newtButton(17, 9, _(" NFS mount "));1369 b7 = newtButton(1, 13, _(" Hard disk "));1370 b8 = newtButton(17, 13, _(" Exit "));1364 b1 = newtButton(1, 1, "CD-R disks "); 1365 b2 = newtButton(17, 1, "CD-RW disks"); 1366 b3 = newtButton(1, 9, "Tape drive "); 1367 b4 = newtButton(17, 5, "CD streamer"); 1368 b5 = newtButton(1, 5, " DVD disks "); 1369 b6 = newtButton(17, 9, " NFS mount "); 1370 b7 = newtButton(1, 13, " Hard disk "); 1371 b8 = newtButton(17, 13, " Exit "); 1371 1372 myForm = newtForm(NULL, NULL, 0); 1372 1373 newtFormAddComponents(myForm, b1, b5, b3, b7, b2, b4, b6, b8, … … 1426 1427 newtDrawRootText(18, 0, WELCOME_STRING); 1427 1428 newtPushHelpLine 1428 ( _(" Please specify the level of compression that you want."));1429 (" Please specify the level of compression that you want."); 1429 1430 // newtOpenWindow (23, 3, 34, 13, "How much compression?"); 1430 newtCenteredWindow(34, 13, _("How much compression?"));1431 b1 = newtButton(4, 1, _("Maximum"));1432 b2 = newtButton(18, 1, _("Average"));1433 b3 = newtButton(4, 5, _("Minimum"));1434 b4 = newtButton(18, 5, _(" None "));1435 b5 = newtButton(4, 9, _(" Exit "));1431 newtCenteredWindow(34, 13, "How much compression?"); 1432 b1 = newtButton(4, 1, "Maximum"); 1433 b2 = newtButton(18, 1, "Average"); 1434 b3 = newtButton(4, 5, "Minumum"); 1435 b4 = newtButton(18, 5, " None "); 1436 b5 = newtButton(4, 9, " Exit "); 1436 1437 myForm = newtForm(NULL, NULL, 0); 1437 1438 newtFormAddComponents(myForm, b1, b3, b2, b4, b5, NULL); … … 1514 1515 paranoid_fclose(fin); 1515 1516 if (filelist->entries >= ARBITRARY_MAXIMUM) { 1516 log_to_screen( _("Arbitrary limits suck, man!"));1517 log_to_screen("Arbitrary limits suck, man!"); 1517 1518 paranoid_free(tmp); 1518 1519 return (1); … … 1656 1657 } 1657 1658 sprintf(differ_sz, 1658 _(" %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list."),1659 " %d files differ. Hit 'Select' to pick a file. Hit 'Close' to quit the list.", 1659 1660 i); 1660 1661 newtPushHelpLine(differ_sz); 1661 bClose = newtCompactButton(10, 15, _(" Close "));1662 bSelect = newtCompactButton(30, 15, _(" Select "));1663 sprintf(tmp, "%-10s %-20s", _("Priority"), _("Filename"));1662 bClose = newtCompactButton(10, 15, " Close "); 1663 bSelect = newtCompactButton(30, 15, " Select "); 1664 sprintf(tmp, "%-10s %-20s", "Priority", "Filename"); 1664 1665 headerMsg = newtLabel(2, 1, tmp); 1665 newtOpenWindow(5, 4, 70, 16, _("Non-matching files"));1666 newtOpenWindow(5, 4, 70, 16, "Non-matching files"); 1666 1667 myForm = newtForm(NULL, NULL, 0); 1667 1668 newtFormAddComponents(myForm, headerMsg, fileListbox, bClose, … … 1677 1678 i++); 1678 1679 if (i == filelist->entries && filelist->entries > 0) { 1679 log_to_screen( _("I don't know what that button does!"));1680 log_to_screen("I don't know what that button does!"); 1680 1681 } else { 1681 1682 currline = i;
Note:
See TracChangeset
for help on using the changeset viewer.