Changeset f5ad808


Ignore:
Timestamp:
03/05/14 09:43:17 (5 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2
Children:
68b1db6
Parents:
0debaa7
Message:

Clean up the LP-GUI display of datasets:
Make sure they are in alphabetical order, with any /usr/home/* datasets at the top.
Make sure the number of tickmarks on the snapshot selector is set to one per snapshot (maxing out at 20 tickmarks if more than 20 snapshots)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/life-preserver/lp-gui/LPMain.cpp

    r65e10ad rf5ad808  
    240240    ui->combo_datasets->clear(); 
    241241    QStringList dslist = POOLDATA.subsets(); 
     242    dslist.sort(); 
     243    //Now move the home directories to the top of the list 
     244    int moved = 0; 
     245    for(int i=0; i<dslist.length(); i++){  //make sure it stays in alphabetical order 
     246      if(dslist[i].startsWith("/usr/home/")){ 
     247        dslist.move(i,moved); 
     248        moved++;  
     249        i--; //make sure to not miss any items from moving 
     250      } 
     251    } 
    242252    ui->combo_datasets->addItems(dslist); 
    243253    int dsin = dslist.indexOf(cds); 
     
    293303      ui->slider_snapshots->setMaximum(max); 
    294304      ui->slider_snapshots->setValue(max); //most recent snapshot 
     305      int interval = 1; //one tick per snapshot 
     306      if( max > 20 ){ interval = max / 20; } //show 20 ticks 
     307      ui->slider_snapshots->setTickInterval(interval); 
     308 
    295309      updateSnapshot(); 
    296310  }else{ 
Note: See TracChangeset for help on using the changeset viewer.