Changeset f7f168f


Ignore:
Timestamp:
Jul 10, 2013 6:40:37 AM (9 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
4018e43, 39e56e7
Parents:
dfe938d (diff), a3c7851 (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

Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/PCDM/themes/default/default.theme

    rabea4e8 ra3c7851  
    4545# TOOLBAR SETTINGS 
    4646TOOLBAR_LOCATION=bottom         # [bottom | top | left | right] 
    47 TOOLBAR_IMAGE_SIZE=24x24     # Set the default size for all images in the toolbar 
     47TOOLBAR_IMAGE_SIZE=32x32     # Set the default size for all images in the toolbar 
    4848TOOLBAR_STYLE=textbesideicon            # [icononly | textonly | textbesideicon | textundericon] 
    4949 
  • src-qt4/pc-softwaremanager/SoftwareManager.qrc

    r78fa8b2 rf3baeb9  
    3333    <file>icons/app_needroot.png</file> 
    3434    <file>icons/app_upgrade.png</file> 
     35    <file>icons/app_upgrade_small.png</file> 
     36    <file>icons/app_upgrade_small-root.png</file> 
    3537    <file>icons/xdg_desktop.png</file> 
    3638    <file>icons/xdg_menu.png</file> 
  • src-qt4/pc-softwaremanager/mainUI.cpp

    r51d6c4b rf3baeb9  
    211211    cList << ui->tree_install_apps->topLevelItem(i)->whatsThis(0); 
    212212  } 
    213    //Now make adjustments as necessary 
    214   for(int i=0; i<installList.length(); i++){ 
    215     //Detemine what action should be done with this item location 
    216     int todo = 0; //0=insert new item, 1=update current item, 2=remove current item 
    217     if(i < cList.length()){ 
    218       if(installList[i] == cList[i]){ todo=1; } 
    219       else if( installList.contains(cList[i]) && !cList.contains(installList[i]) ){ todo=0; } //new item to be inserted here 
    220       else if( !installList.contains(cList[i]) ){ todo=2; } //current item in this location should be removed 
    221     } 
    222     //Now perform the action on this location 
    223     if(todo==0){  
    224       //insert new item 
    225       QTreeWidgetItem *item = new QTreeWidgetItem; //create the item 
    226       item->setWhatsThis(0,installList[i]); 
    227       //Now format the display 
    228       formatInstalledItemDisplay(item); 
    229       //Now insert this item onto the list 
    230       ui->tree_install_apps->insertTopLevelItem(i,item); 
    231       cList.insert(i,installList[i]); //reflect this inclusion into the current list 
    232     }else if(todo==1){ 
    233       //Update current item 
    234       formatInstalledItemDisplay( ui->tree_install_apps->topLevelItem(i) ); 
    235     }else{ 
    236       //Remove current item 
    237       ui->tree_install_apps->takeTopLevelItem(i); 
    238       cList.removeAt(i); //reflect the change to the current list 
    239       i--; //Re-check the item that should be in this location 
    240     } 
    241   } 
    242   //Now makesure that there are no extra items at the end 
    243   int il = installList.length(); 
    244   while(il < cList.length()){ 
    245    ui->tree_install_apps->takeTopLevelItem(il); 
    246    cList.removeAt(il); //reflect the change to the current list  
    247   } 
     213  //Quick finish if no items installed 
     214  if(installList.isEmpty()){ 
     215    ui->tree_install_apps->clear(); 
     216  }else{ 
     217    //Now make adjustments as necessary 
     218    for(int i=0; i<installList.length(); i++){ 
     219      //Detemine what action should be done with this item location 
     220      int todo = 0; //0=insert new item, 1=update current item, 2=remove current item 
     221      if(i < cList.length()){ 
     222        if(installList[i] == cList[i]){ todo=1; } 
     223        else if( installList.contains(cList[i]) && !cList.contains(installList[i]) ){ todo=0; } //new item to be inserted here 
     224        else if( !installList.contains(cList[i]) ){ todo=2; } //current item in this location should be removed 
     225      } 
     226      //Now perform the action on this location 
     227      if(todo==0){  
     228        //insert new item 
     229        QTreeWidgetItem *item = new QTreeWidgetItem; //create the item 
     230        item->setWhatsThis(0,installList[i]); 
     231        //Now format the display 
     232        formatInstalledItemDisplay(item); 
     233        //Now insert this item onto the list 
     234        ui->tree_install_apps->insertTopLevelItem(i,item); 
     235        cList.insert(i,installList[i]); //reflect this inclusion into the current list 
     236      }else if(todo==1){ 
     237        //Update current item 
     238        formatInstalledItemDisplay( ui->tree_install_apps->topLevelItem(i) ); 
     239      }else{ 
     240        //Remove current item 
     241        ui->tree_install_apps->takeTopLevelItem(i); 
     242        cList.removeAt(i); //reflect the change to the current list 
     243        i--; //Re-check the item that should be in this location 
     244      } 
     245    } 
     246    //Now makesure that there are no extra items at the end 
     247    int il = installList.length(); 
     248    while(il < cList.length()){ 
     249      ui->tree_install_apps->takeTopLevelItem(il); 
     250      cList.removeAt(il); //reflect the change to the current list  
     251    } 
     252  } //end of empty list check 
    248253   
    249254  //Make sure that there is an item selected 
     
    257262    }  
    258263  } 
    259    
    260264  on_tree_install_apps_itemSelectionChanged(); //Update the info boxes 
    261265  slotDisplayStats(); 
     
    310314  vals << "name" << "icon" << "author" << "website" << "version" << "license"; 
    311315  QStringList bools; 
    312   bools << "autoupdate" << "hasdesktopicons" << "hasmenuicons"; 
     316  bools << "autoupdate" << "hasdesktopicons" << "hasmenuicons" << "requiresroot"; 
    313317  vals = PBI->PBIInfo(appID,vals); 
    314318  bools = PBI->PBIInfo(appID,bools); 
     
    323327  bool desktopSC = (bools[1] == "true"); // XDG desktop entries available 
    324328  bool menuSC= (bools[2] == "true");     // XDG menu entries available 
    325   bool autoupdate = (bools[0] == "true");   
     329  bool autoupdate = (bools[0] == "true"); //auto-update enabled 
     330  bool rootonly = (bools[3] == "true"); //requires root 
    326331  //Create the shortcuts string 
    327332  QString shortcuts; 
     
    344349  ui->label_install_shortcuts->setText(shortcuts); 
    345350  ui->check_install_autoupdate->setChecked(autoupdate); 
    346   //Make the upgrade button invisible if no upgrade available 
    347   if(PBI->upgradeAvailable(appID).isEmpty()){ ui->tool_install_update->setVisible(FALSE); } 
    348   else{ ui->tool_install_update->setVisible(TRUE); } 
     351   
     352  //Adjust the quick action buttons as necessary 
     353  if(!PBI->currentAppStatus(appID).isEmpty()){ 
     354    //Actions pending/working only show cancel button 
     355    ui->tool_install_cancel->setVisible(TRUE); 
     356    ui->tool_install_remove->setVisible(FALSE); 
     357    ui->tool_install_update->setVisible(FALSE); 
     358  }else{ 
     359    //Nothing pending 
     360    ui->tool_install_cancel->setVisible(FALSE); 
     361    if( !PBI->isInstalled(appID).isEmpty() ){  
     362      //Remove Button 
     363      ui->tool_install_remove->setVisible(TRUE); 
     364      if(rootonly){ ui->tool_install_remove->setIcon(QIcon(":icons/remove-root.png")); } 
     365      else{ ui->tool_install_remove->setIcon(QIcon(":icons/remove.png")); } 
     366      //Upgrade button 
     367      if(PBI->upgradeAvailable(appID).isEmpty()){ ui->tool_install_update->setVisible(FALSE); } 
     368      else{ 
     369        ui->tool_install_update->setVisible(TRUE);  
     370        if(rootonly){ ui->tool_install_update->setIcon(QIcon(":icons/app_upgrade_small-root.png")); } 
     371        else{ ui->tool_install_update->setIcon(QIcon(":icons/app_upgrade_small.png")); } 
     372      } 
     373    }else{  
     374      ui->tool_install_remove->setVisible(FALSE);  
     375      ui->tool_install_update->setVisible(FALSE);  
     376    }    
     377  } 
    349378   
    350379} 
     
    384413    PBI->removePBI(QStringList() << appID); 
    385414  } 
     415} 
     416 
     417void MainUI::on_tool_install_cancel_clicked(){ 
     418  //Get the current item 
     419  QString appID; 
     420  if(ui->tree_install_apps->topLevelItemCount() > 0){ 
     421    appID = ui->tree_install_apps->currentItem()->whatsThis(0); 
     422  } 
     423  if(appID.isEmpty()){return;} 
     424  PBI->cancelActions(QStringList() << appID); 
     425   
    386426} 
    387427 
  • src-qt4/pc-softwaremanager/mainUI.h

    r0314e57 rf3baeb9  
    6363  void on_tool_install_update_clicked(); 
    6464  void on_tool_install_remove_clicked(); 
     65  void on_tool_install_cancel_clicked(); 
    6566  void slotActionAddDesktop(); 
    6667  void slotActionRemoveDesktop(); 
  • src-qt4/pc-softwaremanager/pbiBackend.cpp

    recf5153 rf3baeb9  
    159159// ===== Local/Repo Interaction Functions ===== 
    160160QString PBIBackend::isInstalled(QString appID){ 
     161  //check if the pbiID was given (quick) 
     162  if(PBIHASH.contains(appID)){ 
     163    if(PBIHASH[appID].path.isEmpty()){ return ""; } 
     164    else{ return appID; } 
     165  } 
    161166  //Returns pbiID of the installed application 
    162167  QString output; 
     
    167172  QStringList pbiID = PBIHASH.keys(); //get list of installed PBI's 
    168173  for(int i=0; i<pbiID.length();i++){ 
    169     QString pbi = Extras::nameToID(PBIHASH[pbiID[i]].name); 
     174    QString pbi = Extras::nameToID(PBIHASH[pbiID[i]].metaID); 
    170175    if( (pbi == appID) && !PBIHASH[pbiID[i]].path.isEmpty() ){ 
    171176      output = pbiID[i]; 
     
    179184  QString output; 
    180185  if(!PBIHASH.contains(pbiID)){return output;} 
    181   QString appID = Extras::nameToID(PBIHASH[pbiID].name); 
     186  QString appID = Extras::nameToID(PBIHASH[pbiID].metaID); 
    182187  if(APPHASH.contains(appID)){ 
    183188    if(APPHASH[appID].latestVersion != PBIHASH[pbiID].version){output = APPHASH[appID].latestVersion;}   
     
    247252  //Now check/start the remove process 
    248253  QTimer::singleShot(0,this,SLOT(checkProcesses()) ); 
    249 } 
    250  
    251 void PBIBackend::stopUpdate(QStringList pbiID){ 
    252   qDebug() << "Stop Update requested for:" << pbiID; 
    253254} 
    254255 
     
    522523 
    523524QString PBIBackend::currentAppStatus( QString appID ){ 
     525  QString output; 
     526  int status = -999; 
     527  //pbiID given (quicker) 
     528  if(PBIHASH.contains(appID)){ status = PBIHASH[appID].status; } 
     529  else{ 
     530    //appID given 
     531    if(!APPHASH.contains(appID)){ return ""; } 
     532    QStringList pbilist = PBIHASH.keys(); 
     533    for(int i=0; i<pbilist.length(); i++){ 
     534      if(PBIHASH[pbilist[i]].metaID == appID){ status = PBIHASH[pbilist[i]].status; } 
     535    } 
     536  } 
    524537  //Determine if the app is currently in a pending state 
    525   if(!APPHASH.contains(appID)){ return ""; } 
    526   QString output; 
    527   QStringList pbilist = PBIHASH.keys(); 
     538  switch (status){ 
     539        case InstalledPBI::DOWNLOADING: 
     540          output = tr("Downloading"); break; 
     541        case InstalledPBI::INSTALLING: 
     542          output = tr("Installing"); break; 
     543        case InstalledPBI::REMOVING: 
     544          output = tr("Removing"); break; 
     545        case InstalledPBI::UPDATING: 
     546          output = tr("Updating"); break; 
     547        case InstalledPBI::PENDINGDOWNLOAD: 
     548          output = tr("Pending Download"); break; 
     549        case InstalledPBI::PENDINGINSTALL: 
     550          output = tr("Pending Install"); break; 
     551        case InstalledPBI::PENDINGREMOVAL: 
     552          output = tr("Pending Removal"); break; 
     553        case InstalledPBI::PENDINGUPDATE: 
     554          output = tr("Pending Update"); break; 
     555        default: //do nothing for the rest 
     556          output.clear(); 
     557  } 
     558  return output; 
     559  /* 
    528560  for(int i=0; i<pbilist.length(); i++){ 
    529561    if(PBIHASH[pbilist[i]].metaID == appID){ 
     
    551583    } 
    552584  } 
    553   return output; 
     585  return output;*/ 
    554586} 
    555587 
  • src-qt4/pc-softwaremanager/pbiBackend.h

    r78fa8b2 rf3baeb9  
    5151        void upgradePBI(QStringList pbiID); //start upgrade process for list of PBI's 
    5252        void removePBI(QStringList pbiID); //start the removal process 
    53         void stopUpdate(QStringList pbiID); //stop upgrade/downgrade/removal process 
    5453        void installApp(QStringList appID); //[install/upgrade/downgrade] application from the repo (as appropriate) 
    5554        void addDesktopIcons(QStringList pbiID, bool allusers); // add XDG desktop icons 
  • src-sh/pc-sysinstall/backend/functions-unmount.sh

    r88e7386 rdfe938d  
    237237 
    238238  # Make sure to copy zpool.cache first 
    239   rc_nohalt "cp /boot/zfs/zpool.cache ${FSMNT}/boot/zfs/" 
     239  if [ ! -d "${FSMNT}/boot/zfs/" ] ; then  
     240     rc_halt "mkdir ${FSMNT}/boot/zfs" 
     241  fi 
     242  rc_halt "cp /boot/zfs/zpool.cache ${FSMNT}/boot/zfs/" 
     243  rc_halt "ln -s ../zfs ${FSMNT}/boot/kernel/zfs" 
    240244 
    241245  # Copy the hostid so that our zfs cache works 
Note: See TracChangeset for help on using the changeset viewer.