Permalink
Browse files

Have the AppCafe also check/update the installed PBI icons whenever i…

…t just updates a single PBI. This should catch those rare instances where the AppCafe is aware of an installed PBI before the icon is added to the PBI database and update the icon on the TreeWidgetItem.
  • Loading branch information...
1 parent 2a873ce commit 6763bdf051979e5097d936f9f8c1b283c58441f6 Ken Moore committed Oct 29, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 src-qt4/pc-softwaremanager/mainUI.cpp
@@ -275,6 +275,8 @@ void MainUI::slotRefreshInstallTab(){
}
void MainUI::slotPBIStatusUpdate(QString pbiID){
+ //This will do a full update of a particlar PBI entry
+ // and just update/check the icons for all the other PBI's
for(int i=0; i<ui->tree_install_apps->topLevelItemCount(); i++){
QString itemID = ui->tree_install_apps->topLevelItem(i)->whatsThis(0);
if(itemID == pbiID){
@@ -288,7 +290,11 @@ void MainUI::slotPBIStatusUpdate(QString pbiID){
if ( appID == pbiID ) {
slotUpdateSelectedPBI(true);; //only update status
}
- return; // Found our match, we can return now
+ }else{
+ //Just check/update the icon if necessary
+ if(ui->tree_install_apps->topLevelItem(i)->icon(0).isNull()){
+ ui->tree_install_apps->topLevelItem(i)->setIcon(0, QIcon( PBI->PBIInfo(itemID, QStringList() << "icon").join("") ));
+ }
}
}
}

0 comments on commit 6763bdf

Please sign in to comment.