53 #endif // !RD_VIRTUAL_PHONEBOOK |
53 #endif // !RD_VIRTUAL_PHONEBOOK |
54 |
54 |
55 #include "finditem.hrh" |
55 #include "finditem.hrh" |
56 #include <FindItemui.rsg> |
56 #include <FindItemui.rsg> |
57 #include <aknnotewrappers.h> |
57 #include <aknnotewrappers.h> |
58 |
|
59 // add to gallery related |
|
60 #include <AknCommonDialogs.h> |
|
61 |
58 |
62 #include <featmgr.h> |
59 #include <featmgr.h> |
63 |
60 |
64 #include <centralrepository.h> |
61 #include <centralrepository.h> |
65 #include <CommonUiInternalCRKeys.h> |
62 #include <CommonUiInternalCRKeys.h> |
1363 #endif // !RD_VIRTUAL_PHONEBOOK |
1360 #endif // !RD_VIRTUAL_PHONEBOOK |
1364 } |
1361 } |
1365 |
1362 |
1366 void CFindItemMenu::AddToGalleryL() |
1363 void CFindItemMenu::AddToGalleryL() |
1367 { |
1364 { |
1368 _LIT( KRamFileExtension,".ram" ); |
1365 //no need to do anything ,due to the remove of AknCommonDialogs |
1369 TFileName fileName; |
|
1370 iCoeEnv->ReadResourceL( fileName, R_FINDITEMMENU_DEFAULT_GALL_NAME ); |
|
1371 fileName.Append( KRamFileExtension ); |
|
1372 if ( AknCommonDialogs::RunSaveDlgLD( |
|
1373 fileName, R_MEMORY_SELECTION_LOCATIONS ) ) |
|
1374 { |
|
1375 CDesCArrayFlat* array = new (ELeave)CDesCArrayFlat( 1 ); |
|
1376 CleanupStack::PushL( array ); |
|
1377 array->AppendL( iAutomaticFind->CurrentItemExt().iItemDescriptor->Des() ); |
|
1378 TInt err = KErrNone; |
|
1379 if( !iMPEngineDllLoaded ) |
|
1380 { |
|
1381 LoadMPEngineApiL(); |
|
1382 } |
|
1383 err = iMPEngineApi->CreateNewLinkFileL( fileName, array, ETrue ); |
|
1384 CleanupStack::PopAndDestroy( 1 ); |
|
1385 |
|
1386 if ( err == KErrNone ) |
|
1387 { |
|
1388 // Show note |
|
1389 HBufC* msgBuffer = |
|
1390 iCoeEnv->AllocReadResourceLC( R_FINDITEMMENU_LINK_SAVED ); |
|
1391 CAknConfirmationNote* note = |
|
1392 new (ELeave) CAknConfirmationNote( ETrue ); |
|
1393 note->ExecuteLD( *msgBuffer ); |
|
1394 CleanupStack::PopAndDestroy(); // msgBuffer |
|
1395 } |
|
1396 } |
|
1397 } |
1366 } |
1398 |
1367 |
1399 EXPORT_C void CFindItemMenu::SetSenderDescriptorType( |
1368 EXPORT_C void CFindItemMenu::SetSenderDescriptorType( |
1400 CItemFinder::TItemType aType ) |
1369 CItemFinder::TItemType aType ) |
1401 { |
1370 { |