Changes in / [2ead8ff:7fa3570]


Ignore:
Location:
src-qt4
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/libpcbsd/utils/pcbsd-DLProcess.cpp

    r2e26400 r23e7b34  
    9595  }      
    9696  //Check if total is known   
    97   if(!totok){ 
     97  if(!totok && curok){ 
    9898    //Only Current is known 
    9999    tot = cur; //output current instead of total since no percent either 
    100100  } 
    101101  //OTHER input (speed, filename) 
    102   QString other; 
     102  QString other = "??"; 
    103103  //Check the speed 
    104104  if(!speed.isEmpty()){ 
    105105    spd = speed.toDouble(&spdok); 
    106     if(spdok && spd==0){ spdok=false; } 
    107     if(!spdok){ 
    108       spd = -1; //unknown 
     106    if(spdok && spd<=0){ spdok=false; } 
     107    if(spdok){ 
     108      other = kbToString(spd)+"/s"; 
    109109    } 
    110     other = kbToString(spd)+"/s"; 
    111110  //Check for a filename instead 
    112111  }else if(!filename.isEmpty() ){ 
     
    114113  } 
    115114  //Now emit the stats 
    116   emit UpdatePercent(QString::number(percent), kbToString(tot), other); 
     115  QString perc = "??"; 
     116  if(percent >= 0){ perc = QString::number(percent); } 
     117  QString tota = "??"; 
     118  if(tot >= 0){ tota = kbToString(tot); } 
     119   
     120  emit UpdatePercent(perc, tota, other); 
    117121} 
    118122 
  • src-qt4/life-preserver/lp-gui/LPGUtils.cpp

    r8b3a780 r109c737  
    142142 
    143143bool LPGUtils::revertFile(QString oldPath, QString newPath){ 
     144  qDebug() << "Reverting file:" << oldPath << " -> " << newPath; 
    144145  bool ok = QFile::copy(oldPath,newPath); 
    145146  //return the path to the new file if the copy was successful 
     
    149150    QFileInfo FI(oldPath); 
    150151      system( QString("chown "+FI.owner()+":"+FI.group()+" "+newPath).toUtf8() ); 
     152  }else{ 
     153    qDebug() << " - Error: Could not copy file"; 
    151154  } 
    152155  return ok; 
  • src-qt4/life-preserver/lp-gui/LPMain.cpp

    rec61e8e r109c737  
    2121  //Initialize the waitbox pointer 
    2222  waitBox = 0; 
     23  //Initialize the classic dialog pointer 
     24  classicDLG = 0; 
    2325  //Create the basic/advanced view options 
    2426  viewBasic = new QRadioButton(tr("Basic"), ui->menuView); 
     
    522524  QString user = act->text(); 
    523525  qDebug() << "Compress Home Dir:" << user; 
     526  //Start up the Classic Dialog 
     527  bool recreate = false; 
     528  if(classicDLG == 0){ recreate = true; } 
     529  if(recreate){ 
     530    classicDLG = new LPClassic(this); 
     531    classicDLG->setHomeDir("/usr/home/"+user); 
     532    classicDLG->show(); 
     533  }else if(!classicDLG->running){ 
     534    classicDLG->setHomeDir("/usr/home/"+user); //move to the alternate user dir 
     535  } 
     536  classicDLG->raise(); 
     537  classicDLG->show(); 
     538  /* 
    524539  //Prompt for the package name 
    525540  QString pkgName = user+"-"+QDateTime::currentDateTime().toString("yyyyMMdd-hhmm"); 
     
    538553    qDebug() << "Package created at:" << pkgPath; 
    539554    QMessageBox::information(this,tr("Package Success"), tr("The home directory package was successfully created.")+"\n\n"+pkgPath); 
    540   }        
     555  } 
     556  */ 
    541557} 
    542558 
  • src-qt4/life-preserver/lp-gui/LPMain.h

    rec61e8e r109c737  
    2323#include "LPWizard.h" 
    2424#include "LPConfig.h" 
     25#include "LPClassic.h" 
    2526 
    2627namespace Ui{ 
     
    4748        QTimer *timer; 
    4849        QSettings *settings; 
     50        LPClassic *classicDLG; 
    4951 
    5052        void showErrorDialog(QString title, QString message, QString errors); 
  • src-qt4/life-preserver/lp-gui/lp-gui.pro

    rd9190b1 r109c737  
    1010                LPConfig.h \ 
    1111                LPMain.h \ 
    12                 LPGUtils.h 
     12                LPGUtils.h \ 
     13                LPClassic.h 
    1314                 
    1415SOURCES += main.cpp \ 
     
    1718                LPConfig.cpp \ 
    1819                LPMain.cpp \ 
    19                 LPGUtils.cpp 
     20                LPGUtils.cpp \ 
     21                LPClassic.cpp 
    2022 
    2123RESOURCES += lPreserve.qrc 
     
    2325FORMS   = LPWizard.ui \ 
    2426        LPConfig.ui \ 
    25         LPMain.ui 
     27        LPMain.ui \ 
     28        LPClassic.ui 
    2629 
    2730TARGET=life-preserver 
Note: See TracChangeset for help on using the changeset viewer.