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

Commit

Permalink
Have the AppCafe also check/update the installed PBI icons whenever i…
Browse files Browse the repository at this point in the history
…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
Ken Moore committed Oct 29, 2013
1 parent 2a873ce commit 6763bdf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src-qt4/pc-softwaremanager/mainUI.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ void MainUI::slotRefreshInstallTab(){
} }


void MainUI::slotPBIStatusUpdate(QString pbiID){ 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++){ for(int i=0; i<ui->tree_install_apps->topLevelItemCount(); i++){
QString itemID = ui->tree_install_apps->topLevelItem(i)->whatsThis(0); QString itemID = ui->tree_install_apps->topLevelItem(i)->whatsThis(0);
if(itemID == pbiID){ if(itemID == pbiID){
Expand All @@ -288,7 +290,11 @@ void MainUI::slotPBIStatusUpdate(QString pbiID){
if ( appID == pbiID ) { if ( appID == pbiID ) {
slotUpdateSelectedPBI(true);; //only update status 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("") ));
}
} }
} }
} }
Expand Down

0 comments on commit 6763bdf

Please sign in to comment.