Changeset b02e573


Ignore:
Timestamp:
02/11/14 14:35:35 (8 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
a238837, 4f9718b, a2a23ff
Parents:
9537cb2 (diff), 117c1e5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Location:
src-qt4
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/EasyPBI/EasyPBI.qrc

    rebba654 r8eaa615  
    55    <file>icons/cancel.png</file> 
    66    <file>icons/config.png</file> 
     7    <file>icons/window-close.png</file> 
    78    <file>icons/pcbsd.png</file> 
    89    <file>icons/freebsd.png</file> 
  • src-qt4/EasyPBI/backend.cpp

    r1f245a6 r8eaa615  
    1616  else if(icon=="help"){ iconPath.append("standardbutton-help-32.png"); } 
    1717  else if(icon=="open"){ iconPath.append("standardbutton-open-32.png"); } 
    18   else if(icon=="close"){ iconPath.append("standardbutton-close-32.png"); } 
    1918  else if(icon=="file"){ iconPath.append("file-32.png"); } 
    2019  else if(icon=="trash"){ iconPath.append("trash-32.png"); } 
     
    2322  else if(icon=="stop"){ iconPath.append("media-stop-32.png"); } 
    2423  //EasyPBI embedded resources (EasyPBI.qrc) 
     24  else if(icon=="close"){ iconPath = ":/png/icons/window-close.png"; } 
    2525  else if(icon=="easypbi"){ iconPath = ":/png/icons/EasyPBIicon.png"; } 
    2626  else if(icon=="freebsd"){ iconPath = ":/png/icons/freebsd.png"; } 
  • src-qt4/EasyPBI/mainGUI.ui

    rebba654 r8eaa615  
    259259             <y>0</y> 
    260260             <width>528</width> 
    261              <height>648</height> 
     261             <height>659</height> 
    262262            </rect> 
    263263           </property> 
     
    16381638     <y>0</y> 
    16391639     <width>575</width> 
    1640      <height>20</height> 
     1640     <height>21</height> 
    16411641    </rect> 
    16421642   </property> 
    16431643   <widget class="QMenu" name="menuFile"> 
    16441644    <property name="title"> 
    1645      <string>System</string> 
     1645     <string>File</string> 
    16461646    </property> 
    16471647    <addaction name="actionExit"/> 
     
    16491649   <widget class="QMenu" name="menuEdit"> 
    16501650    <property name="title"> 
    1651      <string>Options</string> 
     1651     <string>Configure</string> 
    16521652    </property> 
    16531653    <addaction name="actionPreferences"/> 
     
    16611661    </property> 
    16621662    <property name="title"> 
    1663      <string>Information</string> 
     1663     <string>Help</string> 
    16641664    </property> 
    16651665    <addaction name="actionAbout_EasyPBI"/> 
     
    17211721    <string>Open up the EasyPBI settings editor</string> 
    17221722   </property> 
     1723   <property name="shortcut"> 
     1724    <string>Shift+S</string> 
     1725   </property> 
    17231726  </action> 
    17241727  <action name="actionGet_Ports"> 
     
    18041807  </action> 
    18051808  <action name="actionExit"> 
     1809   <property name="icon"> 
     1810    <iconset resource="EasyPBI.qrc"> 
     1811     <normaloff>:/png/icons/window-close.png</normaloff>:/png/icons/window-close.png</iconset> 
     1812   </property> 
    18061813   <property name="text"> 
    1807     <string>Close EasyPBI</string> 
     1814    <string>Quit</string> 
    18081815   </property> 
    18091816   <property name="statusTip"> 
    18101817    <string>Close EasyPBI</string> 
     1818   </property> 
     1819   <property name="shortcut"> 
     1820    <string>Shift+Q</string> 
    18111821   </property> 
    18121822  </action> 
     
    18291839   </property> 
    18301840   <property name="text"> 
    1831     <string>About EasyPBI</string> 
     1841    <string>About</string> 
    18321842   </property> 
    18331843   <property name="statusTip"> 
    18341844    <string>View additional information about EasyPBI</string> 
     1845   </property> 
     1846   <property name="shortcut"> 
     1847    <string>Shift+A</string> 
    18351848   </property> 
    18361849  </action> 
  • src-qt4/life-preserver/lp-tray/LPTray.cpp

    rd62db8b r9537cb2  
    129129    msgdlg->raise();  
    130130    msgdlg->show(); 
    131   }else{ 
     131  }else if(!watcher->initPhase()){ 
    132132    startGUI(); 
    133133  } 
  • src-qt4/life-preserver/lp-tray/LPWatcher.cpp

    r6a2483b r9537cb2  
    3838  timer = new QTimer(); 
    3939    connect(timer, SIGNAL(timeout()), this, SLOT(checkPoolStatus()) ); 
     40  iniTimer = new QTimer(); 
     41    connect(iniTimer, SIGNAL(timeout()), this, SLOT(endInitPhase()) ); 
     42    iniTimer->setSingleShot(true); 
    4043  //initialize the log file reader 
    4144  logfile = new QFile(FILE_LOG, this); 
     
    5760// ----------------------------------- 
    5861void LPWatcher::start(){ 
    59   if(!logfile->exists()){ 
    60     QString dir = FILE_LOG; 
    61           dir.chop( dir.section("/",-1).count()+1 ); 
    62     if(!QFile::exists(dir)){ system( QString("mkdir -p "+dir).toUtf8() ); } 
    63     system( QString("touch "+FILE_LOG).toUtf8() ); 
    64   } 
    65   //Read the current state of the log file 
    66   logfile->open(QIODevice::ReadOnly | QIODevice::Text); 
    67   readLogFile(true); //do this quietly the first time through 
    68   //Now start up the log file watcher 
    69   watcher->addPath(FILE_LOG); 
     62  INIT=true; 
     63  setupLogFile(); 
    7064  //Now check for any current errors in the LPbackend 
    7165  checkPoolStatus(); 
    7266  //And start up the error file watcher 
    7367  if(!timer->isActive()){ timer->start(sysCheckTime); } 
     68  iniTimer->start(30000); //30 seconds of initialization phase 
    7469} 
    7570 
     
    143138} 
    144139 
     140bool LPWatcher::initPhase(){ 
     141  return INIT; 
     142} 
    145143// ------------------------------------- 
    146144//    PRIVATE FUNCTIONS 
    147145// ------------------------------------- 
     146void LPWatcher::setupLogFile(){ 
     147 //Tray now has user permissions and cannot create files/dirs in /var 
     148 /*if(!logfile->exists()){ 
     149    QString dir = FILE_LOG; 
     150          dir.chop( dir.section("/",-1).count()+1 ); 
     151    if(!QFile::exists(dir)){ system( QString("mkdir -p "+dir).toUtf8() ); } 
     152    system( QString("touch "+FILE_LOG).toUtf8() ); 
     153  }*/ 
     154         
     155  //Read the current state of the log file 
     156  if(logfile->exists()){ 
     157    logfile->open(QIODevice::ReadOnly | QIODevice::Text); 
     158    readLogFile(true); //do this quietly the first time through 
     159    //Now start up the log file watcher 
     160    watcher->addPath(FILE_LOG);  
     161  } 
     162} 
     163 
    148164void LPWatcher::readLogFile(bool quiet){ 
    149165  QStringList reppools = listReplicatedPools(); 
     
    386402 
    387403void LPWatcher::checkPoolStatus(){ 
     404  if(watcher->files().isEmpty()){ 
     405    setupLogFile(); //try it now - might have been created in the meantime 
     406  } 
    388407  //Now check zpool status for bad/running statuses 
    389408  QStringList zstat = getCmdOutput("zpool status"); 
     
    579598  else{ emit StatusUpdated(); } 
    580599} 
     600 
     601void LPWatcher::endInitPhase(){ 
     602  INIT=false; 
     603} 
  • src-qt4/life-preserver/lp-tray/LPWatcher.h

    r6a2483b r9537cb2  
    2525        bool isRunning(); 
    2626        bool hasError(); 
     27        bool initPhase(); 
    2728 
    2829public slots: 
     
    3839        //File system watcher 
    3940        QFileSystemWatcher *watcher; 
    40         QTimer *timer; 
     41        QTimer *timer, *iniTimer; 
    4142        int sysCheckTime; 
    4243        QFile *logfile, *repfile; 
     
    4445        //Replication size variables 
    4546        QString repTotK, lastSize; 
     47        bool INIT; 
    4648 
     49        void setupLogFile(); 
    4750        void readLogFile(bool quiet = false); 
    4851        void readReplicationFile(); //always sends quiet signals 
     
    6063        void fileChanged(QString); //file system watcher saw a change 
    6164        void checkPoolStatus(); //check for serious system errors 
     65        void endInitPhase(); 
    6266 
    6367signals: 
Note: See TracChangeset for help on using the changeset viewer.