diff -r 26b6f0522fd8 -r 8110bf1194d1 iaupdate/IAD/ui/src/iaupdateuicontroller.cpp --- a/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp Mon May 03 12:38:03 2010 +0300 +++ b/iaupdate/IAD/ui/src/iaupdateuicontroller.cpp Fri May 14 15:58:48 2010 +0300 @@ -319,20 +319,22 @@ } TBool agreementAccepted( EFalse ); - CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC(); - agreementAccepted = agreement->AgreementAcceptedL(); - if ( ( !agreementAccepted )&& ( iRequestType != IAUpdateUiDefines::ECheckUpdates ) ) + if ( !ForcedRefresh() ) { - // agreement (disclaimer) dialog is not prompted when CheckUpdates is called - // - // Refresh from network is allowed when first time case - iRefreshFromNetworkDenied = EFalse; - agreementAccepted = agreement->AcceptAgreementL(); + CIAUpdateAgreement* agreement = CIAUpdateAgreement::NewLC(); + agreementAccepted = agreement->AgreementAcceptedL(); + if ( ( !agreementAccepted )&& ( iRequestType != IAUpdateUiDefines::ECheckUpdates ) ) + { + // agreement (disclaimer) dialog is not prompted when CheckUpdates is called + // + // Refresh from network is allowed when first time case + iRefreshFromNetworkDenied = EFalse; + agreementAccepted = agreement->AcceptAgreementL(); + } + CleanupStack::PopAndDestroy( agreement ); } - - CleanupStack::PopAndDestroy( agreement ); - - if ( !agreementAccepted ) + + if ( !agreementAccepted && !ForcedRefresh() ) { if ( iRequestType == IAUpdateUiDefines::ECheckUpdates ) { @@ -420,7 +422,8 @@ HbAction action("OK"); messageBox.setPrimaryAction(&action); messageBox.setTimeout(HbPopup::NoTimeout); - messageBox.exec(); + messageBox.show(); + //messageBox.exec(); } else { @@ -512,6 +515,7 @@ selectedNode->DownloadL( *this ); iState = EDownloading; iClosingAllowedByClient = ETrue; + selectedNode->SetDownloading( ETrue); /*ShowUpdatingDialogL( R_IAUPDATE_DOWNLOADING_NOTE, selectedNode->Base().Name(), iNodeIndex + 1, @@ -2288,25 +2292,32 @@ { if ( params->Refresh() ) { - // Check from the central repocitory what are the automatic checking and - // roaming settings. - TInt autoUpdateCheckValue( 0 ); - CRepository* cenrep( + if ( ForcedRefresh() ) + { + allowRefresh = ETrue; + } + else + { + // Check from the central repocitory what are the automatic checking and + // roaming settings. + TInt autoUpdateCheckValue( 0 ); + CRepository* cenrep( CRepository::NewLC( KCRUidIAUpdateSettings ) ); - // Notice, that KIAUpdateSettingAutoUpdateCheck can give following values - // 0 = No automatic update check - // 1 = Automatic update check enabled when not roaming - // 2 = Automatic update enabled + // Notice, that KIAUpdateSettingAutoUpdateCheck can give following values + // 0 = No automatic update check + // 1 = Automatic update check enabled when not roaming + // 2 = Automatic update enabled - User::LeaveIfError( cenrep->Get( KIAUpdateAutoUpdateCheck, - autoUpdateCheckValue ) ); - CleanupStack::PopAndDestroy( cenrep ); - if ( ( autoUpdateCheckValue == EIAUpdateSettingValueEnable ) || - ( autoUpdateCheckValue == EIAUpdateSettingValueDisableWhenRoaming && - !iRoamingHandler->IsRoaming() ) ) - { - allowRefresh = ETrue; - } + User::LeaveIfError( cenrep->Get( KIAUpdateAutoUpdateCheck, + autoUpdateCheckValue ) ); + CleanupStack::PopAndDestroy( cenrep ); + if ( ( autoUpdateCheckValue == EIAUpdateSettingValueEnable ) || + ( autoUpdateCheckValue == EIAUpdateSettingValueDisableWhenRoaming && + !iRoamingHandler->IsRoaming() ) ) + { + allowRefresh = ETrue; + } + } } } } @@ -2624,6 +2635,26 @@ return params; } +// --------------------------------------------------------------------------- +// CIAUpdateUiController::ForcedRefresh +// +// --------------------------------------------------------------------------- +// +TBool CIAUpdateUiController::ForcedRefresh() const + { + return iForcedRefresh; + } + + +// --------------------------------------------------------------------------- +// CIAUpdateUiController::SetForcedRefresh +// +// --------------------------------------------------------------------------- +// +void CIAUpdateUiController::SetForcedRefresh( TBool aForcedRefresh ) + { + iForcedRefresh = aForcedRefresh; + } // --------------------------------------------------------------------------- // CIAUpdateUiController::ParamsWriteFileL