1997 User::LeaveIfError(err); |
1997 User::LeaveIfError(err); |
1998 } |
1998 } |
1999 |
1999 |
2000 if ( cancelled ) |
2000 if ( cancelled ) |
2001 { |
2001 { |
2002 DeleteDownloadL( currDownload ); |
2002 DeleteDownloadL( currDownload ); |
|
2003 |
|
2004 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
2005 TInt currentItemIndex = aDialog.CurrentItemIndex(); |
|
2006 if (currentItemIndex != -1) |
|
2007 { |
|
2008 TInt Inprogress = iListModel->DownloadsCount |
|
2009 ( MASKED_DL_STATE(EHttpDlCreated) | |
|
2010 MASKED_DL_STATE(EHttpDlPaused) | |
|
2011 MASKED_DL_STATE(EHttpDlInprogress) | |
|
2012 MASKED_DL_STATE(EHttpDlMultipleMOFailed)); |
|
2013 if ( Inprogress > 1 ) |
|
2014 { |
|
2015 aDialog.ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, ETrue ); |
|
2016 } |
|
2017 else |
|
2018 { |
|
2019 aDialog.ButtonGroupContainer()->MakeCommandVisible( EAknSoftkeyOptions, EFalse ); |
|
2020 } |
|
2021 } |
|
2022 #endif |
2003 } |
2023 } |
2004 iIsCancelInProgress = EFalse; |
2024 iIsCancelInProgress = EFalse; |
2005 } |
2025 } |
2006 break; |
2026 break; |
2007 } |
2027 } |
2249 delete contentType; |
2269 delete contentType; |
2250 contentType = NULL; |
2270 contentType = NULL; |
2251 CDocumentHandler* docHandler = CDocumentHandler::NewLC(); |
2271 CDocumentHandler* docHandler = CDocumentHandler::NewLC(); |
2252 canProgHandled = docHandler->CanHandleProgressivelyL( dataType, pdPlayerUid ); |
2272 canProgHandled = docHandler->CanHandleProgressivelyL( dataType, pdPlayerUid ); |
2253 CleanupStack::PopAndDestroy( docHandler ); // docHandler |
2273 CleanupStack::PopAndDestroy( docHandler ); // docHandler |
2254 |
2274 |
|
2275 #ifndef BRDO_SINGLE_CLICK_ENABLED_FF |
2255 //delete open file manager when download is not complete |
2276 //delete open file manager when download is not complete |
2256 if( !(isCompleted)) |
2277 if( !(isCompleted)) |
2257 { |
2278 { |
2258 aMenuPane->DeleteMenuItem( EDownloadsListCmdFileManager ); |
2279 aMenuPane->DeleteMenuItem( EDownloadsListCmdFileManager ); |
2259 } |
2280 } |
2384 { |
2405 { |
2385 if ( isCompleted && gallerySupported && s60Supported ) |
2406 if ( isCompleted && gallerySupported && s60Supported ) |
2386 { |
2407 { |
2387 aMenuPane->DeleteMenuItem( EDownloadsListCmdFileManager ); |
2408 aMenuPane->DeleteMenuItem( EDownloadsListCmdFileManager ); |
2388 } |
2409 } |
2389 } |
2410 } |
2390 } |
2411 #else |
2391 |
2412 // Count paused downloads. Note that Creates and Failed downloads |
|
2413 // are also considered as Paused, and they can be resumed. |
|
2414 TInt pausedCount = iListModel->DownloadsCount |
|
2415 ( MASKED_DL_STATE(EHttpDlCreated) | |
|
2416 MASKED_DL_STATE(EHttpDlPaused) | |
|
2417 MASKED_DL_STATE(EHttpDlMultipleMOFailed) ); |
|
2418 CLOG_WRITE_FORMAT(" paused count: %d",pausedCount); |
|
2419 // |
|
2420 if ( !( 1 < pausedCount ) ) |
|
2421 { |
|
2422 aMenuPane->DeleteMenuItem( EDownloadsListCmdResumeAll ); |
|
2423 } |
|
2424 |
|
2425 TInt downloadCount = iListModel->DownloadsCount |
|
2426 ( MASKED_DL_STATE(EHttpDlCreated) | |
|
2427 MASKED_DL_STATE(EHttpDlInprogress)| |
|
2428 MASKED_DL_STATE(EHttpDlPaused) ); |
|
2429 CLOG_WRITE_FORMAT(" download count: %d",downloadCount); |
|
2430 |
|
2431 if ( !( 1 < downloadCount ) ) |
|
2432 { |
|
2433 aMenuPane->DeleteMenuItem( EDownloadsListCmdCancelAll ); |
|
2434 } |
|
2435 #endif |
|
2436 } |
2392 if ( wasCompleted && !isThemeType ) |
2437 if ( wasCompleted && !isThemeType ) |
2393 { |
2438 { |
2394 InitializeAIWPlugInMenusL( aResourceId, aMenuPane, currDownload ); |
2439 InitializeAIWPlugInMenusL( aResourceId, aMenuPane, currDownload ); |
2395 } |
2440 } |
2396 CLOG_LEAVEFN("CDownloadMgrUiDownloadsList::DynInitMenuPaneL"); |
2441 CLOG_LEAVEFN("CDownloadMgrUiDownloadsList::DynInitMenuPaneL"); |
2397 } |
2442 } |
2398 |
2443 |
|
2444 #ifdef BRDO_SINGLE_CLICK_ENABLED_FF |
|
2445 void CDownloadMgrUiDownloadsList::AIWPlugInMenusL(TInt aResourceId,CEikMenuPane* aMenuPane) |
|
2446 { |
|
2447 if( !iAIWServiceHandler ) |
|
2448 { |
|
2449 AttachAIWInterestL(); |
|
2450 } |
|
2451 RHttpDownload& currDownload = iListModel->Download( 0 ); |
|
2452 InitializeAIWPlugInMenusL( aResourceId, aMenuPane, currDownload ); |
|
2453 } |
|
2454 #endif |
2399 // ----------------------------------------------------------------------------- |
2455 // ----------------------------------------------------------------------------- |
2400 // CDownloadMgrUiDownloadsList::OfferKeyEventL |
2456 // CDownloadMgrUiDownloadsList::OfferKeyEventL |
2401 // ----------------------------------------------------------------------------- |
2457 // ----------------------------------------------------------------------------- |
2402 // |
2458 // |
2403 TKeyResponse CDownloadMgrUiDownloadsList::OfferKeyEventL |
2459 TKeyResponse CDownloadMgrUiDownloadsList::OfferKeyEventL |