Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:pcbsd/pcbsd
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Moore committed Mar 5, 2014
2 parents ad36b59 + 68b1db6 commit 3a00741
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src-qt4/life-preserver/lp-gui/LPMain.cpp
Expand Up @@ -239,6 +239,16 @@ void LPMain::updateTabs(){
QString cds = ui->combo_datasets->currentText();
ui->combo_datasets->clear();
QStringList dslist = POOLDATA.subsets();
dslist.sort();
//Now move the home directories to the top of the list
int moved = 0;
for(int i=0; i<dslist.length(); i++){ //make sure it stays in alphabetical order
if(dslist[i].startsWith("/usr/home/")){
dslist.move(i,moved);
moved++;
i--; //make sure to not miss any items from moving
}
}
ui->combo_datasets->addItems(dslist);
int dsin = dslist.indexOf(cds);
if(dsin >= 0){ ui->combo_datasets->setCurrentIndex(dsin); }
Expand Down Expand Up @@ -292,6 +302,10 @@ void LPMain::updateDataset(){
if(max < 0){ max = 0; ui->slider_snapshots->setEnabled(false); }
ui->slider_snapshots->setMaximum(max);
ui->slider_snapshots->setValue(max); //most recent snapshot
int interval = 1; //one tick per snapshot
if( max > 20 ){ interval = max / 20; } //show 20 ticks
ui->slider_snapshots->setTickInterval(interval);

updateSnapshot();
}else{
ui->slider_snapshots->setEnabled(false);
Expand Down

0 comments on commit 3a00741

Please sign in to comment.