Ignore:
Timestamp:
Apr 22, 2011, 1:49:03 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • Adds GUI support for compresion type. Fix half of #468.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-devices.c

    r2769 r2771  
    3535/*@unused@*/
    3636//static char cvsid[] = "$Id$";
     37//
     38
     39extern char *which_compression_type();
    3740
    3841extern int g_current_media_number;
     
    21662169    char *sz_size;
    21672170    char *command;
     2171    char *compression_type = NULL;
    21682172    char *comment;
    21692173    char *prompt;
     
    22232227                    bkpinfo->manual_cd_tray = TRUE;
    22242228                }
     2229            }
     2230            if ((compression_type = which_compression_type()) == NULL) {
     2231                log_to_screen("User has chosen not to backup the PC");
     2232                finish(1);
    22252233            }
    22262234            if ((bkpinfo->compression_level =
     
    24102418        }
    24112419        if (archiving_to_media) {
     2420            if ((compression_type = which_compression_type()) == NULL) {
     2421                log_to_screen("User has chosen not to backup the PC");
     2422                finish(1);
     2423            }
    24122424            if ((bkpinfo->compression_level =
    24132425                 which_compression_level()) == -1) {
     
    24442456            }
    24452457            if (!bkpinfo->restore_data) {
     2458                if ((compression_type = which_compression_type()) == NULL) {
     2459                    log_to_screen("User has chosen not to backup the PC");
     2460                    finish(1);
     2461                }
    24462462                if ((bkpinfo->compression_level =
    24472463                     which_compression_level()) == -1) {
     
    25752591            }
    25762592            if (archiving_to_media) {
     2593                if ((compression_type = which_compression_type()) == NULL) {
     2594                    log_to_screen("User has chosen not to backup the PC");
     2595                    finish(1);
     2596                }
    25772597                if ((bkpinfo->compression_level =
    25782598                     which_compression_level()) == -1) {
     
    27322752#endif
    27332753        bkpinfo->backup_data = TRUE;
     2754        if (strcmp(compression_type,"lzo") == 0) {
     2755            strcpy(bkpinfo->zip_exe, "lzop");
     2756            strcpy(bkpinfo->zip_suffix, "lzo");
     2757        } else if (strcmp(compression_type,"gzip") == 0) {
     2758            strcpy(bkpinfo->zip_exe, "gzip");
     2759            strcpy(bkpinfo->zip_suffix, "gz");
     2760        //} else if (strcmp(compression_type,"lzma") == 0) {
     2761            //strcpy(bkpinfo->zip_exe, "xy");
     2762            //strcpy(bkpinfo->zip_suffix, "xy");
     2763        } else if (strcmp(compression_type,"bzip2") == 0) {
     2764            strcpy(bkpinfo->zip_exe, "bzip2");
     2765            strcpy(bkpinfo->zip_suffix, "bz2");
     2766        } else {
     2767            bkpinfo->zip_exe[0] = bkpinfo->zip_suffix[0] = '\0';
     2768        }
    27342769        bkpinfo->verify_data =
    27352770            ask_me_yes_or_no
Note: See TracChangeset for help on using the changeset viewer.