--- a/photos_plat/gallery_utilities_api/inc/glxmediageneraldefs.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photos_plat/gallery_utilities_api/inc/glxmediageneraldefs.h Thu Aug 19 09:55:03 2010 +0300
@@ -114,4 +114,9 @@
EGlxDrmRightsValid,
EGlxDrmRightsInvalid
};
+
+// Maximum length of a media pop-up text
+// Example, Album/Tag/Title/Description's length is set to 40 chars maximum
+const TInt KMaxMediaPopupTextLength = 40;
+
#endif // __T_GLXMEDIAGENERALDEFS_H__
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -1019,11 +1019,19 @@
fs.SetAtt(object.Uri(), 0, KEntryAttReadOnly);
TInt err = manager->DeleteFile(object.Uri());
if (err != KErrNone)
- {
- lastErr = err;
- }
+ {
+ const TInt KDelayInterval = 250000;
+ const TInt KMaxRetries = 4;
+ for (TInt i = 0; ((i < KMaxRetries) && err == KErrInUse
+ && queryCount == 1); i++)
+ {
+ User::After(KDelayInterval);
+ err = manager->DeleteFile(object.Uri());
+ }
+ lastErr = err;
+ }
else
- {
+ {
// On successful deletion, delete the same from database
objectsForRemoval.AppendL(object.Id());
}
--- a/photosgallery/common/inc/glxfilterfactory.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/common/inc/glxfilterfactory.h Thu Aug 19 09:55:03 2010 +0300
@@ -161,6 +161,7 @@
* Creates a filter that most suited for the SlideShow
*
* @param aSelectedListPath - this contains the list of Id's required. If NULL it is ignored
+ * Takes ownership of aSelectedListPath
* @param aSortDirection - Acsending or Descending
* @param aSortFilter - Alphabetic, Item Count, Capture date, Modified date,
* @param aItemTypeFilter - All, Image, Video, Video and Images, Album
@@ -177,6 +178,7 @@
*
* @param aOriginalFilter - Use values in this filter but overide with other parameters
* @param aSelectedListPath - this contains the list of Id's required. If NULL it is ignored
+ * Takes ownership of aSelectedListPath
* @param aSortDirection - Acsending, Descending or use value in aOriginalFilter
* @param aItemTypeFilter - All, Image, Video, Video and Images, Album or use value in aOriginalFilter
* @Param aExcludeAnimation - Exlude images with FrameCount > 1, include all images or use value in aOriginalFilter
--- a/photosgallery/common/src/glxcommandparser.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/common/src/glxcommandparser.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -215,7 +215,9 @@
User::Leave(KErrArgument);
}
- const CMPXCollectionPath* path = aCommand.ValueCObjectL<CMPXCollectionPath>(aAttribute);
+ CMPXCollectionPath* path = aCommand.ValueCObjectL<CMPXCollectionPath>(aAttribute);
+ // ValueCObjectL returns the ownership of path, hence we need to delete
+ CleanupStack::PushL(path);
RArray<TMPXItemId> list;
path->SelectionL(list);
@@ -230,6 +232,7 @@
aArray.AppendL(TGlxMediaId(list[i]));
}
}
+ CleanupStack::PopAndDestroy(path);
CleanupStack::Pop(&aArray);
}
--- a/photosgallery/common/src/glxfilterfactory.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/common/src/glxfilterfactory.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -230,16 +230,20 @@
// Creates a filter most suited for the SlideShow
// ---------------------------------------------------------------------------
//
-EXPORT_C CMPXFilter* TGlxFilterFactory::CreateSlideShowFilterFromExistingFilterL( CMPXFilter* aOriginalFilter,
- CMPXCollectionPath* aSelectedListPath,
- TBool aReverseSortDirection)
- {
+EXPORT_C CMPXFilter* TGlxFilterFactory::CreateSlideShowFilterFromExistingFilterL(
+ CMPXFilter* aOriginalFilter, CMPXCollectionPath* aSelectedListPath,
+ TBool aReverseSortDirection)
+ {
TGlxFilterProperties filterProperties;
- filterProperties.iSortDirection = aReverseSortDirection ? EGlxFilterSortDirectionReverse : EGlxFilterSortDirectionNotUsed;
+ // Ref:NShwSlideshow::TPlayDirection
+ // EPlayForwards = 0; Chronological Order (Older to newer)
+ // EPlayBackwards = 1; Reverse Chronological Order (Newer to older)
+ filterProperties.iSortDirection = aReverseSortDirection ?
+ EGlxFilterSortDirectionNotUsed : EGlxFilterSortDirectionReverse;
filterProperties.iItemType = EGlxFilterImage;
filterProperties.iPath = aSelectedListPath;
- filterProperties.iNoDRM = ETrue;;
- filterProperties.iExcludeAnimation = ETrue;;
+ filterProperties.iNoDRM = ETrue;
+ filterProperties.iExcludeAnimation = ETrue;
return CreateCombinedFilterL(filterProperties, aOriginalFilter);
}
@@ -455,18 +459,25 @@
}
CMPXCollectionPath* path = aFilterProperties.iPath;
+ TBool deletePath = EFalse;
if( aOriginalFilter->IsSupported(KGlxFilterGeneralMPXCollectionPath) )
{
if( !aOverrideOriginal || !aFilterProperties.iPath )
{
path = aOriginalFilter->ValueCObjectL<CMPXCollectionPath>(KGlxFilterGeneralMPXCollectionPath);
+ CleanupStack::PushL(path);
+ deletePath = ETrue;
}
}
if( path )
{
+ // SetCObjectValueL creates a copy of path, so safe to destroy path after this call.
filter->SetCObjectValueL<CMPXCollectionPath>(KGlxFilterGeneralMPXCollectionPath, path);
}
-
+ if(deletePath)
+ {
+ CleanupStack::PopAndDestroy(path);
+ }
TBool promoteSystemItems = aFilterProperties.iPromoteSystemItems;
if( aOriginalFilter->IsSupported(KGlxFilterGeneralSortOrderPromoteSystemItems) )
{
--- a/photosgallery/controllers/fetcher/data/glxfetcherdialog.rss Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/fetcher/data/glxfetcherdialog.rss Thu Aug 19 09:55:03 2010 +0300
@@ -152,79 +152,19 @@
};
}
-RESOURCE MENU_BAR r_multiselect_ok_menubar
- {
- titles=
- {
- MENU_TITLE { menu_pane=r_multiselect_ok_menu; txt=""; }
- };
- }
-
-
-RESOURCE MENU_PANE r_multiselect_ok_menu
- {
- items=
- {
- MENU_ITEM
- {
- command=EAknSoftkeySelect;
- txt = qtn_cffh_options_select;
- },
+RESOURCE DIALOG r_glx_fetcher_dialog
+ {
+ // blocking dialog with CBA and no border please
+ flags=EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
+ EEikDialogFlagCbaButtons | EEikDialogFlagWait |
+ EEikDialogFlagNoBackgroundFade |EEikDialogFlagNoBorder;
+ buttons = R_AVKON_SOFTKEYS_CANCEL;
+ // Do not add any items
+ }
- MENU_ITEM
- {
- command=EGlxCmdSelectMarked;
- txt = qtn_cffh_select_marked;
- },
- MENU_ITEM
- {
- command = EGlxCmdStartMultipleMarking;
- txt = qtn_lgal_options_mark_multi;
- },
- MENU_ITEM
- {
- command=EGlxCmdMarkingSubmenu;
- txt = qtn_options_list;
- cascade = r_multiselect_marking_submenu;
- }
- };
- }
-
-
-//End of MultiSelect
-
-RESOURCE DIALOG r_modal_single_dialog
- {
- // blocking dialog with CBA and no border please
- flags=EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
- EEikDialogFlagCbaButtons | EEikDialogFlagWait |
- EEikDialogFlagNoBackgroundFade |EEikDialogFlagNoBorder;
- buttons = R_AVKON_SOFTKEYS_CANCEL;
- // Do not add any items
- }
-
-RESOURCE DIALOG r_modal_multi_dialog
- {
- // blocking dialog with CBA and no border please
- flags=EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
- EEikDialogFlagCbaButtons | EEikDialogFlagWait |
- EEikDialogFlagNoBackgroundFade |EEikDialogFlagNoBorder;
- buttons = R_AVKON_SOFTKEYS_CANCEL;
- // Do not add any items
- }
-
-RESOURCE TBUF r_glx_softkey_cancel { buf = text_softkey_cancel; }
+RESOURCE TBUF r_glx_softkey_cancel
+ {buf = text_softkey_cancel;}
RESOURCE TBUF r_glx_marking_mark
- { buf=qtn_msk_mark; }
+ {buf=qtn_msk_mark;}
-// custom CBA resource for options - ok options menu - cancel
-RESOURCE CBA r_glx_softkeys_options_cancel_context
- {
- buttons =
- {
- CBA_BUTTON { id=EAknSoftkeyOptions; txt = text_softkey_option; },
- CBA_BUTTON { id=EAknSoftkeyCancel; txt = text_softkey_cancel; },
- CBA_BUTTON { id=EAknSoftkeyContextOptions; txt = text_softkey_option; }
- };
- }
--- a/photosgallery/controllers/fetcher/inc/glxfetchercontainer.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/fetcher/inc/glxfetchercontainer.h Thu Aug 19 09:55:03 2010 +0300
@@ -178,7 +178,7 @@
/**
* Set the Icons
*/
- void SetIconsL(TInt index);
+ void SetIconsL(TInt aIndex);
/**
* This doesnt add up any value to the code, just to satisfy the compiler
--- a/photosgallery/controllers/fetcher/inc/glxfetcherdialog.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/fetcher/inc/glxfetcherdialog.h Thu Aug 19 09:55:03 2010 +0300
@@ -75,12 +75,7 @@
* @ref CEikDialog
*/
TBool OkToExitL(TInt aKeycode);
-
- /**
- * From MEikMenuObserver
- */
- void DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) ;
-
+
protected: // From CAknDialog
/**
* From MEikMenuObserver
@@ -126,9 +121,6 @@
*/
SEikControlInfo CreateCustomControlL(TInt aControlType);
- private: // CAknDialog
- void HandlePointerEventL(const TPointerEvent& aPointerEvent);
-
private:// From MGlxEventObserver
virtual void HandleDoubleTapEventL(TInt aCommandId);
@@ -145,12 +137,10 @@
*/
void HandleMMCRemovalL();
-
private:
CGlxFetcherContainer* iFetcherContainer ; //Container Object
CGlxUiUtility* iUiUtility; // UiUtility
- CAlfEnv* iEnv; // Alf Environment
-
+
// Selected items array
// Not Own. Owned by the client
CDesCArray& iSelectedFiles;
--- a/photosgallery/controllers/fetcher/src/glxfetcher.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/fetcher/src/glxfetcher.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -199,18 +199,11 @@
}
}
// create the dialog first
- iDialog =
- CGlxFetcherDialog::NewL( aSelectedFiles, iVerifier ,iFilterType ,*iTitle, iIsMultiSelection );
+ iDialog = CGlxFetcherDialog::NewL(aSelectedFiles, iVerifier, iFilterType,
+ *iTitle, iIsMultiSelection);
// Returns zero when Fetcher is cancelled by User.
- if( iIsMultiSelection )
- {
- buttonId = iDialog->ExecuteLD( R_MODAL_MULTI_DIALOG );
- }
- else
- {
- buttonId = iDialog->ExecuteLD( R_MODAL_SINGLE_DIALOG );
- }
+ buttonId = iDialog->ExecuteLD( R_GLX_FETCHER_DIALOG );
// Return false if the fetcher was canceled by user
return ( 0 != buttonId && aSelectedFiles.Count()!=0);
}
--- a/photosgallery/controllers/fetcher/src/glxfetchercontainer.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/fetcher/src/glxfetchercontainer.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -32,7 +32,6 @@
#include <AknsBasicBackgroundControlContext.h> // Background Context
#include <glxuistd.h> // KGlxFetchontextPriorityNormal and KGlxIconsFilename
-#include <glxcollectionpluginall.hrh> // All item collection plugin id
#include <glxfilterfactory.h> // For Filters required in Medilaits
#include <glxresourceutilities.h> // for CGlxResourceUtilities
#include <glxfetcherdialog.rsg> // FOR GETTING Dialog ID AND RESOURCE ID
@@ -58,11 +57,6 @@
#include "glxfetchercommandhandler.h"
const TInt KPadding(7);
-const TInt KNoOfPages(4);
-const TInt KBufferTreshold(1);
-const TInt KItemsPerPage(18);
-const TInt KBufferSize(KNoOfPages * KItemsPerPage);
-const TInt KBufferTresholdSize(KBufferTreshold * KItemsPerPage);
//-----------------------------------------------------------------------------
// Two-phased constructor.
@@ -143,7 +137,6 @@
}
}
-
// ---------------------------------------------------------------------------
// CreateAndDisplayGridL
// ---------------------------------------------------------------------------
@@ -169,6 +162,7 @@
iMultipleMarkNotStarted = EFalse;
}
}
+
// ---------------------------------------------------------------------------
// CreateMediaListL()
// Creates a collection path
@@ -199,6 +193,7 @@
CleanupStack::PopAndDestroy( path );
}
+
// ---------------------------------------------------------------------------
// CreateHgGridWidgetL
// ---------------------------------------------------------------------------
@@ -252,7 +247,9 @@
// This Displays the scrollbar at the opening of the Grid view
iHgGrid->SetScrollBarTypeL(CHgScroller::EHgScrollerTimeStrip );
// Enable Buffer support
- iHgGrid->EnableScrollBufferL(*this, KBufferSize, KBufferTresholdSize);
+ iHgGrid->EnableScrollBufferL(*this, (KNoOfPages
+ * iUiUtility->VisibleItemsInPageGranularityL()),
+ KBufferTresholdSize);
// Enable Marking support
iHgGrid->SetMarkingObserver(*this);
@@ -265,12 +262,12 @@
//
void CGlxFetcherContainer::CreateGridMediaListObserverL()
{
- iGlxGridMLObserver = CGlxGridViewMLObserver::NewL(*iMediaList, iHgGrid,
- iFilterType);
+ iGlxGridMLObserver = CGlxGridViewMLObserver::NewL(*this, *iMediaList,
+ iHgGrid, iFilterType);
}
// ---------------------------------------------------------------------------
-// BufferPositionChanged
+// Request
// ---------------------------------------------------------------------------
//
void CGlxFetcherContainer::Request(TInt aRequestStart, TInt aRequestEnd,
@@ -279,6 +276,7 @@
TRACER("CGlxFetcherContainer::Request()");
TRAP_IGNORE(RequestL( aRequestStart, aRequestEnd ));
}
+
// ---------------------------------------------------------------------------
// RequestL
// ---------------------------------------------------------------------------
@@ -303,7 +301,7 @@
visIndex = 0;
}
- GLX_LOG_INFO1("CGlxGridViewImp::Request - SetVisibleWindowIndex "
+ GLX_LOG_INFO1("CGlxFetcherContainer::Request - SetVisibleWindowIndex "
"visIndex(%d)", visIndex);
iMediaList->SetVisibleWindowIndexL(visIndex);
}
@@ -314,13 +312,14 @@
TInt lastOnScreen = firstIndex + iHgGrid->ItemsOnScreen() - 1;
if (i >= firstIndex && i <= lastOnScreen)
{
- GLX_LOG_INFO1("CGlxGridViewImp::Request - RefreshScreen i(%d)", i);
+ GLX_LOG_INFO1("CGlxFetcherContainer::Request - RefreshScreen i(%d)", i);
iHgGrid->RefreshScreen(i);
}
}
}
+
// ---------------------------------------------------------------------------
-// SetIcons
+// SetIconsL
// ---------------------------------------------------------------------------
//
void CGlxFetcherContainer::SetIconsL(TInt aIndex)
@@ -343,11 +342,11 @@
CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
bitmap->Duplicate( value->iBitmap->Handle());
iHgGrid->ItemL(aIndex).SetIcon(CGulIcon::NewL(bitmap));
- GLX_LOG_INFO1("### CGlxGridViewImp::Request value-Index is %d",aIndex);
+ GLX_LOG_INFO1("### CGlxFetcherContainer::Request value-Index is %d",aIndex);
}
else if (item.GetIconInfo(icon))
{
- GLX_LOG_INFO1("CGlxGridViewImp::Request - icon(%d)", aIndex);
+ GLX_LOG_INFO1("CGlxFetcherContainer::Request - icon(%d)", aIndex);
CFbsBitmap* bitmap = NULL;
CFbsBitmap* mask = NULL;
AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), KAknsIIDNone,
@@ -363,13 +362,13 @@
iHgGrid->ItemL(aIndex).SetIcon(CGulIcon::NewL(bitmap, mask));
CleanupStack::Pop(mask);
CleanupStack::Pop(bitmap);
- GLX_LOG_INFO1("### CGlxGridViewImp::Request GetIconInfo-Index is %d",
+ GLX_LOG_INFO1("### CGlxFetcherContainer::Request GetIconInfo-Index is %d",
aIndex);
}
else if (KErrNone != tnError && KErrNotSupported != tnError)
{
GLX_LOG_INFO2(
- "CGlxGridViewImp::Request - image_corrupted tnError(%d), "
+ "CGlxFetcherContainer::Request - image_corrupted tnError(%d), "
"i(%d)", tnError, aIndex);
CFbsBitmap* bitmap = NULL;
@@ -441,22 +440,29 @@
}
// ---------------------------------------------------------------------------
-// HandleSelect
+// HandleSelectL
// ---------------------------------------------------------------------------
//
void CGlxFetcherContainer::HandleSelectL( TInt aIndex )
{
- TRACER("CGlxGridViewImp::HandleSelect()");
+ TRACER("CGlxFetcherContainer::HandleSelectL()");
+ GLX_LOG_INFO1("CGlxFetcherContainer::HandleSelectL(%d)", aIndex);
// Make sure that the Selection Index is inside medialist count
- if (aIndex <iMediaList->Count() && aIndex >=0)
+ if (aIndex < iMediaList->Count() && aIndex >= 0)
{
// Setting the focus of the medialist
- iMediaList->SetFocusL(NGlxListDefs::EAbsolute, aIndex);
+ iMediaList->SetFocusL(NGlxListDefs::EAbsolute, aIndex);
+
+ //Show Left Soft Key when media is selected
+ CEikButtonGroupContainer* cbaContainer =
+ CEikButtonGroupContainer::Current();
+ cbaContainer->SetCommandSetL(R_AVKON_SOFTKEYS_OK_CANCEL);
+ cbaContainer->DrawDeferred();
}
}
// ---------------------------------------------------------------------------
-// HandleOpen
+// HandleOpenL
// ---------------------------------------------------------------------------
//
void CGlxFetcherContainer::HandleOpenL( TInt aIndex )
@@ -482,7 +488,7 @@
//
void CGlxFetcherContainer::HandleMarkingL( TInt aIndex, TBool/* aMarked*/ )
{
- TRACER("CGlxGridViewImp::HandleMarkingL()");
+ TRACER("CGlxFetcherContainer::HandleMarkingL()");
HandleMultipleMarkingL(aIndex);
iEventObserver.HandleMarkEventL();
}
@@ -493,7 +499,7 @@
//
void CGlxFetcherContainer::HandleMultipleMarkingL(TInt aIndex )
{
- TRACER("CGlxGridViewImp::HandleMultipleMarkingL()");
+ TRACER("CGlxFetcherContainer::HandleMultipleMarkingL()");
if(iMediaList->IsSelected(aIndex))
{
if(iHgGrid)
@@ -603,7 +609,6 @@
return retVal;
}
-
// -----------------------------------------------------------------------------
// Retrieve Uris
// -----------------------------------------------------------------------------
--- a/photosgallery/controllers/fetcher/src/glxfetcherdialog.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/fetcher/src/glxfetcherdialog.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -142,7 +142,6 @@
// Get the Hitchcock environment.
iUiUtility = CGlxUiUtility::UtilityL();
- iEnv = iUiUtility->Env();
iFetchUri = EFalse;
iMMCNotifier = CGlxMMCNotifier::NewL(*this);
}
@@ -208,6 +207,7 @@
}
}
}
+
//-----------------------------------------------------------------------------
// CGlxFetcherDialog::OkToExitL
//-----------------------------------------------------------------------------
@@ -394,16 +394,6 @@
}
//-----------------------------------------------------------------------------
-// CGlxFetcherDialog::DynInitMenuPaneL
-//-----------------------------------------------------------------------------
-void CGlxFetcherDialog::DynInitMenuPaneL(
- TInt /*aResourceId*/, CEikMenuPane* /*aMenuPane*/ )
- {
- TRACER("CGlxFetcherDialog::DynInitMenuPaneL");
- // No Implementation
- }
-
-//-----------------------------------------------------------------------------
// CGlxFetcherDialog::OfferKeyEventL
//-----------------------------------------------------------------------------
TKeyResponse CGlxFetcherDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent,
@@ -414,28 +404,15 @@
response = iFetcherContainer->OfferKeyEventL(aKeyEvent,aType);
if(response == EKeyWasNotConsumed)
+ {
response = CAknDialog::OfferKeyEventL(aKeyEvent,aType);
+ }
return response;
}
//-----------------------------------------------------------------------------
-// CGlxFetcherDialog::HandlePointerEventL
-// Handles all pointer events to the screen.
-// Offers the events to the primary display control (container - widgets)
-// and also finally calls handlescreenbufferevent and draws the bitmap onto
-// the screen
-//-----------------------------------------------------------------------------
-void CGlxFetcherDialog::HandlePointerEventL(
- const TPointerEvent& aPointerEvent)
- {
- TRACER("CGlxFetcherDialog::HandlePointerEventL");
- CCoeControl::HandlePointerEventL( aPointerEvent );
- iEnv->PrimaryDisplay().HandlePointerEventL( aPointerEvent );
- }
-
-//-----------------------------------------------------------------------------
-// CGlxFetcherDialog::HandleDoubleTapEvent
+// CGlxFetcherDialog::HandleDoubleTapEventL
// Callback from the container for double tap events
// Offers the event from container to Dialog
//-----------------------------------------------------------------------------
--- a/photosgallery/controllers/imageviewer/bwins/glximageviewermanageru.def Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/imageviewer/bwins/glximageviewermanageru.def Thu Aug 19 09:55:03 2010 +0300
@@ -1,11 +1,13 @@
EXPORTS
- ?SetImageFileHandleL@CGlxImageViewerManager@@QAEXABVRFile@@@Z @ 1 NONAME ; void CGlxImageViewerManager::SetImageFileHandleL(class RFile const &)
- ?SetImageUriL@CGlxImageViewerManager@@QAEXABVTDesC16@@@Z @ 2 NONAME ; void CGlxImageViewerManager::SetImageUriL(class TDesC16 const &)
- ?DeleteInstance@CGlxImageViewerManager@@QAEXXZ @ 3 NONAME ; void CGlxImageViewerManager::DeleteInstance(void)
- ?Reset@CGlxImageViewerManager@@QAEXXZ @ 4 NONAME ; void CGlxImageViewerManager::Reset(void)
- ?IsPrivate@CGlxImageViewerManager@@QAEHXZ @ 5 NONAME ; int CGlxImageViewerManager::IsPrivate(void)
- ?ImageUri@CGlxImageViewerManager@@QAEPAVHBufC16@@XZ @ 6 NONAME ; class HBufC16 * CGlxImageViewerManager::ImageUri(void)
- ?ImageFileHandle@CGlxImageViewerManager@@QAEAAVRFile64@@XZ @ 7 NONAME ; class RFile64 & CGlxImageViewerManager::ImageFileHandle(void)
- ?InstanceL@CGlxImageViewerManager@@SAPAV1@XZ @ 8 NONAME ; class CGlxImageViewerManager * CGlxImageViewerManager::InstanceL(void)
- ?IsPrivateGif@CGlxImageViewerManager@@QAEHXZ @ 9 NONAME ; int CGlxImageViewerManager::IsPrivateGif(void)
+ ?SetImageUriL@CGlxImageViewerManager@@QAEXABVTDesC16@@@Z @ 1 NONAME ; void CGlxImageViewerManager::SetImageUriL(class TDesC16 const &)
+ ?CloseImageDecoder@CGlxImageViewerManager@@QAEXXZ @ 2 NONAME ; void CGlxImageViewerManager::CloseImageDecoder(void)
+ ?Reset@CGlxImageViewerManager@@QAEXXZ @ 3 NONAME ; void CGlxImageViewerManager::Reset(void)
+ ?ImageUri@CGlxImageViewerManager@@QAEPAVHBufC16@@XZ @ 4 NONAME ; class HBufC16 * CGlxImageViewerManager::ImageUri(void)
+ ?ImageFileHandle@CGlxImageViewerManager@@QAEAAVRFile64@@XZ @ 5 NONAME ; class RFile64 & CGlxImageViewerManager::ImageFileHandle(void)
+ ?InstanceL@CGlxImageViewerManager@@SAPAV1@XZ @ 6 NONAME ; class CGlxImageViewerManager * CGlxImageViewerManager::InstanceL(void)
+ ?CreateImageDecoderL@CGlxImageViewerManager@@QAEXXZ @ 7 NONAME ; void CGlxImageViewerManager::CreateImageDecoderL(void)
+ ?SetImageFileHandleL@CGlxImageViewerManager@@QAEXABVRFile@@@Z @ 8 NONAME ; void CGlxImageViewerManager::SetImageFileHandleL(class RFile const &)
+ ?DeleteInstance@CGlxImageViewerManager@@QAEXXZ @ 9 NONAME ; void CGlxImageViewerManager::DeleteInstance(void)
+ ?IsPrivate@CGlxImageViewerManager@@QAEHXZ @ 10 NONAME ; int CGlxImageViewerManager::IsPrivate(void)
+ ?IsPrivateGif@CGlxImageViewerManager@@QAEHXZ @ 11 NONAME ; int CGlxImageViewerManager::IsPrivateGif(void)
--- a/photosgallery/controllers/imageviewer/eabi/glximageviewermanageru.def Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/imageviewer/eabi/glximageviewermanageru.def Thu Aug 19 09:55:03 2010 +0300
@@ -1,13 +1,15 @@
EXPORTS
- _ZN22CGlxImageViewerManager12SetImageUriLERK7TDesC16 @ 1 NONAME
- _ZN22CGlxImageViewerManager14DeleteInstanceEv @ 2 NONAME
- _ZN22CGlxImageViewerManager15ImageFileHandleEv @ 3 NONAME
- _ZN22CGlxImageViewerManager19SetImageFileHandleLERK5RFile @ 4 NONAME
- _ZN22CGlxImageViewerManager5ResetEv @ 5 NONAME
- _ZN22CGlxImageViewerManager8ImageUriEv @ 6 NONAME
- _ZN22CGlxImageViewerManager9InstanceLEv @ 7 NONAME
- _ZN22CGlxImageViewerManager9IsPrivateEv @ 8 NONAME
- _ZTI22CGlxImageViewerManager @ 9 NONAME
- _ZTV22CGlxImageViewerManager @ 10 NONAME
- _ZN22CGlxImageViewerManager12IsPrivateGifEv @ 11 NONAME
+ _ZN22CGlxImageViewerManager12IsPrivateGifEv @ 1 NONAME
+ _ZN22CGlxImageViewerManager12SetImageUriLERK7TDesC16 @ 2 NONAME
+ _ZN22CGlxImageViewerManager14DeleteInstanceEv @ 3 NONAME
+ _ZN22CGlxImageViewerManager15ImageFileHandleEv @ 4 NONAME
+ _ZN22CGlxImageViewerManager17CloseImageDecoderEv @ 5 NONAME
+ _ZN22CGlxImageViewerManager19CreateImageDecoderLEv @ 6 NONAME
+ _ZN22CGlxImageViewerManager19SetImageFileHandleLERK5RFile @ 7 NONAME
+ _ZN22CGlxImageViewerManager5ResetEv @ 8 NONAME
+ _ZN22CGlxImageViewerManager8ImageUriEv @ 9 NONAME
+ _ZN22CGlxImageViewerManager9InstanceLEv @ 10 NONAME
+ _ZN22CGlxImageViewerManager9IsPrivateEv @ 11 NONAME
+ _ZTI22CGlxImageViewerManager @ 12 NONAME
+ _ZTV22CGlxImageViewerManager @ 13 NONAME
--- a/photosgallery/controllers/imageviewer/group/glximageviewermanager.mmp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/imageviewer/group/glximageviewermanager.mmp Thu Aug 19 09:55:03 2010 +0300
@@ -38,12 +38,12 @@
USERINCLUDE ../inc
-LIBRARY efsrv.lib
-LIBRARY euser.lib
+LIBRARY efsrv.lib
+LIBRARY euser.lib
LIBRARY caf.lib // ContentAccess::CManager
LIBRARY flogger.lib // For Logging Tracer
LIBRARY glxcommon.lib // CGlxSingetonStore
LIBRARY cone.lib // ConeUtils
LIBRARY platformenv.lib // DriveInfo
-
+LIBRARY imageconversion.lib // CImageDecoder
//EXPORTUNFROZEN
\ No newline at end of file
--- a/photosgallery/controllers/imageviewer/inc/glximageviewermanager.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/imageviewer/inc/glximageviewermanager.h Thu Aug 19 09:55:03 2010 +0300
@@ -23,7 +23,7 @@
#include <e32std.h>
#include <e32base.h>
#include <caf/manager.h>
-
+#include <imageconversion.h>
// CLASS DECLARATION
class RFile;
class RFile64;
@@ -55,6 +55,8 @@
IMPORT_C void SetImageUriL(const TDesC& aFileName);
IMPORT_C void SetImageFileHandleL(const RFile& aFileHandle);
IMPORT_C void Reset();
+ IMPORT_C void CreateImageDecoderL();
+ IMPORT_C void CloseImageDecoder();
private:
@@ -95,6 +97,9 @@
/// Flag that stores if the gif file is in a private folder.
/// ETrue means the gif is from private path, else EFalse
TBool iIsPrivateGif;
+
+ /// Image Decoder, which keeps the file in use while viewing
+ CImageDecoder* iImageDecoder;
};
#endif // GLXIMAGEVIEWERMANAGER_H
--- a/photosgallery/controllers/imageviewer/src/glximageviewermanager.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/controllers/imageviewer/src/glximageviewermanager.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -26,6 +26,7 @@
#include <caf/content.h>
#include <driveinfo.h>
#include <coeutils.h>
+#include <coemain.h>
_LIT( KPrivateFolder, "\\Private\\" );
_LIT( KGifFileMime, "image/gif" );
@@ -121,6 +122,7 @@
User::Leave(KErrNotSupported);
}
iImageUri = aFileName.AllocL();
+ CreateImageDecoderL();
}
// ---------------------------------------------------------------------------
@@ -137,6 +139,8 @@
delete iFile;
iFile = NULL;
+ CloseImageDecoder();
+
if (iIsPrivateGif)
{
iManager->DeleteFile(iImageUri->Des());
@@ -208,3 +212,51 @@
}
SetImageUriL( filePath );
}
+
+// ---------------------------------------------------------------------------
+// CloseImageDecoder
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CGlxImageViewerManager::CloseImageDecoder()
+ {
+ TRACER("void CGlxImageViewerManager::CloseImageDecoder()");
+ if (iImageDecoder)
+ {
+ delete iImageDecoder;
+ iImageDecoder = NULL;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CreateImageDecoderL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CGlxImageViewerManager::CreateImageDecoderL()
+ {
+ TRACER("void CGlxImageViewerManager::CreateImageDecoderL()");
+
+ CloseImageDecoder();
+
+ TInt err = KErrNone;
+ if (IsPrivate())
+ {
+ if (&ImageFileHandle())
+ {
+ GLX_DEBUG1("CGlxImageViewerManager::CreateImageDecoderL() FH");
+ TRAP(err, iImageDecoder = CImageDecoder::FileNewL(
+ ImageFileHandle(), ContentAccess::EPeek));
+ }
+ }
+ else
+ {
+ if (ImageUri())
+ {
+ GLX_DEBUG1("CGlxImageViewerManager::CreateImageDecoderL() FN");
+ TRAP(err, iImageDecoder = CImageDecoder::FileNewL(
+ CCoeEnv::Static()->FsSession(), ImageUri()->Des()));
+ }
+ }
+
+ GLX_DEBUG2("CGlxImageViewerManager::CreateImageDecoderL() err(%d)", err);
+ User::LeaveIfError(err);
+ }
--- a/photosgallery/gallery/loc/photos.loc Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/gallery/loc/photos.loc Thu Aug 19 09:55:03 2010 +0300
@@ -598,6 +598,12 @@
//
#define qtn_lgal_details_description "Description"
+// d:Type field in the details view.
+// l:list_logical_template_5_title
+// r:8.0
+//
+#define qtn_lgal_details_type "Type"
+
// d:Location field in the details view.
// l:list_logical_template_5_title
// r:8.0
@@ -1352,3 +1358,129 @@
// r:4.0
//
#define qtn_lgal_slideshow_softkey_end "End"
+
+//-----------------------------------------------------------------------------
+// Removal of suites view - related strings
+//-----------------------------------------------------------------------------
+//
+// d:Icon text for "All" toolbar extn button
+// l:cell_tb_ext_pane_t1/opt1
+// r:11.0
+//
+#define qtn_lgal_toolbar_extension_all_nc "All"
+
+// d:Icon text for "All" toolbar extn button
+// d:%N will be replaced with count of items present in All
+// l:cell_tb_ext_pane_t1/opt1
+// r:11.0
+//
+#define qtn_lgal_toolbar_extension_all "All (%N)"
+
+// d:Icon text for "Album" toolbar extn button
+// l:cell_tb_ext_pane_t1/opt1
+// r:11.0
+//
+#define qtn_lgal_toolbar_extension_album_nc "Albums"
+
+// d:Icon text for "Album" toolbar extn button
+// d:%N will be replaced with count of albums present
+// l:cell_tb_ext_pane_t1/opt1
+// r:11.0
+//
+#define qtn_lgal_toolbar_extension_album "Albums (%N)"
+
+// d:Icon text for "Tags" toolbar extn button
+// l:cell_tb_ext_pane_t1/opt1
+// r:11.0
+//
+#define qtn_lgal_toolbar_extension_tags_nc "Tags"
+
+// d:Icon text for "Tags" toolbar extn button
+// d:%N will be replaced with count of tags present
+// l:cell_tb_ext_pane_t1/opt1
+// r:11.0
+//
+#define qtn_lgal_toolbar_extension_tags "Tags (%N)"
+
+// d:Icon text for "Places" toolbar extn button
+// l:cell_tb_ext_pane_t1/opt1
+// r:11.0
+//
+#define qtn_lgal_toolbar_extension_places_nc "Places"
+
+// d:Icon text for "Places" toolbar extn button
+// d:%N will be replaced with count of places present
+// l:cell_tb_ext_pane_t1/opt1
+// r:11.0
+//
+#define qtn_lgal_toolbar_extension_places "Places (%N)"
+
+// d: Tooltip string for "Change View" toolbar item
+// l: popup_preview_text_window_t1
+// r: 11.0
+#define qtn_lgal_tooltip_change_view "Change View"
+
+// d: Tooltip string for "All" toolbar item
+// l: popup_preview_text_window_t1
+// r: 11.0
+#define qtn_lgal_tooltip_all "All"
+
+// d: Tooltip string for "Albums" toolbar item
+// l: popup_preview_text_window_t1
+// r: 11.0
+#define qtn_lgal_tooltip_albums "Albums"
+
+// d: Tooltip string for "Tags" toolbar item
+// l: popup_preview_text_window_t1
+// r: 11.0
+#define qtn_lgal_tooltip_tags "Tags"
+
+// d: Tooltip string for "places" toolbar item
+// l: popup_preview_text_window_t1
+// r: 11.0
+#define qtn_lgal_tooltip_places "Places"
+
+// d: Tooltip string for "New album" toolbar item
+// l: popup_preview_text_window_t1
+// r: 11.0
+#define qtn_lgal_preview_tooltip_new_album "New album"
+
+// d: Tooltip string for "New tag" toolbar item
+// l: popup_preview_text_window_t1
+// r: 11.0
+#define qtn_lgal_tooltip_new_tag "New Tag"
+
+// d: Tooltip string for "Sort" toolbar item
+// l: popup_preview_text_window_t1
+// r: 11.0
+#define qtn_lgal_tooltip_sort "Sort"
+
+// d: Options menu item to open All items in grid view
+// l: list_single_pane_t1_cp2
+// r: 11.0
+#define qtn_lgal_option_all "All"
+
+// d: Options menu item to open Albums list view
+// l: list_single_pane_t1_cp2
+// r: 11.0
+#define qtn_lgal_option_albums "Albums"
+
+// d: Options menu item to open Places list view
+// l: list_single_pane_t1_cp2
+// r: 11.0
+#define qtn_lgal_option_places "Places"
+
+// d: Options menu item to open Tags cloud view
+// l: list_single_pane_t1_cp2
+// r: 11.0
+#define qtn_lgal_option_tags "Tags"
+
+// d: "Birthday" option in select album pop-up or select tag popup
+// l:list_single_pane_t1
+// r: 11.0
+#define qtn_lgal_option_birthday "Birthday"
+
+// d: "Personal" option in select album pop-up or select tag popup
+// l:list_single_pane_t1
+// r: 11.0
+#define qtn_lgal_option_personal "Personal"
Binary file photosgallery/help/data/xhtml.zip has changed
--- a/photosgallery/inc/glxfilterproperties.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/inc/glxfilterproperties.h Thu Aug 19 09:55:03 2010 +0300
@@ -24,9 +24,8 @@
// INCLUDES
#include <glxmediaid.h>
#include <glxfiltergeneraldefs.h>
-
+#include <mpxcollectionpath.h> // for deep copying the path
// FORWARD DECLARATIONS
-class CMPXCollectionPath;
// CONSTANTS
@@ -56,6 +55,89 @@
iNoDRM(EFalse)
{}
+ /**
+ * Destructor
+ */
+ inline ~TGlxFilterProperties ()
+ {
+ delete iPath;
+ }
+
+ /**
+ * overloaded assignment operator
+ *
+ * @param aFilterProperties, assigned object
+ * @return TGlxFilterProperties object after deep copying the path.
+ */
+ inline TGlxFilterProperties& operator=(const TGlxFilterProperties& aFilterProperties)
+ {
+ if(this != &aFilterProperties)
+ {
+ iSortOrder = aFilterProperties.iSortOrder;
+ iSortDirection = aFilterProperties.iSortDirection;
+ iIncludeCameraAlbum = aFilterProperties.iIncludeCameraAlbum;
+ iMinCount = aFilterProperties.iMinCount;
+ iContainsItem = aFilterProperties.iContainsItem;
+ iExcludeAnimation = aFilterProperties.iExcludeAnimation;
+ iLastCaptureDate = aFilterProperties.iLastCaptureDate;
+ iMaxCount = aFilterProperties.iMaxCount;
+ iThumbnailLoadability = aFilterProperties.iThumbnailLoadability;
+ iItemType = aFilterProperties.iItemType;
+ iPromoteSystemItems = aFilterProperties.iPromoteSystemItems;
+ iOrigin = aFilterProperties.iOrigin;
+ iUri = aFilterProperties.iUri;
+ iStartDate = aFilterProperties.iStartDate;
+ iEndDate = aFilterProperties.iEndDate;
+ iNoDRM = aFilterProperties.iNoDRM;
+
+ // creating a copy of iPath
+ if(aFilterProperties.iPath)
+ {
+ const CMPXCollectionPath* path = aFilterProperties.iPath;
+ iPath = CMPXCollectionPath::NewL(*path);
+ }
+ else
+ {
+ iPath = NULL;
+ }
+ }
+ return *this;
+ }
+ /**
+ * Copy constructor
+ *
+ * @param aFilterProperties, assigned object
+ */
+ inline TGlxFilterProperties(const TGlxFilterProperties& aFilterProperties)
+ {
+ iSortOrder = aFilterProperties.iSortOrder;
+ iSortDirection = aFilterProperties.iSortDirection;
+ iIncludeCameraAlbum = aFilterProperties.iIncludeCameraAlbum;
+ iMinCount = aFilterProperties.iMinCount;
+ iContainsItem = aFilterProperties.iContainsItem;
+ iExcludeAnimation = aFilterProperties.iExcludeAnimation;
+ iLastCaptureDate = aFilterProperties.iLastCaptureDate;
+ iMaxCount = aFilterProperties.iMaxCount;
+ iThumbnailLoadability = aFilterProperties.iThumbnailLoadability;
+ iItemType = aFilterProperties.iItemType;
+ iPromoteSystemItems = aFilterProperties.iPromoteSystemItems;
+ iOrigin = aFilterProperties.iOrigin;
+ iUri = aFilterProperties.iUri;
+ iStartDate = aFilterProperties.iStartDate;
+ iEndDate = aFilterProperties.iEndDate;
+ iNoDRM = aFilterProperties.iNoDRM;
+
+ // creating a copy of iPath
+ if(aFilterProperties.iPath)
+ {
+ const CMPXCollectionPath* path = aFilterProperties.iPath;
+ iPath = CMPXCollectionPath::NewL(*path);
+ }
+ else
+ {
+ iPath = NULL;
+ }
+ }
public:
TGlxFilterSortOrder iSortOrder;
TGlxFilterSortDirection iSortDirection;
--- a/photosgallery/slideshow/engine/inc/shwconstants.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/engine/inc/shwconstants.h Thu Aug 19 09:55:03 2010 +0300
@@ -34,9 +34,10 @@
{
enum TPlayDirection
{
- EPlayForwards = 1, // default
- EPlayBackwards,
- EPlayRandom
+ // Chronological Order (Older to newer)
+ EPlayForwards = 0,
+ // Reverse Chronological Order (Newer to older)
+ EPlayBackwards = 1 // default
};
// Named constants for navigation directions
--- a/photosgallery/slideshow/engine/tsrc/group/bld.inf Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/engine/tsrc/group/bld.inf Thu Aug 19 09:55:03 2010 +0300
@@ -26,17 +26,10 @@
PRJ_EXPORTS
PRJ_TESTMMPFILES
-//t_cshwzoomandpaneffect.mmp
t_cshwdefaulteffectmanager.mmp
t_cshwtimercontrol.mmp
t_cshwviewcontrol.mmp
t_cshweventrouter.mmp
-//t_cshwmusiccontrol.mmp
-//t_cshwsettingsmodel.mmp
-//t_cshweffects.mmp
-//t_cshweffectcontrol.mmp
-//t_cshwslideshowengine.mmp
-//t_cshwplaybackfactory.mmp
PRJ_MMPFILES
../../group/shwslideshowengine.mmp
--- a/photosgallery/slideshow/engine/tsrc/group/t_cshweffectcontrol.mmp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slideshow engine build file for test
- *
-*/
-
-
-
-#include <platform_paths.hrh>
-#include "../../../../group/glxbuildcommon.mmh"
-
-TARGET t_cshweffectcontrol.dll
-TARGETTYPE dll
-UID 0x1000af5a 0x01700000
-
-CAPABILITY ALL -TCB
-
-SOURCEPATH ../t_cshweffectcontrol
-SOURCE t_cshweffectcontrol.cpp
-SOURCE t_cshweffectcontrol_dllmain.cpp
-
-SOURCEPATH ../stubs
-SOURCE tmglxvisuallist_adapter.cpp
-SOURCE stub_tglxlayoutsplitter.cpp
-SOURCE tmshweffectmanager_adapter.cpp
-SOURCE stub_glxfetchcontexts.cpp
-
-// Sources required by the test suite
-SOURCEPATH ../../controlsrc
-SOURCE shweffectcontrol.cpp
-SOURCE shweventpublisherbase.cpp
-SOURCE shwevent.cpp
-SOURCEPATH ../../coresrc
-SOURCE shwthumbnailloader.cpp
-SOURCE shwthumbnailcontext.cpp
-SOURCE shwtimer.cpp
-
-USERINCLUDE ../t_cshweffectcontrol
-USERINCLUDE ../stubs
-USERINCLUDE ../../../../viewframework/medialists/tsrc/inc
-
-// User include folders required by the tested code
-SYSTEMINCLUDE ../../inc
-SYSTEMINCLUDE ../../controlsrc
-SYSTEMINCLUDE ../../coresrc
-SYSTEMINCLUDE ../../effectsrc
-SYSTEMINCLUDE ../../../utils
-SYSTEMINCLUDE ../../../../commonui/inc
-SYSTEMINCLUDE ../../../../inc
-SYSTEMINCLUDE ../../../../viewframework/medialists/inc
-SYSTEMINCLUDE ../../../../viewframework/layouts/inc
-SYSTEMINCLUDE ../../../../viewframework/visuallistmanager/inc
-SYSTEMINCLUDE ../../../../viewframework/uiutilities/inc // for attribute retriever
-
-
-// System include folders required by the tested code
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY EUnit.lib
-LIBRARY EUnitUtil.lib
-LIBRARY euser.lib
-LIBRARY mpxcommon.lib
-// glx dependencies
-LIBRARY glxlayouts.lib
-
-// allow static data
-#ifndef WINSCW
-EPOCALLOWDLLDATA
-#endif
-
-// no need to export test DLLs
-EXPORTUNFROZEN
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/group/t_cshweffects.mmp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slideshow engine build file for test
- *
-*/
-
-
-
-#include <platform_paths.hrh>
-#include "../../../../group/glxbuildcommon.mmh"
-
-TARGET t_cshweffects.dll
-TARGETTYPE dll
-UID 0x1000af5a 0x01700000
-
-CAPABILITY ALL -TCB
-
-SOURCEPATH ../t_cshweffects
-SOURCE t_cshweffects.cpp
-SOURCE t_cshweffects_dllmain.cpp
-
-// Sources required by the test suite
-SOURCEPATH ../../effectsrc
-SOURCE shwcrossfadeeffect.cpp
-SOURCE shwcrossfadelayout.cpp
-SOURCE shwzoomandpaneffect.cpp
-SOURCE shwzoomandpanlayout.cpp
-SOURCE shwcurvefactory.cpp
-
-SOURCEPATH ../../coresrc
-SOURCE shwtimer.cpp
-
-USERINCLUDE ../t_cshweffects
-
-// User include folders required by the tested code
-USERINCLUDE ../../inc
-USERINCLUDE ../../effectsrc
-USERINCLUDE ../../../utils
-USERINCLUDE ../../coresrc
-
-
-
-// System include folders required by the tested code
-SYSTEMINCLUDE ../../../../viewframework/medialists/inc
-SYSTEMINCLUDE ../../../../viewframework/layouts/inc
-SYSTEMINCLUDE ../../../../viewframework/visuallistmanager/inc
-SYSTEMINCLUDE ../../../../inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-
-LIBRARY EUnit.lib
-LIBRARY EUnitUtil.lib
-LIBRARY euser.lib
-
-// Libraries required by the tested code
-LIBRARY glxmedialists.lib
-LIBRARY glxlayouts.lib
-
-LIBRARY bafl.lib
-LIBRARY estor.lib
-LIBRARY hitchcock.lib
-LIBRARY cone.lib
-LIBRARY efsrv.lib
-LIBRARY commonengine.lib
-LIBRARY avkon.lib
-
-// allow static data
-#ifndef WINSCW
-EPOCALLOWDLLDATA
-#endif
-
-// no need to export test DLLs
-EXPORTUNFROZEN
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/group/t_cshwmusiccontrol.mmp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slideshow engine build file for test
- *
-*/
-
-
-
-#include <platform_paths.hrh>
-#include "../../../../group/glxbuildcommon.mmh"
-
-TARGET t_cshwmusiccontrol.dll
-TARGETTYPE dll
-UID 0x1000af5a 0x01700000
-
-CAPABILITY ALL -TCB
-
-SOURCEPATH ../t_cshwmusiccontrol
-SOURCE t_cshwmusiccontrol.cpp
-SOURCE t_cshwmusiccontrol_dllmain.cpp
-
-// Sources required by the test suite
-SOURCEPATH ../../controlsrc
-SOURCE shwevent.cpp
-SOURCE shwmusiccontrol.cpp
-SOURCE shweventpublisherbase.cpp
-
-USERINCLUDE ../t_cshwmusiccontrol
-
-// User include folders required by the tested code
-USERINCLUDE ../../inc
-USERINCLUDE ../../coresrc
-USERINCLUDE ../../../utils
-USERINCLUDE ../../controlsrc
-USERINCLUDE ../../effectsrc
-
-
-
-// System include folders required by the tested code
-SYSTEMINCLUDE ../../../../viewframework/medialists/inc
-SYSTEMINCLUDE ../../../../viewframework/layouts/inc
-SYSTEMINCLUDE ../../../../viewframework/visuallistmanager/inc
-SYSTEMINCLUDE ../../../../inc
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE ../../../../viewframework/views/fullscreenview/inc
-
-// for mgallery drm
-SYSTEMINCLUDE ../../../../viewframework/drmutility/inc
-
-
-LIBRARY eunit.lib
-LIBRARY eunitutil.lib
-LIBRARY efsrv.lib
-LIBRARY euser.lib
-
-LIBRARY mpxplaybackutility.lib
-
-// Libraries required by the tested code
-
-// allow static data
-#ifndef WINSCW
-EPOCALLOWDLLDATA
-#endif
-
-// no need to export test DLLs
-EXPORTUNFROZEN
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/group/t_cshwplaybackfactory.mmp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slideshow engine build file for test
- *
-*/
-
-
-
-#include <platform_paths.hrh>
-#include "../../../../group/glxbuildcommon.mmh"
-
-TARGET t_cshwplaybackfactory.dll
-TARGETTYPE dll
-UID 0x1000af5a 0x01700000
-
-CAPABILITY ALL -TCB
-
-// test code
-SOURCEPATH ../t_cshwplaybackfactory
-SOURCE t_cshwplaybackfactory.cpp
-SOURCE t_cshwplaybackfactory_dllmain.cpp
-
-// stubs for code under test
-SOURCEPATH ../stubs
-SOURCE tmglxvisuallist_adapter.cpp
-SOURCE stub_glxfetchcontexts.cpp
-
-// code under test
-SOURCEPATH ../../controlsrc
-SOURCE shwevent.cpp
-SOURCE shweffectcontrol.cpp
-SOURCE shwviewcontrol.cpp
-SOURCE shwtimercontrol.cpp
-SOURCE shweventrouter.cpp
-SOURCE shwmusiccontrol.cpp
-SOURCE shweventpublisherbase.cpp
-SOURCEPATH ../../effectsrc
-SOURCE shwdefaulteffectmanager.cpp
-SOURCEPATH ../../coresrc
-SOURCE shwplaybackfactory.cpp
-SOURCE shwthumbnailloader.cpp
-SOURCE shwsettingsmodel.cpp
-SOURCE shwtimer.cpp
-SOURCE shwthumbnailcontext.cpp
-
-// test code
-USERINCLUDE ../t_cshwplaybackfactory
-USERINCLUDE ../stubs
-USERINCLUDE ../../../../viewframework/medialists/tsrc/inc
-
-// User include folders required by the code under test
-USERINCLUDE ../../inc
-USERINCLUDE ../../coresrc
-USERINCLUDE ../../../utils
-USERINCLUDE ../../controlsrc
-USERINCLUDE ../../effectsrc
-
-
-
-// System include folders required by the code under test
-SYSTEMINCLUDE ../../../../commonui/inc
-SYSTEMINCLUDE ../../../../viewframework/medialists/inc
-SYSTEMINCLUDE ../../../../viewframework/layouts/inc
-SYSTEMINCLUDE ../../../../viewframework/visuallistmanager/inc
-SYSTEMINCLUDE ../../../../viewframework/uiutilities/inc // for attribute retriever
-SYSTEMINCLUDE ../../../../inc
-APP_LAYER_SYSTEMINCLUDE
-
-
-LIBRARY EUnit.lib
-LIBRARY EUnitUtil.lib
-LIBRARY euser.lib
-
-// Libraries required by the code under test
-LIBRARY glxlayouts.lib
-LIBRARY mpxplaybackutility.lib // for music playback
-LIBRARY efsrv.lib
-LIBRARY mpxcommon.lib
-
-// For central repository
-LIBRARY centralrepository.lib
-
-// allow writeable statics
-#ifndef WINSCW
-EPOCALLOWDLLDATA
-#endif
-
-// no need to export test DLLs
-EXPORTUNFROZEN
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/group/t_cshwsettingsmodel.mmp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slideshow engine build file for test
- *
-*/
-
-
-
-#include <platform_paths.hrh>
-#include "../../../../group/glxbuildcommon.mmh"
-
-TARGET t_cshwsettingsmodel.dll
-TARGETTYPE dll
-UID 0x1000af5a 0x01700000
-
-CAPABILITY ALL -TCB
-
-// test code
-SOURCEPATH ../t_cshwsettingsmodel
-SOURCE t_cshwsettingsmodel.cpp
-SOURCE t_cshwsettingsmodeldllmain.cpp
-SOURCEPATH ../../coresrc
-SOURCE shwsettingsmodel.cpp
-
-
-// code under test
-USERINCLUDE ../../inc
-USERINCLUDE ../../../utils
-USERINCLUDE ../../../group // for shwbuildvariant.hrh
-
-// test code
-USERINCLUDE ../t_cshwsettingsmodel
-
-
-// System include folders required by the tested code
-SYSTEMINCLUDE ../../../../inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY EUnit.lib
-LIBRARY euser.lib
-// For central repository
-LIBRARY centralrepository.lib
-
-// allow static data
-#ifndef WINSCW
-EPOCALLOWDLLDATA
-#endif
-
-// no need to export test DLLs
-EXPORTUNFROZEN
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/group/t_cshwslideshowengine.mmp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slideshow engine build file for test
- *
-*/
-
-
-
-#include <platform_paths.hrh>
-#include "../../../../group/glxbuildcommon.mmh"
-
-TARGET t_cshwslideshowengine.dll
-TARGETTYPE dll
-UID 0x1000af5a 0x01700000
-
-CAPABILITY ALL -TCB
-
-// test code
-SOURCEPATH ../t_cshwslideshowengine
-SOURCE t_cshwslideshowengine.cpp
-SOURCE t_cshwslideshowengine_dllmain.cpp
-
-// stubs for code under test
-SOURCEPATH ../stubs
-SOURCE tmglxvisuallist_adapter.cpp
-SOURCE tmshweventobserver_adapter.cpp
-SOURCE stub_tglxlayoutsplitter.cpp
-SOURCE stub_glxfetchcontexts.cpp
-
-// code under test
-SOURCEPATH ../../controlsrc
-SOURCE shwevent.cpp
-SOURCE shweffectcontrol.cpp
-SOURCE shwviewcontrol.cpp
-SOURCE shwtimercontrol.cpp
-SOURCE shwmusiccontrol.cpp
-SOURCE shweventrouter.cpp
-SOURCE shweventpublisherbase.cpp
-SOURCEPATH ../../coresrc
-SOURCE shwslideshowengine.cpp
-SOURCE shwslideshowengineimpl.cpp
-SOURCE shwthumbnailloader.cpp
-SOURCE shwtimer.cpp
-SOURCE shwthumbnailcontext.cpp
-
-// test code
-USERINCLUDE ../t_cshwslideshowengine
-USERINCLUDE ../stubs
-USERINCLUDE ../../../../viewframework/medialists/tsrc/inc
-
-// code under test
-USERINCLUDE ../../inc
-USERINCLUDE ../../coresrc
-USERINCLUDE ../../controlsrc
-USERINCLUDE ../../effectsrc
-USERINCLUDE ../../../utils
-
-
-// System include folders required by the tested code
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE ../../../../commonui/inc
-SYSTEMINCLUDE ../../../../inc
-SYSTEMINCLUDE ../../../../viewframework/medialists/inc
-SYSTEMINCLUDE ../../../../viewframework/layouts/inc
-SYSTEMINCLUDE ../../../../viewframework/visuallistmanager/inc
-SYSTEMINCLUDE ../../../../viewframework/uiutilities/inc // for attribute retriever
-
-LIBRARY EUnit.lib
-LIBRARY EUnitUtil.lib
-LIBRARY euser.lib
-
-// cshwmusiccontrol libraries
-LIBRARY efsrv.lib
-LIBRARY mpxplaybackutility.lib
-LIBRARY mpxcommon.lib
-
-// Libraries required by the tested code
-LIBRARY glxlayouts.lib
-
-// allow static data
-#ifndef WINSCW
-EPOCALLOWDLLDATA
-#endif
-
-// no need to export test DLLs
-EXPORTUNFROZEN
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/group/t_cshwzoomandpaneffect.mmp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Slideshow engine build file for test
- *
-*/
-
-
-
-#include <platform_paths.hrh>
-#include "../../../../group/glxbuildcommon.mmh"
-
-TARGET t_cshwzoomandpaneffect.dll
-TARGETTYPE dll
-UID 0x1000af5a 0x01700000
-
-CAPABILITY ALL -TCB
-
-SOURCEPATH ../t_cshwzoomandpaneffect
-SOURCE t_cshwzoomandpaneffect.cpp
-SOURCE t_cshwzoomandpaneffect_dllmain.cpp
-
-// Sources required by the test suite
-SOURCEPATH ../../effectsrc
-SOURCE shwzoomandpaneffect.cpp
-SOURCE shwresourceutility.cpp
-SOURCE shwzoomandpanlayout.cpp
-SOURCE shwcurvefactory.cpp
-SOURCE shwcrossfadelayout.cpp
-
-SOURCEPATH ../../coresrc
-SOURCE shwtimer.cpp
-
-USERINCLUDE ../t_cshwzoomandpaneffect
-
-// User include folders required by the tested code
-USERINCLUDE ../../inc
-USERINCLUDE ../../coresrc
-USERINCLUDE ../../controlsrc
-USERINCLUDE ../../effectsrc
-USERINCLUDE ../../../utils
-
-
-// System include folders required by the tested code
-SYSTEMINCLUDE ../../../../viewframework/medialists/inc
-SYSTEMINCLUDE ../../../../viewframework/layouts/inc
-SYSTEMINCLUDE ../../../../viewframework/visuallistmanager/inc
-SYSTEMINCLUDE ../../../../inc
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE ../../../../common/inc // for CGlxResourceUtilities
-
-LIBRARY EUnit.lib
-LIBRARY EUnitUtil.lib
-LIBRARY euser.lib
-
-// Libraries required by the tested code
-LIBRARY bafl.lib
-LIBRARY efsrv.lib
-LIBRARY glxlayouts.lib
-LIBRARY glxcommon.lib // for CResourceUtilities
-LIBRARY estor.lib
-LIBRARY avkon.lib
-LIBRARY cone.lib
-LIBRARY hitchcock.lib
-
-// allow static data
-#ifndef WINSCW
-EPOCALLOWDLLDATA
-#endif
-
-// no need to export test DLLs
-EXPORTUNFROZEN
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/stubs/stub_tglxlayoutsplitter.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Stub file for image transaction in slideshow
- *
-*/
-
-
-
-
-#include "stub_tglxlayoutsplitter.h"
-
-extern TBool gSplitterAddLayoutLCalled = EFalse;
-extern TBool gSplitterRemoveLayoutLCalled = EFalse;
-
-// -----------------------------------------------------------------------------
-// Stub for TGlxLayout -->
-// -----------------------------------------------------------------------------
-TGlxLayout::TGlxLayout()
- {
- }
-TGlxLayout::~TGlxLayout()
- {
- }
-void TGlxLayout::SetNext( MGlxLayout* /*aLayout*/ )
- {
- }
-MGlxLayout* TGlxLayout::Next() const
- {
- return NULL;
- }
-void TGlxLayout::Insert(MGlxLayout* /*aLayout*/)
- {
- }
-void TGlxLayout::Remove(MGlxLayout* /*aLayout*/)
- {
- }
-void TGlxLayout::SetLayoutValues( TGlxLayoutInfo& /*aInfo*/ )
- {
- }
-TBool TGlxLayout::Changed() const
- {
- return ETrue;
- }
-void TGlxLayout::ClearChanged()
- {
- }
-void TGlxLayout::DoSetLayoutValues( TGlxLayoutInfo& /*aInfo*/ )
- {
- }
-TBool TGlxLayout::DoChanged() const
- {
- return ETrue;
- }
-void TGlxLayout::DoClearChanged()
- {
- }
-// -----------------------------------------------------------------------------
-// <-- Stub for TGlxLayout
-// -----------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------
-// Stub for layout splitter -->
-// -----------------------------------------------------------------------------
-TGlxLayoutSplitter::TGlxLayoutSplitter()
- {
- gSplitterAddLayoutLCalled = EFalse;
- gSplitterRemoveLayoutLCalled = EFalse;
- }
-TGlxLayoutSplitter::~TGlxLayoutSplitter()
- {
- }
-void TGlxLayoutSplitter::SetVisualListL(MGlxVisualList* /*aVisualList*/)
- {
- }
-
-void TGlxLayoutSplitter::AddLayoutL(MGlxLayout* /*aLayout*/, const CHuiVisual* /*aVisual*/)
- {
- gSplitterAddLayoutLCalled = ETrue;
- }
-
-void TGlxLayoutSplitter::RemoveLayout(const CHuiVisual* /*aVisual*/)
- {
- gSplitterRemoveLayoutLCalled = ETrue;
- }
-void TGlxLayoutSplitter::SetDefaultLayout(MGlxLayout* /*aLayout*/)
- {
- }
-
-void TGlxLayoutSplitter::HandleFocusChangedL(
- TInt /*aFocusIndex*/, TReal32 /*aItemsPerSecond*/, MGlxVisualList* /*aList*/,
- NGlxListDefs::TFocusChangeType /*aType*/ )
- {
-
- }
-void TGlxLayoutSplitter::HandleSizeChanged( const TSize& /*aSize*/, MGlxVisualList* /*aList*/ )
- {
-
- }
-void TGlxLayoutSplitter::HandleVisualRemoved(
- const CHuiVisual* /*aVisual*/, MGlxVisualList* /*aList*/ )
- {
-
- }
-void TGlxLayoutSplitter::HandleVisualAddedL(
- CHuiVisual* /*aVisual*/, TInt /*aIndex*/, MGlxVisualList* /*aList*/ )
- {
-
- }
-void TGlxLayoutSplitter::DoSetLayoutValues( TGlxLayoutInfo& /*aInfo*/ )
- {
-
- }
-TBool TGlxLayoutSplitter::DoChanged() const
- {
- return ETrue;
- }
-void TGlxLayoutSplitter::DoClearChanged()
- {
-
- }
-// -----------------------------------------------------------------------------
-// <-- Stub for layout splitter
-// -----------------------------------------------------------------------------
--- a/photosgallery/slideshow/engine/tsrc/stubs/stub_tglxlayoutsplitter.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Stub file for image transaction in slideshow
- *
-*/
-
-
-
-#ifndef __STUB_TGLXLAYOUTSPLITTER_H__
-#define __STUB_TGLXLAYOUTSPLITTER_H__
-
-#include <glxlayoutsplitter.h>
-
-extern TBool gSplitterAddLayoutLCalled;
-extern TBool gSplitterRemoveLayoutLCalled;
-
-#endif // __STUB_TGLXLAYOUTSPLITTER_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/stubs/tmglxvisuallist_adapter.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Stub file for visual list adapter
- *
-*/
-
-
-
-
-// CLASS HEADER
-#include "TMGlxVisualList_Adapter.h"
-
-// EXTERNAL INCLUDES
-#include <EUnitMacros.h>
-#include <mglxvisuallistobserver.h>
-
-// declate the enum to be printed as TInt
-EUNIT_DECLARE_PRINTABLE_AS_TINT( MGlxVisualList_Observer::TMGlxVisualListMethodId )
-
-// INTERNAL INCLUDES
-
-// CONSTRUCTION
-
-TMGlxVisualList_Adapter::TMGlxVisualList_Adapter( MGlxVisualList_Observer* aObserver )
- : iSize( TMGlxVisualList_Adapter_Config::KDefaultSize ),
- iFocus( TMGlxVisualList_Adapter_Config::KDefaultFocus ),
- iMGlxVisualList_Observer( aObserver ),
- iMGlxVisualList( NULL )
- {
- }
-
-TMGlxVisualList_Adapter::~TMGlxVisualList_Adapter()
- {
- // release the array
- iObservers.Close();
- }
-
-void TMGlxVisualList_Adapter::SetAdaptee( MGlxVisualList* aAdaptee )
- {
- iMGlxVisualList = aAdaptee;
- }
-
-// METHODS
-TGlxVisualListId TMGlxVisualList_Adapter::Id() const
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_TGlxVisualListId_Id_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- return iMGlxVisualList->Id();
- }
- return TGlxVisualListId( reinterpret_cast< unsigned int >( (void*)this ) );
- }
-
-CHuiVisual* TMGlxVisualList_Adapter::Visual( TInt aListIndex )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_CHuiVisual_p_Visual_TInt_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- return iMGlxVisualList->Visual( aListIndex );
- }
- // return the index as visual
- return (CHuiVisual*)aListIndex;
- }
-
-CGlxVisualObject* TMGlxVisualList_Adapter::Item( TInt aListIndex )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_CGlxVisualObject_p_Item_TInt_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- return iMGlxVisualList->Item( aListIndex );
- }
- // return the index as item
- return (CGlxVisualObject*)aListIndex;
- }
-
-TInt TMGlxVisualList_Adapter::ItemCount() const
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_TInt_ItemCount_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- return iMGlxVisualList->ItemCount();
- }
- return iSize;
- }
-
-TInt TMGlxVisualList_Adapter::FocusIndex() const
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_TInt_FocusIndex_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- return iMGlxVisualList->FocusIndex();
- }
- return iFocus;
- }
-
-CHuiControlGroup* TMGlxVisualList_Adapter::ControlGroup() const
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_CHuiControlGroup_p_ControlGroup_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- return iMGlxVisualList->ControlGroup();
- }
- return NULL;
- }
-
-void TMGlxVisualList_Adapter::AddObserverL( MGlxVisualListObserver* aObserver )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_void_AddObserverL_MGlxVisualListObserver_p_ );
-
- // call the actual method
- if ( iMGlxVisualList )
- {
- iMGlxVisualList->AddObserverL( aObserver );
- }
-
- // add the observer to array
- iObservers.AppendL( aObserver );
- }
-
-void TMGlxVisualList_Adapter::RemoveObserver( MGlxVisualListObserver* aObserver )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_void_RemoveObserver_MGlxVisualListObserver_p_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- iMGlxVisualList->RemoveObserver( aObserver );
- }
- }
-
-void TMGlxVisualList_Adapter::AddLayoutL( MGlxLayout* aLayout )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_void_AddLayoutL_MGlxLayout_p_ );
-
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
-
- // call the actual method
- if ( iMGlxVisualList )
- {
- iMGlxVisualList->AddLayoutL( aLayout );
- }
- }
-
-void TMGlxVisualList_Adapter::RemoveLayout( const MGlxLayout* aLayout )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_void_RemoveLayout_const_MGlxLayout_p_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- iMGlxVisualList->RemoveLayout( aLayout );
- }
- }
-
-TGlxViewContextId TMGlxVisualList_Adapter::AddContextL( TInt aFrontVisibleRangeOffset, TInt aRearVisibleRangeOffset )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_TGlxViewContextId_AddContextL_TInt_TInt_ );
-
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
-
- // call the actual method
- if ( iMGlxVisualList )
- {
- return iMGlxVisualList->AddContextL( aFrontVisibleRangeOffset, aRearVisibleRangeOffset );
- }
- return TGlxViewContextId( reinterpret_cast< unsigned int >( (void*)this) );
- }
-
-void TMGlxVisualList_Adapter::RemoveContext( const TGlxViewContextId& aContextId )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_void_RemoveContext_const_TGlxViewContextId_r_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- iMGlxVisualList->RemoveContext( aContextId );
- }
- }
-
-void TMGlxVisualList_Adapter::NavigateL( TInt aIndexCount )
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_void_NavigateL_TInt_ );
-
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
-
- // call the actual method
- if ( iMGlxVisualList )
- {
- iMGlxVisualList->NavigateL( aIndexCount );
- }
-
- // change the focus
- iFocus = (iFocus + aIndexCount)% iSize;
- // if navigated backwards, loop the index
- if( iFocus < 0 )
- {
- iFocus = iSize - 1;
- }
-
- EUNIT_PRINT( _L("Visual list focus %d"), iFocus );
-
- for( TInt i=0; i<iObservers.Count(); i++ )
- {
- iObservers[ i ]->HandleFocusChangedL( iFocus, 0, this, NGlxListDefs::EUnknown );
- }
- }
-
-TSize TMGlxVisualList_Adapter::Size() const
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_TSize_Size_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- return iMGlxVisualList->Size();
- }
- return TSize( 0, 0 );
- }
-
-void TMGlxVisualList_Adapter::BringVisualsToFront()
- {
- // inform the test case
- iMGlxVisualList_Observer->MGlxVisualList_MethodCalled( MGlxVisualList_Observer::E_void_BringVisualsToFront_ );
- // call the actual method
- if ( iMGlxVisualList )
- {
- iMGlxVisualList->BringVisualsToFront();
- }
- }
-
-void TMGlxVisualList_Adapter::EnableAnimationL(TBool /*aAnimate*/, TInt /*aIndex*/)
- {
- }
-
-// -----------------------------------------------------------------------------
-// SetDefaultIconBehaviourL
-// -----------------------------------------------------------------------------
-void TMGlxVisualList_Adapter::SetDefaultIconBehaviourL( TBool /*aEnable*/ )
- {
- }
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/stubs/tmglxvisuallist_adapter.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Stub file for visual list adapter
- *
-*/
-
-
-
-
-#ifndef __TMGLXVISUALLIST_ADAPTER_H__
-#define __TMGLXVISUALLIST_ADAPTER_H__
-
-// EXTERNAL INCLUDES
-
-// INTERNAL INCLUDES
-#include "MGlxVisualList_Observer.h"
-#include <mglxvisuallist.h>
-
-// FORWARD DECLARATIONS
-
-namespace TMGlxVisualList_Adapter_Config
- {
- const TInt KDefaultSize = 3;
- const TInt KDefaultFocus = 1;
- }
-
-// CLASS DEFINITION
-/**
- * Stub version of visual list
- * for testing purposes
- */
-class TMGlxVisualList_Adapter
- : public MGlxVisualList
- {
- public: // Constructors and destructors
-
- /**
- * Construction
- */
- TMGlxVisualList_Adapter( MGlxVisualList_Observer* aObserver );
- ~TMGlxVisualList_Adapter();
- void SetAdaptee( MGlxVisualList* aAdaptee );
-
- public: // from MGlxVisualList
-
- TGlxVisualListId Id() const;
- CHuiVisual* Visual(TInt aListIndex);
- CGlxVisualObject* Item(TInt aListIndex);
- TInt ItemCount() const;
- TInt FocusIndex() const;
- CHuiControlGroup* ControlGroup() const;
- void AddObserverL(MGlxVisualListObserver* aObserver);
- void RemoveObserver(MGlxVisualListObserver* aObserver);
- void AddLayoutL(MGlxLayout* aLayout);
- void RemoveLayout(const MGlxLayout* aLayout);
- TGlxViewContextId AddContextL(TInt aFrontVisibleRangeOffset, TInt aRearVisibleRangeOffset);
- void RemoveContext(const TGlxViewContextId& aContextId);
- void NavigateL(TInt aIndexCount);
- TSize Size() const;
- void BringVisualsToFront();
- void EnableAnimationL(TBool aAnimate, TInt aIndex);
- /// @ref MGlxVisualList::SetDefaultIconBehaviourL
- void SetDefaultIconBehaviourL( TBool aEnable );
-
- void AddIconL( TInt , const CHuiTexture& ,
- NGlxIconMgrDefs::TGlxIconPosition ,
- TBool , TBool , TInt, TReal32, TReal32 ) { }
-
- TBool RemoveIcon( TInt , const CHuiTexture& ) { return ETrue;}
-
- void SetIconVisibility( TInt , const CHuiTexture&, TBool ) { }
-
- public: // Data
-
- TInt iSize;
- TInt iFocus;
-
- private: // Data
-
- RArray<MGlxVisualListObserver*> iObservers;
- MGlxVisualList_Observer* iMGlxVisualList_Observer;
- MGlxVisualList* iMGlxVisualList;
-
- };
-
-#endif // __TMGLXVISUALLIST_ADAPTER_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/stubs/tmshweffectmanager_adapter.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,246 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Stub file for managing effect in slideshow
- *
-*/
-
-
-
-
-// CLASS HEADER
-#include "tmshweffectmanager_adapter.h"
-
-// EXTERNAL INCLUDES
-// INTERNAL INCLUDES
-#include <EUnitMacros.h>
-
-// declare the enums to be printable as TInts
-EUNIT_DECLARE_PRINTABLE_AS_TINT( MShwEffectManager_Observer::TMShwEffectManagerMethodId )
-
-// CONSTRUCTION
-
-TMShwEffectManager_Adapter::TMShwEffectManager_Adapter(
- MShwEffectManager_Observer* aObserver )
- : iViewDuration( 0 ),
- iTransitionDuration( 0 ),
- iPrepareVisual( NULL ),
- iViewVisual( NULL ),
- iTransitionVisual( NULL ),
- iMShwEffectManager_Observer( aObserver ),
- iMShwEffectManager( NULL )
- {
- }
-
-void TMShwEffectManager_Adapter::SetAdaptee( MShwEffectManager* aAdaptee )
- {
- iMShwEffectManager = aAdaptee;
- }
-
-// METHODS
-void TMShwEffectManager_Adapter::AddEffectL( MShwEffect* aEffect )
- {
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_void_AdoptEffectsL_TArrayMShwEffect_p );
-
- // allocate to cause an alloc leave
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
-
- // call the actual method
- if ( iMShwEffectManager )
- {
- iMShwEffectManager->AddEffectL( aEffect );
- }
- }
-
-MShwEffect* TMShwEffectManager_Adapter::CurrentEffect()
- {
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_MShwEffect_p_CurrentEffect );
- // call the actual method
- if ( iMShwEffectManager )
- {
- return iMShwEffectManager->CurrentEffect();
- }
- return this;
- }
-
-MShwEffect* TMShwEffectManager_Adapter::Effect( TInt aDirection )
- {
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_MShwEffect_p_NextEffect );
- // call the actual method
- if ( iMShwEffectManager )
- {
- return iMShwEffectManager->Effect( aDirection );
- }
- return this;
- }
-
-void TMShwEffectManager_Adapter::ProceedToEffect( TInt aDirection )
- {
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_void_ProceedToNextEffect );
- // call the actual method
- if ( iMShwEffectManager )
- {
- iMShwEffectManager->ProceedToEffect( aDirection );
- }
- }
-
-void TMShwEffectManager_Adapter::SetEffectOrder(
- MShwEffectManager::TShwEffectOrder /*aOrder*/ )
- {
- }
-
-MShwEffectManager::TShwEffectOrder TMShwEffectManager_Adapter::EffectOrder()
- {
- return EEffectOrderProgrammed;
- }
-
-void TMShwEffectManager_Adapter::SetProgrammedEffects(
- RArray< TShwEffectInfo >& /*aEffects*/ )
- {
- }
-
-TInt TMShwEffectManager_Adapter::ProgrammedEffects(
- RArray< MShwEffect* >& /*aEffects*/ )
- {
- return KErrNone;
- }
-
-void TMShwEffectManager_Adapter::SetDefaultEffectL( TShwEffectInfo /*aInfo*/ )
- {
- }
-
-void TMShwEffectManager_Adapter::GetActiveEffectsL( RPointerArray< MShwEffect >& /*aEffects*/ )
- {
- }
-
-/// MShwEffect part
-MShwEffect* TMShwEffectManager_Adapter::CloneLC()
- {
- return NULL;
- }
-
-void TMShwEffectManager_Adapter::InitializeL(
- CHuiEnv* /*aHuiEnv*/,
- MGlxVisualList* /*aVisualList*/,
- MGlxMediaList* /*aMediaList*/,
- TSize /*aScreenSize*/ )
- {
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_MGlxLayout_InitializeL );
-
- // allocate to cause an alloc leave in OOM tests
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
- }
-
-TSize TMShwEffectManager_Adapter::PrepareViewL( CHuiVisual* aVisual, TSize /*aSize*/ )
- {
- // store the visual
- iPrepareVisual = aVisual;
-
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_MGlxLayout_PrepareViewL );
-
- // allocate to cause an alloc leave in OOM tests
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
-
- return TSize( 0, 0 );
- }
-
-MGlxLayout* TMShwEffectManager_Adapter::EnterViewL(
- CHuiVisual* aVisual, TInt aDuration, TInt /*aDuration2*/ )
- {
- iViewDuration = aDuration;
- // store the visual
- iViewVisual = aVisual;
-
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_MGlxLayout_EnterViewL_TInt );
-
- // allocate to cause an alloc leave
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
-
- return NULL;
- }
-
-void TMShwEffectManager_Adapter::ExitView( CHuiVisual* aVisual )
- {
- // store the visual
- iViewVisual = aVisual;
-
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_void_ExitView );
- }
-
-MGlxLayout* TMShwEffectManager_Adapter::EnterTransitionL(
- CHuiVisual* aVisual, TInt aDuration )
- {
- iTransitionDuration = aDuration;
- // store the visual
- iTransitionVisual = aVisual;
-
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_MGlxLayout_EnterTransitionL_TInt );
-
- // allocate to cause an alloc leave
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
-
- return NULL;
- }
-
-void TMShwEffectManager_Adapter::ExitTransition( CHuiVisual* aVisual )
- {
- // store the visual
- iTransitionVisual = aVisual;
-
- // inform the observer
- iMShwEffectManager_Observer->MShwEffectManager_MethodCalled(
- MShwEffectManager_Observer::E_void_ExitTransition );
- }
-
-void TMShwEffectManager_Adapter::PauseL()
- {
- // allocate to cause an alloc leave
- TInt* memAlloc = new (ELeave) TInt;
- delete memAlloc;
- }
-
-void TMShwEffectManager_Adapter::Resume()
- {
- }
-
-TShwEffectInfo TMShwEffectManager_Adapter::EffectInfo()
- {
- TShwEffectInfo info;
- info.iName = KNullDesC;
- return info;
- }
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/stubs/tmshweffectmanager_adapter.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Stub file for managing effect in slideshow
- *
-*/
-
-
-
-
-#ifndef __TMSHWEFFECTMANAGER_ADAPTER_H__
-#define __TMSHWEFFECTMANAGER_ADAPTER_H__
-
-// EXTERNAL INCLUDES
-
-
-// INTERNAL INCLUDES
-#include "mshweffectmanager_observer.h"
-#include "shweffectmanager.h"
-#include "shweffect.h"
-
-// FORWARD DECLARATIONS
-
-// CLASS DEFINITION
-/**
- * Stub implementation of effect manager and effect.
- */
-class TMShwEffectManager_Adapter
- : public MShwEffectManager, public MShwEffect
- {
- public: // Constructors and destructors
-
- /**
- * Construction
- */
- TMShwEffectManager_Adapter( MShwEffectManager_Observer* aObserver );
- void SetAdaptee( MShwEffectManager* aAdaptee );
-
- public: // From MShwEffectManager
-
- void AddEffectL( MShwEffect* aEffect );
- MShwEffect* CurrentEffect();
- MShwEffect* Effect( TInt aDirection );
- void ProceedToEffect( TInt aDirection );
- void SetEffectOrder( TShwEffectOrder aOrder );
- TShwEffectOrder EffectOrder();
- void SetProgrammedEffects( RArray< TShwEffectInfo >& aEffects );
- TInt ProgrammedEffects( RArray< MShwEffect* >& aEffects );
- void SetDefaultEffectL(TShwEffectInfo aInfo);
- void GetActiveEffectsL( RPointerArray< MShwEffect >& aEffects );
-
- public: // From MShwEffect
-
- MShwEffect* CloneLC();
- void InitializeL(
- CHuiEnv* aHuiEnv,
- MGlxVisualList* aVisualList,
- MGlxMediaList* aMediaList,
- TSize aScreenSize );
- TSize PrepareViewL( CHuiVisual* aVisual, TSize aSize );
- MGlxLayout* EnterViewL( CHuiVisual* aVisual, TInt aDuration, TInt aDuration2 );
- void ExitView( CHuiVisual* aVisual );
- MGlxLayout* EnterTransitionL( CHuiVisual* aVisual, TInt aDuration );
- void ExitTransition( CHuiVisual* aVisual );
- void PauseL();
- void Resume();
- TShwEffectInfo EffectInfo();
-
- public: // Data (for verification)
-
- TInt iViewDuration;
- TInt iTransitionDuration;
- CHuiVisual* iPrepareVisual;
- CHuiVisual* iViewVisual;
- CHuiVisual* iTransitionVisual;
-
- private: // Data
-
- MShwEffectManager_Observer* iMShwEffectManager_Observer;
- MShwEffectManager* iMShwEffectManager;
-
- };
-
-#endif // __TMSHWEFFECTMANAGER_ADAPTER_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/t_cshweffectcontrol/t_cshweffectcontrol.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,932 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for effect control for the slideshow
- *
-*/
-
-
-
-
-// CLASS HEADER
-#include "t_cshweffectcontrol.h"
-
-// EXTERNAL INCLUDES
-#include <EUnitMacros.h>
-#include <EUnitDecorators.h>
-
-// INTERNAL INCLUDES
-#include "shwslideshowenginepanic.h"
-#include "shweffectcontrol.h"
-#include "shwevent.h"
-#include "shwthumbnailcontext.h"
-#include "shwautoptr.h"
-
-#include "stub_tglxlayoutsplitter.h"
-#include "stub_glxfetchcontexts.h"
-
-// -----------------------------------------------------------------------------
-// Stub for NShwEngine::Panic -->
-// -----------------------------------------------------------------------------
-TBool gNShwEnginePanicCalled = EFalse;
-namespace NShwEngine
- {
- extern void Panic( TShwEnginePanic aPanic )
- {
- gNShwEnginePanicCalled = ETrue;
- // in test situation just do a leave
- User::Leave( aPanic );
- }
- }
-
-// -----------------------------------------------------------------------------
-// <-- Stub for NShwEngine::Panic
-// -----------------------------------------------------------------------------
-
-// CONSTRUCTION
-T_CShwEffectControl* T_CShwEffectControl::NewL()
- {
- T_CShwEffectControl* self = T_CShwEffectControl::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-T_CShwEffectControl* T_CShwEffectControl::NewLC()
- {
- T_CShwEffectControl* self = new( ELeave ) T_CShwEffectControl();
- CleanupStack::PushL( self );
-
- self->ConstructL();
-
- return self;
- }
-
-// Destructor (virtual by CBase)
-T_CShwEffectControl::~T_CShwEffectControl()
- {
- }
-
-// Default constructor
-T_CShwEffectControl::T_CShwEffectControl() :
- iStubEffectManager( this )
- {
- }
-
-// Second phase construct
-void T_CShwEffectControl::ConstructL()
- {
- // The ConstructL from the base class CEUnitTestSuiteClass must be called.
- // It generates the test case table.
- CEUnitTestSuiteClass::ConstructL();
- }
-
-// METHODS
-void T_CShwEffectControl::MGlxMediaList_MethodCalled( TMGlxMediaListMethodId aMethodId )
- {
- // append the methodid in the array
- TInt error = iMediaListCalls.Append( aMethodId );
- // check that append succeeded
- if( error != KErrNone )
- {
- // critical error, not enough space to append messages
- User::Panic( _L("T_CShwEffectControl::MGlxMediaList_MethodCalled"), __LINE__ );
- }
- }
-
-void T_CShwEffectControl::MGlxVisualList_MethodCalled( TMGlxVisualListMethodId aMethodId )
- {
- // append the methodid in the array
- TInt error = iVisualListCalls.Append( aMethodId );
- // check that append succeeded
- if( error != KErrNone )
- {
- // critical error, not enough space to append messages
- User::Panic( _L("TestError:AppendFail"), -1 );
- }
- }
-
-void T_CShwEffectControl::MShwEffectManager_MethodCalled( TMShwEffectManagerMethodId aMethodId )
- {
- // append the methodid in the array
- TInt error = iEffectCalls.Append( aMethodId );
- // check that append succeeded
- if( error != KErrNone )
- {
- // critical error, not enough space to append messages
- User::Panic( _L("TestError:AppendFail"), -2 );
- }
- }
-
-TInt gSendEventLeaveCode = KErrNone;
-void T_CShwEffectControl::SendEventL( MShwEvent* aEvent )
- {
- // need to clone the event since the caller goes out of scope
- TInt error = iEvents.Append( aEvent->CloneLC() );
- CleanupStack::Pop(); // aEvent->CloneLC()
-
- // check that append succeeded
- if( error != KErrNone )
- {
- // critical error, not enough space to append events
- User::Panic( _L("T_CShwEffectControl::NotifyL"), __LINE__ );
- }
- User::LeaveIfError( gSendEventLeaveCode );
-
- // stop the scheduler loop if its started
- if( iWait.IsStarted() )
- {
- iWait.AsyncStop();
- }
- }
-
-void T_CShwEffectControl::EmptySetupL()
- {
- gNShwEnginePanicCalled = EFalse; // by default no panic was called
- gSendEventLeaveCode = KErrNone; // by default no leaves in SendEventL
- // make room for 20 entries on each array
- iVisualListCalls.ReserveL( 20 );
- iMediaListCalls.ReserveL( 20 );
- iEffectCalls.ReserveL( 20 );
- iEvents.ReserveL( 20 );
-
- iStubVisualList = new( ELeave ) TMGlxVisualList_Adapter( this );
- iStubMediaList = new( ELeave ) TMGlxMediaList_Stub( this );
-
- // set the size and focus of the list
- iStubVisualList->iSize = 3;
- iStubVisualList->iFocus = 1;
- iStubMediaList->iCount = 3;
- iStubMediaList->iFocus = 1;
-
- iStubEffectManager.iViewDuration = 0;
- iStubEffectManager.iTransitionDuration = 0;
-
- // reset the visuals of effect stub
- iStubEffectManager.iPrepareVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- iStubEffectManager.iViewVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- iStubEffectManager.iTransitionVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
-
- // tell the thumbnail stub to add attributes
- // this tells the thumbnailcontext stub to add entries to the
- // array which then tell the thumbnail loader that the
- // thumbnail was not yet loaded
- gThumbnailContextRequestCount = 1;
- // by default size is available
- gTGlxMediaGetDimensions = ETrue;
- // by default we dont want alloc behavior
- gFetchContextAllocTest = EFalse;
- }
-
-void T_CShwEffectControl::SetupL()
- {
- // reuse the empty version to create the stubs
- EmptySetupL();
- // create the effect control
- iCShwEffectControl =
- CShwEffectControl::NewL(
- iStubEffectManager, *iStubVisualList, *iStubMediaList, TSize( 320, 240 ) );
- // set the event queue
- iCShwEffectControl->SetEventQueue( this );
-
- // perform the second phase of construction
- TShwEventInitialize initEvent;
- iCShwEffectControl->NotifyL( &initEvent );
- }
-
-void T_CShwEffectControl::Teardown()
- {
- // delete effect control
- delete iCShwEffectControl;
- iCShwEffectControl = NULL;
- // close the arrays
- iEffectCalls.Close();
- iVisualListCalls.Close();
- iMediaListCalls.Close();
- // release events
- for( TInt i=0; i<iEvents.Count(); i++ )
- {
- MShwEvent* event = iEvents[ i ];
- delete event;
- }
- iEvents.Close();
- // release the visual list stub
- delete iStubVisualList;
- iStubVisualList = NULL;
- // delete the media list stub
- delete iStubMediaList;
- iStubMediaList = NULL;
- }
-
-void T_CShwEffectControl::TestConstructionL()
- {
- // we want alloc behavior
- gFetchContextAllocTest = ETrue;
- // reset stub
- iStubVisualList->iSize = 11;
- iStubVisualList->iFocus = 10;
- // reset the state as setup uses splitter
- gSplitterAddLayoutLCalled = EFalse;
- gSplitterRemoveLayoutLCalled = EFalse;
- // create an effect control
- CShwEffectControl* tmp =
- CShwEffectControl::NewL(
- iStubEffectManager, *iStubVisualList, *iStubMediaList, TSize( 320, 240 ) );
- // need to put to cleanupstack in case NotifyL leaves
- CleanupStack::PushL( tmp );
-
- EUNIT_ASSERT_DESC( tmp, "Construction successfull");
-
- EUNIT_ASSERT_EQUALS_DESC( 0, iEffectCalls.Count(), "Effect manager was not called" );
-
- // perform the second phase of construction
- TShwEventInitialize initEvent;
- tmp->NotifyL( &initEvent );
-
- // check that the calls made by CShwEffectControl were correct ones
- EUNIT_ASSERT_EQUALS_DESC( 2, iEffectCalls.Count(), "Effect manager was called 2 times" );
- EUNIT_ASSERT_EQUALS_DESC( E_MShwEffect_p_CurrentEffect, iEffectCalls[ 0 ], "current effect was called" );
- EUNIT_ASSERT_EQUALS_DESC( E_MGlxLayout_PrepareViewL, iEffectCalls[ 1 ], "current effect was called" );
-
- // test notify again with size not available
- gTGlxMediaGetDimensions = EFalse;
- // call notify again
- tmp->NotifyL( &initEvent );
- // check that the calls made by CShwEffectControl were correct ones
- EUNIT_ASSERT_EQUALS_DESC( 4, iEffectCalls.Count(), "Effect manager was called 4 times" );
- EUNIT_ASSERT_EQUALS_DESC( E_MShwEffect_p_CurrentEffect, iEffectCalls[ 2 ], "current effect was called" );
- EUNIT_ASSERT_EQUALS_DESC( E_MGlxLayout_PrepareViewL, iEffectCalls[ 3 ], "current effect was called" );
-
- // check splitter usage
- EUNIT_ASSERT_DESC( !gSplitterAddLayoutLCalled, "layout was not set" );
- EUNIT_ASSERT_DESC( !gSplitterRemoveLayoutLCalled, "layout was not removed" );
-
- CleanupStack::PopAndDestroy( tmp );
- }
-
-void T_CShwEffectControl::TransitionCompletedL()
- {
- // reset the state as setup uses splitter
- gSplitterAddLayoutLCalled = EFalse;
- gSplitterRemoveLayoutLCalled = EFalse;
-
- // call transition completed
- iCShwEffectControl->SendTransitionReadyL();
-
- // check that we got the correct event
- EUNIT_ASSERT_DESC( iEvents.Count() > 0, "we got an event");
- EUNIT_ASSERT_DESC(
- dynamic_cast<TShwEventTransitionReady*>( iEvents[ 0 ] ),
- "event was correct class" );
-
- // check splitter usage
- EUNIT_ASSERT_DESC( !gSplitterAddLayoutLCalled, "layout was not set" );
- EUNIT_ASSERT_DESC( !gSplitterRemoveLayoutLCalled, "layout was not removed" );
- }
-
-void T_CShwEffectControl::TransitionCompleted2L()
- {
- // tell the thumbnail context that the thumbnail is already loaded
- // so that the thumbnail loader will immediately make the callback
- gThumbnailContextRequestCount = 0;
- // tell the medialist stub to notify that we have the first thumbnail loaded
- iStubMediaList->NotifyAttributesAvailableL( iStubMediaList->iFocus );
-
- // check that we dont have event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "event received");
- // check that we got the correct event
- EUNIT_ASSERT_DESC(
- dynamic_cast<TShwEventReadyToView*>( iEvents[ 0 ] ),
- "event was correct class" );
-
- // send the event
- TShwEventStartTransition trans( 123 );
- iCShwEffectControl->NotifyL( &trans );
-
- // start the wait loop
- iWait.Start();
- // check that we got event
- EUNIT_ASSERT_EQUALS_DESC( 3, iEvents.Count(), "we got an event");
- // check that we got the correct events
- EUNIT_ASSERT_DESC(
- dynamic_cast<TShwEventReadyToView*>( iEvents[ 1 ] ),
- "event was correct class" );
- EUNIT_ASSERT_DESC(
- dynamic_cast<TShwEventTransitionReady*>( iEvents[ 2 ] ),
- "event was correct class" );
- }
-
-void T_CShwEffectControl::NotifyLL()
- {
- TInt initialEffectCalls = iEffectCalls.Count();
- TInt initialVisualCalls = iVisualListCalls.Count();
-
- // reset the state as setup uses splitter
- gSplitterAddLayoutLCalled = EFalse;
- gSplitterRemoveLayoutLCalled = EFalse;
- // reset the visuals
- iStubEffectManager.iPrepareVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- iStubEffectManager.iViewVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- iStubEffectManager.iTransitionVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
-
- // test not supported event path
- iCShwEffectControl->NotifyL( NULL );
-
- // check that there was no new calls made by CShwEffectControl to visual list or effect manager
- EUNIT_ASSERT_EQUALS_DESC( initialEffectCalls, iEffectCalls.Count(), "Effect manager was not called" );
- EUNIT_ASSERT_EQUALS_DESC( initialVisualCalls, iVisualListCalls.Count(), "Visual list was not called" );
-
- // test if( viewEvent )
-
- // tell the stub context that a request is complete
- gThumbnailContextRequestCount = KErrNone;
- // tell the media list stub to notify that thumbnail in focus is loaded
- iStubMediaList->NotifyAttributesAvailableL( iStubMediaList->iFocus );
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToView* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
-
- // tell the stub context that its request is complete, at this point there is no
- // context so we only test that thumbnail context works without one
- gThumbnailContextRequestCount = KErrNone;
- // tell the media list stub to notify that next thumbnail is loaded
- // remember the modulo
- iStubMediaList->NotifyAttributesAvailableL(
- ( iStubMediaList->iFocus + 1 )%iStubMediaList->iCount );
-
- // if( view_event ) : true
- // if( iLoopStarted ) : false
- TShwEventStartView start( 999 );
- iCShwEffectControl->NotifyL( &start );
-
- // thumbnail notify is always asynchronous so first check we did not yet get the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got only previous event");
- // start async wait
- iWait.Start();
-
- // check that we got view ready event
- EUNIT_ASSERT_EQUALS_DESC( 2, iEvents.Count(), "we got an event");
- EUNIT_ASSERT_DESC( dynamic_cast<TShwEventReadyToAdvance*>( iEvents[ 1 ] ), "TShwEventReadyToAdvance received" );
-
- // check the visual given to effect
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iPrepareVisual, 2, "prepare was given visual 2 (focus is on 1)" );
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iViewVisual, 1, "view was given visual 1 (focus is on 1)" );
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iTransitionVisual, KErrNotFound, "transition was not given visual" );
- // check splitter usage
- EUNIT_ASSERT_DESC( gSplitterAddLayoutLCalled, "layout was set (view layout)" );
- EUNIT_ASSERT_DESC( gSplitterRemoveLayoutLCalled, "layout was removed (old view layout)" );
-
- // test path:
- EUNIT_PRINT( _L("if( view_event ) : false") );
- EUNIT_PRINT( _L("else if( trans_event ) : true") );
- // if( view_event ) : false
- // else if( trans_event ) : true
- TInt effectCalls = iEffectCalls.Count();
- TInt visualCalls = iVisualListCalls.Count();
- // reset the visuals
- iStubEffectManager.iPrepareVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- iStubEffectManager.iViewVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- iStubEffectManager.iTransitionVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- // send the event
- TShwEventStartTransition trans( 666 );
- iCShwEffectControl->NotifyL( &trans );
- // check that view duration was stored from view event
- EUNIT_ASSERT_EQUALS_DESC( 999, iStubEffectManager.iViewDuration, "view duration is set correctly" );
- // check that transition duration was given as parameter
- EUNIT_ASSERT_EQUALS_DESC( 666, iStubEffectManager.iTransitionDuration, "transition duration is set correctly" );
- // check the visual given to effect
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iPrepareVisual, KErrNotFound, "prepare was not given visual" );
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iViewVisual, 2, "view was given visual 2 (focus is on 2)" );
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iTransitionVisual, 1, "transition was given visual 1 (focus is on 1)" );
- // check splitter usage
- EUNIT_ASSERT_DESC( gSplitterAddLayoutLCalled, "layout was set" );
- EUNIT_ASSERT_DESC( gSplitterRemoveLayoutLCalled, "layout was removed" );
-
- // test path:
- EUNIT_PRINT( _L("if( view_event ) : true") );
- EUNIT_PRINT( _L("if( iLoopStarted ) : true") );
- EUNIT_PRINT( _L("else if( trans_event ) : false") );
- // if( view_event ) : true
- // if( iLoopStarted ) : true
- // reset the state of splitter stub
- gSplitterAddLayoutLCalled = EFalse;
- gSplitterRemoveLayoutLCalled = EFalse;
- effectCalls = iEffectCalls.Count();
- visualCalls = iVisualListCalls.Count();
- // reset the visuals
- iStubEffectManager.iPrepareVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- iStubEffectManager.iViewVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- iStubEffectManager.iTransitionVisual = reinterpret_cast<CHuiVisual*>( KErrNotFound );
- // move focus to 2
- iStubVisualList->iFocus = 2;
- iStubMediaList->iFocus = 2;
-
- // tell the stub context that its request is complete
- gThumbnailContextRequestCount = KErrNone;
- // tell the media list stub to notify that thumbnail is loaded
- // remember the modulo
- iStubMediaList->NotifyAttributesAvailableL(
- ( iStubMediaList->iFocus + 1 )%iStubMediaList->iCount );
-
- // send the event
- TShwEventStartView start2( 123 );
- iCShwEffectControl->NotifyL( &start2 );
-
- // check we got the ready to view event
- EUNIT_ASSERT_EQUALS_DESC( 3, iEvents.Count(), "we got ready to view");
- EUNIT_ASSERT_DESC( dynamic_cast<TShwEventReadyToView*>( iEvents[ 2 ] ), "TShwEventReadyToView received" );
- // start async wait
- iWait.Start();
-
- // check that view duration was not set
- EUNIT_ASSERT_EQUALS_DESC( 999, iStubEffectManager.iViewDuration, "view duration is same as last, see above" );
- // check the visual given to effect
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iPrepareVisual, 0, "prepare view was given visual 0 (focus is on 2, size is 3)" );
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iViewVisual, KErrNotFound, "view was not given visual" );
- EUNIT_ASSERT_EQUALS_DESC( (TInt)iStubEffectManager.iTransitionVisual, 1, "exit transition was given visual 1 (focus is on 2)" );
- // check that we got view ready event
- EUNIT_ASSERT_EQUALS_DESC( 4, iEvents.Count(), "event received" );
- EUNIT_ASSERT_DESC( dynamic_cast<TShwEventReadyToAdvance*>( iEvents[ 3 ] ), "TShwEventReadyToAdvance received" );
-
- // check splitter usage
- EUNIT_ASSERT_DESC( !gSplitterAddLayoutLCalled, "layout was not set" );
- EUNIT_ASSERT_DESC( gSplitterRemoveLayoutLCalled, "layout was removed" );
- }
-
-void T_CShwEffectControl::SlowImageLoadL()
- {
- // test path:
- EUNIT_PRINT( _L("if( view_event ) : true") );
- EUNIT_PRINT( _L("if( iLoopStarted ) : false") );
- EUNIT_PRINT( _L("else if( trans_event ) : false") );
-
- // tell the stub context that its request is complete
- gThumbnailContextRequestCount = KErrNone;
- // tell the media list stub to notify that thumbnail in focus is loaded
- iStubMediaList->NotifyAttributesAvailableL( iStubMediaList->iFocus );
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToView* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
-
- // tell the stub context that its request is not complete
- gThumbnailContextRequestCount = 1;
-
- // if( view_event ) : true
- // if( iLoopStarted ) : false
- TShwEventStartView start( 999 );
- iCShwEffectControl->NotifyL( &start );
- // variable iLoopStarted is initialized as false so we dont go through the loop
- // check that we got view ready event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "new event not received" );
-
- // tell the stub context that its request is complete
- gThumbnailContextRequestCount = KErrNone;
- // tell the media list stub to notify that thumbnail is loaded
- // remember the modulo
- iStubMediaList->NotifyAttributesAvailableL(
- ( iStubMediaList->iFocus + 1 )%iStubMediaList->iCount );
-
- EUNIT_ASSERT_EQUALS_DESC( 2, iEvents.Count(), "we got an event");
- EUNIT_ASSERT_DESC( dynamic_cast<TShwEventReadyToAdvance*>( iEvents[ 1 ] ), "TShwEventReadyToAdvance received" );
- }
-
-void T_CShwEffectControl::SlowImageLoad2L()
- {
- // set the size and focus of the list
- iStubVisualList->iSize = 10;
- iStubVisualList->iFocus = 1;
- iStubMediaList->iCount = 10;
- iStubMediaList->iFocus = 1;
- // test path:
- EUNIT_PRINT( _L("if( view_event ) : true") );
- EUNIT_PRINT( _L("if( iLoopStarted ) : false") );
- EUNIT_PRINT( _L("else if( trans_event ) : false") );
-
- // tell the stub context that its request is complete
- gThumbnailContextRequestCount = KErrNone;
- // tell the media list stub to notify that thumbnail in focus is loaded
- iStubMediaList->NotifyAttributesAvailableL( iStubMediaList->iFocus );
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToView* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
-
- // tell the stub context that its request is not complete
- gThumbnailContextRequestCount = 1;
-
- // if( view_event ) : true
- // if( iLoopStarted ) : false
- TShwEventStartView start( 999 );
- iCShwEffectControl->NotifyL( &start );
- // variable iLoopStarted is initialized as false so we dont go through the loop
- // check that we got view ready event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "new event not received" );
-
- // tell the stub context that its request is complete
- gThumbnailContextRequestCount = KErrNone;
- // tell the media list stub to notify that thumbnail is loaded
- // remember the modulo
- iStubMediaList->NotifyAttributesAvailableL(
- ( iStubMediaList->iFocus + 3 )%iStubMediaList->iCount );
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "new event not received" );
-
- // tell the media list stub to notify that thumbnail is loaded
- // remember the modulo
- iStubMediaList->NotifyAttributesAvailableL(
- ( iStubMediaList->iFocus + 2 )%iStubMediaList->iCount );
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "new event not received" );
-
- // tell the stub context that its request is not complete
- gThumbnailContextRequestCount = 1;
- // tell the media list stub to notify that thumbnail is loaded
- // remember the modulo
- iStubMediaList->NotifyAttributesAvailableL(
- ( iStubMediaList->iFocus + 1 )%iStubMediaList->iCount );
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "new event not received" );
-
- // tell the stub context that its request is complete
- gThumbnailContextRequestCount = KErrNone;
- iStubMediaList->NotifyAttributesAvailableL(
- ( iStubMediaList->iFocus + 1 )%iStubMediaList->iCount );
- EUNIT_ASSERT_EQUALS_DESC( 2, iEvents.Count(), "event received" );
- // this was second time the event was received so we get view complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast<TShwEventReadyToAdvance*>( iEvents[ 1 ] ),
- "TShwEventViewReady received" );
- }
-
-void T_CShwEffectControl::HandleFocusChangedL()
- {
- TInt initialVisualListCalls = iVisualListCalls.Count();
- iCShwEffectControl->HandleFocusChangedL( 0, 0, NULL, NGlxListDefs::EUnknown );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- initialVisualListCalls, iVisualListCalls.Count(), "Visual list was called" );
- }
-
-void T_CShwEffectControl::TestThumbnailLoadingL()
- {
- // create shw thumbnail context for index 1 and size 100,100
- const TInt thumbIndex = 1;
- CShwThumbnailContext* context = CShwThumbnailContext::NewLC(thumbIndex,
- TSize(100, 100), iStubMediaList);
-
- // test that the index is returned
- // set iterator to first
- context->SetToFirst(iStubMediaList);
- // then iterate once
- TInt index = (*context)++;
- EUNIT_ASSERT_EQUALS_DESC(thumbIndex, index, "check first iterated index");
-
- index = (*context)++;
- EUNIT_ASSERT_EQUALS_DESC( KErrNotFound, index, "next index is KErrNotFound" );
-
- // check range
- EUNIT_ASSERT_DESC( !context->InRange( thumbIndex-1 ), "thumbIndex-1 is not in range" );
- EUNIT_ASSERT_DESC( !context->InRange( thumbIndex+1 ), "thumbIndex+1 is not in range" );
- EUNIT_ASSERT_DESC( context->InRange( thumbIndex ), "thumbIndex is in range" );
-
- CleanupStack::PopAndDestroy(context);
- }
-
-void T_CShwEffectControl::TestErrorsInThumbnailLoadingL()
- {
- // set the size and focus of the list
- iStubVisualList->iSize = 10;
- iStubVisualList->iFocus = 1;
- iStubMediaList->iCount = 10;
- iStubMediaList->iFocus = 1;
-// first test that first thumbnail does not load
- // tell the stub context that its request has error
- gThumbnailContextRequestCount = KErrCorrupt;
- {
- // create an effect control, no need to delete or cleanupstack
- TShwAutoPtr< CShwEffectControl > tmp =
- CShwEffectControl::NewL(
- iStubEffectManager, *iStubVisualList, *iStubMediaList, TSize( 320, 240 ) );
- // need to set the event queue
- tmp->SetEventQueue( this );
- // perform the second phase of construction
- TShwEventInitialize initEvent;
- tmp->NotifyL( &initEvent );
-
- // check that we did not get an event
- EUNIT_ASSERT_EQUALS_DESC( 0, iEvents.Count(), "we did not yet get an event");
-
- // start async wait loop
- iWait.Start();
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToView* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
- // delete and remove the event
- delete iEvents[ 0 ];
- iEvents.Remove( 0 );
- // tmp gets deleted here, EUnit checks for memory
- }
-
-// test that second thumbnail does not load
- // tell the stub context that its request is not yet completed
- gThumbnailContextRequestCount = 1;
- {
- // create an effect control, no need to delete or cleanupstack
- TShwAutoPtr< CShwEffectControl > tmp =
- CShwEffectControl::NewL(
- iStubEffectManager, *iStubVisualList, *iStubMediaList, TSize( 320, 240 ) );
- // need to set the event queue
- tmp->SetEventQueue( this );
- // perform the second phase of construction
- TShwEventInitialize initEvent;
- tmp->NotifyL( &initEvent );
- // check that we did not get an event
- EUNIT_ASSERT_EQUALS_DESC( 0, iEvents.Count(), "we did not yet get new event");
-
- // tell the stub context that the request has error
- gThumbnailContextRequestCount = KErrCorrupt;
- // tell the media list stub to notify that first thumbnail is loaded
- iStubMediaList->NotifyAttributesAvailableL( iStubMediaList->iFocus );
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToView* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
- // delete and remove the event
- delete iEvents[ 0 ];
- iEvents.Remove( 0 );
- // tmp gets deleted here, EUnit checks for memory
- }
-
-// test HandleError call before first thumbnail
- // tell the stub context that its request is not yet completed
- gThumbnailContextRequestCount = 1;
- {
- // create an effect control, no need to delete or cleanupstack
- TShwAutoPtr< CShwEffectControl > tmp =
- CShwEffectControl::NewL(
- iStubEffectManager, *iStubVisualList, *iStubMediaList, TSize( 320, 240 ) );
- // need to set the event queue
- tmp->SetEventQueue( this );
- // perform the second phase of construction
- TShwEventInitialize initEvent;
- tmp->NotifyL( &initEvent );
- // check that we did not get an event
- EUNIT_ASSERT_EQUALS_DESC( 0, iEvents.Count(), "we did not yet get new event");
-
- // tell the stub context that the request has error
- gThumbnailContextRequestCount = KErrCorrupt;
- // tell the media list stub to notify that there was an error
- iStubMediaList->NotifyError( KErrNoMemory );
-
- // start async wait loop
- iWait.Start();
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToView* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
- // delete and remove the event
- delete iEvents[ 0 ];
- iEvents.Remove( 0 );
- // tmp gets deleted here, EUnit checks for memory
- }
-
-// test HandleError call after first thumbnail
- // tell the stub context that its request is completed
- gThumbnailContextRequestCount = KErrNone;
- {
- // create an effect control, no need to delete or cleanupstack
- TShwAutoPtr< CShwEffectControl > tmp =
- CShwEffectControl::NewL(
- iStubEffectManager, *iStubVisualList, *iStubMediaList, TSize( 320, 240 ) );
- // need to set the event queue
- tmp->SetEventQueue( this );
- // perform the second phase of construction
- TShwEventInitialize initEvent;
- tmp->NotifyL( &initEvent );
- // check that we did not get an event
- EUNIT_ASSERT_EQUALS_DESC( 0, iEvents.Count(), "we did not yet get new event");
-
- // start async wait loop
- iWait.Start();
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToView* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
- // delete and remove the event
- delete iEvents[ 0 ];
- iEvents.Remove( 0 );
-
- // tell the stub context that its request is not yet completed
- gThumbnailContextRequestCount = 1;
- // send start view
- TShwEventStartView startView( 123 );
- tmp->NotifyL( &startView );
-
- // tell the stub context that the request has error
- gThumbnailContextRequestCount = KErrCorrupt;
- // tell the media list stub to notify that there was an error
- iStubMediaList->NotifyError( KErrNoMemory );
-
- // start async wait loop
- iWait.Start();
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToAdvance* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
- // delete and remove the event
- delete iEvents[ 0 ];
- iEvents.Remove( 0 );
- // tmp gets deleted here, EUnit checks for memory
- }
-
-// test HandleItemRemovedL call
- // tell the stub context that its request is not completed
- gThumbnailContextRequestCount = KErrNone;
- {
- // create an effect control, no need to delete or cleanupstack
- TShwAutoPtr< CShwEffectControl > tmp =
- CShwEffectControl::NewL(
- iStubEffectManager, *iStubVisualList, *iStubMediaList, TSize( 320, 240 ) );
- // need to set the event queue
- tmp->SetEventQueue( this );
- // perform the second phase of construction
- TShwEventInitialize initEvent;
- tmp->NotifyL( &initEvent );
- // check that we did not get an event
- EUNIT_ASSERT_EQUALS_DESC( 0, iEvents.Count(), "we did not yet get new event");
-
- // start async wait loop
- iWait.Start();
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventReadyToView* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
- // delete and remove the event
- delete iEvents[ 0 ];
- iEvents.Remove( 0 );
-
- // tell medialist stub to call HandleItemRemovedL
- iStubMediaList->NotifyItemRemoved( 0, 1 );
- // this time the list was not empty so nothing done
- // check that we got no event
- EUNIT_ASSERT_EQUALS_DESC( 0, iEvents.Count(), "we got no event");
- // remove items from stub medialist
- iStubMediaList->iCount = 0;
- // tell medialist stub to call HandleItemRemovedL
- iStubMediaList->NotifyItemRemoved( 0, 1 );
-
- // check that we got the event
- EUNIT_ASSERT_EQUALS_DESC( 1, iEvents.Count(), "we got an event");
- // this was the first time the event was received so we get init complete event
- EUNIT_ASSERT_DESC(
- dynamic_cast< TShwEventFatalError* >( iEvents[ 0 ] ),
- "TShwEventReadyToView received" );
- // delete and remove the event
- delete iEvents[ 0 ];
- iEvents.Remove( 0 );
-
- // tell medialist stub to call HandleItemRemovedL again
- iStubMediaList->NotifyItemRemoved( 0, 1 );
- // this does nothing as the thumbnail loader was deleted and all contexts removed
- // check that we got no event
- EUNIT_ASSERT_EQUALS_DESC( 0, iEvents.Count(), "we got an event");
- // tmp gets deleted here, EUnit checks for memory
- }
-
- // test also leave on SendEventL
- // tell the stub context that its request is not completed
- gThumbnailContextRequestCount = KErrNone;
- {
- // create an effect control, no need to delete or cleanupstack
- TShwAutoPtr< CShwEffectControl > tmp =
- CShwEffectControl::NewL(
- iStubEffectManager, *iStubVisualList, *iStubMediaList, TSize( 320, 240 ) );
- // need to set the event queue
- tmp->SetEventQueue( this );
- // perform the second phase of construction
- TShwEventInitialize initEvent;
- tmp->NotifyL( &initEvent );
- // start async wait loop
- iWait.Start();
- // remove items from stub medialist
- iStubMediaList->iCount = 0;
- // tell SendEventL to leave
- gSendEventLeaveCode = KErrNoMemory;
- // tell medialist stub to call HandleItemRemovedL
- TRAPD( error, iStubMediaList->NotifyItemRemoved( 0, 1 ) );
- // check that engine did panic
- EUNIT_ASSERT_DESC( gNShwEnginePanicCalled, "Engine panic was called" );
- EUNIT_ASSERT_EQUALS_DESC(
- NShwEngine::EEngineFatalError, error, "panic code was fatal error");
- }
-
- }
-
-
-// TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
- T_CShwEffectControl,
- "Test suite for CShwEffectControl",
- "UNIT" )
-
-EUNIT_ALLOC_TEST(
- "Construct-destruct test",
- "CShwEffectControl",
- "CShwEffectControl",
- "FUNCTIONALITY",
- EmptySetupL, TestConstructionL, Teardown ) // needs to have teardown as alloc test
-
-EUNIT_ALLOC_TEST(
- "test TransitionCompleted",
- "CShwEffectControl",
- "TransitionCompleted",
- "FUNCTIONALITY",
- SetupL, TransitionCompletedL, Teardown )
-
-EUNIT_NOT_DECORATED_TEST( // cant be decorated as active objects
- "test TransitionCompleted",
- "CShwEffectControl",
- "TransitionCompleted",
- "FUNCTIONALITY",
- SetupL, TransitionCompleted2L, Teardown )
-
-EUNIT_NOT_DECORATED_TEST( // cant be decorated as active objects
- "test NotifyL",
- "CShwEffectControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, NotifyLL, Teardown )
-
-EUNIT_NOT_DECORATED_TEST( // cant be decorated as active objects
- "slow image load",
- "CShwEffectControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, SlowImageLoadL, Teardown )
-
-EUNIT_NOT_DECORATED_TEST( // cant be decorated as active objects
- "slow image load",
- "CShwEffectControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, SlowImageLoad2L, Teardown )
-
-EUNIT_TEST(
- "HandleFocusChangedL",
- "CShwEffectControl",
- "HandleFocusChangedL",
- "FUNCTIONALITY",
- SetupL, HandleFocusChangedL, Teardown )
-
-EUNIT_TEST(
- "Thumbnail loading",
- "CShwThumbnailContext",
- "multiple",
- "FUNCTIONALITY",
- SetupL, TestThumbnailLoadingL, Teardown )
-
-EUNIT_TEST(
- "Thumbnail errors",
- "CShwThumbnailLoader",
- "multiple",
- "FUNCTIONALITY",
- EmptySetupL, TestErrorsInThumbnailLoadingL, Teardown )
-
-EUNIT_END_TEST_TABLE
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshweffectcontrol/t_cshweffectcontrol.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for effect control for the slideshow
- *
-*/
-
-
-
-
-#ifndef __T_CSHWEFFECTCONTROL_H__
-#define __T_CSHWEFFECTCONTROL_H__
-
-// EXTERNAL INCLUDES
-#include <CEUnitTestSuiteClass.h>
-#include <EUnitDecorators.h>
-
-
-// INTERNAL INCLUDES
-#include "tmglxvisuallist_adapter.h"
-#include "tmglxmedialist_stub.h"
-#include "tmshweffectmanager_adapter.h"
-#include "shweventqueue.h"
-
-// FORWARD DECLARATIONS
-class CShwEffectControl;
-
-// CLASS DEFINITION
-/**
- * EUnit test suite for CShwEffectControl
- *
- */
-NONSHARABLE_CLASS( T_CShwEffectControl )
- : public CEUnitTestSuiteClass,
- public MGlxMediaList_Stub_Observer,
- public MGlxVisualList_Observer,
- public MShwEffectManager_Observer,
- public MShwEventQueue
- {
- public: // Constructors and destructors
-
- /**
- * Two phase construction
- */
- static T_CShwEffectControl* NewL();
- static T_CShwEffectControl* NewLC();
- /**
- * Destructor
- */
- ~T_CShwEffectControl();
-
- private: // Constructors and destructors
-
- T_CShwEffectControl();
- void ConstructL();
-
- public: // from MGlxMediaList_Stub_Observer, MGlxVisualList_Observer, MShwEffectManager_Observer, MShwEventQueue
-
- void MGlxMediaList_MethodCalled( TMGlxMediaListMethodId aMethodId );
- void MGlxVisualList_MethodCalled( TMGlxVisualListMethodId aMethodId );
- void MShwEffectManager_MethodCalled( TMShwEffectManagerMethodId aMethodId );
- void SendEventL( MShwEvent* aEvent );
-
- private: // New methods
-
- void EmptySetupL();
- void SetupL();
- void Teardown();
-
- void TestConstructionL();
- void TransitionCompletedL();
- void TransitionCompleted2L();
- void NotifyLL();
- void SlowImageLoadL();
- void SlowImageLoad2L();
- void HandleFocusChangedL();
- void TestThumbnailLoadingL();
- void TestErrorsInThumbnailLoadingL();
-
- private: // Data
-
- CShwEffectControl* iCShwEffectControl;
-
- TMGlxVisualList_Adapter* iStubVisualList;
- TMGlxMediaList_Stub* iStubMediaList;
-
- TMShwEffectManager_Adapter iStubEffectManager;
-
- CActiveSchedulerWait iWait;
-
- RArray<TInt> iVisualListCalls;
- RArray<TInt> iMediaListCalls;
- RArray<TInt> iEffectCalls;
- RArray<MShwEvent*> iEvents;
-
- EUNIT_DECLARE_TEST_TABLE;
-
- };
-
-#endif // __T_CSHWEFFECTCONTROL_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/t_cshweffectcontrol/t_cshweffectcontrol_dllmain.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for effect control for the slideshow
- *
-*/
-
-
-
-
-// CLASS HEADER
-#include "T_CShwEffectControl.h"
-
-// EXTERNAL INCLUDES
-#include <CEUnitTestSuite.h>
-
-EXPORT_C MEUnitTest* CreateTestSuiteL()
- {
- return T_CShwEffectControl::NewL();
- }
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshweffects/t_cshweffects.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,321 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for effect for the slideshow
- *
-*/
-
-
-
-// CLASS HEADER
-#include "t_cshweffects.h"
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/EUnitMacros.h>
-#include <digia/eunit/EUnitDecorators.h>
-
-#include <uiacceltk/huiEnv.h>
-#include <uiacceltk/huiDisplayCoeControl.h>
-#include <uiacceltk/huiImageVisual.h>
-#include <uiacceltk/huiControl.h>
-
-// INTERNAL INCLUDES
-#include "shweffect.h"
-#include "shwresourceutility.h"
-#include "shwslideshowenginepanic.h"
-
-// -----------------------------------------------------------------------------
-// Stub for NShwEngine::Panic -->
-// -----------------------------------------------------------------------------
-TBool gNShwEnginePanicCalled = EFalse;
-namespace NShwEngine
- {
- extern void Panic( TShwEnginePanic aPanic )
- {
- gNShwEnginePanicCalled = ETrue;
- // in test situation just do a leave
- User::Leave( aPanic );
- }
- }
-// -----------------------------------------------------------------------------
-// <-- Stub for NShwEngine::Panic
-// -----------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------
-// Stub for LocalisedNameL >>>
-// -----------------------------------------------------------------------------
-TPtrC gNameForEffect( 0, 0 );
-_LIT( T_KZoomPanName, "ZoomAndPan" );
-_LIT( T_KCrossfadeName, "Crossfade" );
-HBufC* ShwResourceUtility::LocalisedNameL( TInt aResourceId )
- {
- if( aResourceId == R_SHW_EFFECT_ZOOM_AND_PAN )
- {
- gNameForEffect.Set( T_KZoomPanName() );
- return T_KZoomPanName().AllocL();
- }
- else if( aResourceId == R_SHW_EFFECT_CROSS_FADE )
- {
- gNameForEffect.Set( T_KCrossfadeName() );
- return T_KCrossfadeName().AllocL();
- }
- gNameForEffect.Set( KNullDesC );
- return NULL;
- }
-// -----------------------------------------------------------------------------
-// <<< Stub for LocalisedNameL
-// -----------------------------------------------------------------------------
-
-class CTestControl : public CHuiControl
- {
- public:
- static CTestControl* NewL( CHuiEnv& aEnv )
- {
- return new (ELeave) CTestControl( aEnv );
- }
- CTestControl( CHuiEnv& aEnv )
- : CHuiControl( aEnv )
- {
- }
- };
-
-// CONSTRUCTION
-T_CShwEffects* T_CShwEffects::NewLC( T_ShwEffectFactoryL* aEffectFactory )
- {
- T_CShwEffects* self = new( ELeave ) T_CShwEffects;
- CleanupStack::PushL( self );
-
- self->iEffectFactory = aEffectFactory;
- self->ConstructL();
-
- return self;
- }
-
-// Destructor (virtual by CBase)
-T_CShwEffects::~T_CShwEffects()
- {
- }
-
-// Default constructor
-T_CShwEffects::T_CShwEffects()
- {
- }
-
-// Second phase construct
-void T_CShwEffects::ConstructL()
- {
- // The ConstructL from the base class CEUnitTestSuiteClass must be called.
- // It generates the test case table.
- CEUnitTestSuiteClass::ConstructL();
- }
-
-// METHODS
-
-void T_CShwEffects::EmptyL()
- {
- }
-
-void T_CShwEffects::SetupL()
- {
- // set name for the effect verification
- gNameForEffect.Set( KNullDesC );
-
- // create HUI env
- iEnv = CHuiEnv::NewL();
- // create Display
- iCoeDisplay = CHuiDisplayCoeControl::NewL( *iEnv, TRect( 0, 0, 100, 100 ) );
-
- // create control
- iControl = CTestControl::NewL( *iEnv );
-
- // create the visual, ownership goes to iCoeDisplay
- iVisual = CHuiImageVisual::AddNewL( *iControl );
-
- // call the factory method to construct the effect
- iEffect = (*iEffectFactory)();
- }
-
-void T_CShwEffects::Teardown()
- {
- // delete effect
- delete iEffect;
- iEffect = NULL;
-
- // delete control, it deletes the visual
- delete iControl;
- iControl = NULL;
-
- // delete display
- delete iCoeDisplay;
- iCoeDisplay = NULL;
-
- // delete env last
- delete iEnv;
- iEnv = NULL;
- }
-
-void T_CShwEffects::T_ConstructorL()
- {
- // call the factory method to construct the effect
- iEffect = (*iEffectFactory)();
-
- EUNIT_ASSERT_DESC( iEffect, "Effect is constructed");
- // EUnit checks that memory is in balance
- // teardown deletes the object
- }
-
-void T_CShwEffects::T_PrepareViewLL()
- {
- // initialize with null lists but proper screen
- iEffect->InitializeL(
- NULL,
- NULL,
- NULL,
- TSize( 320, 240 ) );
- // call prepare view with proper size
- TSize size = iEffect->PrepareViewL( iVisual, TSize( 320, 240 ) );
- // verify that the thumbnail size is not 0,0
- EUNIT_ASSERT_GREATER_DESC(
- size.iWidth, 0, "thumbnail size is set");
- EUNIT_ASSERT_GREATER_DESC(
- size.iHeight, 0, "thumbnail size is set");
-
- // call prepare view with unknown size
- size = iEffect->PrepareViewL( iVisual, TSize( KErrNotFound, KErrNotFound ) );
- // verify that the thumbnail size is not 0,0
- EUNIT_ASSERT_GREATER_DESC(
- size.iWidth, 0, "thumbnail size is set");
- EUNIT_ASSERT_GREATER_DESC(
- size.iHeight, 0, "thumbnail size is set");
- }
-
-void T_CShwEffects::T_EnterViewLL()
- {
- MGlxLayout* layout = iEffect->EnterViewL( iVisual, 123, 345 );
- EUNIT_ASSERT_DESC( layout, "Layout is not NULL");
- }
-
-void T_CShwEffects::T_ExitViewL()
- {
- iEffect->ExitView( iVisual );
- // nothing to really verify what the effect is supposed to do
- EUNIT_ASSERT_DESC( iEffect, "Effect is constructed");
- }
-
-void T_CShwEffects::T_EnterTransitionLL()
- {
- MGlxLayout* layout = iEffect->EnterTransitionL( iVisual, 321 );
- EUNIT_ASSERT_DESC( layout, "Layout is not NULL");
- }
-
-void T_CShwEffects::T_ExitTransitionL()
- {
- iEffect->ExitTransition( iVisual );
- // nothing to really verify what the effect is supposed to do
- EUNIT_ASSERT_DESC( iEffect, "Effect is constructed");
- }
-
-void T_CShwEffects::T_PauseLL()
- {
- iEffect->PauseL();
- // nothing to really verify what the effect is supposed to do
- EUNIT_ASSERT_DESC( iEffect, "Effect is constructed");
- }
-
-void T_CShwEffects::T_ResumeL()
- {
- iEffect->Resume();
- // nothing to really verify what the effect is supposed to do
- EUNIT_ASSERT_DESC( iEffect, "Effect is constructed");
- }
-
-void T_CShwEffects::T_EffectInfoL()
- {
- // get effect info
- TShwEffectInfo info = iEffect->EffectInfo();
- // assert that the info contains some values
- EUNIT_ASSERT_EQUALS_DESC( info.iName, gNameForEffect, "Info has correct name");
- }
-
-// TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
- T_CShwEffects,
- "Test suite for MShwEffect",
- "UNIT" )
-
-EUNIT_ALLOC_TEST(
- "Constructor test",
- "MShwEffect",
- "Constructor test",
- "FUNCTIONALITY",
- EmptyL, T_ConstructorL, Teardown ) // need teardown since alloc test
-
-EUNIT_TEST(
- "PrepareViewL",
- "CShwCrossFadeEffect",
- "PrepareViewL",
- "FUNCTIONALITY",
- SetupL, T_PrepareViewLL, Teardown)
-
-EUNIT_TEST(
- "EnterViewL",
- "CShwCrossFadeEffect",
- "EnterViewL",
- "FUNCTIONALITY",
- SetupL, T_EnterViewLL, Teardown)
-
-EUNIT_TEST(
- "ExitView",
- "CShwCrossFadeEffect",
- "ExitView",
- "FUNCTIONALITY",
- SetupL, T_ExitViewL, Teardown)
-
-EUNIT_TEST(
- "EnterTransitionL",
- "CShwCrossFadeEffect",
- "EnterTransitionL",
- "FUNCTIONALITY",
- SetupL, T_EnterTransitionLL, Teardown)
-
-EUNIT_TEST(
- "ExitTransition",
- "CShwCrossFadeEffect",
- "ExitTransition",
- "FUNCTIONALITY",
- SetupL, T_ExitTransitionL, Teardown)
-
-EUNIT_TEST(
- "PauseL",
- "CShwCrossFadeEffect",
- "PauseL",
- "FUNCTIONALITY",
- SetupL, T_PauseLL, Teardown)
-
-EUNIT_TEST(
- "Resume",
- "CShwCrossFadeEffect",
- "Resume",
- "FUNCTIONALITY",
- SetupL, T_ResumeL, Teardown)
-
-EUNIT_TEST(
- "EffectInfo",
- "CShwCrossFadeEffect",
- "EffectInfo",
- "FUNCTIONALITY",
- SetupL, T_EffectInfoL, Teardown)
-
-EUNIT_END_TEST_TABLE
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshweffects/t_cshweffects.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for control for the slideshow
- *
-*/
-
-
-
-
-#ifndef __T_CSHWEFFECT_H__
-#define __T_CSHWEFFECT_H__
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/CEUnitTestSuiteClass.h>
-#include <digia/eunit/EUnitDecorators.h>
-
-// INTERNAL INCLUDES
-
-// FORWARD DECLARATIONS
-class MShwEffect;
-class CHuiEnv;
-class CHuiDisplayCoeControl;
-class CHuiControl;
-class CHuiImageVisual;
-
-// TYPE DEFINITIONS
-typedef MShwEffect* (T_ShwEffectFactoryL)();
-
-// CLASS DEFINITION
-/**
- * EUnit test suite for slideshow effects
- */
-NONSHARABLE_CLASS( T_CShwEffects )
- : public CEUnitTestSuiteClass
- {
- public: // Constructors and destructors
-
- /**
- * Two phase construction
- */
- static T_CShwEffects* NewLC( T_ShwEffectFactoryL* aEffectFactory );
-
- /**
- * Destructor
- */
- ~T_CShwEffects();
-
- private: // Constructors and destructors
-
- T_CShwEffects();
- void ConstructL();
-
- private: // New methods
-
- void EmptyL();
- void SetupL();
- void Teardown();
-
- void T_ConstructorL();
- void T_PrepareViewLL();
- void T_EnterViewLL();
- void T_ExitViewL();
- void T_EnterTransitionLL();
- void T_ExitTransitionL();
- void T_PauseLL();
- void T_ResumeL();
- void T_EffectInfoL();
-
- private: // Data
-
- T_ShwEffectFactoryL* iEffectFactory;
- MShwEffect* iEffect;
-
- CHuiEnv* iEnv;
- CHuiDisplayCoeControl* iCoeDisplay;
- CHuiControl* iControl;
- CHuiImageVisual* iVisual;
-
-
- EUNIT_DECLARE_TEST_TABLE;
-
- };
-
-#endif // __T_CSHWEFFECT_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/t_cshweffects/t_cshweffects_dllmain.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for control for the slideshow
- *
-*/
-
-
-
-
-// CLASS HEADER
-#include "t_cshweffects.h"
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/CEUnitTestSuite.h>
-
-// CLASS UNDER TEST
-#include "shwcrossfadeeffect.h"
-#include "shwzoomandpaneffect.h"
-
-MShwEffect* CreateCrossfadeL()
- {
- // create the normal zoom and pan
- MShwEffect* eff = CShwCrossFadeEffect::NewLC();
- CleanupStack::Pop( eff );
- return eff;
- }
-
-MShwEffect* CreateZoomAndPanL()
- {
- MShwEffect* eff = CShwZoomAndPanEffect::NewLC();
- CleanupStack::Pop( eff );
- return eff;
- }
-
-EXPORT_C MEUnitTest* CreateTestSuiteL()
- {
- // Create a root suite to contain tests for both the effects
- CEUnitTestSuite* rootSuite =
- CEUnitTestSuite::NewLC( _L("ShwEffect Unit Tests") );
-
- // Note that NewLC leaves the object in the cleanupstack.
- rootSuite->AddL( T_CShwEffects::NewLC( &CreateCrossfadeL ) );
- CleanupStack::Pop(); // T_CShwEffects instance
-
- rootSuite->AddL( T_CShwEffects::NewLC( &CreateZoomAndPanL ) );
- CleanupStack::Pop(); // T_CShwEffects instance
-
- CleanupStack::Pop( rootSuite ); // rootSuite instance
-
- return rootSuite;
- }
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshwmusiccontrol/t_cshwmusiccontrol.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,527 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for music control for the slideshow
- *
-*/
-
-
-
-// CLASS HEADER
-#include "t_cshwmusiccontrol.h"
-
-// EXTERNAL INCLUDES
-#include <EUnitMacros.h>
-#include <EUnitDecorators.h>
-
-// INTERNAL INCLUDES
-#include "shwevent.h"
-
-namespace
- {
- _LIT(KFileName, "c:\\knightrider.mp3");
- }
-
-// CONSTRUCTION
-T_CShwMusicControl* T_CShwMusicControl::NewL()
- {
- T_CShwMusicControl* self = T_CShwMusicControl::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-T_CShwMusicControl* T_CShwMusicControl::NewLC()
- {
- T_CShwMusicControl* self = new( ELeave ) T_CShwMusicControl;
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-
-
-// Destructor (virtual by CBase)
-T_CShwMusicControl::~T_CShwMusicControl()
- {
- }
-
-
-
-// Default constructor
-T_CShwMusicControl::T_CShwMusicControl()
- :iMusicOn(EFalse),
- iCurrentVolume(KErrNotFound),
- iMaxVolume(KErrNotFound),
- iPrevVolume(KErrNotFound)
- {
- }
-
-// Second phase construct
-void T_CShwMusicControl::ConstructL()
- {
- // The ConstructL from the base class CEUnitTestSuiteClass must be called.
- // It generates the test case table.
- CEUnitTestSuiteClass::ConstructL();
- }
-
-void T_CShwMusicControl::SendEventL(MShwEvent* aEvent)
- {
- iEvent = aEvent->CloneLC();
- CleanupStack::Pop( iEvent );
- }
-
-TBool gMusicOnCalled = EFalse;
-void T_CShwMusicControl::MusicOnL()
- {
- EUNIT_PRINT(_L("Music is ON"));
- iMusicOn = ETrue;
- gMusicOnCalled = ETrue;
- // leave if error code set
- User::LeaveIfError( iLeaveInObserver );
- }
-
-TBool gMusicOffCalled = EFalse;
-void T_CShwMusicControl::MusicOff()
- {
- EUNIT_PRINT(_L("Music is OFF"));
- iMusicOn = EFalse;
- gMusicOffCalled = ETrue;
- }
-
-
-void T_CShwMusicControl::MusicVolume(TInt aCurrentVolume, TInt aMaxVolume)
- {
- iPrevVolume = iCurrentVolume;
- iCurrentVolume = aCurrentVolume;
- iMaxVolume = aMaxVolume;
- EUNIT_PRINT(_L("current volume %d"),aCurrentVolume);
- if(iWait.IsStarted())
- {
- iWait.AsyncStop();
- }
- }
-
-void T_CShwMusicControl::ErrorWithTrackL( TInt aErrorCode )
- {
- iErrorCode = aErrorCode;
- }
-
-void T_CShwMusicControl::Empty()
- {
- }
-
-void T_CShwMusicControl::SetupL()
- {
- // reset current and max volume
- iCurrentVolume = KErrNotFound;
- iMaxVolume = KErrNotFound;
- // reset error code
- iErrorCode = KErrNone;
- // reset leave flag
- iLeaveInObserver = KErrNone;
- // reset state flags
- gMusicOnCalled = EFalse;
- gMusicOffCalled = EFalse;
-
- iCShwMusicControl = CShwMusicControl::NewL( *this, KFileName );
- // set the event queue - inherited from parent CShwEventPublisherBase
- iCShwMusicControl->SetEventQueue(this);
- }
-
-
-void T_CShwMusicControl::Teardown()
- {
- delete iCShwMusicControl;
- iCShwMusicControl = NULL;
-
- delete iEvent;
- iEvent = NULL;
- }
-
-void T_CShwMusicControl::TestConstructL()
- {
- EUNIT_PRINT(_L("CShwMusicControl::NewL"));
- // create
- iCShwMusicControl = CShwMusicControl::NewL(*this, KFileName);
- // set the event queue
- iCShwMusicControl->SetEventQueue(this);
- // test that object exists
- EUNIT_ASSERT_DESC(iCShwMusicControl, "object created");
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNone, iErrorCode, "if there was error, make sure track file exists");
- // delete music control
- delete iCShwMusicControl;
- iCShwMusicControl = NULL;
- // EUnit checks for memory leaks
- }
-
-void T_CShwMusicControl::T_NotifyLL()
- {
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNone, iErrorCode, "if there was error, make sure track file exists");
- // send start event
- TShwEventStart start;
- iCShwMusicControl->NotifyL(&start);
- // Need to let the scheduler loop to get first volume callback
- iWait.Start(); // Wait for notification of volume
- EUNIT_ASSERT(iMusicOn == ETrue);
- EUNIT_ASSERT(iCurrentVolume != KErrNotFound && iMaxVolume != KErrNotFound);
- }
-
-void T_CShwMusicControl::T_NotifyL1L()
- {
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNone, iErrorCode, "if there was error, make sure track file exists");
- // if should evaluate false: if (event)
- MShwEvent* iParam1 = NULL;
- iCShwMusicControl->NotifyL(iParam1);
-
- EUNIT_ASSERT_DESC( !iEvent, "event was not received" );
-
- // test also HandlePropertyL with unsupported property
- iCShwMusicControl->HandlePropertyL( EPbPropertyMute, 0, 0 );
- // test that volume was not send
- EUNIT_ASSERT( iCurrentVolume == KErrNotFound && iMaxVolume == KErrNotFound );
- }
-
-void T_CShwMusicControl::T_NotifyL2L()
- {
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNone, iErrorCode, "if there was error, make sure track file exists");
- // send start event
- TShwEventStart start;
- iCShwMusicControl->NotifyL( &start );
- // Need to let the scheduler loop to get first volume callback
- iWait.Start();
- // check that we got the volume
- EUNIT_ASSERT(iCurrentVolume != KErrNotFound && iMaxVolume != KErrNotFound);
-
- // send pause
- TShwEventPause pause;
- iCShwMusicControl->NotifyL( &pause );
- EUNIT_ASSERT( iMusicOn == EFalse );
-
- // send resume
- TShwEventResume resume;
- iCShwMusicControl->NotifyL( &resume );
-
- EUNIT_ASSERT(iMusicOn != EFalse );
- }
-
-void T_CShwMusicControl::T_NotifyL3L()
- {
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNone, iErrorCode, "if there was error, make sure track file exists");
- // send resume before start
- TShwEventResume resume;
- iCShwMusicControl->NotifyL( &resume );
- EUNIT_ASSERT_DESC( iMusicOn == ETrue, "music is on" );
-
- // Send pause before start, does not pause
- TShwEventPause pause;
- iCShwMusicControl->NotifyL( &pause );
- EUNIT_ASSERT_DESC( iMusicOn == EFalse, "music is off" );
-
- // send start event
- TShwEventStart start;
- iCShwMusicControl->NotifyL( &start );
- // Need to let the scheduler loop to get first volume callback
- iWait.Start();
-
- // Second subsequent pause request
- iCShwMusicControl->NotifyL( &pause );
- EUNIT_ASSERT_DESC( iMusicOn == EFalse, "music is now paused" );
- }
-
-void T_CShwMusicControl::T_NotifyL4L()
- {
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNone, iErrorCode, "if there was error, make sure track file exists");
- // send start event
- TShwEventStart start;
- iCShwMusicControl->NotifyL(&start);
- // Need to let the scheduler loop to get first volume callback
- iWait.Start();
-
- // if should evaluate false: if (event)
- TShwEventVolumeDown vol;
- iCShwMusicControl->NotifyL(&vol);
-
- // Need to let the scheduler loop to get another volume callback
- iWait.Start();
- EUNIT_ASSERT_GREATER_DESC( iPrevVolume, iCurrentVolume, "volume should decrease" );
- EUNIT_ASSERT_NOT_EQUALS( KErrNotFound, iMaxVolume );
-
- iMaxVolume = KErrNotFound;
- }
-
-void T_CShwMusicControl::T_NotifyL5L()
- {
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNone, iErrorCode, "if there was error, make sure track file exists");
- // send start event
- TShwEventStart start;
- iCShwMusicControl->NotifyL(&start);
- // Need to let the scheduler loop to get first volume callback
- iWait.Start();
-
- // if should evaluate false: if (event)
- TShwEventVolumeUp vol;
- iCShwMusicControl->NotifyL(&vol);
-
- // Need to let the scheduler loop to get another volume callback
- iWait.Start();
- EUNIT_ASSERT_GREATER_DESC( iCurrentVolume, iPrevVolume, "volume should increase" );
- EUNIT_ASSERT_NOT_EQUALS( KErrNotFound, iMaxVolume );
- iMaxVolume = KErrNotFound;
- }
-
-void T_CShwMusicControl::T_ExtendedPlayL()
- {
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNone, iErrorCode, "if there was error, make sure track file exists");
-
- TShwEventStart start;
- iCShwMusicControl->NotifyL( &start );
-
- if (!iTimer)
- {
- iTimer = CPeriodic::NewL(EPriorityNormal);
- }
-
- // play for 10 seconds
- const TInt KPlayPeriod = 10 * 1000000; // Microseconds
- TCallBack callBack(StopPlaying, this);
- iTimer->Start(KPlayPeriod, KPlayPeriod, callBack);
-
- iPlayWait.Start();
-
- delete iTimer;
- iTimer = NULL;
-
- TShwEventPause pause;
- iCShwMusicControl->NotifyL(&pause);
- EUNIT_ASSERT(iMusicOn == EFalse);
-
- }
-
-TInt T_CShwMusicControl::StopPlaying(TAny* aMusicControl)
- {
- T_CShwMusicControl* self = reinterpret_cast<T_CShwMusicControl*>(aMusicControl);
-
- if(self->iPlayWait.IsStarted())
- {
- self->iPlayWait.AsyncStop();
- }
-
- return KErrNone;
- }
-
-void T_CShwMusicControl::T_ErrorInFileL()
- {
- // need to reset state as the setup is empty
- gMusicOnCalled = EFalse;
- // file that does not exist
- _LIT( KErrorFileName, "C:\\juubaduuba.mp123" );
- // create
- iCShwMusicControl = CShwMusicControl::NewL( *this, KErrorFileName );
- // set the event queue
- iCShwMusicControl->SetEventQueue( this );
- // test that object exists
- EUNIT_ASSERT_DESC(iCShwMusicControl, "object created");
-
- // test that error was called
- // test that no error
- EUNIT_ASSERT_EQUALS_DESC(
- KErrNotFound, iErrorCode, "track should not exist");
-
- // test that start is a no-op
- TShwEventStart start;
- iCShwMusicControl->NotifyL( &start );
-
- // test that music is off
- EUNIT_ASSERT_DESC( gMusicOnCalled == EFalse, "music on was not called" );
-
- // delete music control
- delete iCShwMusicControl;
- iCShwMusicControl = NULL;
- // EUnit checks for memory leaks
- }
-
-void T_CShwMusicControl::T_LeaveInObserverL()
- {
- // make observer leave
- iLeaveInObserver = KErrCorrupt;
-
- // send start event
- TShwEventStart start;
- iCShwMusicControl->NotifyL( &start );
-
- // test that music is off
- EUNIT_ASSERT_DESC( iMusicOn == EFalse, "music is off");
- EUNIT_ASSERT_DESC( gMusicOnCalled == ETrue, "music on was called (and it did leave)" );
- EUNIT_ASSERT_DESC( gMusicOffCalled == ETrue, "music off was called" );
- // reset flags
- gMusicOnCalled = EFalse;
- gMusicOffCalled = EFalse;
-
- // make observer not leave
- iLeaveInObserver = KErrNone;
-
- // resend start event
- iCShwMusicControl->NotifyL( &start );
- // test that music is on
- EUNIT_ASSERT_DESC( iMusicOn == ETrue, "music is on");
- EUNIT_ASSERT_DESC( gMusicOnCalled == ETrue, "music on was called" );
- EUNIT_ASSERT_DESC( gMusicOffCalled == EFalse, "music off was not called" );
- // reset flags
- gMusicOnCalled = EFalse;
- gMusicOffCalled = EFalse;
-
- // send pause
- TShwEventPause pause;
- iCShwMusicControl->NotifyL( &pause );
- EUNIT_ASSERT_DESC( iMusicOn == EFalse, "music is off" );
- EUNIT_ASSERT_DESC( gMusicOnCalled == EFalse, "music on was not called" );
- EUNIT_ASSERT_DESC( gMusicOffCalled == ETrue, "music off was called" );
- // reset flags
- gMusicOnCalled = EFalse;
- gMusicOffCalled = EFalse;
-
- // make observer leave
- iLeaveInObserver = KErrCorrupt;
-
- // send resume
- TShwEventResume resume;
- iCShwMusicControl->NotifyL( &resume );
- EUNIT_ASSERT_DESC( iMusicOn == EFalse, "music is off" );
- EUNIT_ASSERT_DESC( gMusicOnCalled == ETrue, "music on was called (and it did leave)" );
- EUNIT_ASSERT_DESC( gMusicOffCalled == ETrue, "music off was called" );
- // reset flags
- gMusicOnCalled = EFalse;
- gMusicOffCalled = EFalse;
-
- // send volume up
- TShwEventVolumeUp vol;
- iCShwMusicControl->NotifyL( &vol );
- EUNIT_ASSERT_DESC( gMusicOnCalled == EFalse, "music on was not called" );
- EUNIT_ASSERT_DESC( gMusicOffCalled == EFalse, "music off was not called" );
- // reset flags
- gMusicOnCalled = EFalse;
- gMusicOffCalled = EFalse;
-
- // make observer not leave
- iLeaveInObserver = KErrNone;
-
- // send resume
- iCShwMusicControl->NotifyL( &resume );
- EUNIT_ASSERT_DESC( iMusicOn == ETrue, "music is on" );
- EUNIT_ASSERT_DESC( gMusicOnCalled == ETrue, "music on was called" );
- EUNIT_ASSERT_DESC( gMusicOffCalled == EFalse, "music off was not called" );
- }
-
-// TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
- T_CShwMusicControl,
- "Test suite for CShwMusicControl",
- "UNIT" )
-
-/*
- Commented out as MPX crashes with Kern-exec 0
-EUNIT_ALLOC_TEST(
- "Constructor test",
- "CShwMusicControl",
- "NewL",
- "FUNCTIONALITY",
- Empty, TestConstructL, Teardown )
-*/
-// these cant be decorated as the EUnit
-// scheduler does not implement Error method
-EUNIT_NOT_DECORATED_TEST(
- "NotifyL - test 0",
- "CShwMusicControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, T_NotifyLL, Teardown)
-
-EUNIT_NOT_DECORATED_TEST(
- "NotifyL - test 1",
- "CShwMusicControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, T_NotifyL1L, Teardown)
-
-EUNIT_NOT_DECORATED_TEST(
- "NotifyL - test 2",
- "CShwMusicControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, T_NotifyL2L, Teardown)
-
-EUNIT_NOT_DECORATED_TEST(
- "NotifyL - test 3",
- "CShwMusicControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, T_NotifyL3L, Teardown)
-
-EUNIT_NOT_DECORATED_TEST(
- "NotifyL - test 4",
- "CShwMusicControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, T_NotifyL4L, Teardown)
-
-EUNIT_NOT_DECORATED_TEST(
- "NotifyL - test 5",
- "CShwMusicControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, T_NotifyL5L, Teardown)
-
-EUNIT_NOT_DECORATED_TEST(
- "Test error in file",
- "CShwMusicControl",
- "ConstructL, NotifyL",
- "FUNCTIONALITY",
- Empty, T_ErrorInFileL, Teardown)
-
-EUNIT_NOT_DECORATED_TEST(
- "Test leave in observer",
- "CShwMusicControl",
- "NotifyL",
- "FUNCTIONALITY",
- SetupL, T_LeaveInObserverL, Teardown )
-
-/*
-commented out as no added value for the time beeing
-EUNIT_NOT_DECORATED_TEST(
- "Play for multitple seconds",
- "CShwMusicControl",
- "NotifyL - test 6",
- "FUNCTIONALITY",
- SetupL, T_ExtendedPlayL, Teardown)
-*/
-
-
-EUNIT_END_TEST_TABLE
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshwmusiccontrol/t_cshwmusiccontrol.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for music control for the slideshow
- *
-*/
-
-
-
-
-#ifndef __T_CSHWMUSICCONTROL_H__
-#define __T_CSHWMUSICCONTROL_H__
-
-// EXTERNAL INCLUDES
-#include <CEUnitTestSuiteClass.h>
-#include <EUnitDecorators.h>
-
-
-// INTERNAL INCLUDES
-#include "shweventqueue.h"
-#include "shwmusiccontrol.h"
-#include "shwmusicobserver.h"
-
-// FORWARD DECLARATIONS
-
-
-const TInt KMaxFileLen = 256;
-
-// CLASS DEFINITION
-/**
- * EUnit test suite for CShwMusicControl
- */
-NONSHARABLE_CLASS( T_CShwMusicControl )
- : public CEUnitTestSuiteClass,
- public MShwMusicObserver,
- public MShwEventQueue
- {
- public: // Constructors and destructors
-
- /**
- * Two phase construction
- */
- static T_CShwMusicControl* NewL();
- static T_CShwMusicControl* NewLC();
- /**
- * Destructor
- */
- ~T_CShwMusicControl();
-
- private: // Constructors and destructors
-
- T_CShwMusicControl();
- void ConstructL();
-
- public:
- static TInt StopPlaying(TAny* aMusicControl);
-
- public: // From MShwEventQueue
-
- void SendEventL( MShwEvent* aEvent );
-
-
- public: // From MShwMusicObserver
-
- void MusicOnL();
- void MusicOff();
- void MusicVolume(TInt aCurrentVolume, TInt aMaxVolume);
- void ErrorWithTrackL(TInt aErrorCode);
-
- private: // New methods
-
- void SetupL();
- void Teardown();
- void Empty();
-
- void TestConstructL();
- void T_NotifyLL();
- void T_NotifyL1L();
- void T_NotifyL2L();
- void T_NotifyL3L();
- void T_NotifyL4L();
- void T_NotifyL5L();
- void T_ExtendedPlayL();
- void T_ErrorInFileL();
- void T_LeaveInObserverL();
-
- private: // Data
- // The music state
- TBool iMusicOn;
-
- // The music volume
- TInt iCurrentVolume;
-
- // The maximum music volume
- TInt iMaxVolume;
-
- // The previous music volume setting
- // - used to test volume up and down.
- TInt iPrevVolume;
-
- // Own: the class under test
- CShwMusicControl* iCShwMusicControl;
-
- // Own: the event received from SendEventL
- MShwEvent* iEvent;
-
- // Own: scheduler wait object
- CActiveSchedulerWait iWait;
-
- // Own: scheduler wait object
- CActiveSchedulerWait iPlayWait;
-
- // Own: a timer callback
- CPeriodic* iTimer;
-
- /// Own: the error code from ErrorWithTrackL
- TInt iErrorCode;
-
- /// Own: error code to cause a leave in observer
- TInt iLeaveInObserver;
-
- EUNIT_DECLARE_TEST_TABLE;
-
- };
-
-#endif // __T_CSHWMUSICCONTROL_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/t_cshwmusiccontrol/t_cshwmusiccontrol_dllmain.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for music control for the slideshow
- *
-*/
-
-
-
-
-// CLASS HEADER
-#include "t_cshwmusiccontrol.h"
-
-// EXTERNAL INCLUDES
-#include <CEUnitTestSuite.h>
-
-EXPORT_C MEUnitTest* CreateTestSuiteL()
- {
- return T_CShwMusicControl::NewL();
- }
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshwplaybackfactory/t_cshwplaybackfactory.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test suite for CShwPlaybackFactory
- *
-*/
-
-
-
-// CLASS HEADER
-#include "t_cshwplaybackfactory.h"
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/EUnitMacros.h>
-#include <digia/eunit/EUnitDecorators.h>
-#include <glxthumbnailcontext.h>
-#include <glxsetvaluelayout.h>
-
-// INTERNAL INCLUDES
-#include "shwplaybackfactory.h"
-#include "shwslideshowenginepanic.h"
-#include "shwcrossfadeeffect.h"
-#include "shwzoomandpaneffect.h"
-#include "shwconstants.h"
-
-// -----------------------------------------------------------------------------
-// Stub for NShwEngine::Panic -->
-// -----------------------------------------------------------------------------
-TBool gNShwEnginePanicCalled = EFalse;
-namespace NShwEngine
- {
- extern void Panic( TShwEnginePanic aPanic )
- {
- gNShwEnginePanicCalled = ETrue;
- // in test situation just do a leave
- User::Leave( aPanic );
- }
- }
-// -----------------------------------------------------------------------------
-// <-- Stub for NShwEngine::Panic
-// -----------------------------------------------------------------------------
-
-TGlxSetValueLayout gStubLayout( TGlxLayoutInfo::EPosition );
-
-// -----------------------------------------------------------------------------
-// Stub for CShwCrossFadeEffect -->
-// -----------------------------------------------------------------------------
-inline CShwCrossFadeEffect::CShwCrossFadeEffect()
- {
- }
-CShwCrossFadeEffect* CShwCrossFadeEffect::NewLC()
- {
- CShwCrossFadeEffect* self = new (ELeave) CShwCrossFadeEffect;
- CleanupStack::PushL( self );
- return self;
- }
-CShwCrossFadeEffect::~CShwCrossFadeEffect()
- {
- }
-MShwEffect* CShwCrossFadeEffect::CloneLC()
- {
- return NewLC();
- }
-void CShwCrossFadeEffect::InitializeL(
- CHuiEnv* /*aHuiEnv*/, MGlxVisualList* /*aVisualList*/,
- MGlxMediaList* /*aMediaList*/, TSize /*aScreenSize*/ )
- {
- }
-TSize CShwCrossFadeEffect::PrepareViewL( CHuiVisual* /*aVisual*/, TSize /*aSize*/ )
- {
- return TSize( 0, 0 );
- }
-MGlxLayout* CShwCrossFadeEffect::EnterViewL(
- CHuiVisual* /*aVisual*/, TInt /*aDuration*/, TInt /*aDuration2*/ )
- {
- return &gStubLayout;
- }
-void CShwCrossFadeEffect::ExitView( CHuiVisual* /*aVisual*/ )
- {
- }
-MGlxLayout* CShwCrossFadeEffect::EnterTransitionL(
- CHuiVisual* /*aVisual*/, TInt /*aDuration*/ )
- {
- return &gStubLayout;
- }
-void CShwCrossFadeEffect::ExitTransition( CHuiVisual* /*aVisual*/ )
- {
- }
-void CShwCrossFadeEffect::PauseL()
- {
- }
-void CShwCrossFadeEffect::Resume()
- {
- }
-// the effect info for zoom and pan
-TShwEffectInfo gCrossFadeEffectInfo;
-TShwEffectInfo CShwCrossFadeEffect::EffectInfo()
- {
- return gCrossFadeEffectInfo;
- }
-
-// -----------------------------------------------------------------------------
-// <-- Stub for CShwCrossFadeEffect
-// -----------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------
-// Stub for CShwZoomAndPanEffect -->
-// -----------------------------------------------------------------------------
-inline CShwZoomAndPanEffect::CShwZoomAndPanEffect()
- {
- }
-CShwZoomAndPanEffect* CShwZoomAndPanEffect::NewLC()
- {
- CShwZoomAndPanEffect* self = new (ELeave) CShwZoomAndPanEffect;
- CleanupStack::PushL( self );
- return self;
- }
-CShwZoomAndPanEffect::~CShwZoomAndPanEffect()
- {
- }
-MShwEffect* CShwZoomAndPanEffect::CloneLC()
- {
- return NewLC();
- }
-void CShwZoomAndPanEffect::InitializeL(
- CHuiEnv* /*aHuiEnv*/, MGlxVisualList* /*aVisualList*/,
- MGlxMediaList* /*aMediaList*/, TSize /*aScreenSize*/ )
- {
- }
-TSize CShwZoomAndPanEffect::PrepareViewL( CHuiVisual* /*aVisual*/, TSize /*aSize*/ )
- {
- return TSize( 0, 0 );
- }
-MGlxLayout* CShwZoomAndPanEffect::EnterViewL(
- CHuiVisual* /*aVisual*/, TInt /*aDuration*/, TInt /*aDuration2*/ )
- {
- return &gStubLayout;
- }
-void CShwZoomAndPanEffect::ExitView( CHuiVisual* /*aVisual*/ )
- {
- }
-MGlxLayout* CShwZoomAndPanEffect::EnterTransitionL(
- CHuiVisual* /*aVisual*/, TInt /*aDuration*/ )
- {
- return &gStubLayout;
- }
-void CShwZoomAndPanEffect::ExitTransition( CHuiVisual* /*aVisual*/ )
- {
- }
-void CShwZoomAndPanEffect::PauseL()
- {
- }
-void CShwZoomAndPanEffect::Resume()
- {
- }
-// the effect info for zoom and pan
-TShwEffectInfo gZoomAndPanEffectInfo;
-TShwEffectInfo CShwZoomAndPanEffect::EffectInfo()
- {
- return gZoomAndPanEffectInfo;
- }
-
-// -----------------------------------------------------------------------------
-// <-- Stub for CShwZoomAndPanEffect
-// -----------------------------------------------------------------------------
-
-// CONSTRUCTION
-T_CShwPlaybackFactory* T_CShwPlaybackFactory::NewL()
- {
- T_CShwPlaybackFactory* self = T_CShwPlaybackFactory::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-T_CShwPlaybackFactory* T_CShwPlaybackFactory::NewLC()
- {
- T_CShwPlaybackFactory* self = new( ELeave ) T_CShwPlaybackFactory();
- CleanupStack::PushL( self );
-
- self->ConstructL();
-
- return self;
- }
-
-// Destructor (virtual by CBase)
-T_CShwPlaybackFactory::~T_CShwPlaybackFactory()
- {
- }
-
-// Default constructor
-T_CShwPlaybackFactory::T_CShwPlaybackFactory()
- {
- }
-
-// Second phase construct
-void T_CShwPlaybackFactory::ConstructL()
- {
- // The ConstructL from the base class CEUnitTestSuiteClass must be called.
- // It generates the test case table.
- CEUnitTestSuiteClass::ConstructL();
- }
-
-// METHODS
-
-void T_CShwPlaybackFactory::Empty()
- {
- }
-
-void T_CShwPlaybackFactory::SetupL()
- {
- // create the stubs
- iStubVisuallist = new( ELeave ) TMGlxVisualList_Adapter( this );
- iStubMedialist = new( ELeave ) TMGlxMediaList_Stub( this );
-
- // fix the effect infos
- gCrossFadeEffectInfo.iId.iPluginUid = NShwSlideshow::KDefaultEffectPluginUid;
- gCrossFadeEffectInfo.iId.iIndex = NShwSlideshow::KEffectUidXFadeNormal;
- gZoomAndPanEffectInfo.iId.iPluginUid = NShwSlideshow::KDefaultEffectPluginUid;
- gZoomAndPanEffectInfo.iId.iIndex = NShwSlideshow::KEffectUidZoomAndPan;
-
- /// @todo add an own test case where the music observer is also given
- /// so that the music control is constructed
- iCShwPlaybackFactory =
- CShwPlaybackFactory::NewL(
- iHuiEnv, iStubVisuallist, iStubMedialist, *this, TSize( 100, 100 ) );
- }
-
-void T_CShwPlaybackFactory::Teardown()
- {
- delete iCShwPlaybackFactory;
- iCShwPlaybackFactory = NULL;
- delete iStubVisuallist;
- iStubVisuallist = NULL;
- delete iStubMedialist;
- iStubMedialist = NULL;
- }
-
-TInt gCounter = 0;
-
-void T_CShwPlaybackFactory::T_ContructL()
- {
- // trap the call as it will leave, dont trap oom as this is alloc test
- EUNIT_TRAP_EXCEPT_ALLOC_D( err,
- {
- iCShwPlaybackFactory =
- CShwPlaybackFactory::NewL(
- iHuiEnv, iStubVisuallist, iStubMedialist, *this, TSize( 100, 100 ) );
- } );
- EUNIT_ASSERT_EQUALS_DESC( KErrArgument, err, "wrong effect tried to set" );
- EUNIT_ASSERT_DESC( !iCShwPlaybackFactory, "playback factory not created" );
- }
-
-void T_CShwPlaybackFactory::T_ContructValidEffectL()
- {
- EUNIT_PRINT( _L("T_ContructValidEffectL") );
- // call setup to test the succesfull case
- SetupL();
-
- EUNIT_ASSERT_DESC( iCShwPlaybackFactory, "Test that object created" );
- }
-
-void T_CShwPlaybackFactory::T_EventObserversL()
- {
- // get observers
- RPointerArray< MShwEventObserver > obs =
- iCShwPlaybackFactory->EventObservers();
- // check the amount
- EUNIT_ASSERT_EQUALS_DESC(
- obs.Count(),
- 3,
- "3 observers returned, music is off by default");
- }
-
-void T_CShwPlaybackFactory::T_EventPublishersL( )
- {
- // get publishers
- RPointerArray< MShwEventPublisher > obs =
- iCShwPlaybackFactory->EventPublishers();
- // check the amount
- EUNIT_ASSERT_EQUALS_DESC(
- obs.Count(),
- 3,
- "3 publishers returned, music is off by default");
- }
-
-// TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
- T_CShwPlaybackFactory,
- "CShwPlaybackFactory test suite",
- "UNIT" )
-
-EUNIT_ALLOC_TEST(
- "Constructor invalid effects",
- "CShwPlaybackFactory",
- "Constructor test",
- "FUNCTIONALITY",
- Empty, T_ContructL, Teardown )
-
-EUNIT_ALLOC_TEST(
- "Constructor valid effects",
- "CShwPlaybackFactory",
- "Constructor test",
- "FUNCTIONALITY",
- Empty, T_ContructValidEffectL, Teardown )
-
-EUNIT_ALLOC_TEST(
- "EventObservers",
- "CShwPlaybackFactory",
- "EventObservers",
- "FUNCTIONALITY",
- SetupL, T_EventObserversL, Teardown)
-
-EUNIT_ALLOC_TEST(
- "EventPublishers",
- "CShwPlaybackFactory",
- "EventPublishers",
- "FUNCTIONALITY",
- SetupL, T_EventPublishersL, Teardown)
-
-EUNIT_END_TEST_TABLE
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshwplaybackfactory/t_cshwplaybackfactory.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test suite for CShwPlaybackFactory
- *
-*/
-
-
-
-
-#ifndef __T_CSHWPLAYBACKFACTORY_H__
-#define __T_CSHWPLAYBACKFACTORY_H__
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/CEUnitTestSuiteClass.h>
-#include <digia/eunit/EUnitDecorators.h>
-
-
-// INTERNAL INCLUDES
-#include "shwplaybackfactory.h"
-#include "shwmusicobserver.h"
-
-#include "tmglxmedialist_stub.h"
-#include "tmglxvisuallist_adapter.h"
-
-// FORWARD DECLARATIONS
-class CHuiEnv;
-
-// CLASS DEFINITION
-/**
- * EUnit test suite for CShwPlaybackFactory
- */
-NONSHARABLE_CLASS( T_CShwPlaybackFactory )
- : public CEUnitTestSuiteClass,
- public MGlxMediaList_Stub_Observer,
- public MGlxVisualList_Observer,
- public MShwMusicObserver
- {
- public: // Constructors and destructors
-
- /**
- * Two phase construction
- */
- static T_CShwPlaybackFactory* NewL();
- static T_CShwPlaybackFactory* NewLC();
- /**
- * Destructor
- */
- ~T_CShwPlaybackFactory();
-
- private: // Constructors and destructors
-
- T_CShwPlaybackFactory();
- void ConstructL();
-
- public: // from MGlxMediaList_Stub_Observer and MGlxVisualList_Observer
-
- void MGlxMediaList_MethodCalled( TMGlxMediaListMethodId /*aMethodId*/ )
- { // not interested on the events
- }
- void MGlxVisualList_MethodCalled( TMGlxVisualListMethodId /*aMethodId*/ )
- { // not interested on the events
- }
-
- public: // From MShwMusicObserver
-
- void MusicOnL()
- { // not interested on the events
- }
- void MusicOff()
- { // not interested on the events
- }
- void MusicVolume( TInt /*aCurrentVolume*/, TInt /*aMaxVolume*/ )
- { // not interested on the events
- }
- void ErrorWithTrackL( TInt /*aErrorCode*/ )
- { // not interested on the events
- }
-
- private: // New methods
-
- void Empty();
- void SetupL();
- void Teardown();
- void T_ContructL();
- void T_ContructValidEffectL();
- void T_EventObserversL();
- void T_EventPublishersL();
-
- private: // Data
-
- CHuiEnv* iHuiEnv;
- TMGlxMediaList_Stub* iStubMedialist;
- TMGlxVisualList_Adapter* iStubVisuallist;
-
- // class under test
- CShwPlaybackFactory* iCShwPlaybackFactory;
- EUNIT_DECLARE_TEST_TABLE;
-
- };
-
-#endif // __T_CSHWPLAYBACKFACTORY_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/t_cshwplaybackfactory/t_cshwplaybackfactory_dllmain.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test suite for CShwPlaybackFactory
- *
-*/
-
-
-
-
-// CLASS HEADER
-#include "t_cshwplaybackfactory.h"
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/CEUnitTestSuite.h>
-
-EXPORT_C MEUnitTest* CreateTestSuiteL()
- {
- return T_CShwPlaybackFactory::NewL();
- }
-
-#ifndef EKA2
-GLDEF_C TInt E32Dll( TDllReason )
- {
- return KErrNone;
- }
-#endif
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshwsettingsmodel/t_cshwsettingsmodel.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for settings model for the slideshow
-*
-*/
-
-
-
-
-// CLASS HEADER
-#include "t_cshwsettingsmodel.h"
-
-// CLASS UNDER TEST
-#include "shwsettingsmodel.h"
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/EUnitMacros.h>
-#include <centralrepository.h>
-
-// INTERNAL INCLUDES
-
-
-// CONSTRUCTION
-T_CShwSettingsModel* T_CShwSettingsModel::NewL()
- {
- T_CShwSettingsModel* self = T_CShwSettingsModel::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-T_CShwSettingsModel* T_CShwSettingsModel::NewLC()
- {
- T_CShwSettingsModel* self = new (ELeave) T_CShwSettingsModel();
- CleanupStack::PushL(self);
- self->ConstructL();
- return self;
- }
-
-
-// Destructor (virtual by CBase)
-T_CShwSettingsModel::~T_CShwSettingsModel()
- {
- }
-
-
-// Default constructor
-T_CShwSettingsModel::T_CShwSettingsModel()
- {
- }
-
-
-// Second phase construct
-void T_CShwSettingsModel::ConstructL()
- {
- // The ConstructL from the base class CEUnitTestSuiteClass must be called.
- // It generates the test case table.
- CEUnitTestSuiteClass::ConstructL();
- }
-
-// METHODS
-
-
-void T_CShwSettingsModel::SetupL()
- {
- iShwSettingsModel = CShwSettingsModel::NewL();
- }
-
-void T_CShwSettingsModel::Teardown()
- {
- delete iShwSettingsModel;
- iShwSettingsModel = NULL;
-
- const TInt KEngineId = 0x200071D3;
- const TUid KEngineUid = TUid::Uid(KEngineId);
- TRAP_IGNORE(
- {
- CRepository* repository = CRepository::NewL(KEngineUid);
- TInt err = repository->Reset();
- User::LeaveIfError(err);
- delete repository;
- } );
- }
-
-
-
-void T_CShwSettingsModel::TestGetDefaultValues()
- {
- TBuf<KMaxFileName> fileNamePath;
- iShwSettingsModel->MusicNamePathL(fileNamePath);
- _LIT(KDefaultFileName, "None");
- EUNIT_ASSERT(fileNamePath == KDefaultFileName);
-
- const TUint KDefaultUid = 0x200071D6;
- TUid defaultUId;
- defaultUId.iUid = KDefaultUid;
-
- TUid uId;
- TUint index = 0;
- iShwSettingsModel->TransitionTypeL(uId, index);
- EUNIT_ASSERT(defaultUId.iUid == uId.iUid);
- EUNIT_ASSERT_EQUALS_DESC( 1, index, "default index is 0");
- }
-
-void T_CShwSettingsModel::TestSetAndGetMusicPathL()
- {
- // Set music name and path field.
- _LIT(KTestFileName, "c:\\test\\knightrider.mp3");
- iShwSettingsModel->SaveMusicNamePathL( KTestFileName() );
-
- // Compare returned values to those set.
- TFileName fileNamePath;
- iShwSettingsModel->MusicNamePathL(fileNamePath);
- EUNIT_ASSERT(fileNamePath == KTestFileName);
-
- // try setting an empty music name
- iShwSettingsModel->SaveMusicNamePathL( KNullDesC() );
- // test that it was not set
- iShwSettingsModel->MusicNamePathL(fileNamePath);
- EUNIT_ASSERT(fileNamePath == KTestFileName);
- }
-
-
-void T_CShwSettingsModel::TestSetAndGetMusicOnOffL()
- {
- iShwSettingsModel->SaveMusicStateL(ETrue);
- EUNIT_ASSERT(iShwSettingsModel->MusicOnL() == ETrue);
- }
-
-
-void T_CShwSettingsModel::TestSetAndGetTransDelayL()
- {
- const TUint KTimeDelay = 5;
- iShwSettingsModel->SaveTransDelayL(KTimeDelay);
- EUNIT_ASSERT(iShwSettingsModel->TransDelayL() == KTimeDelay);
- }
-
-
-void T_CShwSettingsModel::TestSetAndGetTransitionTypeL()
- {
- const TUint KUid = 0x01234567;
- TUid uId1;
- uId1.iUid = KUid;
- iShwSettingsModel->SaveTransitionTypeL(uId1, 1);
-
- TUid uId2;
- TUint index = 0;
- iShwSettingsModel->TransitionTypeL(uId2, index);
- EUNIT_ASSERT(uId1.iUid == uId2.iUid);
- EUNIT_ASSERT(index == 1);
- }
-
-// TEST TABLE
-
-EUNIT_BEGIN_TEST_TABLE(
- T_CShwSettingsModel,
- "Test suite for CShwSettingsModel",
- "MODULE" )
-
-EUNIT_TEST(
- "Test Get Default Values",
- "TestGetDefaultValues",
- "Central Repositoy getter - default values",
- "FUNCTIONALITY",
- SetupL, TestGetDefaultValues, Teardown)
-
-
-EUNIT_TEST(
- "Test Set And Get Music Path",
- "TestSetAndGetMusicPath",
- "Music name and path Central Repositoy setter and getter",
- "FUNCTIONALITY",
- SetupL, TestSetAndGetMusicPathL, Teardown)
-
-
-EUNIT_TEST(
- "Test Set And Get Music On/Off",
- "TestSetAndGetMusicOnOffL",
- "Music On/Off Central Repositoy setter and getter",
- "FUNCTIONALITY",
- SetupL, TestSetAndGetMusicOnOffL, Teardown)
-
-
-EUNIT_TEST(
- "Test Set And Get Transition Delay",
- "TestSetAndGetTransDelayL",
- "Transition Delay Central Repositoy setter and getter",
- "FUNCTIONALITY",
- SetupL, TestSetAndGetTransDelayL, Teardown)
-
-
-EUNIT_TEST(
- "Test Set And Get Transition Type",
- "TestSetAndGetTransitionTypeL",
- "Transition Type Central Repositoy setter and getter",
- "FUNCTIONALITY",
- SetupL, TestSetAndGetTransitionTypeL, Teardown)
-
-
-EUNIT_END_TEST_TABLE
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshwsettingsmodel/t_cshwsettingsmodel.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for settings model for the slideshow
- *
-*/
-
-
-
-
-
-#ifndef __T_CSHWSETTINGSMODEL_H__
-#define __T_CSHWSETTINGSMODEL_H__
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/CEUnitTestSuiteClass.h>
-
-// INTERNAL INCLUDES
-
-
-// FORWARD DECLARATIONS
-class CShwSettingsModel;
-
-// CLASS DEFINITION
-/**
- *
- * Test class for CShwSettingsModel
- *
- */
-NONSHARABLE_CLASS( T_CShwSettingsModel )
- : public CEUnitTestSuiteClass
- {
- public: // Constructors and destructors
-
- /**
- * Two phase construction
- */
- static T_CShwSettingsModel* NewL();
- static T_CShwSettingsModel* NewLC();
- /**
- * Destructor
- */
- ~T_CShwSettingsModel();
-
- private: // Constructors and destructors
-
- T_CShwSettingsModel();
- void ConstructL();
-
- public: // From observer interface
-
-
-
- private: // New methods
-
- void SetupL();
-
- void Teardown();
-
- void TestGetDefaultValues();
-
- void TestSetAndGetMusicPathL();
-
- void TestSetAndGetMusicOnOffL();
-
- void TestSetAndGetTransDelayL();
-
- void TestSetAndGetTransitionTypeL();
-
-
- private: // Data
-
- CShwSettingsModel* iShwSettingsModel;
-
- EUNIT_DECLARE_TEST_TABLE;
-
- };
-
-#endif // __T_CSHWSETTINGSMODEL_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/t_cshwsettingsmodel/t_cshwsettingsmodelDllMain.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for settings model for the slideshow
-*
-*/
-
-
-
-
-// CLASS HEADER
-#include "T_CShwSettingsModel.h"
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/CEUnitTestSuite.h>
-
-/**
- * Test suite factory function.
- */
-EXPORT_C MEUnitTest* CreateTestSuiteL()
- {
- return T_CShwSettingsModel::NewL();
- }
-
-// END OF FILE
-
-
-
-
-
-
--- a/photosgallery/slideshow/engine/tsrc/t_cshwzoomandpaneffect/t_cshwzoomandpaneffect.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1069 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for zoom and pan effect in slideshow
- *
-*/
-
-
-
-// CLASS HEADER
-#include "t_cshwzoomandpaneffect.h"
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/eunitmacros.h>
-#include <digia/eunit/eunitdecorators.h>
-#include <digia/eunit/teunitfillmem.h>
-#include <e32math.h>
-
-#include <uiacceltk/huienv.h>
-#include <uiacceltk/huidisplaycoecontrol.h>
-#include <uiacceltk/huicurvepath.h>
-#include <uiacceltk/huirealpoint.h>
-#include <uiacceltk/huicontrol.h>
-#include <uiacceltk/huiimagevisual.h>
-
-// INTERNAL INCLUDES
-#include "shwzoomandpaneffect.h"
-#include "shwzoomandpanlayout.h"
-#include "shwcrossfadelayout.h"
-#include "shwcurvefactory.h"
-#include "shwconstants.h"
-#include "shwautoptr.h"
-#include "shwcallback.h"
-#include "shwslideshowenginepanic.h"
-#include "shwgeometryutilities.h"
-
-using namespace NShwSlideshow;
-
-// -----------------------------------------------------------------------------
-// Stub for NShwEngine::Panic -->
-// -----------------------------------------------------------------------------
-TBool gNShwEnginePanicCalled = EFalse;
-namespace NShwEngine
- {
- extern void Panic( TShwEnginePanic aPanic )
- {
- gNShwEnginePanicCalled = ETrue;
- // in test situation just do a leave
- User::Leave( aPanic );
- }
- }
-// -----------------------------------------------------------------------------
-// <-- Stub for NShwEngine::Panic
-// -----------------------------------------------------------------------------
-
-// LOCAL HELPERs
-namespace
- {
- /**
- * @param aSource the TReal32 to round
- * @return a rounded TInt
- */
- inline TInt TReal2TInt( TReal32 aSource )
- {
- if( aSource < 0 )
- {
- // just subst 0.5 and cast, -0.4 becomes -0.9 and typecast
- // truncates it to 0, -0.6 becomes -1.1 and its truncated to -1
- return TInt( aSource - TReal32( 0.5 ) );
- }
- else
- {
- // just add 0.5 and cast, 0.4 becomes 0.9 and typecast
- // truncates it to 0, 0.6 becomes 1.1 and its truncated to 1
- return TInt( aSource + TReal32( 0.5 ) );
- }
- }
- }
-
-class CTestControl : public CHuiControl
- {
- public:
- static CTestControl* NewL( CHuiEnv& aEnv )
- {
- return new (ELeave) CTestControl( aEnv );
- }
- CTestControl( CHuiEnv& aEnv )
- : CHuiControl( aEnv )
- {
- }
- };
-
-// CONSTRUCTION
-T_CShwZoomAndPanEffect* T_CShwZoomAndPanEffect::NewL()
- {
- T_CShwZoomAndPanEffect* self = T_CShwZoomAndPanEffect::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-T_CShwZoomAndPanEffect* T_CShwZoomAndPanEffect::NewLC()
- {
- T_CShwZoomAndPanEffect* self = new( ELeave ) T_CShwZoomAndPanEffect();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor (virtual by CBase)
-T_CShwZoomAndPanEffect::~T_CShwZoomAndPanEffect()
- {
- }
-
-// Default constructor
-T_CShwZoomAndPanEffect::T_CShwZoomAndPanEffect()
- {
- }
-
-// Second phase construct
-void T_CShwZoomAndPanEffect::ConstructL()
- {
- // The ConstructL from the base class CEUnitTestSuiteClass must be called.
- // It generates the test case table.
- CEUnitTestSuiteClass::ConstructL();
- }
-
-// METHODS
-// global constant for screensize
-const TInt gScreenWidth = 100;
-const TInt gScreenHeight = 100;
-const TRect gScreenRect( 0, 0, gScreenWidth, gScreenHeight );
-void T_CShwZoomAndPanEffect::Empty()
- {
- }
-
-void T_CShwZoomAndPanEffect::SetupL()
- {
- // create env
- iEnv = CHuiEnv::NewL();
-
- // create Display
- iCoeDisplay = CHuiDisplayCoeControl::NewL( *iEnv, gScreenRect );
-
- // create control
- iControl = CTestControl::NewL( *iEnv );
-
- // create the visual, ownership goes to iControl
- iVisual = CHuiImageVisual::AddNewL( *iControl );
-
- // create class under test
- CShwZoomAndPanEffect* tmp = CShwZoomAndPanEffect::NewLC();
- // take ownership
- iCShwZoomAndPanEffect = tmp;
- // remove the pointer from cleanup stack
- CleanupStack::Pop( tmp );
- }
-
-void T_CShwZoomAndPanEffect::Teardown()
- {
- // delete class under test
- delete iCShwZoomAndPanEffect;
- iCShwZoomAndPanEffect = NULL;
-
- // delete control, it also deletes the visual
- delete iControl;
- iControl = NULL;
-
- // delete display
- delete iCoeDisplay;
- iCoeDisplay = NULL;
-
- // delete environment
- delete iEnv;
- iEnv = NULL;
- }
-
-void T_CShwZoomAndPanEffect::T_TestGeometryAlgorithmsL()
- {
- // use the namespace for coord utilities
- using namespace NShwGeometryUtilities;
-
- // test FitDimension
- // fit width with same values
- {
- TInt width = 10;
- TInt height = 10;
- FitDimension( width, height, 10 );
- EUNIT_ASSERT_EQUALS_DESC( 10, width, "width is same" );
- EUNIT_ASSERT_EQUALS_DESC( 10, height, "height is same" );
- }
- // fit width with width greater
- {
- TInt width = 20;
- TInt height = 10;
- FitDimension( width, height, 10 );
- EUNIT_ASSERT_EQUALS_DESC( 20, width, "width is same" );
- EUNIT_ASSERT_EQUALS_DESC( 10, height, "height is same" );
- }
- // fit width with new height greater
- {
- TInt width = 20;
- TInt height = 10;
- FitDimension( width, height, 20 );
- EUNIT_ASSERT_EQUALS_DESC( 40, width, "width increased" );
- EUNIT_ASSERT_EQUALS_DESC( 20, height, "height increased" );
- }
- // fit width with new height smaller
- {
- TInt width = 22;
- TInt height = 11;
- FitDimension( width, height, 5 );
- EUNIT_ASSERT_EQUALS_DESC( 10, width, "width decreased" );
- EUNIT_ASSERT_EQUALS_DESC( 5, height, "height decreased" );
- }
-
- // fit height with same values
- {
- TInt width = 99;
- TInt height = 88;
- FitDimension( height, width, 99 );
- EUNIT_ASSERT_EQUALS_DESC( 99, width, "width is same" );
- EUNIT_ASSERT_EQUALS_DESC( 88, height, "height is same" );
- }
- // fit height with width greater
- {
- TInt width = 22;
- TInt height = 11;
- FitDimension( height, width, 22 );
- EUNIT_ASSERT_EQUALS_DESC( 22, width, "width is same" );
- EUNIT_ASSERT_EQUALS_DESC( 11, height, "height is same" );
- }
- // fit height with new width greater
- {
- TInt width = 22;
- TInt height = 11;
- FitDimension( height, width, 33 );
- EUNIT_ASSERT_EQUALS_DESC( 33, width, "width increased" );
- EUNIT_ASSERT_EQUALS_DESC( 16, height, "height increased" );
- }
- // fit height with new width smaller
- {
- TInt width = 99;
- TInt height = 88;
- FitDimension( height, width, 88 );
- EUNIT_ASSERT_EQUALS_DESC( 88, width, "width increased" );
- EUNIT_ASSERT_EQUALS_DESC( 78, height, "height increased" );
- }
-
- // test FitInsideBox
- // fit with same width and height
- {
- TInt width = 99;
- TInt height = 99;
- FitInsideBox( width, height, 99, 99 );
- EUNIT_ASSERT_EQUALS_DESC( 99, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 99, height, "height is same as box" );
- }
- // fit with smaller width and height
- {
- TInt width = 99;
- TInt height = 99;
- FitInsideBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 99, width, "width did not change" );
- EUNIT_ASSERT_EQUALS_DESC( 99, height, "height did not change" );
- }
- // fit with greater width and height
- {
- TInt width = 111;
- TInt height = 111;
- FitInsideBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 100, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 100, height, "height is same as box" );
- }
- // fit with greater and width closer to box
- {
- TInt width = 150;
- TInt height = 200;
- FitInsideBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 75, width, "width is smaller" );
- EUNIT_ASSERT_EQUALS_DESC( 100, height, "height is same as box" );
- }
- // fit with greater and height closer to box
- {
- TInt width = 150;
- TInt height = 100;
- FitInsideBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 100, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 66, height, "height is smaller" );
- }
- // fit with smaller and width closer to box
- {
- TInt width = 75;
- TInt height = 40;
- FitInsideBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 75, width, "width did not change" );
- EUNIT_ASSERT_EQUALS_DESC( 40, height, "height did not change" );
- }
- // fit with smaller and height closer to box
- {
- TInt width = 60;
- TInt height = 90;
- FitInsideBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 60, width, "width did not change" );
- EUNIT_ASSERT_EQUALS_DESC( 90, height, "height did not change" );
- }
- // fit with width greater and height smaller to box
- {
- TInt width = 110;
- TInt height = 90;
- FitInsideBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 100, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 81, height, "height is smaller" );
- }
- // fit with height greater and width smaller to box
- {
- TInt width = 90;
- TInt height = 120;
- FitInsideBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 90*100/120, width, "width is smaller" );
- EUNIT_ASSERT_EQUALS_DESC( 100, height, "height is same as box" );
- }
-
- // test FitToCoverBox
- // fit with same width and height
- {
- TInt width = 99;
- TInt height = 99;
- FitToCoverBox( width, height, 99, 99 );
- EUNIT_ASSERT_EQUALS_DESC( 99, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 99, height, "height is same as box" );
- }
- // fit with smaller width and height
- {
- TInt width = 99;
- TInt height = 99;
- FitToCoverBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 100, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 100, height, "height is same as box" );
- }
- // fit with greater width and height
- {
- TInt width = 111;
- TInt height = 111;
- FitToCoverBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 100, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 100, height, "height is same as box" );
- }
- // fit with greater and width closer to box
- {
- TInt width = 150;
- TInt height = 200;
- FitToCoverBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 100, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 133, height, "height is greater" );
- }
- // fit with greater and height closer to box
- {
- TInt width = 150;
- TInt height = 100;
- FitToCoverBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 150, width, "width is greater than box" );
- EUNIT_ASSERT_EQUALS_DESC( 100, height, "height is same as box" );
- }
- // fit with greater and height closer to box
- {
- TInt width = 300;
- TInt height = 200;
- FitToCoverBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 150, width, "width is greater than box" );
- EUNIT_ASSERT_EQUALS_DESC( 100, height, "height is same as box" );
- }
- // fit with smaller and width closer to box
- {
- TInt width = 75;
- TInt height = 40;
- FitToCoverBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 187, width, "width is greater" );
- EUNIT_ASSERT_EQUALS_DESC( 100, height, "height is same as box" );
- }
- // fit with smaller and height closer to box
- {
- TInt width = 60;
- TInt height = 90;
- FitToCoverBox( width, height, 100, 100 );
- EUNIT_ASSERT_EQUALS_DESC( 100, width, "width is same as box" );
- EUNIT_ASSERT_EQUALS_DESC( 150, height, "height is greater" );
- }
- }
-
-void T_CShwZoomAndPanEffect::T_LayoutTestL()
- {
-// test zoom and pan
- // create the layout
- TEUnitFillMem< TShwZoomAndPanLayout > layout;
-
- // check that layout has correct init values
- // need to upcast to get access to public functions
- MGlxLayout& base = static_cast< MGlxLayout& >( layout );
- TGlxLayoutInfoResetter info;
- info.iPosition.iX = -1;
- info.iPosition.iY = -1;
- info.iSize.iX = -1;
- info.iSize.iY = -1;
-
- base.SetLayoutValues( info );
- // verify that the position was not set
- EUNIT_ASSERT_EQUALS_DESC( -1, (TInt)info.iPosition.iX,"x position not changed" );
- EUNIT_ASSERT_EQUALS_DESC( -1, (TInt)info.iPosition.iY,"y position not changed" );
- // check size
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- -1, (TInt)info.iSize.iX,"x size changed" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- -1, (TInt)info.iSize.iY,"y size changed" );
-
- // set custom screen size and image size; image smaller than screen
- layout.SetSizes( TSize( 99, 88 ), TSize( 44, 55 ), TSize( 500, 500 ) );
- // redo layout
- base.SetLayoutValues( info );
- // verify that the position was not set
- EUNIT_ASSERT_EQUALS_DESC( -1, (TInt)info.iPosition.iX,"x position not changed" );
- EUNIT_ASSERT_EQUALS_DESC( -1, (TInt)info.iPosition.iY,"y position not changed" );
- // check size
- EUNIT_ASSERT_EQUALS_DESC( 99, TReal2TInt( info.iSize.iX ),"x size changed" );
- EUNIT_ASSERT_EQUALS_DESC( 124, TReal2TInt( info.iSize.iY ),"y size changed" );
-
- // set custom screen size and image size; image larger than screen
- layout.SetSizes( TSize( 99, 88 ), TSize( 144, 155 ), TSize( 500, 500 ) );
- // redo layout
- base.SetLayoutValues( info );
- // verify that the position was not set
- EUNIT_ASSERT_EQUALS_DESC( -1, (TInt)info.iPosition.iX,"x position not changed" );
- EUNIT_ASSERT_EQUALS_DESC( -1, (TInt)info.iPosition.iY,"y position not changed" );
- // check size
- EUNIT_ASSERT_EQUALS_DESC( 99, TReal2TInt( info.iSize.iX ),"x size changed" );
- EUNIT_ASSERT_EQUALS_DESC( 107, TReal2TInt( info.iSize.iY ),"y size changed" );
-
- // set custom screen size and image size; image partially larger than screen
- layout.SetSizes( TSize( 99, 88 ), TSize( 100, 15 ), TSize( 500, 500 ) );
- // redo layout
- base.SetLayoutValues( info );
- // verify that the position was not set
- EUNIT_ASSERT_EQUALS_DESC( -1, (TInt)info.iPosition.iX,"x position not changed" );
- EUNIT_ASSERT_EQUALS_DESC( -1, (TInt)info.iPosition.iY,"y position not changed" );
- // check size
- EUNIT_ASSERT_EQUALS_DESC( 587, TReal2TInt( info.iSize.iX ),"x size changed" );
- EUNIT_ASSERT_EQUALS_DESC( 88, TReal2TInt( info.iSize.iY ),"y size changed" );
-
- // set big enough image so that it zooms
- layout.SetSizes( TSize( 100, 100 ), TSize( 200, 150 ), TSize( 500, 500 ) );
- layout.StartZoom( TShwZoomAndPanLayout::EZoomIn, 0 );
- // redo layout
- base.SetLayoutValues( info );
- // check that layout is changed
- EUNIT_ASSERT_DESC( layout.Changed(), "layout is changed" );
- // clear changeflag
- layout.ClearChanged();
- EUNIT_ASSERT_DESC( !layout.Changed(), "layout is not changed" );
-
-// test crossfade
- // create the crossfade layout
- TEUnitFillMem< TShwCrossFadeLayout > cflayout;
- // get base class pointer
- MGlxLayout& base2 = static_cast< MGlxLayout& >( cflayout );
- // reset info opacity
- info.iOpacity = -1;
- // run the layout
- base2.SetLayoutValues( info );
- // verify that opacity was set to minimum
- EUNIT_ASSERT_EQUALS_DESC(
- TInt( KMinOpacity ), TReal2TInt( info.iOpacity ),"opacity is minimum" );
- // check that layout is not changed
- EUNIT_ASSERT_DESC( !cflayout.Changed(), "layout is not changed" );
- // set new value
- cflayout.Set( 2.0, 0 );
- // reset info opacity
- info.iOpacity = -1;
- // run the layout
- base2.SetLayoutValues( info );
- // check that layout is changed
- EUNIT_ASSERT_DESC( cflayout.Changed(), "layout is changed" );
- // verify that opacity was set to maximum
- EUNIT_ASSERT_EQUALS_DESC(
- TInt( KMaxOpacity ), TReal2TInt( info.iOpacity ),"opacity is maximum" );
- // clear change flag
- cflayout.ClearChanged();
- EUNIT_ASSERT_DESC( !cflayout.Changed(), "layout is not changed" );
- }
-
-void T_CShwZoomAndPanEffect::T_CurveTestL()
- {
- // create env, no need to delete or cleanupstack
- TShwAutoPtr< CHuiEnv > env = CHuiEnv::NewL();
-
- // create curve path with 200 length
- TShwAutoPtr< CHuiCurvePath > ellipsis =
- NShwCurveFactory::CreateEllipsisL( TSize( 100, 200 ), 200 );
-
- // the ellipsis is clockwise around the box
- // check ellipsis values, point 0
- TReal32 x_value = ellipsis->MapValue( 0, 0 );
- TReal32 y_value = ellipsis->MapValue( 0, 1 );
- EUNIT_ASSERT_EQUALS_DESC( 50, TReal2TInt( x_value ), "x coordinate");
- EUNIT_ASSERT_EQUALS_DESC( 0, TReal2TInt( y_value ), "y coordinate");
-
- // point 50
- x_value = ellipsis->MapValue( 50, 0 );
- y_value = ellipsis->MapValue( 50, 1 );
- EUNIT_ASSERT_EQUALS_DESC( 0, TReal2TInt( x_value ), "x coordinate");
- EUNIT_ASSERT_EQUALS_DESC( 100, TReal2TInt( y_value ), "y coordinate");
-
- // point 100
- x_value = ellipsis->MapValue( 100, 0 );
- y_value = ellipsis->MapValue( 100, 1 );
- EUNIT_ASSERT_EQUALS_DESC( -50, TReal2TInt( x_value ), "x coordinate");
- EUNIT_ASSERT_EQUALS_DESC( 0, TReal2TInt( y_value ), "y coordinate");
-
- // point 150
- x_value = ellipsis->MapValue( 150, 0 );
- y_value = ellipsis->MapValue( 150, 1 );
- EUNIT_ASSERT_EQUALS_DESC( 0, TReal2TInt( x_value ), "x coordinate");
- EUNIT_ASSERT_EQUALS_DESC( -100, TReal2TInt( y_value ), "y coordinate");
-
- // point 200
- x_value = ellipsis->MapValue( 200, 0 );
- y_value = ellipsis->MapValue( 200, 1 );
- EUNIT_ASSERT_EQUALS_DESC( 50, TReal2TInt( x_value ), "x coordinate");
- EUNIT_ASSERT_EQUALS_DESC( 0, TReal2TInt( y_value ), "y coordinate");
- }
-
-void T_CShwZoomAndPanEffect::T_ZoomAndPanTestL()
- {
- // create env, no need to delete or cleanupstack
- TShwAutoPtr< CHuiEnv > env = CHuiEnv::NewL();
-
- // size of screen
- const TInt screenX = 320;
- const TInt screenY = 200;
- TSize screen( screenX, screenY );
- // size of image, smaller than screen x KMaxZoomAndPanFactor
- // but larger than screen
- const TInt originalImageX = ( screenX + screenX * KMaxZoomAndPanFactor ) / 2;
- const TInt originalImageY = ( screenY + screenY * KMaxZoomAndPanFactor ) / 2;
- TSize image( originalImageX, originalImageY );
- // create curve path with 100 length
- TShwAutoPtr< CHuiCurvePath > ellipsis =
- NShwCurveFactory::CreateEllipsisL( screen, 100 );
-
- // create the layout
- TEUnitFillMem< TShwZoomAndPanLayout > layout;
- // set screen and image size and maximum size
- layout.SetSizes( screen, image,
- TSize( screenX * KMaxZoomAndPanFactor, screenY * KMaxZoomAndPanFactor ) );
- // set the panning curve
- layout.SetPanningCurve( &ellipsis );
-
- // check that layout has correct init values
- // need to upcast to get access to public functions
- MGlxLayout& base = static_cast< MGlxLayout& >( layout );
- TGlxLayoutInfoResetter info;
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- // run the layout
- base.SetLayoutValues( info );
- // verify that the position was set properly, the initial size is minimum
- // so pan gets scaled to 0
- TInt initialXonCurve = 160;
- TInt initialYonCurve = 0;
- EUNIT_ASSERT_EQUALS_DESC(
- 0, TReal2TInt( info.iPosition.iX ),"x position set" );
- EUNIT_ASSERT_EQUALS_DESC(
- 0, TReal2TInt( info.iPosition.iY ),"y position set" );
- // verify size
- EUNIT_ASSERT_EQUALS_DESC(
- screenX, TReal2TInt( info.iSize.iX ),"default x size is screen size" );
- EUNIT_ASSERT_EQUALS_DESC(
- screenY, TReal2TInt( info.iSize.iY ),"default y size is screen size" );
-
- // do zoom in in 1 second
- layout.StartZoom( TShwZoomAndPanLayout::EZoomIn, 1 );
-
- // create timer to give us callback
- TShwAutoPtr< CPeriodic > timer = CPeriodic::NewL( CActive::EPriorityStandard );
- // wait for 1.5 seconds (to be sure the zoom completes)
- timer->Start(1.5 * 1000000, 1.5 * 1000000, TShwCallBack<
- T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> (
- this));
- // start async wait
- iAsyncWait.Start();
-
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- // run the layout
- base.SetLayoutValues( info );
- // verify that the position was set; zoom in does one half of the curve
- EUNIT_ASSERT_EQUALS_DESC(
- -initialXonCurve, TReal2TInt( info.iPosition.iX ),"x position looped on the opposite side" );
- EUNIT_ASSERT_EQUALS_DESC(
- initialYonCurve, TReal2TInt( info.iPosition.iY ),"y position looped back" );
- // verify size, after zoom in we are in 4x screen size
- EUNIT_ASSERT_GREATER_DESC(
- TReal2TInt( info.iSize.iX ), originalImageX,"x size is greater than original size" );
- EUNIT_ASSERT_GREATER_DESC(
- TReal2TInt( info.iSize.iY ), originalImageY,"y size is greater than original size" );
-
- // perform zoom out in one second
- layout.StartZoom( TShwZoomAndPanLayout::EZoomOut, 1 );
- // cancel old timer
- timer->Cancel();
- // wait for 1.5 seconds (to be sure the zoom completes)
- timer->Start(1.5 * 1000000, 1.5 * 1000000, TShwCallBack<
- T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> (
- this));
- // start async wait
- iAsyncWait.Start();
-
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- // run the layout
- base.SetLayoutValues( info );
- // verify that the position was set to zero again as in minimum size the pan is 0
- EUNIT_ASSERT_EQUALS_DESC(
- 0, TReal2TInt( info.iPosition.iX ), "x position looped " );
- EUNIT_ASSERT_EQUALS_DESC(
- 0, TReal2TInt( info.iPosition.iY ), "y position looped back" );
- // verify size, after zoom in we are in 100% size
- EUNIT_ASSERT_EQUALS_DESC(
- screenX, TReal2TInt( info.iSize.iX ),"x size is back to minimum" );
- EUNIT_ASSERT_EQUALS_DESC(
- screenY, TReal2TInt( info.iSize.iY ),"y size is back to minimum" );
- }
-
-void T_CShwZoomAndPanEffect::T_PauseTestL()
- {
- // display size is define by gScreenRect
- // give the HUI env to the effect and the size
- TSize screenSize = gScreenRect.Size();
- iCShwZoomAndPanEffect->InitializeL(
- iEnv,
- NULL,
- NULL,
- screenSize );
-
- // prepare view with a max size image
- TSize imageSize( screenSize.iWidth * KMaxThumbnailSize, screenSize.iHeight * KMaxThumbnailSize );
- TSize thumbSize = iCShwZoomAndPanEffect->PrepareViewL( iVisual, imageSize );
- // check thumbnail size
- EUNIT_ASSERT_EQUALS_DESC(
- imageSize.iHeight, thumbSize.iHeight, "thumbnail is image size" );
- EUNIT_ASSERT_EQUALS_DESC(
- imageSize.iWidth, thumbSize.iWidth, "thumbnail is image size" );
-
- // then enter view, fade in should last 250 millliseconds and view 500
- // get the layout chain
- MGlxLayout* layout =
- iCShwZoomAndPanEffect->EnterViewL( iVisual, 500, 250 );
- // get the initial layout values
- TGlxLayoutInfoResetter info;
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
-
- // next pause the effect
- iCShwZoomAndPanEffect->PauseL();
- // create timer to give us callback
- TShwAutoPtr< CPeriodic > timer = CPeriodic::NewL( CActive::EPriorityStandard );
- // start asynch wait for 1.5 second
- timer->Start(1.5 * 1000000, 1.5 * 1000000, TShwCallBack<
- T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> (
- this));
- // start async wait
- iAsyncWait.Start();
- // cancel the timer
- timer->Cancel();
-
- // now verify that the layout chain is in same situation
- // get new layout values
- TGlxLayoutInfoResetter info2;
- // reset info2
- info2.iPosition.iX = -1;info2.iPosition.iY = -1;
- info2.iSize.iX = -1; info2.iSize.iY = -1;
- info2.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info2 );
- // check that no changes
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info.iOpacity ), TReal2TInt( info2.iOpacity ), "opacity" );
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info.iPosition.iX ), TReal2TInt( info2.iPosition.iX ), "position x" );
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info.iPosition.iY ), TReal2TInt( info2.iPosition.iY ), "position y" );
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info.iSize.iX ), TReal2TInt( info2.iSize.iX ), "size x" );
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info.iSize.iY ), TReal2TInt( info2.iSize.iY ), "size y" );
-
- // resume the effect
- iCShwZoomAndPanEffect->Resume();
-
- // start timer for 1.5 seconds
- timer->Start(1.5 * 1000000, 1.5 * 1000000, TShwCallBack<
- T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> (
- this));
- // start async wait
- iAsyncWait.Start();
- // cancel the timer
- timer->Cancel();
-
- // now verify that the layout chain did change
- // reset info2
- info2.iPosition.iX = -1;info2.iPosition.iY = -1;
- info2.iSize.iX = -1; info2.iSize.iY = -1;
- info2.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info2 );
- // check that values did not change
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info.iOpacity ), TReal2TInt( info2.iOpacity ), "opacity" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info.iSize.iX ), TReal2TInt( info2.iSize.iX ), "size x" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info.iSize.iY ), TReal2TInt( info2.iSize.iY ), "size y" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info.iPosition.iX ), TReal2TInt( info2.iPosition.iX ), "position x" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info.iPosition.iY ), TReal2TInt( info2.iPosition.iY ), "position y" );
-
- // enter view again, fade in should last 250 millliseconds and view 500
- // get the layout chain
- layout = iCShwZoomAndPanEffect->EnterViewL( iVisual, 500, 250 );
- // get the initial layout values
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
- // start timer for .1 seconds, to make sure opacity does not run too fast
- timer->Start(0.1 * 1000000, 0.1 * 1000000, TShwCallBack<
- T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> (
- this));
- // start async wait
- iAsyncWait.Start();
- // cancel the timer
- timer->Cancel();
-
- // reset info2
- info2.iPosition.iX = -1;info2.iPosition.iY = -1;
- info2.iSize.iX = -1; info2.iSize.iY = -1;
- info2.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info2 );
- // check that size and opacity changed, multiply with 10 to remove rounding errors
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info.iOpacity * 10 ), TReal2TInt( info2.iOpacity * 10 ), "opacity" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info.iSize.iX ), TReal2TInt( info2.iSize.iX ), "size x" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info.iSize.iY ), TReal2TInt( info2.iSize.iY ), "size y" );
-
- // pause the effect
- iCShwZoomAndPanEffect->PauseL();
- // run the layout to get values
- layout->SetLayoutValues( info2 );
- // start timer for 1.0 seconds
- timer->Start(1.0 * 1000000, 1.0 * 1000000, TShwCallBack<
- T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> (
- this));
- // start async wait
- iAsyncWait.Start();
- // cancel the timer
- timer->Cancel();
- TGlxLayoutInfoResetter info3;
- // reset info3
- info3.iPosition.iX = -1;info3.iPosition.iY = -1;
- info3.iSize.iX = -1; info3.iSize.iY = -1;
- info3.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info3 );
- // check that no changes between info2 and info3, multiply opacity to remove rounding error
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info2.iOpacity * 10 ), TReal2TInt( info3.iOpacity * 10 ), "opacity" );
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info2.iSize.iX ), TReal2TInt( info3.iSize.iX ), "size x" );
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info2.iSize.iY ), TReal2TInt( info3.iSize.iY ), "size y" );
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info2.iPosition.iX ), TReal2TInt( info3.iPosition.iX ), "position x" );
- EUNIT_ASSERT_EQUALS_DESC(
- TReal2TInt( info2.iPosition.iY ), TReal2TInt( info3.iPosition.iY ), "position y" );
-
- // now do the resume
- iCShwZoomAndPanEffect->Resume();
- // start timer for 1.0 seconds
- timer->Start(1.0 * 1000000, 1.0 * 1000000, TShwCallBack<
- T_CShwZoomAndPanEffect, &T_CShwZoomAndPanEffect::CancelAsyncL> (
- this));
- // start async wait
- iAsyncWait.Start();
- // cancel the timer
- timer->Cancel();
-
- // reset info3
- info3.iPosition.iX = -1;info3.iPosition.iY = -1;
- info3.iSize.iX = -1; info3.iSize.iY = -1;
- info3.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info3 );
- // check that values did change between info2 and info3, multiply opacity to remove rounding error
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info2.iOpacity * 10 ), TReal2TInt( info3.iOpacity * 10 ), "opacity" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info2.iSize.iX ), TReal2TInt( info3.iSize.iX ), "size x" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info2.iSize.iY ), TReal2TInt( info3.iSize.iY ), "size y" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info2.iPosition.iX ), TReal2TInt( info3.iPosition.iX ), "position x" );
- EUNIT_ASSERT_NOT_EQUALS_DESC(
- TReal2TInt( info2.iPosition.iY ), TReal2TInt( info3.iPosition.iY ), "position y" );
- }
-
-void T_CShwZoomAndPanEffect::T_TestBoundariesL()
- {
- // get the screen size
- TSize screenSize = gScreenRect.Size();
- // calculate the maximum width and height
- TInt maximumImageWidth = screenSize.iWidth * KMaxThumbnailSize;
- TInt maximumImageHeight = screenSize.iHeight * KMaxThumbnailSize;
-
- // display size is define by gScreenRect
- // give the HUI env to the effect and the size
- iCShwZoomAndPanEffect->InitializeL(
- iEnv,
- NULL,
- NULL,
- screenSize );
-
- // prepare view with image twice as wide but half the height of maximum
- TSize imageSize(
- maximumImageWidth * 2,
- maximumImageHeight / 2 );
- TSize thumbSize = iCShwZoomAndPanEffect->PrepareViewL( iVisual, imageSize );
- // check the thumbnail size
- // note that the thumbnail may be wider than higher than the maximage but the area
- // is the same
- EUNIT_ASSERT_EQUALS_DESC(
- maximumImageWidth * 2, thumbSize.iWidth, "size x" );
- EUNIT_ASSERT_EQUALS_DESC(
- maximumImageHeight / 2, thumbSize.iHeight, "size y" );
-
- // then enter view, fade in should last 0 millliseconds and view 0 so that the new values
- // are immediate
- // get the layout chain
- MGlxLayout* layout =
- iCShwZoomAndPanEffect->EnterViewL( iVisual, 0, 0 );
- // get the initial layout values
- TGlxLayoutInfoResetter info;
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
- // check that image width is maximum screen width times two and height is
- // original by two (as original was twice as wide as fitted)
- // note that the thumbnail may be wider than higher than the maximage but the area
- // is the same
- EUNIT_ASSERT_EQUALS_DESC(
- maximumImageWidth * 2, TReal2TInt( info.iSize.iX ), "size x" );
- EUNIT_ASSERT_EQUALS_DESC(
- maximumImageHeight / 2, TReal2TInt( info.iSize.iY ), "size y" );
-
- // prepare view with image max wide but twice the height of maximum
- imageSize.SetSize( maximumImageWidth, maximumImageHeight * 2 );
- iCShwZoomAndPanEffect->PrepareViewL( iVisual, imageSize );
- // then enter view, fade in should last 0 millliseconds and view 0 so that the new values
- // are immediate
- // get the layout chain
- layout = iCShwZoomAndPanEffect->EnterViewL( iVisual, 0, 0 );
- // get the initial layout values
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
- // check that image area is same as maximum image area
- // note that the thumbnail may be wider than higher than the maximage but the area
- // is the same
- EUNIT_ASSERT_EQUALS_DESC(
- maximumImageWidth * maximumImageHeight,
- TReal2TInt( info.iSize.iX * info.iSize.iY ), "size x" );
-
- // test image partially smaller than screen, should not zoom
- // prepare view with image quarter of the screen wide but four times the height of screen
- imageSize.SetSize( gScreenWidth / 4, gScreenHeight * 4 );
- iCShwZoomAndPanEffect->PrepareViewL( iVisual, imageSize );
- // then enter view, fade in should last 0 millliseconds and view 0 so that the new values
- // are immediate
- // get the layout chain
- layout = iCShwZoomAndPanEffect->EnterViewL( iVisual, 0, 0 );
- // get the initial layout values
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
- // check that image size is the maximum screen width and height multiplied by 16
- EUNIT_ASSERT_EQUALS_DESC(
- gScreenWidth, TReal2TInt( info.iSize.iX ), "size x" );
- EUNIT_ASSERT_EQUALS_DESC(
- gScreenHeight * 4 * 4, TReal2TInt( info.iSize.iY ), "size y" );
-
- // test image partially smaller than screen, should zoom
- // prepare view with image half of the screen wide but three times the height of screen
- imageSize.SetSize( gScreenWidth - 10, gScreenHeight * 2 );
- iCShwZoomAndPanEffect->PrepareViewL( iVisual, imageSize );
- // then enter view, fade in should last 0 millliseconds and view 0 so that the new values
- // are immediate
- // get the layout chain
- layout = iCShwZoomAndPanEffect->EnterViewL( iVisual, 0, 0 );
- // get the initial layout values
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
- // check image area, should be same as max size
- EUNIT_ASSERT_EQUALS_DESC(
- maximumImageWidth * maximumImageHeight,
- TReal2TInt( info.iSize.iX * info.iSize.iY ), "size x" );
-
- // test image that is screen size, should not zoom
- // prepare view with image
- imageSize.SetSize( gScreenWidth, gScreenHeight );
- iCShwZoomAndPanEffect->PrepareViewL( iVisual, imageSize );
- // then enter view, fade in should last 0 millliseconds and view 0 so that the new values
- // are immediate
- // get the layout chain
- layout = iCShwZoomAndPanEffect->EnterViewL( iVisual, 0, 0 );
- // get the initial layout values
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
- // check that image size is screen size
- EUNIT_ASSERT_EQUALS_DESC(
- gScreenWidth, TReal2TInt( info.iSize.iX ), "size x" );
- EUNIT_ASSERT_EQUALS_DESC(
- gScreenHeight, TReal2TInt( info.iSize.iY ), "size y" );
-
- // test image partially larger than screen, should zoom
- // prepare view
- imageSize.SetSize( gScreenWidth * 1.5, gScreenHeight * 1.5 );
- iCShwZoomAndPanEffect->PrepareViewL( iVisual, imageSize );
- // then enter view, fade in should last 0 millliseconds and view 0 so that the new values
- // are immediate
- // get the layout chain
- layout = iCShwZoomAndPanEffect->EnterViewL( iVisual, 0, 0 );
- // get the initial layout values
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
- // check that image size is the screen multiplied by max zoom
- EUNIT_ASSERT_EQUALS_DESC(
- TInt(gScreenWidth * KMaxZoomAndPanFactor), TReal2TInt( info.iSize.iX ), "size x" );
- EUNIT_ASSERT_EQUALS_DESC(
- TInt(gScreenHeight * KMaxZoomAndPanFactor), TReal2TInt( info.iSize.iY ), "size y" );
-
- // enter transition to increase the counter, duration zero
- // ignore layout chain
- iCShwZoomAndPanEffect->EnterTransitionL( iVisual, 0 );
- // enter the same effect again, this time we do zoom out (max to min size)
- // get the layout chain
- layout = iCShwZoomAndPanEffect->EnterViewL( iVisual, 0, 0 );
- // reset info
- info.iPosition.iX = -1;info.iPosition.iY = -1;
- info.iSize.iX = -1; info.iSize.iY = -1;
- info.iOpacity = -1;
- // run the layout to get values
- layout->SetLayoutValues( info );
- // check that image size is the screen multiplied by max zoom
- EUNIT_ASSERT_EQUALS_DESC(
- gScreenWidth, TReal2TInt( info.iSize.iX ), "size x" );
- EUNIT_ASSERT_EQUALS_DESC(
- gScreenHeight, TReal2TInt( info.iSize.iY ), "size y" );
- }
-
-TInt T_CShwZoomAndPanEffect::CancelAsyncL()
- {
- // stop async wait
- iAsyncWait.AsyncStop();
- // return KErrNone to stop the timer
- return KErrNone;
- }
-
-// TEST TABLE
-EUNIT_BEGIN_TEST_TABLE(
- T_CShwZoomAndPanEffect,
- "Test suite for CShwZoomAndPanEffect and Layout",
- "UNIT" )
-
-EUNIT_TEST(
- "Geometry utilities test",
- "NShwGeometryUtilities",
- "FitDimension,FitInsideBox,FitToCoverBox",
- "FUNCTIONALITY",
- Empty, T_TestGeometryAlgorithmsL, Empty )
-
-EUNIT_TEST(
- "Layout test",
- "TShwZoomAndPanLayout",
- "TShwZoomAndPanLayout",
- "FUNCTIONALITY",
- Empty, T_LayoutTestL, Empty )
-
-EUNIT_TEST(
- "Curve test",
- "ShwCurveFactory",
- "CreateEllipsisL",
- "FUNCTIONALITY",
- Empty, T_CurveTestL, Empty )
-
-EUNIT_TEST(
- "Zoom and pan test",
- "TShwZoomAndPanLayout",
- "DoSetLayoutValues",
- "FUNCTIONALITY",
- Empty, T_ZoomAndPanTestL, Empty )
-
-EUNIT_TEST(
- "Pause Zoom and pan",
- "CShwZoomAndPanEffect",
- "PauseL, Resume",
- "FUNCTIONALITY",
- SetupL, T_PauseTestL, Teardown )
-
-EUNIT_TEST(
- "Test boundaries",
- "CShwZoomAndPanEffect",
- "PrepareViewL",
- "FUNCTIONALITY",
- SetupL, T_TestBoundariesL, Teardown )
-
-EUNIT_END_TEST_TABLE
-
-// END OF FILE
--- a/photosgallery/slideshow/engine/tsrc/t_cshwzoomandpaneffect/t_cshwzoomandpaneffect.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for zoom and pan effect in slideshow
- *
-*/
-
-
-
-
-#ifndef __T_CSHWZOOMANDPANEFFECT_H__
-#define __T_CSHWZOOMANDPANEFFECT_H__
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/CEUnitTestSuiteClass.h>
-#include <digia/eunit/EUnitDecorators.h>
-
-// INTERNAL INCLUDES
-
-// FORWARD DECLARATIONS
-class CHuiEnv;
-class CHuiDisplayCoeControl;
-class CHuiControl;
-class CHuiImageVisual;
-class CShwZoomAndPanEffect;
-
-// CLASS DEFINITION
-/**
- * EUnit test suite for Zoom and pan related classes
- */
-NONSHARABLE_CLASS( T_CShwZoomAndPanEffect )
- : public CEUnitTestSuiteClass
- {
- public: // Constructors and destructors
-
- /**
- * Two phase construction
- */
- static T_CShwZoomAndPanEffect* NewL();
- static T_CShwZoomAndPanEffect* NewLC();
- /**
- * Destructor
- */
- ~T_CShwZoomAndPanEffect();
-
- // helper
- TInt CancelAsyncL();
-
- private: // Constructors and destructors
-
- T_CShwZoomAndPanEffect();
- void ConstructL();
-
- private: // New methods
-
- void Empty();
- void SetupL();
- void Teardown();
- void T_LayoutTestL();
- void T_CurveTestL();
- void T_ZoomAndPanTestL();
- void T_PauseTestL();
- void T_TestGeometryAlgorithmsL();
- void T_TestBoundariesL();
-
- private: // Data
-
- /// Own: HUI environment
- CHuiEnv* iEnv;
-
- /// Own: HUI display
- CHuiDisplayCoeControl* iCoeDisplay;
-
- /// Own: HUI control
- CHuiControl* iControl;
-
- /// Own: HUI visual
- CHuiImageVisual* iVisual;
-
- /// Own: asynch wait
- CActiveSchedulerWait iAsyncWait;
-
- /// Own: class under test
- CShwZoomAndPanEffect* iCShwZoomAndPanEffect;
- EUNIT_DECLARE_TEST_TABLE;
-
- };
-
-#endif // __T_CSHWZOOMANDPANEFFECT_H__
-
-// End of file
--- a/photosgallery/slideshow/engine/tsrc/t_cshwzoomandpaneffect/t_cshwzoomandpaneffect_dllmain.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
-* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Test for zoom and pan effect in slideshow
- *
-*/
-
-
-
-
-// CLASS HEADER
-#include "t_cshwzoomandpaneffect.h"
-
-// EXTERNAL INCLUDES
-#include <digia/eunit/CEUnitTestSuite.h>
-
-EXPORT_C MEUnitTest* CreateTestSuiteL()
- {
- return T_CShwZoomAndPanEffect::NewL();
- }
-
-#ifndef EKA2
-GLDEF_C TInt E32Dll( TDllReason )
- {
- return KErrNone;
- }
-#endif
-
-// END OF FILE
--- a/photosgallery/slideshow/settingsdialog/data/shwsettingsdialog.rss Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/settingsdialog/data/shwsettingsdialog.rss Thu Aug 19 09:55:03 2010 +0300
@@ -264,6 +264,7 @@
}
// -----------------------------------------------------------------------------
// Slideshow settings play direction popup setting texts resource
+// Direction of slideshow play (0->Older to newer, 1->newer to older)
// -----------------------------------------------------------------------------
RESOURCE ARRAY r_shw_settingslist_play_direction_texts
{
@@ -271,12 +272,12 @@
{
AVKON_ENUMERATED_TEXT
{
- value = 1;
+ value = 0;
text = qtn_lgal_slideshow_settings_older_to_newer;
},
AVKON_ENUMERATED_TEXT
{
- value = 0;
+ value = 1;
text = qtn_lgal_slideshow_settings_newer_to_older;
}
};
@@ -353,15 +354,16 @@
// ---------------------------------------------------------------------------
// Delay transition slider.
// ---------------------------------------------------------------------------
-RESOURCE SLIDER r_shw_settingslist_delay_slider
+RESOURCE SLIDER_WITH_FEEDBACK_STYLE r_shw_settingslist_delay_slider
{
- layout = EAknSettingsItemSliderLayout;
- minvalue = KMinTransDelay;
- maxvalue = KMaxTransDelay;
- step = KTransDelayStep;
+ feedbackstyle = EAknSliderFbDynamic;
+ layout = EAknSettingsItemSliderLayout;
+ minvalue = KMinTransDelay;
+ maxvalue = KMaxTransDelay;
+ step = KTransDelayStep;
valuetype = EAknSliderValueNone;
- minlabel = qtn_lgal_slideshow_settings_delay_slow;
- maxlabel = qtn_lgal_slideshow_settings_delay_fast;
+ minlabel = qtn_lgal_slideshow_settings_delay_slow;
+ maxlabel = qtn_lgal_slideshow_settings_delay_fast;
}
--- a/photosgallery/slideshow/settingsdialog/src/shwslideshowsettingslist.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/settingsdialog/src/shwslideshowsettingslist.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -1203,25 +1203,26 @@
//-----------------------------------------------------------------------------
void CShwSlideShowSettingsList::SetPlayDirectionL(TBool aNewPlayDirection)
{
- TRACER("CShwSlideShowSettingsList::SetPlayDirectionL");
- GLX_LOG_INFO("CShwSlideShowSettingsList::SetMusicStateL");
- if (aNewPlayDirection != iPlayDirection)
- {
- // retrieve play direction setting
- (*SettingItemArray())[EPlayDirectionItem]->EditItemL(EFalse);
- // updates play direction
- iPlayDirection = aNewPlayDirection;
- // internalise new state to settings item
- (*(SettingItemArray()))[EPlayDirectionItem]->StoreL();
-
- // persist direction
- iShwSettings.SavePlayOrderL(iPlayDirection);
- //@TODO cenrep update
-
- // redraw music on/off control
- ListBox()->DrawItem(EPlayDirectionItem);
- }
- }
+ TRACER("CShwSlideShowSettingsList::SetPlayDirectionL");
+ GLX_LOG_INFO1("CShwSlideShowSettingsList::SetPlayDirectionL(%d)",
+ aNewPlayDirection);
+
+ // retrieve play direction setting
+ (*SettingItemArray())[EPlayDirectionItem]->EditItemL(EFalse);
+
+ // updates play direction
+ iPlayDirection = aNewPlayDirection;
+
+ // internalise new state to settings item
+ (*(SettingItemArray()))[EPlayDirectionItem]->StoreL();
+
+ // persist direction
+ iShwSettings.SavePlayOrderL(iPlayDirection);
+
+ // redraw music on/off control
+ ListBox()->DrawItem(EPlayDirectionItem);
+ }
+
//-----------------------------------------------------------------------------
// CShwSlideShowSettingsList::ConfirmationQueryL
//-----------------------------------------------------------------------------
--- a/photosgallery/slideshow/view/group/shwslideshowviewplugin.mmp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/view/group/shwslideshowviewplugin.mmp Thu Aug 19 09:55:03 2010 +0300
@@ -75,6 +75,7 @@
SYSTEMINCLUDE ../../../viewframework/visuallistmanager/inc
SYSTEMINCLUDE ../../../viewframework/uiutilities/inc
SYSTEMINCLUDE ../../../viewframework/texturemanager/inc
+SYSTEMINCLUDE ../../../viewframework/commandhandlers/inc
SYSTEMINCLUDE ../../../viewframework/commandhandlers/commoncommandhandlers/inc
SYSTEMINCLUDE ../../../viewframework/commandhandlers/commandhandlerbase/inc
SYSTEMINCLUDE ../../engine/inc // slideshow engine
@@ -105,8 +106,6 @@
LIBRARY mpxcommon.lib
LIBRARY ecom.lib
-LIBRARY hitchcock.lib // HUI
-
LIBRARY glxviewbase.lib
LIBRARY glxmedialists.lib
LIBRARY glxvisuallistmanager.lib
@@ -123,7 +122,7 @@
LIBRARY aknicon.lib // AknIconUtils
LIBRARY etel3rdparty.lib // for CTelephony
-LIBRARY alfclient.lib
+LIBRARY alfclient.lib
LIBRARY gesturehelper.lib
LIBRARY remconcoreapi.lib
@@ -131,4 +130,5 @@
//LIBRARY hgcontextutility.lib // For Teleport
LIBRARY glxtvout.lib
LIBRARY fbscli.lib
+LIBRARY ws32.lib // RWindowGroup
// End of File
--- a/photosgallery/slideshow/view/inc/shwslideshowview.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/view/inc/shwslideshowview.h Thu Aug 19 09:55:03 2010 +0300
@@ -23,6 +23,7 @@
#include <glxviewbase.h>
#include <mglxmedialistobserver.h>
#include <AknProgressDialog.h>
+#include <AknWsEventObserver.h>
#include <gestureobserver.h>
#include <gesturehelper.h>
#include "shwengineobserver.h"
@@ -73,7 +74,8 @@
public MShwGestureObserver,
public MStorageNotifierObserver,
public MGlxTvObserver,
- public MGlxHDMIDecoderObserver
+ public MGlxHDMIDecoderObserver,
+ public MAknWsEventObserver
{
public:
@@ -139,6 +141,9 @@
*/
void HandleForegroundEventL(TBool aForeground);
+ public: // From MAknWsEventObserver
+ void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination);
+
public: // From CGlxViewBase
/**
@@ -341,6 +346,11 @@
* for which HDMI advance decoding will be done
*/
TInt GetNextIndex();
+ /**
+ * Returns the application foreground status.
+ * Foreground status is found using WindowsGroupID
+ */
+ TBool IsAppInForegroundL();
public:
//to keep in track which of the command set is active/on top
enum TShwState
@@ -425,7 +435,6 @@
TShwState iShwState;
TShwFurniture iShwFurniture;
- TInt iCurrentActiveCommandSet;
CShwGestureControl* iShwGestureControl;
GestureHelper::CGestureControl* iGestureControl;
CAlfControlGroup* iGestureControlGroup;
@@ -444,6 +453,7 @@
TInt iHdmiWidth;
TInt iHdmiHeight;
+ CAknWsEventMonitor* iAknEventMonitor;// not owned
};
#endif // C_SHWSLIDESHOWVIEW_H
--- a/photosgallery/slideshow/view/src/shwslideshowview.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/view/src/shwslideshowview.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -40,6 +40,7 @@
#include <glxresolutionutility.h> // for CGlxResolutionUtility
#include <shwslideshowview.rsg> // view's resource
#include <data_caging_path_literals.hrh> // for resource directory path
+#include <glxcommandhandlers.hrh> // for EGlxCmdResetView
#include <glxlog.h>
#include <glxtracer.h>
#include <aknsoundsystem.h> // for CAknKeySoundSystem
@@ -247,6 +248,10 @@
{
// The list should now be populated, so set the focus
SetListFocusL();
+
+ // Initialize control textures
+ iVolumeControl->InitControlTextureL();
+
// Need to take latest screen size as layout has changed
TRect currentScreen;
AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen,
@@ -292,6 +297,8 @@
// we need the full path for the filter creation so that the selection can be
// extracted from there
CMPXCollectionPath* fullpath = iMediaList->PathLC();
+ // CreateSlideShowFilterFromExistingFilterL() takes ownership of the fullpath so no need to destroy it.
+ CleanupStack::Pop( fullpath );
// create the filter
filter = TGlxFilterFactory::CreateSlideShowFilterFromExistingFilterL(
iMediaList->Filter(), fullpath,
@@ -304,7 +311,6 @@
iFilteredList->AddMediaListObserverL( this );
CleanupStack::PopAndDestroy( filter );
- CleanupStack::PopAndDestroy( fullpath );
// return value needed as this is a TCallBack
return KErrNone;
@@ -375,6 +381,8 @@
&CShwSlideshowView::PopulateListL> (this));
iMSKPressed = EFalse;
iLSKPressed = EFalse;
+ iAknEventMonitor
+ = static_cast<CAknAppUiBase*> (CCoeEnv::Static()->AppUi())->EventMonitor();
}
// ---------------------------------------------------------------------------
@@ -391,15 +399,16 @@
// ---------------------------------------------------------------------------
// From CAknView
-// Foreground event handling function.
+// Background event handling in HandleWsEventL.
+// Foreground event handling this function.
// ---------------------------------------------------------------------------
//
void CShwSlideshowView::HandleForegroundEventL(TBool aForeground)
{
- TRACER("CShwSlideshowView::HandleForegroundEventL");
- GLX_LOG_INFO( "CShwSlideshowView::HandleForegroundEventL()" );
+ TRACER("CShwSlideshowView::HandleForegroundEventL");
+ GLX_LOG_INFO1("CShwSlideshowView::HandleForegroundEventL(%d)", aForeground);
iIsForegrnd = aForeground;
- if( aForeground )
+ if (aForeground)
{
if (iHdmiController && iHdmiActive)
{
@@ -416,16 +425,6 @@
iEngine->GetMusicVolumeL();
}
}
- else
- {
- if (iHdmiController && iHdmiActive)
- {
- iHdmiController->ShiftToCloningMode();
- }
- // Something else has gained the foreground
- iPauseHandler->SwitchToBackgroundL();
- }
-
CAknView::HandleForegroundEventL(aForeground);
}
@@ -507,6 +506,8 @@
// We will require to act on events ONLY when the view is active.
// So listen to them only when the view is active.
iShwGestureControl->AddObserverL(this);
+ iAknEventMonitor->Enable(ETrue);
+ iAknEventMonitor->AddObserverL(this);
}
// -----------------------------------------------------------------------------
@@ -547,6 +548,8 @@
//are always valid so no need to test for != NULL
iDisplay->Roster().Hide( *iVolumeControlGroup );
+ iAknEventMonitor->Enable(EFalse);
+ iAknEventMonitor->RemoveObserver(this);
//Ensure we revert to a proper background
TRAP_IGNORE(
@@ -760,23 +763,23 @@
// ---------------------------------------------------------------------------
//
void CShwSlideshowView::EngineStartedL()
- {
- TRACER("CShwSlideshowView::EngineStartedL");
- GLX_LOG_INFO( "CShwSlideshowView::EngineStartedL()" );
-
- if (iWaitDialog)
- {
- // cancel the progress bar
- iWaitDialog->ProcessFinishedL();
- }
- if (iHdmiController)
- {
- iHdmiController->ShiftToPostingMode();
- }
- iShwState = EShwPlay;
- ReplaceCommandSetL(R_SHW_SOFTKEYS_END_PAUSE, R_SHW_SOFTKEYS_END_PAUSE);
- ShowShwFurnitureL();
- }
+ {
+ TRACER("CShwSlideshowView::EngineStartedL");
+ GLX_LOG_INFO( "CShwSlideshowView::EngineStartedL()" );
+ if (iWaitDialog)
+ {
+ // cancel the progress bar
+ iWaitDialog->ProcessFinishedL();
+ }
+ if (iHdmiController)
+ {
+ iHdmiController->ShiftToPostingMode();
+ }
+ // Here, iShwState value is either 0(first instance)
+ // or EShwExiting(remembered from previous instance)
+ iShwState = EShwPlay;
+ ShowShwFurnitureL();
+ }
// ---------------------------------------------------------------------------
// From MShwEngineObserver
@@ -786,20 +789,19 @@
void CShwSlideshowView::EnginePausedL()
{
TRACER("CShwSlideshowView::EnginePausedL");
- GLX_LOG_INFO( "CShwSlideshowView::EnginePausedL()" );
-
+ GLX_LOG_INFO( "CShwSlideshowView::EnginePausedL()" );
// Cancel the backlight if it's on
- if ( iBackLightTimer->IsRunning() )
+ if (iBackLightTimer->IsRunning())
{
iBackLightTimer->Cancel();
}
-
- if(!iUiUtility->IsExitingState())
- {
- iShwState = EShwPause;
- ReplaceCommandSetL(R_SHW_SOFTKEYS_END_CONTINUE,R_SHW_SOFTKEYS_END_PAUSE);
- ShowShwFurnitureL();
- }
+ if (!iUiUtility->IsExitingState() && (iShwState != EShwExiting))
+ {
+ iShwState = EShwPause;
+ ReplaceCommandSetL(R_SHW_SOFTKEYS_END_CONTINUE,
+ R_SHW_SOFTKEYS_END_PAUSE);
+ ShowShwFurnitureL();
+ }
}
// ---------------------------------------------------------------------------
@@ -807,20 +809,24 @@
// Engine resumed callback.
// ---------------------------------------------------------------------------
//
-void CShwSlideshowView::EngineResumedL()
- {
- TRACER("CShwSlideshowView::EngineResumedL");
- GLX_LOG_INFO( "CShwSlideshowView::EngineResumedL" );
- iEngine->GetMusicVolumeL();
+void CShwSlideshowView::EngineResumedL()
+ {
+ TRACER("CShwSlideshowView::EngineResumedL");
+ GLX_LOG_INFO( "CShwSlideshowView::EngineResumedL" );
+ iEngine->GetMusicVolumeL();
// Re-enable the backlight if it's off
- if ( !iBackLightTimer->IsRunning() )
+ if (!iBackLightTimer->IsRunning())
{
iBackLightTimer->StartL();
}
- iShwState = EShwPlay;
- ReplaceCommandSetL(R_SHW_SOFTKEYS_END_PAUSE,R_SHW_SOFTKEYS_END_CONTINUE);
- ShowShwFurnitureL();
- }
+ if (iShwState != EShwExiting)
+ {
+ iShwState = EShwPlay;
+ ReplaceCommandSetL(R_SHW_SOFTKEYS_END_PAUSE,
+ R_SHW_SOFTKEYS_END_CONTINUE);
+ ShowShwFurnitureL();
+ }
+ }
// ---------------------------------------------------------------------------
// From MShwEngineObserver
// Engine LSK Pressed
@@ -1008,17 +1014,13 @@
CleanupClosePushL( stream );
stream.ReadInt32L();
-
//Get the play direction.
-
CShwSettingsModel* shwSettingsMdl = CShwSettingsModel::NewL();
- CleanupStack::PushL( shwSettingsMdl );
- iPlayDirection = static_cast< NShwSlideshow::
- TPlayDirection>(shwSettingsMdl->PlayOrderL());
+ CleanupStack::PushL(shwSettingsMdl);
+ iPlayDirection
+ = static_cast<NShwSlideshow::TPlayDirection> (shwSettingsMdl->PlayOrderL());
CleanupStack::PopAndDestroy( shwSettingsMdl );
-
-
// Retrieve the path
iCollectionPath = CMPXCollectionPath::NewL();
iCollectionPath->InternalizeL( stream );
@@ -1049,28 +1051,31 @@
void CShwSlideshowView::SetListFocusL()
{
TRACER("CShwSlideshowView::SetListFocusL");
- GLX_LOG_INFO( "CShwSlideshowView::SetListFocusL" );
+ GLX_LOG_INFO("CShwSlideshowView::SetListFocusL");
// Ensure that we start the slideshow from the correct image index:
// if there are any selected images we always start from the first one,
// otherwise we try to use the item with focus from the unfiltered list
// so long as it hasn't been filtered out, in which case we use the first image.
TInt selectionCount = iCollectionPath->Selection().Count();
TInt focusIndex = 0;
- if ( selectionCount == 0 )
+ if (selectionCount == 0)
{
+
// nothing selected, so determine which item has focus in the original list
focusIndex = iMediaList->FocusIndex();
- const TGlxMedia& mediaItem = iMediaList->Item( focusIndex );
+ GLX_LOG_INFO1("SlideshowView::SetListFocusL focusIndex(%d)", focusIndex);
+
+ const TGlxMedia& mediaItem = iMediaList->Item(focusIndex);
// Check if this item is in the filtered list
- TGlxIdSpaceId spaceId = iMediaList->IdSpaceId( focusIndex );
- focusIndex = iFilteredList->Index( spaceId, mediaItem.Id() );
- if ( focusIndex == KErrNotFound )
+ TGlxIdSpaceId spaceId = iMediaList->IdSpaceId(focusIndex);
+ focusIndex = iFilteredList->Index(spaceId, mediaItem.Id());
+ if (focusIndex == KErrNotFound)
{
- // it's been filtered out so just use the first item
- focusIndex = 0;
+ focusIndex = ((iPlayDirection == NShwSlideshow::EPlayBackwards)
+ ? 0 : iFilteredList->Count() - 1);
}
}
- iFilteredList->SetFocusL( NGlxListDefs::EAbsolute, focusIndex );
+ iFilteredList->SetFocusL(NGlxListDefs::EAbsolute, focusIndex);
}
@@ -1183,8 +1188,6 @@
CEikButtonGroupContainer::EVertical,
this, R_SHW_SOFTKEYS_END_PAUSE );
iShwCba->MakeVisible(EFalse);
- //set the current active command set
- ReplaceCommandSetL(R_SHW_SOFTKEYS_END_PAUSE,R_SHW_SOFTKEYS_END_PAUSE);
}
// -----------------------------------------------------------------------------
@@ -1204,8 +1207,6 @@
}
// set the new command set
iShwCba->SetCommandSetL( aNewComandId );
- // keep the current active command set
- iCurrentActiveCommandSet = aNewComandId;
}
@@ -1226,7 +1227,6 @@
iVolumeControl->Hide();
}
iShwFurniture = EFurnitureHidden;
-
}
// -----------------------------------------------------------------------------
@@ -1259,13 +1259,19 @@
{
TRACER("CShwSlideshowView::ProcessCommandL");
GLX_LOG_INFO( "CShwSlideshowView::ProcessCommandL" );
- switch(aCommandId)
+ switch (aCommandId)
{
case EShwSlideshowCmdEnd:
+ case EAknSoftkeyBack:
+ case EGlxCmdResetView:
{
iShwState = EShwExiting;
- aCommandId = EAknSoftkeyBack;
- iDisplay->Roster().Hide( *iGestureControlGroup );
+ iDisplay->Roster().Hide(*iGestureControlGroup);
+ HideShwFurniture();
+ if (aCommandId == EShwSlideshowCmdEnd)
+ {
+ aCommandId = EAknSoftkeyBack;
+ }
break;
}
//When user presses MSK or LSK this cmd will Generated
@@ -1273,11 +1279,11 @@
case EShwSlideshowCmdContinue:
{
// If MSK preesed to toggle visibility of softekey
- if(iMSKPressed)
+ if (iMSKPressed)
{
iMSKPressed = EFalse;
- }
- else if(iLSKPressed)
+ }
+ else if (iLSKPressed)
{
iLSKPressed = EFalse;// Already Handlled
}
@@ -1285,9 +1291,8 @@
{
iPauseHandler->UserToggledPauseL();
}
- break;
+ break;
}
-
default:
{
break;
@@ -1538,3 +1543,50 @@
TRACER("CShwSlideshowView::HandleHDMIDecodingEventL()");
iEngine->HandleHDMIDecodingEventL(aStatus);
}
+// -------------------------------------------------------------------------------------------------
+// CShwSlideshowView::IsAppInForegroundL()
+// -------------------------------------------------------------------------------------------------
+//
+TBool CShwSlideshowView::IsAppInForegroundL()
+ {
+ TRACER("CShwSlideshowView::IsAppInForegroundL()");
+ TBool ret = EFalse;
+ CArrayFixFlat<TInt>* wgList = new (ELeave) CArrayFixFlat<TInt> (
+ iEikonEnv->WsSession().NumWindowGroups());
+ CleanupStack::PushL(wgList);
+ if (iEikonEnv->WsSession().WindowGroupList(0, wgList) == KErrNone)
+ {
+ // Check if Photos App window group is in foreground
+ ret = (iCoeEnv->RootWin().Identifier() == wgList->At(0));
+ GLX_LOG_INFO2("SlideshowView::IsAppInForegroundL() ret=%d, wgId=%u",
+ ret, wgList->At(0));
+ }
+
+ CleanupStack::PopAndDestroy(wgList);
+ return ret;
+ }
+
+// -------------------------------------------------------------------------------------------------
+// CShwSlideshowView::HandleWsEventL()
+// WS Events handling function
+// -------------------------------------------------------------------------------------------------
+//
+void CShwSlideshowView::HandleWsEventL(const TWsEvent& aEvent,
+ CCoeControl* /*aDestination*/)
+ {
+ TRACER("CShwSlideshowView::HandleWsEventL()");
+ TInt event = aEvent.Type();
+ GLX_LOG_INFO1("CShwSlideshowView::HandleWsEventL() event=%d", event);
+
+ // If we are sent to full background, shift to cloning mode
+ if ((event == KAknFullOrPartialForegroundLost) && !IsAppInForegroundL())
+ {
+ GLX_LOG_INFO("SlideshowView::HandleWsEventL() App is in background!");
+ if (iHdmiController && iHdmiActive)
+ {
+ iHdmiController->ShiftToCloningMode();
+ }
+ // Something else has gained the foreground
+ iPauseHandler->SwitchToBackgroundL();
+ }
+ }
--- a/photosgallery/slideshow/view/src/shwslideshowvolumecontrol.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/view/src/shwslideshowvolumecontrol.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -163,35 +163,6 @@
// BackGround Visual
iBackgroundImageVisual->EnableBrushesL();
iBackgroundImageVisual->SetOpacity( KHalfOpacityOpaque );
-
- // Get the icon file
- TFileName mifFile( KDC_APP_BITMAP_DIR );
- mifFile.Append( KIconsFilename );
- User::LeaveIfError( CompleteWithAppPath( mifFile ) );
- // Get the texture manager
- CGlxTextureManager& textureMgr = iUtility.GlxTextureManager();
- // Load the background texture
-
- // Below given icon ID is to be changed once the Capped_element Icon
- // is available in the build
- CAlfTexture& backgroundTexture = textureMgr.CreateIconTextureL
- ( EMbmGlxiconsQgn_graf_adapt_search_bg, mifFile );
-
- // apply an image brush to the visual
- iBrush = CAlfImageBrush::NewL(iAlfEnv, TAlfImage( backgroundTexture ) );
- iBackgroundImageVisual->Brushes()->AppendL( iBrush, EAlfHasOwnership );
- iBackgroundImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside );
- // Muted visual
- CAlfTexture& textureMuted = iUtility.GlxTextureManager().CreateIconTextureL
- ( EMbmGlxiconsQgn_indi_mup_speaker_muted, mifFile );
- iMuteImageVisual->SetImage( textureMuted );
- iMuteImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside );
-
- // Speaker visual
- CAlfTexture& textureSpkr = iUtility.GlxTextureManager().CreateIconTextureL
- ( EMbmGlxiconsQgn_indi_mup_speaker, mifFile );
- iSpeakerImageVisual->SetImage( textureSpkr );
- iSpeakerImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside );
//hide the volume level visualation by default
iMainVisual->SetOpacity(KOpacityTransperent);
@@ -254,6 +225,43 @@
roster.Hide( *group );
}
}
+
+// ---------------------------------------------------------------------------
+// InitControlTextureL
+// ---------------------------------------------------------------------------
+void CShwSlideshowVolumeControl::InitControlTextureL()
+ {
+ TRACER("CShwSlideshowVolumeControl::InitControlTextureL");
+ // Get the icon file
+ TFileName mifFile( KDC_APP_BITMAP_DIR );
+ mifFile.Append( KIconsFilename );
+ User::LeaveIfError( CompleteWithAppPath( mifFile ) );
+ // Get the texture manager
+ CGlxTextureManager& textureMgr = iUtility.GlxTextureManager();
+ // Load the background texture
+
+ // Below given icon ID is to be changed once the Capped_element Icon
+ // is available in the build
+ CAlfTexture& backgroundTexture = textureMgr.CreateIconTextureL
+ ( EMbmGlxiconsQgn_graf_adapt_search_bg, mifFile );
+
+ // apply an image brush to the visual
+ iBrush = CAlfImageBrush::NewL(iAlfEnv, TAlfImage( backgroundTexture ) );
+ iBackgroundImageVisual->Brushes()->AppendL( iBrush, EAlfHasOwnership );
+ iBackgroundImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside );
+ // Muted visual
+ CAlfTexture& textureMuted = iUtility.GlxTextureManager().CreateIconTextureL
+ ( EMbmGlxiconsQgn_indi_mup_speaker_muted, mifFile );
+ iMuteImageVisual->SetImage( textureMuted );
+ iMuteImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside );
+
+ // Speaker visual
+ CAlfTexture& textureSpkr = iUtility.GlxTextureManager().CreateIconTextureL
+ ( EMbmGlxiconsQgn_indi_mup_speaker, mifFile );
+ iSpeakerImageVisual->SetImage( textureSpkr );
+ iSpeakerImageVisual->SetScaleMode( CAlfImageVisual::EScaleFitInside );
+ }
+
// ---------------------------------------------------------------------------
// ShowControlL
// ---------------------------------------------------------------------------
--- a/photosgallery/slideshow/view/src/shwslideshowvolumecontrol.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/slideshow/view/src/shwslideshowvolumecontrol.h Thu Aug 19 09:55:03 2010 +0300
@@ -103,6 +103,13 @@
void Hide();
/**
+ * Initilize the control textures
+ * e.g. When slideshow engine started or
+ * textures are removed due to foreground lost event
+ */
+ void InitControlTextureL();
+
+ /**
* Called when the control should be shown.
* e.g. Key press and tap event
*/
--- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/group/glxcommandhandlerbase.mmp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/group/glxcommandhandlerbase.mmp Thu Aug 19 09:55:03 2010 +0300
@@ -47,7 +47,7 @@
SYSTEMINCLUDE ../../../medialists/inc
SYSTEMINCLUDE ../../../uiutilities/inc
SYSTEMINCLUDE ../../../../common/inc // for CGlxResourceUtilities
-
+SYSTEMINCLUDE ../../../../commonui/inc
LIBRARY aknicon.lib
LIBRARY aknlayout2.lib
@@ -73,7 +73,8 @@
LIBRARY glxuiutilities.lib
LIBRARY glxvisuallistmanager.lib
LIBRARY glxcommon.lib // for CResourceUtilities
-
+LIBRARY glxcommonui.lib
+LIBRARY glximageviewermanager.lib
LIBRARY hlplch.lib
LIBRARY hitchcock.lib // HUI framework
@@ -83,7 +84,7 @@
LIBRARY mpxviewutility.lib
LIBRARY ws32.lib
LIBRARY commonengine.lib
-
-LIBRARY libpthread.lib
+LIBRARY caf.lib
+LIBRARY libpthread.lib
// End of File
--- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/inc/glxmpxcommandcommandhandler.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/inc/glxmpxcommandcommandhandler.h Thu Aug 19 09:55:03 2010 +0300
@@ -30,7 +30,8 @@
class MGlxMediaList;
class MGlxMediaListProvider;
class CAknAppUi;
-
+class CGlxImageViewerManager;
+
/**
* @class CGlxMpxCommandCommandHandler
*
@@ -230,6 +231,16 @@
* Remove medialist observer
*/
void RemoveMediaListObserver();
+
+ /**
+ * Creates the image viewer instance, if not created already.
+ */
+ void CreateImageViewerInstanceL();
+
+ /**
+ * Deletes the image viewer instance, if created already.
+ */
+ void DeleteImageViewerInstance();
protected: // From MGlxMediaListObserver
/// See @ref MGlxMediaListObserver::HandleItemAddedL
@@ -281,6 +292,9 @@
/// The AppUI. Not owned
CAknAppUi* iAppUi;
+
+ // For image viewer, not own
+ CGlxImageViewerManager* iImageViewerInstance;
};
#endif // __C_GLXMPXCOMMANDCOMMANDHANDLER_H__
--- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -43,9 +43,12 @@
#include <glxcommandhandlers.hrh>
#include <glxtracer.h>
#include <glxresourceutilities.h> // for CGlxResourceUtilities
+#include <glxnavigationalstate.h>
+#include <mpxcollectionpath.h>
+#include <glxcollectionpluginimageviewer.hrh>
+#include <glximageviewermanager.h>
+#include <caf/manager.h>
-/// @todo Move elsewhere
-const TInt KGlxMaxNoteLength = 256;
// -----------------------------------------------------------------------------
// ConstructL
@@ -120,40 +123,85 @@
if ( consume )
{
- // get a command object from the deriving class.
- // Allow deriving class modify the consume value, even without
- // creating a commmand (in case it wants to filter out a command)
- CMPXCommand* command = CreateCommandL(aCommandId, aList, consume);
-
- if (command)
+ CGlxNavigationalState* navState = CGlxNavigationalState::InstanceL();
+ CleanupClosePushL(*navState);
+ CMPXCollectionPath* path = navState->StateLC();
+ CreateImageViewerInstanceL();
+ TBool privatePath = iImageViewerInstance->IsPrivate();
+ TBool viewerPathId = (path->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid)) ? ETrue : EFalse;
+ iImageViewerInstance->CloseImageDecoder();
+ DeleteImageViewerInstance();
+ CleanupStack::PopAndDestroy(path);
+ CleanupStack::PopAndDestroy(navState);
+
+ if (viewerPathId && !privatePath)
{
- CleanupStack::PushL(command);
-
- if ( CommandInfo(aCommandId).iStopAnimationForExecution )
+ RFs fs;
+ CleanupClosePushL(fs);
+ User::LeaveIfError(fs.Connect());
+ ContentAccess::CManager *manager = ContentAccess::CManager::NewL();
+ CleanupStack::PushL(manager);
+ fs.SetAtt(focusedMedia.Uri(), 0, KEntryAttReadOnly);
+ TInt ret = manager->DeleteFile(focusedMedia.Uri());
+ if(ret != KErrNone)
{
- // Stop GIF animation
- iAppUi->ProcessCommandL(EGlxCmdDisableAnimations);
- iAnimationStopped = ETrue;
+ CreateImageViewerInstanceL();
+ iImageViewerInstance->CreateImageDecoderL();
+ DeleteImageViewerInstance();
+ HBufC* noteText = StringLoader::LoadL(R_GLX_DELETION_FAILURE_NOTE);
+ CleanupStack::PushL(noteText);
+ const TDesC& itemName = focusedMedia.Uri();
+ TParsePtrC parse(focusedMedia.Uri());
+ TBuf<KMaxFileName> text;
+ StringLoader::Format(text, *noteText, -1, parse.Name());
+ GlxGeneralUiUtilities::ShowErrorNoteL(text, ETrue);
+ CleanupStack::PopAndDestroy(noteText);
+ }
+ CleanupStack::PopAndDestroy(manager);
+ CleanupStack::PopAndDestroy(&fs);
+ if(ret == KErrNone)
+ {
+ iAppUi->ProcessCommandL(EAknSoftkeyExit);
}
-
- // Add the pointer of this command handler as session id into the message
- // This can be used to ensure that this object is the intended recipient
- // of a message
- command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId,
- static_cast<TAny*>(this));
+ }
+ else
+ {
+ // get a command object from the deriving class.
+ // Allow deriving class modify the consume value, even without
+ // creating a commmand (in case it wants to filter out a command)
+ CMPXCommand* command = CreateCommandL(aCommandId, aList, consume);
+
+ if (command)
+ {
+ CleanupStack::PushL(command);
+
+ if (CommandInfo(aCommandId).iStopAnimationForExecution)
+ {
+ // Stop GIF animation
+ iAppUi->ProcessCommandL(EGlxCmdDisableAnimations);
+ iAnimationStopped = ETrue;
+ }
- aList.AddMediaListObserverL(this);
-
- aList.CommandL(*command);
-
- // raise progress note. Note will be closed when complete message received
- // For EGlxCmdAddMedia we dont need to show dialog as EGlxCmdAddToAlbum or
- // EGlxCmdAddTag will show processing dialog.
- if (aCommandId != EGlxCmdAddMedia)
- {
- ProgressNoteL(aCommandId);
+ // Add the pointer of this command handler as session id into the message
+ // This can be used to ensure that this object is the intended recipient
+ // of a message
+ command->SetTObjectValueL<TAny*> (
+ KMPXCommandGeneralSessionId,
+ static_cast<TAny*> (this));
+
+ aList.AddMediaListObserverL(this);
+
+ aList.CommandL(*command);
+
+ // raise progress note. Note will be closed when complete message received
+ // For EGlxCmdAddMedia we dont need to show dialog as EGlxCmdAddToAlbum or
+ // EGlxCmdAddTag will show processing dialog.
+ if (aCommandId != EGlxCmdAddMedia)
+ {
+ ProgressNoteL(aCommandId);
+ }
+ CleanupStack::PopAndDestroy(command);
}
- CleanupStack::PopAndDestroy(command);
}
}
@@ -381,7 +429,7 @@
// noteText has a place for a title string in it
const TDesC& itemName = media->ValueText(KMPXMediaGeneralTitle);
- TBuf<KGlxMaxNoteLength> text;
+ TBuf<KMaxFileName> text;
StringLoader::Format(text, *noteText, -1, itemName);
// show popup
@@ -416,7 +464,7 @@
// item count
TInt count = aMediaList.SelectionCount();
- TBuf<KGlxMaxNoteLength> text;
+ TBuf<KMaxFileName> text;
GlxGeneralUiUtilities::FormatString(text, *noteText, -1, count, ETrue);
// show popup
@@ -699,3 +747,27 @@
TRAP_IGNORE(DismissProgressNoteL());
}
}
+
+// -----------------------------------------------------------------------------
+// CreateImageViewerInstanceL
+// -----------------------------------------------------------------------------
+//
+void CGlxMpxCommandCommandHandler::CreateImageViewerInstanceL()
+ {
+ TRACER("CGlxMpxCommandCommandHandler::CreateImageViewerInstanceL");
+ iImageViewerInstance = CGlxImageViewerManager::InstanceL();
+ __ASSERT_ALWAYS(iImageViewerInstance, Panic(EGlxPanicNullPointer));
+ }
+
+// -----------------------------------------------------------------------------
+// DeleteImageViewerInstance
+// -----------------------------------------------------------------------------
+//
+void CGlxMpxCommandCommandHandler::DeleteImageViewerInstance()
+ {
+ TRACER("CGlxMpxCommandCommandHandler::DeleteImageViewerInstance");
+ if ( iImageViewerInstance )
+ {
+ iImageViewerInstance->DeleteInstance();
+ }
+ }
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxmediaselectionpopup.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxmediaselectionpopup.h Thu Aug 19 09:55:03 2010 +0300
@@ -164,7 +164,24 @@
void HandleListBoxEventL (CEikListBox *aListBox, TListBoxEvent aEventType) ;
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
};
-
+
+/**
+ * CGlxSingleGraphicPopupMenuStyleList
+ *
+ * Adds behaviour to CAknSingleGraphicPopupMenuStyleListBox:
+ * For 'Add Album', default functionality is performed.
+ * For Tags editor, If a static item or user-defined item is selected
+ * then we show 'OK' & 'Cancel' as SoftKeys(SK). Otherwise 'Cancel' SK.
+ * If 'static Item' is selected, sends 'EnterKeyPressed' event to ListBox observer.
+ */
+NONSHARABLE_CLASS( CGlxSingleGraphicPopupMenuStyleListBox )
+ : public CAknSingleGraphicPopupMenuStyleListBox
+ {
+public:
+ /** See @ref CCoeControl::OfferKeyEventL */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+ };
+
/**
* CGlxMediaSelectionPopup
*
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -39,6 +39,8 @@
#include <mpxcollectionpath.h>
#include <glxcollectionpluginimageviewer.hrh>
#include "glxcommandfactory.h"
+#include <glximageviewermanager.h>
+
// ---------------------------------------------------------------------------
// Two-phased constructor.
@@ -214,35 +216,31 @@
MGlxMediaList& aList) const
{
TRACER( "CGlxCommandHandlerDelete::DoIsDisabled" );
- TBool fullscreenViewingMode = EFalse;
- CGlxNavigationalState* aNavigationalState = CGlxNavigationalState::InstanceL();
- CMPXCollectionPath* naviState = aNavigationalState->StateLC();
+ TBool disable = EFalse;
+
+ CGlxNavigationalState* navState = CGlxNavigationalState::InstanceL();
+ CleanupClosePushL(*navState);
+ CMPXCollectionPath* path = navState->StateLC();
- if ( naviState->Levels() >= 1)
+ if ( path->Levels() >= 1)
{
- if (aNavigationalState->ViewingMode() == NGlxNavigationalState::EBrowse)
+ CGlxImageViewerManager* viewerInstance = CGlxImageViewerManager::InstanceL();
+ if (path->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid)
+ && viewerInstance->IsPrivate())
{
- // For image viewer collection, goto view mode
- if (naviState->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid))
- {
- //it means we are in img viewer.
- fullscreenViewingMode = ETrue;
- }
- }
- else
- {
- //it means we are in Fullscreen.
- fullscreenViewingMode = ETrue;
- }
+ //it means we are in image viewer private path.
+ disable = ETrue;
+ }
+ viewerInstance->DeleteInstance();
}
- CleanupStack::PopAndDestroy( naviState );
- aNavigationalState->Close();
- if (EGlxCmdDelete==aCommandId && 0 == aList.Count() &&
- !fullscreenViewingMode)
+ CleanupStack::PopAndDestroy(path);
+ CleanupStack::PopAndDestroy(navState);
+
+ if (EGlxCmdDelete==aCommandId && 0 == aList.Count())
{
- return ETrue;
+ disable = ETrue;
}
- return EFalse;
+ return disable;
}
//end of file
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlernewmedia.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlernewmedia.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -45,12 +45,11 @@
#include <mpxcollectionpath.h>
#include <mpxcommonframeworkdefs.h>
#include <StringLoader.h>
-
+#include <glxmediageneraldefs.h> // for KMaxMediaPopupTextLength
#include <data_caging_path_literals.hrh>
#include <glxuiutilities.rsg>
+#include <e32const.h> //For TDigitType
-const TInt KMaxMediaPopupTitleLength = 0x28; // Accepts only 40 characters
-const TInt KMaxNewMediaItemTitleLength = 0x28; // Accepts only 40 characters
const TInt KMaxNumberLength = 10;
_LIT(KOpenBracket, "(");
@@ -192,7 +191,7 @@
CMPXCollectionPath* path = aMediaList.PathLC( NGlxListDefs::EPathParent );
CMPXCommand* command = NULL;
- TBuf <KMaxNewMediaItemTitleLength> defaultNewMediaItemTitle;
+ TBuf <KMaxMediaPopupTextLength> defaultNewMediaItemTitle;
TRAPD(error, TitlesL(TGlxMediaId(path->Id(0)), defaultNewMediaItemTitle));
if(error != KErrNone)
@@ -216,8 +215,6 @@
TPtr newMediaItemTitleDes = iNewMediaItemTitle->Des();
CGlxTextEntryPopup* dialog = CGlxTextEntryPopup::NewL(*mediaPopupTitle, newMediaItemTitleDes);
-
-
if(dialog->ExecuteLD() == EEikBidOk)
{
command = TGlxCommandFactory::AddContainerCommandLC(*iNewMediaItemTitle, path->Id(0));
@@ -320,7 +317,7 @@
{
aDefaultNewMediaItemTitle.Copy(media->ValueText(
KGlxMediaCollectionPluginSpecificDefaultMediaTitle).Left(
- KMaxMediaPopupTitleLength));
+ KMaxMediaPopupTextLength));
}
CleanupStack::PopAndDestroy(attributeContext);
@@ -387,12 +384,17 @@
- KCloseBracket().Length();
if (length > 0)
{
- TLex lex = title.Mid(pos, length);
+ HBufC* num = title.Mid(pos, length).AllocLC();
+ TPtr numPtr = num->Des();
+ //Change to Western numeric for determining next numeral
+ AknTextUtils::ConvertDigitsTo(numPtr,EDigitTypeWestern);
+ TLex lex(numPtr);
TInt val = 0;
if (lex.Val(val) == KErrNone)
{
numbers.InsertInOrderL(val);
}
+ CleanupStack::PopAndDestroy(num);
}
}
}
@@ -420,18 +422,21 @@
TInt defaultTitleLength = aDefaultNewMediaItemTitle.Length()
+ KFileNameFormatString().Length() + KCloseBracket().Length()
+ KMaxNumberLength;
- // If the default title length is bigger than KMaxMediaPopupTitleLength,
+ // If the default title length is bigger than KMaxMediaPopupTextLength,
// make sure we allocate enough space for it.
- TInt titleLength = defaultTitleLength > KMaxMediaPopupTitleLength ?
+ TInt titleLength = defaultTitleLength > KMaxMediaPopupTextLength ?
defaultTitleLength
- : KMaxMediaPopupTitleLength;
+ : KMaxMediaPopupTextLength;
HBufC* newMediaItemTitle = HBufC::NewL(titleLength);
TPtr newMediaItemTitleDes = newMediaItemTitle->Des();
newMediaItemTitleDes.Append(aDefaultNewMediaItemTitle);
if (nextNumber > 0)
{
- newMediaItemTitleDes.AppendFormat(KFileNameFormatString, nextNumber);
+ newMediaItemTitleDes.AppendFormat(KFileNameFormatString, nextNumber);
+ //Change numeric according to current input language here
+ AknTextUtils::ConvertDigitsTo(newMediaItemTitleDes,
+ AknTextUtils::TextEditorDigitType());
}
else
{
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrename.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrename.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -38,13 +38,10 @@
#include <glxicons.mbg>
#include <glxtracer.h>
#include <glxlog.h>
+#include <glxmediageneraldefs.h> // for KMaxMediaPopupTextLength
#include "glxcommandfactory.h"
-namespace
- {
- const TInt KNameMaxLength = 128;
- }
// ---------------------------------------------------------------------------
// Two-phased constructor.
@@ -81,7 +78,7 @@
//
void CGlxCommandHandlerRename::ConstructL(const TDesC& aFileName)
{
- iRenameText = HBufC::NewL(KNameMaxLength);
+ iRenameText = HBufC::NewL(KMaxMediaPopupTextLength);
iResourceOffset = CCoeEnv::Static()->AddResourceFileL(aFileName);
@@ -137,16 +134,13 @@
TPtr textPtr = iRenameText->Des();
GetTitleL( textPtr, aMediaList );
// store the current name.
- TBuf<KNameMaxLength> currentName;
+ TBuf<KMaxMediaPopupTextLength> currentName;
currentName.Copy(textPtr);
// Load the title for the popup
HBufC* title = StringLoader::LoadLC( R_GLX_POPUP_RENAME_TITLE );
CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *title,
textPtr );
-
-
-
if ( popup->ExecuteLD() == EEikBidOk && currentName != *iRenameText)
{
// Text entry was successful
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -138,6 +138,7 @@
if (aCommandId == EGlxCmdSend)
{
+ iAvkonAppUi->ProcessCommandL(EGlxCmdDialogLaunched);
SendSelectedItemsL();
return ETrue;
}
@@ -364,6 +365,7 @@
CleanupStack::PopAndDestroy(filterOutPlugins);
CleanupStack::PopAndDestroy(title);
CleanupStack::PopAndDestroy(msgData);
+ iAvkonAppUi->ProcessCommandL(EGlxCmdDialogDismissed);
}
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxmediaselectionpopup.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxmediaselectionpopup.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -206,14 +206,16 @@
TBool staticItemSelected = EFalse;
TInt currItemIndx = listBox->View()->CurrentItemIndex();
+ GLX_LOG_INFO1("Glx Pop-up listbox - HandleListBoxEventL() currItemIndx=%d",
+ currItemIndx);
switch (aEventType)
{
case EEventItemClicked:
case EEventItemSingleClicked:
{
-
- if (mediaListAdaptor->MultiSelectionEnabled() && currItemIndx >= 0)
+ if (mediaListAdaptor->MultiSelectionEnabled() && currItemIndx
+ >= 0)
{
const TGlxMedia& item = mediaListAdaptor->MediaList()->Item(
currItemIndx);
@@ -224,18 +226,21 @@
if (!staticItemSelected)
{
//Mark or UnMark the user-defined item
- TBool isMarked = listBox->View()->ItemIsSelected(currItemIndx);
+ TBool isMarked = listBox->View()->ItemIsSelected(
+ currItemIndx);
(isMarked == (TBool) ETrue) ? (listBox->View()->DeselectItem(
- currItemIndx))
- : (listBox->View()->SelectItemL(currItemIndx));
+ currItemIndx))
+ : (listBox->View()->SelectItemL(currItemIndx));
}
//Show Command Set based on selected items
- TInt selectCount = listBox->View()->SelectionIndexes()->Count();
- CEikButtonGroupContainer* cbaContainer = ButtonGroupContainer();
+ TInt selectCount =
+ listBox->View()->SelectionIndexes()->Count();
+ CEikButtonGroupContainer* cbaContainer =
+ ButtonGroupContainer();
//Show 'OK' only if a static item or more than
//1 user-defined item is selected
- if(staticItemSelected || selectCount)
+ if (staticItemSelected || selectCount)
{
cbaContainer->SetCommandSetL(R_GLX_SOFTKEYS_OK_CANCEL);
}
@@ -253,7 +258,7 @@
if (staticItemSelected
|| (!mediaListAdaptor->MultiSelectionEnabled()))
{
- CAknPopupList::HandleListBoxEventL( aListBox, aEventType);
+ CAknPopupList::HandleListBoxEventL(aListBox, aEventType);
}
//After Scrolling, then Select "New Tag" i.e Static item is selected
@@ -266,20 +271,22 @@
}
case EEventEnterKeyPressed:
{
- //Check for MultipleSelection is Disbaled
- if (!(mediaListAdaptor->MultiSelectionEnabled()))
+ // Check for multiselection is disbaled(i.e. for Albums)
+ // and valid index
+ if (!(mediaListAdaptor->MultiSelectionEnabled()) && currItemIndx
+ >= 0)
{
//Set if its a static item
const TGlxMedia& item = mediaListAdaptor->MediaList()->Item(
currItemIndx);
mediaListAdaptor->SetStaticItemSelected(item.IsStatic());
}
- CAknPopupList::HandleListBoxEventL( aListBox, aEventType);
+ CAknPopupList::HandleListBoxEventL(aListBox, aEventType);
break;
}
default:
{
- CAknPopupList::HandleListBoxEventL( aListBox, aEventType);
+ CAknPopupList::HandleListBoxEventL(aListBox, aEventType);
break;
}
}
@@ -315,10 +322,84 @@
mediaListAdaptor->SetStaticItemSelected( item.IsStatic() );
}
}
+ //Forward for default processing
+ CAknPopupList::HandlePointerEventL( aPointerEvent);
+ }
+
+// ---------------------------------------------------------------------------
+// CGlxSingleGraphicPopupMenuStyleListBox::OfferKeyEventL
+// ---------------------------------------------------------------------------
+//
+TKeyResponse CGlxSingleGraphicPopupMenuStyleListBox::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+ {
+ TRACER("CGlxSingleGraphicPopupMenuStyleListBox::OfferKeyEventL");
+
+ //Based on the selected item index, disable the MultipleSelection flag
+ //to stop the flickering of 'marked box', when Highlighted 'New Tag' is selected.
+ CGlxMediaListAdaptor* mediaListAdaptor =
+ static_cast<CGlxMediaListAdaptor*> (Model()->ItemTextArray());
+ TInt currItemIndx = View()->CurrentItemIndex();
+ GLX_LOG_INFO1("Glx Pop-up listbox - OfferKeyEventL(1) currItemIndx=%d",
+ currItemIndx);
+
+ if (mediaListAdaptor->MultiSelectionEnabled() && currItemIndx >= 0)
+ {
+ const TGlxMedia& oldItem = mediaListAdaptor->MediaList()->Item(
+ currItemIndx);
+ if (oldItem.IsStatic())
+ {
+ iListBoxFlags &= (~EMultipleSelection); // turn off multiple selection
+ }
+ else
+ {
+ iListBoxFlags |= EMultipleSelection; // turn on multiple selection
+ }
+ }
//Forward for default processing
- CAknPopupList::HandlePointerEventL( aPointerEvent);
+ TKeyResponse response =
+ CAknSingleGraphicPopupMenuStyleListBox::OfferKeyEventL(aKeyEvent,
+ aType);
+
+ currItemIndx = View()->CurrentItemIndex();
+ GLX_LOG_INFO1("Glx Pop-up listbox - OfferKeyEventL(2) currItemIndx=%d",
+ currItemIndx);
+ //Check if 'Enter'/'Ok' key was consumed for 'MultipleSelection' List Box i.e for Tags
+ if ((response == EKeyWasConsumed) && ((aKeyEvent.iCode == EKeyEnter)
+ || (aKeyEvent.iCode == EKeyOK))
+ && mediaListAdaptor->MultiSelectionEnabled() && currItemIndx >= 0)
+ {
+ //current selected item
+ const TGlxMedia& item = mediaListAdaptor->MediaList()->Item(
+ currItemIndx);
+ TBool staticItemSelected = item.IsStatic();
+ mediaListAdaptor->SetStaticItemSelected(staticItemSelected);
+ TInt selectCount = View()->SelectionIndexes()->Count();
+ CEikButtonGroupContainer* cbaContainer =
+ CEikButtonGroupContainer::Current();
+ //Check if selected Item is static or other item is selected
+ if (staticItemSelected || selectCount)
+ {
+ cbaContainer->SetCommandSetL(R_GLX_SOFTKEYS_OK_CANCEL);
+ }
+ //no item is selected
+ else
+ {
+ cbaContainer->SetCommandSetL(R_AVKON_SOFTKEYS_CANCEL);
+ }
+ cbaContainer->DrawDeferred();
+
+ //Enter Key is Pressed and Static Item is selected
+ if (staticItemSelected)
+ {
+ //Report 'Enter' key is pressed to ListBox observers
+ ReportListBoxEventL(MEikListBoxObserver::EEventEnterKeyPressed);
+ }
+ }
+
+ return response;
}
// ---------------------------------------------------------------------------
@@ -841,7 +922,7 @@
{
TRACER("CGlxMediaSelectionPopup::ConstructPopupListL");
// create the list box
- iListBox = new (ELeave) CAknSingleGraphicPopupMenuStyleListBox;
+ iListBox = new (ELeave) CGlxSingleGraphicPopupMenuStyleListBox;
// create the popup list
iPopupList = CGlxSingleGraphicPopupMenuStyleList::NewL( iListBox, R_AVKON_SOFTKEYS_CANCEL) ;
--- a/photosgallery/viewframework/commandhandlers/inc/glxcommandhandlers.hrh Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/inc/glxcommandhandlers.hrh Thu Aug 19 09:55:03 2010 +0300
@@ -93,6 +93,7 @@
EGlxCmdSave,
EGlxCmdRenameCompleted,
EGlxCmdDialogLaunched,
+ EGlxCmdDialogDismissed, //For sendui dialog dismiss.Handled in FS and Grid
EGlxCmdAiwBase = 0x6000
};
--- a/photosgallery/viewframework/dataprovider/group/dataprovider.mmp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/group/dataprovider.mmp Thu Aug 19 09:55:03 2010 +0300
@@ -94,10 +94,11 @@
LIBRARY glxcommon.lib
LIBRARY flogger.lib
LIBRARY exiflib.lib //For CExifModify
-LIBRARY avkon.lib //For AknUtils.h
-LIBRARY eikcore.lib
+LIBRARY avkon.lib //For AknUtils.h
+LIBRARY eikcore.lib
LIBRARY glximageviewermanager.lib
LIBRARY imageconversion.lib // ICL
LIBRARY fbscli.lib
+LIBRARY bitgdi.lib
// End of File
\ No newline at end of file
--- a/photosgallery/viewframework/dataprovider/inc/glxdetailsboundcommand.hrh Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxdetailsboundcommand.hrh Thu Aug 19 09:55:03 2010 +0300
@@ -52,7 +52,7 @@
enum TImageVwrDetailsFields
{
EImgVwrNameItem,
- EImgVwrDescriptionItem,
+ EImgVwrMimeTypeItem,
EImgVwrDateAndTimeItem,
EImgVwrSizeItem,
EImgVwrResolutionItem,
--- a/photosgallery/viewframework/dataprovider/inc/glxdrmgiftexturecreator.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/inc/glxdrmgiftexturecreator.h Thu Aug 19 09:55:03 2010 +0300
@@ -111,8 +111,6 @@
*/
void ProcessImageL();
- TSize ReCalculateSizeL(TSize& aTargetBitmapSize);
-
void SetTexture(TInt aTextureId=KErrNotFound);
private:
@@ -145,5 +143,6 @@
TBool iAnimateFlag;
TBool iTransparencyPossible;
TFrameInfo iFrameInfo;
+ TBool iFrameShift;
};
#endif /* GLXDRMGIFTEXTURECREATOR_H_ */
--- a/photosgallery/viewframework/dataprovider/src/glxdetailsboundcommand.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxdetailsboundcommand.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -17,11 +17,14 @@
+#include "glxdetailsboundcommand.hrh"
+#include "glxdetailsboundcommand.h" // Handles user commands
+#include "glxuiutility.h"
+/** Error Id EMPY-7MKDHP **/
+#include "mglxmetadatadialogobserver.h" //for call back to dailog
#include <e32base.h> // Base class for all classes to be instantiated on the heap
#include <ExifModify.h> //For CExifModify
-#include "glxdetailsboundcommand.hrh"
-#include "glxdetailsboundcommand.h" // Handles user commands
#include <glxmetadatadialog.rsg>
#include <glxuiutilities.rsg>
#include <glxuiutilities.rsg>
@@ -37,16 +40,11 @@
#include <glxlog.h> // Logging
#include <glxtracer.h>
#include <glxviewbase.rsg>
-#include "glxuiutility.h"
-#include <glxscreenfurniture.h>
-#include <glxresourceutilities.h> // for CGlxResourceUtilities
-/** Error Id EMPY-7MKDHP **/
-#include "mglxmetadatadialogobserver.h" //for call back to dailog
+#include <glxscreenfurniture.h>
+#include <glxresourceutilities.h> // for CGlxResourceUtilities
+#include <glxmediageneraldefs.h> // for KMaxMediaPopupTextLength
-//CONSTANTS
-const TInt KMaxMediaPopupTitleLength = 0x100;
-
// ----------------------------------------------------------------------------
// CGlxTitleBoundCommand::NewL
// ----------------------------------------------------------------------------
@@ -91,11 +89,11 @@
{
///@todo - remove popup when editable template is avaliable
//Popup for testing
- HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTitleLength );
+ HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTextLength );
(textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralTitle)));
TPtr textPtr = textBuf->Des();
/// bug fix - EMPY-7MCKD6
- TBuf<KMaxMediaPopupTitleLength> titleText(*textBuf);
+ TBuf<KMaxMediaPopupTextLength> titleText(*textBuf);
/// bug fix - EMPY-7MCKD6
///@todo - remove literal for popup title when resource string is avaliable
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_TITLE_NSERIES);
@@ -386,11 +384,11 @@
{
///@todo - remove popup when editable template is avaliable
//Popup for testing
- HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTitleLength );
+ HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTextLength );
(textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralComment)));
TPtr textPtr = textBuf->Des();
/// bug fix - EMPY-7MCKD6
- TBuf<KMaxMediaPopupTitleLength> descText(*textBuf);
+ TBuf<KMaxMediaPopupTextLength> descText(*textBuf);
/// bug fix - EMPY-7MCKD6
///@todo - remove literal for popup title when resource string is avaliable
@@ -1022,7 +1020,6 @@
void CGlxUsageRightsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
{
TRACER("CGlxUsageRightsBoundCommand::InitMenuL");
- aMenu.SetItemTextL( KGlxViewBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_VIEW );
aMenu.SetItemDimmed( KGlxViewBoundMenuCommandId, EFalse );
}
--- a/photosgallery/viewframework/dataprovider/src/glxdrmgiftexturecreator.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxdrmgiftexturecreator.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
- * Description: Gif Texture creator implementation
+ * Description: DRM Gif Texture creator implementation
*
*/
@@ -30,7 +30,8 @@
#include "glxdrmgiftexturecreator.h"
#include "glxdrmgifactivedecoder.h"
-const TInt KTimerInterval = 200000;
+// Default frame interval for animation, in microseconds
+const TInt KDefaultFrameInterval = 100000;
// -----------------------------------------------------------------------------
// NewLC
@@ -49,13 +50,13 @@
}
// -----------------------------------------------------------------------------
-// destructor
+// Destructor
// -----------------------------------------------------------------------------
CGlxDrmGifTextureCreator::~CGlxDrmGifTextureCreator()
{
TRACER("CGlxDrmGifTextureCreator::~CGlxDrmGifTextureCreator()");
ReleaseContent();
-
+
// Delete the animation timer
if (iAnimationTimer)
{
@@ -66,7 +67,7 @@
iUiUtility->Close();
delete iGlxDecoderAO;
-
+
iFsSession.Close();
}
@@ -76,25 +77,36 @@
void CGlxDrmGifTextureCreator::ReleaseContent()
{
TRACER("void CGlxDrmGifTextureCreator::ReleaseContent()");
+ iBitmapReady = EFalse;
+ iAnimCount = 0;
+ iAnimateFlag = EFalse;
+ iTransparencyPossible = EFalse;
+ iFrameShift = EFalse;
+
if (iGlxDecoderAO)
{
iGlxDecoderAO->Cancel();
}
+ if (iAnimationTimer)
+ {
+ iAnimationTimer->Cancel();
+ }
+
for (TInt i = 0; i < iFrameCount; i++)
{
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::ReleaseContent(). Releasing AnimBitmaps %d", i);
+ GLX_LOG_INFO1("DrmGif: ReleaseContent() Releasing AnimBitmaps %d", i);
delete (iDecodedBitmap[i]);
iDecodedBitmap[i] = NULL;
delete (iDecodedMask[i]);
iDecodedMask[i] = NULL;
}
-
+
if (iUiUtility && iMedia)
{
iUiUtility->GlxTextureManager().RemoveTexture(iMedia->Id());
}
-
+
if (iImageDecoder)
{
delete iImageDecoder;
@@ -126,7 +138,9 @@
iBitmapReady = EFalse;
iAnimCount = 0;
iAnimateFlag = EFalse;
-
+ iTransparencyPossible = EFalse;
+ iFrameShift = EFalse;
+
//Set the initial texture, it could be default or the FS texture
SetTexture();
// Create the active object
@@ -145,20 +159,24 @@
TInt aItemIndex)
{
TRACER("CGlxDrmGifTextureCreator::UpdateNewImageL()");
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::UpdateNewImageL() aItemIndex=%d", aItemIndex);
- if(aItemIndex == iItemIndex)
+ GLX_LOG_INFO1("DrmGif: UpdateNewImageL() aItemIndex=%d", aItemIndex);
+ if (aItemIndex == iItemIndex)
{
return;
}
- iTransparencyPossible = EFalse;
- iItemIndex = aItemIndex;
- iMedia = &aMedia;
+
// First release the contents before proceeding further
ReleaseContent();
+ iItemIndex = aItemIndex;
+ iMedia = &aMedia;
+
iBitmapReady = EFalse;
iAnimCount = 0;
iAnimateFlag = EFalse;
+ iTransparencyPossible = EFalse;
+ iFrameShift = EFalse;
+
//Set the initial texture, it could be default or the FS texture
SetTexture();
#ifdef _DEBUG
@@ -178,16 +196,17 @@
{
return;
}
-
+
if (aAnimate && iBitmapReady)
{
if (!iAnimationTimer->IsActive())
{
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::AnimateDRMGifItem() - Gif iAnimCount =%d", iAnimCount);
- GLX_LOG_INFO1("=>CGlxDrmGifTextureCreator::AnimateDRMGifItem() - Gif Frame Interval <%d> us",
+ GLX_LOG_INFO1("DrmGif: AnimateDRMGifItem() - iAnimCount=%d", iAnimCount);
+ GLX_LOG_INFO1("DrmGif: AnimateDRMGifItem() - Frame Interval <%d> us",
(TInt)iFrameInfo.iDelay.Int64());
- TInt interval =((TInt)iFrameInfo.iDelay.Int64())?((TInt)iFrameInfo.iDelay.Int64())
- :KTimerInterval;
+ TInt interval =((TInt)iFrameInfo.iDelay.Int64()) ?
+ ((TInt)iFrameInfo.iDelay.Int64()) : KDefaultFrameInterval;
+ GLX_LOG_INFO1("DrmGif: AnimateDRMGifItem() interval=<%d> us", interval);
iAnimationTimer->Start(interval, interval, TCallBack(TimerCallbackL, this));
}
iAnimateFlag = ETrue;
@@ -208,9 +227,10 @@
void CGlxDrmGifTextureCreator::RefreshL()
{
TRACER("CGlxDrmGifTextureCreator::RefreshL()");
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::RefreshL() iAnimCount = %d",iAnimCount);
+ GLX_LOG_INFO2("DrmGif: RefreshL() iAnimCount=%d, iFrameShift=%d",
+ iAnimCount, iFrameShift);
TInt textureId = KErrNotFound;
- if (iTransparencyPossible)
+ if (iTransparencyPossible && !iFrameShift)
{
textureId
= (iUiUtility->GlxTextureManager().CreateDRMAnimatedGifTextureL(
@@ -226,14 +246,14 @@
}
SetTexture(textureId);
+ // Advance animation
iAnimCount++;
- // Advance animation if the animation count is becoming maximum,
- // then set it to zero, such that it can animate again frm begining
+ // if animation count is becoming maximum, then reset to animate again
if (iAnimCount >= iFrameCount)
{
- GLX_LOG_INFO("CGlxDrmGifTextureCreator::RefreshL() Reset iAnimCount");
+ GLX_LOG_INFO("DrmGif: RefreshL() Reset iAnimCount");
iAnimCount = 0;
- }
+ }
}
// -----------------------------------------------------------------------------
@@ -242,44 +262,27 @@
void CGlxDrmGifTextureCreator::CreateBitmapAndStartDecodingL()
{
TRACER("CGlxDrmGifTextureCreator::CreateBitmapAndStartDecodingL()");
- TSize scrnSize = AlfUtil::ScreenSize();
- TSize targetBitmapSize;
+ GLX_LOG_INFO1("CreateBitmapAndDecodingL() iAnimCount=%d", iAnimCount);
+ // Create the bitmap and mask as of original image size, and let the
+ // coverflow widget do the scaling, if required.
+ // This is needed for the transparent gifs frames as the
+ // frame co-ordinates would mismatch if downscaling is applied.
+ TSize frameSize = iImageDecoder->FrameInfo(iAnimCount).iFrameSizeInPixels;
+ GLX_LOG_INFO3("DrmGif: CreateBitmapAndStartDecodingL() - Frame[%d] size=%d,%d",
+ iAnimCount, frameSize.iWidth, frameSize.iHeight);
- GLX_LOG_INFO2("CGlxDrmGifTextureCreator::CreateBitmapAndDecodingL() - bitmapsize=%d, %d",
- iOrigImageDimensions.iWidth,iOrigImageDimensions.iHeight);
- TReal32 scaleFactor = 0.0f;
- if (scrnSize.iWidth * iOrigImageDimensions.iHeight > scrnSize.iHeight
- * iOrigImageDimensions.iWidth)
- {
- scaleFactor = (TReal32) scrnSize.iHeight
- / (TReal32) iOrigImageDimensions.iHeight;
- }
- else
- {
- scaleFactor = (TReal32) scrnSize.iWidth
- / (TReal32) iOrigImageDimensions.iWidth;
- }
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::CreateBitmapAndDecodingL() - scaleFactor=%f",scaleFactor);
- targetBitmapSize.iHeight = iOrigImageDimensions.iHeight * scaleFactor;
- targetBitmapSize.iWidth = iOrigImageDimensions.iWidth * scaleFactor;
- GLX_LOG_INFO2("CGlxDrmGifTextureCreator::CreateBitmapAndDecodingL() - targetBitmapSize=%d, %d",
- targetBitmapSize.iWidth,targetBitmapSize.iHeight);
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::CreateBitmapAndDecodingL() iAnimCount =%d", iAnimCount);
-
- //create the bitmap for the required size
iDecodedBitmap[iAnimCount] = new (ELeave) CFbsBitmap();
- iDecodedBitmap[iAnimCount]->Create(ReCalculateSizeL(targetBitmapSize),
+ iDecodedBitmap[iAnimCount]->Create(frameSize,
iFrameInfo.iFrameDisplayMode);
User::LeaveIfNull(iDecodedBitmap[iAnimCount]);
if (iFrameInfo.iFlags & TFrameInfo::ETransparencyPossible)
- {
+ {
iDecodedMask[iAnimCount] = new (ELeave) CFbsBitmap();
- iDecodedMask[iAnimCount]->Create(ReCalculateSizeL(
- targetBitmapSize), iFrameInfo.iFlags
+ iDecodedMask[iAnimCount]->Create(frameSize, iFrameInfo.iFlags
& TFrameInfo::EAlphaChannel ? EGray256 : EGray2);
User::LeaveIfNull(iDecodedMask[iAnimCount]);
-
+
// decoding the image
iGlxDecoderAO->ConvertImageL(iDecodedBitmap[iAnimCount],
iDecodedMask[iAnimCount], iAnimCount, iImageDecoder);
@@ -291,7 +294,6 @@
iGlxDecoderAO->ConvertImageL(iDecodedBitmap[iAnimCount], NULL,
iAnimCount, iImageDecoder);
}
- iAnimCount++;
}
// -----------------------------------------------------------------------------
@@ -300,13 +302,91 @@
void CGlxDrmGifTextureCreator::HandleRunL(TRequestStatus& aStatus)
{
TRACER("CGlxDrmGifTextureCreator::HandleRunL()");
- GLX_LOG_INFO2("CGlxDrmGifTextureCreator::HandleRunL() - gif image frame=%d/%d",
- iAnimCount,iFrameCount);
+ TInt err = aStatus.Int();
+ GLX_LOG_INFO1("DrmGif: HandleRunL : err=%d", err);
+ if (err != KErrNone)
+ {
+ ReleaseContent();
+ return;
+ }
+
+ GLX_LOG_INFO2("DrmGif: HandleRunL() - Frame=%d/%d",
+ iAnimCount, iFrameCount-1);
+ if (iAnimCount > 0 && iAnimCount < iFrameCount)
+ {
+ TPoint point =
+ iImageDecoder->FrameInfo(iAnimCount).iFrameCoordsInPixels.iTl;
+ GLX_LOG_INFO2("DrmGif: HandleRunL() point=(%d, %d)",
+ point.iX, point.iY );
+ TSize frameSize = iImageDecoder->FrameInfo(iAnimCount).iFrameSizeInPixels;
+ GLX_LOG_INFO2("DrmGif: HandleRunL() - frameSize(%d, %d)",
+ frameSize.iWidth, frameSize.iHeight);
+ // Frame shift is checked,
+ // 1) If the subsequent frame sizes differ from the first frame (or)
+ // 2) If the subsequent frame co-ordinates differ from the first frame
+ if (point != iFrameInfo.iFrameCoordsInPixels.iTl
+ || iFrameInfo.iFrameSizeInPixels != frameSize)
+ {
+ iFrameShift = ETrue;
+ }
+
+ if (iFrameShift)
+ {
+ TSize firstFrameSize = iDecodedBitmap[0]->SizeInPixels();
+ GLX_LOG_INFO2("DrmGif: HandleRunL() - first bitmap size (%d, %d)",
+ firstFrameSize.iWidth, firstFrameSize.iHeight);
+
+ TDisplayMode dispMode = iDecodedBitmap[0]->DisplayMode();
+ TInt scanLineLength = CFbsBitmap::ScanLineLength(
+ firstFrameSize.iWidth, dispMode);
- if (iAnimCount < iFrameCount )
+ CFbsBitmap* bitmap = new (ELeave) CFbsBitmap();
+ CleanupStack::PushL(bitmap);
+ User::LeaveIfError(bitmap->Create(firstFrameSize, dispMode));
+ bitmap->LockHeap();
+ iDecodedBitmap[0]->LockHeap();
+ if (bitmap && bitmap->DataAddress())
+ {
+ memcpy((void*) bitmap->DataAddress(),
+ (void*) iDecodedBitmap[0]->DataAddress(),
+ scanLineLength * firstFrameSize.iHeight);
+ }
+ iDecodedBitmap[0]->UnlockHeap();
+ bitmap->UnlockHeap();
+
+ CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(bitmap);
+ CleanupStack::PushL(bitmapDevice);
+
+ CFbsBitGc* bitmapGc = CFbsBitGc::NewL();
+ CleanupStack::PushL(bitmapGc);
+ bitmapGc->Activate(bitmapDevice);
+
+ if (iTransparencyPossible)
+ {
+ GLX_LOG_INFO("DrmGif: HandleRunL() BitBltMasked");
+ bitmapGc->BitBltMasked(point, iDecodedBitmap[iAnimCount],
+ iOrigImageDimensions, iDecodedMask[iAnimCount],
+ EFalse);
+ }
+ else
+ {
+ GLX_LOG_INFO("DrmGif: HandleRunL() BitBlt");
+ bitmapGc->BitBlt(point, iDecodedBitmap[iAnimCount]);
+ }
+
+ delete iDecodedBitmap[iAnimCount];
+ iDecodedBitmap[iAnimCount] = bitmap;
+ CleanupStack::PopAndDestroy(bitmapGc);
+ CleanupStack::PopAndDestroy(bitmapDevice);
+ CleanupStack::Pop(bitmap);
+ }
+ }
+
+ if (iAnimCount < iFrameCount - 1)
{
if (!iGlxDecoderAO->IsActive())
- {
+ {
+ iAnimCount++;
CreateBitmapAndStartDecodingL();
}
}
@@ -314,20 +394,14 @@
{
#ifdef _DEBUG
iStopTime.HomeTime();
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::HandleRunL() ConvertImageL took"
- " <%d> us", (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
+ GLX_LOG_INFO1("DrmGif: HandleRunL() ConvertImageL took <%d> us",
+ (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
#endif
- TInt err = aStatus.Int();
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::HandleRunL : err=%d", err);
+ iBitmapReady = ETrue;
+ iAnimateFlag = ETrue;
+ iAnimCount = 0;
+ ProcessImageL();
- if (err == KErrNone)
- {
- iBitmapReady = ETrue;
- iAnimateFlag = ETrue;
- iAnimCount = 0;
- ProcessImageL();
- }
-
//release imagedecoder after the conversion is over
if (iImageDecoder)
{
@@ -344,17 +418,16 @@
{
TRACER("CGlxDrmGifTextureCreator::ProcessImageL()");
RefreshL();
-
- GLX_LOG_INFO1("CGlxDrmGifTextureCreator::ProcessImageL() iAnimCount =%d", iAnimCount);
- GLX_LOG_INFO1("=>CGlxDrmGifTextureCreator::ProcessImageL() - Gif Frame Interval <%d> us",
- (TInt)iFrameInfo.iDelay.Int64());
iAnimationTimer->Cancel();
if (iAnimateFlag)
{
- // Next frame
- TInt interval =((TInt)iFrameInfo.iDelay.Int64())?((TInt)iFrameInfo.iDelay.Int64())
- :KTimerInterval;
- iAnimationTimer->Start(interval,interval, TCallBack(TimerCallbackL, this));
+ GLX_LOG_INFO1("DrmGif: ProcessImageL() - Frame Interval <%d> us",
+ (TInt)iFrameInfo.iDelay.Int64());
+ TInt interval =((TInt)iFrameInfo.iDelay.Int64()) ?
+ ((TInt)iFrameInfo.iDelay.Int64()) : KDefaultFrameInterval;
+ GLX_LOG_INFO1("DrmGif: ProcessImageL() interval=<%d> us", interval);
+ iAnimationTimer->Start(interval, interval, TCallBack(TimerCallbackL,
+ this));
}
}
@@ -364,7 +437,7 @@
void CGlxDrmGifTextureCreator::CreateImageDecoderL(const TDesC& aImageFile)
{
TRACER("CGlxDrmGifTextureCreator::CreateImageDecoderL()");
- GLX_LOG_URI("CGlxDrmGifTextureCreator::CreateImageDecoderL(%S)", &aImageFile);
+ GLX_LOG_URI("DrmGif::CreateImageDecoderL(%S)", &aImageFile);
CImageDecoder::TOptions options =
(CImageDecoder::TOptions) (CImageDecoder::EOptionNoDither
@@ -378,11 +451,11 @@
}
iFrameInfo = iImageDecoder->FrameInfo();
iOrigImageDimensions = iImageDecoder->FrameInfo().iOverallSizeInPixels;
- GLX_LOG_INFO1("=>CGlxDrmGifTextureCreator::CreateImageDecoderL() - Gif Frame Interval <%d> us",
+ GLX_LOG_INFO1("DrmGif::CreateImageDecoderL() - Gif Frame Interval <%d> us",
(TInt)iFrameInfo.iDelay.Int64());
iFrameCount = iImageDecoder->FrameCount();
-
- // We are creating array of KGlxMaxFrameCount frames
+
+ // We are creating array of KGlxMaxFrameCount frames
// So re-setting the array-count with the no.
// It will animate till that no. of frames.
if (iFrameCount > KGlxMaxFrameCount)
@@ -390,7 +463,7 @@
iFrameCount = KGlxMaxFrameCount;
}
//dont create the timer if it is a singleframe.no need to animate
- if (iFrameCount > 1)
+ if (iFrameCount > 1)
{
iAnimationTimer = CPeriodic::NewL(CActive::EPriorityLow);
}
@@ -416,24 +489,6 @@
}
// -----------------------------------------------------------------------------
-// ReCalculateSize
-// -----------------------------------------------------------------------------
-TSize CGlxDrmGifTextureCreator::ReCalculateSizeL(TSize& aTargetBitmapSize)
- {
- TRACER("CGlxDrmGifTextureCreator::ReCalculateSizeL()");
- // calculate the reduction factor on what size we need
- TInt reductionFactor = iImageDecoder->ReductionFactor(iOrigImageDimensions,
- aTargetBitmapSize);
- // get the reduced size onto destination size
- TSize destSize;
- User::LeaveIfError(iImageDecoder->ReducedSize(iOrigImageDimensions,
- reductionFactor, destSize));
- GLX_LOG_INFO2("CGlxDrmGifTextureCreator::ReCalculateSizeL() destSize=%d, %d",
- destSize.iWidth,destSize.iHeight);
- return destSize;
- }
-
-// -----------------------------------------------------------------------------
// SetTexture
// -----------------------------------------------------------------------------
void CGlxDrmGifTextureCreator::SetTexture(TInt aTextureId)
--- a/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -20,19 +20,16 @@
#include "glxmulmodelproviderbase.h"
-#include <e32err.h>
#include <alf/alfenv.h>
#include <alf/alfevent.h>
#include <alf/ialfwidgetfactory.h>
#include <alf/alfwidgetenvextension.h>
-//#include <osn/ustring.h>
#include <mul/imulwidget.h>
#include <mul/mulevent.h>
#include <mul/mulvisualitem.h>
+#include <mul/imulcoverflowwidget.h> // An interface for Multimedia coverflow Widget
#include <glxlog.h> //Logging
#include <glxtracer.h>
-#include "glxbinding.h"
-#include "glxcommandbindingutility.h"
#include <glxnavigationalstate.h>
#include <glxnavigationalstatedefs.h>
@@ -42,8 +39,9 @@
#include <glxtexturemanager.h>
#include <glxicons.mbg>
#include <glxuistd.h>
-#include <mul/imulcoverflowwidget.h> // An interface for Multimedia coverflow Widget
#include "glxdrmgiftexturecreator.h"
+#include "glxbinding.h"
+#include "glxcommandbindingutility.h"
using namespace Alf;
@@ -51,9 +49,6 @@
static const char* const KGridWidget = "GridWidget";
static const char* const KCoverFlowWidget = "CoverflowWidget";
-//@todo to be uncommented when using command binding
-//#include "glxboundcommand.h"
-
// ----------------------------------------------------------------------------
// BaseConstructL
// ----------------------------------------------------------------------------
@@ -189,6 +184,7 @@
AlfEventStatus response = EEventNotHandled;
if ( aEvent.IsCustomEvent() )
{
+ GLX_LOG_INFO1("CGlxMulModelProviderBase::offerEvent() aEvent.CustomParameter(%d)", aEvent.CustomParameter());
switch ( aEvent.CustomParameter() )
{
case KAlfActionIdDeviceLayoutChanged:
@@ -206,9 +202,29 @@
response = EEventHandled;
}
break;
- default:
- break;
- }
+ case Alf::ETypeItemRemoved:
+ {
+ GLX_LOG_INFO("CGlxMulModelProviderBase::offerEvent - ETypeItemRemoved!");
+ CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+ CleanupClosePushL(*uiUtility);
+ if (iModel->Count() == 0 && UString(KCoverFlowWidget)
+ == UString(iWidget.widgetName())
+ && iNavigationalState->ViewingMode()
+ == NGlxNavigationalState::EView
+ && uiUtility->GetForegroundStatus())
+ {
+ uiUtility->SetViewNavigationDirection(
+ EGlxNavigationBackwards);
+
+ iNavigationalState->ActivatePreviousViewL();
+ response = EEventHandled;
+ }
+ CleanupStack::PopAndDestroy(uiUtility);
+ }
+ break;
+ default:
+ break;
+ }
}
return response;
}
@@ -306,12 +322,12 @@
TGlxMediaGeneralRightsValidity isValid = EGlxDrmRightsValidityUnknown;
if (aMedia.GetDrmProtected(drm))
{
- GLX_DEBUG1("CGlxMulModelProviderBase::SetDataT GetDrmValidity");
aMedia.GetDrmValidity(isValid);
+ GLX_DEBUG2("CGlxMulModelProviderBase::SetDataT DrmValidity(%d)", isValid);
}
TInt frameCount;
aMedia.GetFrameCount(frameCount);
-
+ GLX_DEBUG2("CGlxMulModelProviderBase::SetDataT framecount=%d", frameCount);
//Create the DRM gif texture intance only if the DRM gif image is
//valid and focused
if (frameCount > 1 && drm && isValid == EGlxDrmRightsValid)
@@ -444,6 +460,7 @@
{
TRACER("CGlxMulModelProviderBase::RemoveItems");
// RemoveItems does not throw according to model documentation
+ GLX_LOG_INFO2("CGlxMulModelProviderBase::RemoveItems() aIndex(%d), aCount(%d)", aIndex, aCount);
iModel->Remove( aIndex, aCount );
}
--- a/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -83,18 +83,33 @@
void GlxThumbnailVariantType::ConstructL( const TGlxMedia& aMedia, const TSize& aSize,
TBool aIsFocused, TInt aTextureId )
{
-
TRACER("GlxThumbnailVariantType::ConstructL");
GLX_DEBUG2("GlxThumbnailVariantType::ConstructL Media Id=%d", aMedia.Id().Value());
-
+ TInt err = KErrNone;
+
if(aTextureId != KErrNotFound)
{
mTextureId = aTextureId;
+ GLX_DEBUG1("GlxThumbnailVariantType::ConstructL valid aTextureId");
return;
}
iUiUtility = CGlxUiUtility::UtilityL();
+ TSize defaultSize = iUiUtility->GetGridIconSize();
+ TFileName resFile(KDC_APP_BITMAP_DIR);
+ resFile.Append(KGlxIconsFilename);
+
+ const TDesC& uri = aMedia.Uri();
+ GLX_LOG_URI( "GlxThumbnailVariantType::ConstructL(uri=%S)", &uri );
+ if (!iUiUtility->GetForegroundStatus() || uri.Length() == 0)
+ {
+ GLX_DEBUG1("GlxThumbnailVariantType::Create default texture & return");
+ TRAP(err, mTextureId = iUiUtility->GlxTextureManager().CreateIconTextureL(
+ EMbmGlxiconsQgn_prop_image_notcreated, resFile, defaultSize).Id());
+ return;
+ }
+
TBool drm = EFalse;
TGlxMediaGeneralRightsValidity isValid = EGlxDrmRightsValidityUnknown;
@@ -107,47 +122,26 @@
TBool fsTnmAvailable = HasRelevantThumbnail(aMedia,aSize);
- TIconInfo icon;
-
- TSize defaultSize = iUiUtility->GetGridIconSize();
-
- TFileName resFile(KDC_APP_BITMAP_DIR);
- resFile.Append(KGlxIconsFilename);
-
TInt frameCount = 0;
aMedia.GetFrameCount(frameCount);
- const TDesC& uri = aMedia.Uri();
- GLX_DEBUG2("GlxThumbnailVariantType::ConstructL() uri.Length()=%d", uri.Length());
-
TInt thumbnailError = GlxErrorManager::HasAttributeErrorL(
aMedia.Properties(), KGlxMediaIdThumbnail );
- TInt err = KErrNone;
+ TIconInfo icon;
TBool expired = EFalse;
- if ( aIsFocused && frameCount > 1 && (fsTnmAvailable) )
+ if (aIsFocused && frameCount > 1 && fsTnmAvailable && !drm)
{
GLX_DEBUG1("GlxThumbnailVariantType::CreateAnimatedGifTextureL");
- // If the image is DRM gif, we'll not animate.
- // Only display the 1st frame. Otherwise animate for normal gif.
- if (drm)
- {
- TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateThumbnailTextureL(
- aMedia, aMedia.IdSpaceId(), aSize, this ).Id() );
- }
- else
- {
- TRAP( err, mTextureId = iUiUtility->GlxTextureManager().
- CreateAnimatedGifTextureL( uri, aSize, aMedia,
- aMedia.IdSpaceId() ).Id() );
- }
+ TRAP( err, mTextureId = iUiUtility->GlxTextureManager().
+ CreateAnimatedGifTextureL( uri, aSize, aMedia,
+ aMedia.IdSpaceId() ).Id() );
}
//URI length could be zero for Media Id based Thumbnail fetch
else if ( fsTnmAvailable )
{
- GLX_DEBUG1("GlxThumbnailVariantType::CreateThumbnailTextureL");
TMPXGeneralCategory cat = aMedia.Category();
//Check if media is DRM rights protected
if (drm)
@@ -191,6 +185,7 @@
//Check If DRM rights have expired.
if (expired)
{
+ GLX_DEBUG1("GlxThumbnailVariantType::CreateIconTextureL:Default (expired)");
TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateIconTextureL(
EMbmGlxiconsQgn_prop_image_notcreated, resFile, defaultSize ).Id() );
}
@@ -200,6 +195,7 @@
{
// Fix for EABI-7RL9DD
// Replaced defaultSize with aSize
+ GLX_DEBUG1("GlxThumbnailVariantType::CreateThumbnailTextureL:EGlxDrmRightsValid");
TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateThumbnailTextureL(
aMedia, aMedia.IdSpaceId(), aSize, this ).Id() );
}
@@ -208,6 +204,7 @@
}
else
{
+ GLX_DEBUG1("GlxThumbnailVariantType::CreateThumbnailTextureL");
TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateThumbnailTextureL(
aMedia, aMedia.IdSpaceId(), aSize, this ).Id() );
}
@@ -223,8 +220,7 @@
//show larger (twice) default icon for videos, which has errors
TSize newSize = defaultSize;
newSize += defaultSize;
- GLX_DEBUG1(
- "GlxThumbnailVariantType::CreateThumbnailTextureL::Default (video)");
+ GLX_DEBUG1("GlxThumbnailVariantType::CreateIconTextureL::Default (video)");
TRAP(err, mTextureId
= iUiUtility->GlxTextureManager().CreateIconTextureL(
EMbmGlxiconsQgn_prop_image_notcreated, resFile,
@@ -293,7 +289,7 @@
TBool GlxThumbnailVariantType::ConsumeRightsBasedOnSize(
TSize aImageSize, TSize aBitmapSize)
{
- TRACER("CGlxCommandHandlerDrm::ConsumeRightsBasedOnSize");
+ TRACER("GlxThumbnailVariantType::ConsumeRightsBasedOnSize");
TBool drmRightsChecked = EFalse;
// minimum size (111 x 83)
--- a/photosgallery/viewframework/drmutility/group/glxdrmutility.mmp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/drmutility/group/glxdrmutility.mmp Thu Aug 19 09:55:03 2010 +0300
@@ -44,5 +44,7 @@
LIBRARY drmhelper.lib
LIBRARY caf.lib
LIBRARY cafutils.lib
+LIBRARY drmuihandling.lib
+LIBRARY efsrv.lib
// End of File
--- a/photosgallery/viewframework/drmutility/src/glxdrmutility.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/drmutility/src/glxdrmutility.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -32,6 +32,9 @@
#include "glxtracer.h"
#include "glxlog.h"
+#include <drmuihandling.h>
+using namespace DRM;
+
const TInt KGlxDRMThumbnailHeight = 120;
const TInt KGlxDRMThumbnailWidth = 90;
@@ -366,15 +369,22 @@
EXPORT_C void CGlxDRMUtility::ShowDRMDetailsPaneL(const TDesC& aUri)
{
TRACER("CGlxDRMUtility::ShowDRMDetailsPaneL(URI)");
- TRAPD( err, iDrmHelper->LaunchDetailsViewEmbeddedL( aUri ) );
- // if no rights ask user to re-activate
- if (err == KErrCANoRights)
- {
- HBufC* buf = aUri.AllocLC();
- iDrmHelper->ActivateContentL(*buf);
- CleanupStack::PopAndDestroy(buf);
- }
+ GLX_LOG_URI("CGlxDRMUtility::ShowDRMDetailsPaneL(%S)", &aUri);
+ RFs fs;
+ User::LeaveIfError(fs.Connect());
+ CleanupClosePushL(fs);
+ RFile64 drmFile;
+ User::LeaveIfError(drmFile.Open(fs, aUri, EFileRead
+ | EFileShareReadersOrWriters));
+ CleanupClosePushL(drmFile);
+
+ CDrmUiHandling* drmUiHandler = CDrmUiHandling::NewLC();
+ TRAP_IGNORE(drmUiHandler->ShowDetailsViewL(drmFile));
+ CleanupStack::PopAndDestroy(drmUiHandler);
+
+ CleanupStack::PopAndDestroy(&drmFile);
+ CleanupStack::PopAndDestroy(&fs);
}
//============================================================================
@@ -383,12 +393,9 @@
EXPORT_C void CGlxDRMUtility::ShowDRMDetailsPaneL(RFile& aFileHandle)
{
TRACER("CGlxDRMUtility::ShowDRMDetailsPaneL(RFile)");
- TRAPD( err, iDrmHelper->LaunchDetailsViewEmbeddedL( aFileHandle ) );
- // if no rights ask user to re-activate
- if (err == KErrCANoRights)
- {
- //need to check if we need to handle.
- }
+ CDrmUiHandling* drmUiHandler = CDrmUiHandling::NewLC();
+ TRAP_IGNORE(drmUiHandler->ShowDetailsViewL(aFileHandle));
+ CleanupStack::PopAndDestroy(drmUiHandler);
}
//============================================================================
--- a/photosgallery/viewframework/medialists/src/glxcachemanager.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/medialists/src/glxcachemanager.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -1007,6 +1007,8 @@
TGlxIdSpaceId spaceId = list->IdSpaceId(iRequestedItemIndexes[0]);
HandleCollectionMediaL(spaceId, *iMPXMedia, KErrNone);
DeleteImageViewerInstance();
+ delete iReader;
+ iReader = NULL;
return;
}
else
--- a/photosgallery/viewframework/plugins/fullscreenviewplugin/data/glxfullscreenviewdata.rss Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/plugins/fullscreenviewplugin/data/glxfullscreenviewdata.rss Thu Aug 19 09:55:03 2010 +0300
@@ -251,6 +251,8 @@
txt = qtn_options_send_via; },
MENU_ITEM { command = EGlxCmdAiwShareOnOvi;
/* txt comes from ShareOnline 4.3 */},
+ MENU_ITEM { command = EGlxCmdDelete;
+ txt = qtn_lgal_options_delete; },
MENU_ITEM { command = EGlxCmdAiwEdit;
txt = qtn_lgal_options_edit; },
MENU_ITEM { command = EGlxCmdDetails;
--- a/photosgallery/viewframework/plugins/gridviewplugin/data/glxgridviewdata.rss Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/plugins/gridviewplugin/data/glxgridviewdata.rss Thu Aug 19 09:55:03 2010 +0300
@@ -1,25 +1,22 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource definitions for Grid View plugin
-*
-*/
-
-
-
+ * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Resource definitions for Grid View plugin
+ *
+ */
// RESOURCE IDENTIFIER
-NAME MPXC
+NAME MPXC
// INCLUDES
@@ -38,9 +35,11 @@
// RESOURCE DEFINITIONS
-RESOURCE RSS_SIGNATURE { }
+RESOURCE RSS_SIGNATURE
+ {}
-RESOURCE TBUF { buf="GLTV"; }
+RESOURCE TBUF
+ {buf="GLTV";}
// -----------------------------------------------------------------------------------
// Resource Definitions
@@ -48,10 +47,10 @@
// Downloads Grid View
RESOURCE AVKON_VIEW r_grid_view
- {
- menubar = r_grid_menubar;
- cba = r_grid_softkeys;
- }
+ {
+ menubar = r_grid_menubar;
+ cba = r_grid_softkeys;
+ }
// Captured Grid View
RESOURCE AVKON_VIEW r_glx_captured_grid_view
@@ -81,26 +80,27 @@
cba = r_grid_softkeys;
}
-
// ------------------------------------------------------------------------------------
// Menu Bar Resources
// ------------------------------------------------------------------------------------
// Basic Grid Views
RESOURCE MENU_BAR r_grid_menubar
- {
- titles=
- {
- MENU_TITLE { menu_pane=r_glx_grid_menu; txt=""; }
- };
- }
+ {
+ titles=
+ {
+ MENU_TITLE
+ {menu_pane=r_glx_grid_menu; txt="";}
+ };
+ }
// Albums Grid View
RESOURCE MENU_BAR r_glx_album_grid_menubar
{
titles=
{
- MENU_TITLE { menu_pane=r_glx_album_grid_menu; txt=""; }
+ MENU_TITLE
+ {menu_pane=r_glx_album_grid_menu; txt="";}
};
}
@@ -109,10 +109,10 @@
{
titles=
{
- MENU_TITLE { menu_pane=r_taggrid_menu; txt=""; }
+ MENU_TITLE
+ {menu_pane=r_taggrid_menu; txt="";}
};
- }
-
+ }
// ------------------------------------------------------------------------------------
// Menu Contents for Grid views
@@ -121,144 +121,180 @@
// Basic grid views
RESOURCE MENU_PANE r_glx_grid_menu
{
- items=
- {
- MENU_ITEM { command = EGlxCmdPlay;
- txt = qtn_lgal_options_play; },
- MENU_ITEM { command = EGlxCmdSend;
- txt = qtn_options_send_via;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdAiwShareOnOvi;
- /* txt comes from ShareOnline 4.3 */
- flags = EEikMenuItemSpecific;},
- MENU_ITEM { command = EGlxCmdDelete;
- txt = qtn_lgal_options_delete;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdSlideshowPlay;
- txt = qtn_lgal_options_slideshow;
- flags = EEikMenuItemSpecific;},
- MENU_ITEM { command = EGlxCmdSlideshow;
- txt = qtn_lgal_options_slideshow;
- cascade = r_grid_shw_menu; },
- MENU_ITEM { command = EGlxCmdAiwEdit;
- txt = qtn_lgal_options_edit;
- flags = EEikMenuItemSpecificListQuery;},
- MENU_ITEM { command = EGlxCmdDetails;
- txt = qtn_lgal_options_details; },
- MENU_ITEM { command = EAknMarkAll;
- txt = qtn_options_list_mark_all;},
- MENU_ITEM { command = EAknUnmarkAll;
- txt = qtn_options_list_unmark_all;},
- MENU_ITEM { command = EGlxCmdAddToAlbum;
- txt = qtn_lgal_options_add_to_album;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdAddTag;
- txt = qtn_lgal_options_properties_add_tag;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EAknCmdHelp;
- txt = qtn_options_help; },
- MENU_ITEM { command = EAknCmdExit;
- txt = qtn_options_exit; }
- };
+ items=
+ {
+ MENU_ITEM
+ {command = EGlxCmdPlay;
+ txt = qtn_lgal_options_play;},
+ MENU_ITEM
+ {command = EGlxCmdSend;
+ txt = qtn_options_send_via;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdAiwShareOnOvi;
+ /* txt comes from ShareOnline 4.3 */},
+ MENU_ITEM
+ {command = EGlxCmdDelete;
+ txt = qtn_lgal_options_delete;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdSlideshowPlay;
+ txt = qtn_lgal_options_slideshow;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdSlideshow;
+ txt = qtn_lgal_options_slideshow;
+ cascade = r_grid_shw_menu;},
+ MENU_ITEM
+ {command = EGlxCmdAiwEdit;
+ txt = qtn_lgal_options_edit;
+ flags = EEikMenuItemSpecificListQuery;},
+ MENU_ITEM
+ {command = EGlxCmdDetails;
+ txt = qtn_lgal_options_details;},
+ MENU_ITEM
+ {command = EAknMarkAll;
+ txt = qtn_options_list_mark_all;},
+ MENU_ITEM
+ {command = EAknUnmarkAll;
+ txt = qtn_options_list_unmark_all;},
+ MENU_ITEM
+ {command = EGlxCmdAddToAlbum;
+ txt = qtn_lgal_options_add_to_album;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdAddTag;
+ txt = qtn_lgal_options_properties_add_tag;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EAknCmdHelp;
+ txt = qtn_options_help;},
+ MENU_ITEM
+ {command = EAknCmdExit;
+ txt = qtn_options_exit;}
+ };
}
// Albums Grid
RESOURCE MENU_PANE r_glx_album_grid_menu
{
- items=
- {
- MENU_ITEM { command = EGlxCmdPlay;
- txt = qtn_lgal_options_play; },
- MENU_ITEM { command = EGlxCmdSend;
- txt = qtn_options_send_via;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdAiwShareOnOvi;
- /* txt comes from ShareOnline 4.3 */
- flags = EEikMenuItemSpecific;},
- MENU_ITEM { command = EGlxCmdRemoveFrom;
- txt = qtn_lgal_options_remove_from_album;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdDelete;
- txt = qtn_lgal_options_delete;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdSlideshowPlay;
- txt = qtn_lgal_options_slideshow;
- flags = EEikMenuItemSpecific;},
- MENU_ITEM { command = EGlxCmdSlideshow;
- txt = qtn_lgal_options_slideshow;
- cascade = r_grid_shw_menu; },
- MENU_ITEM { command = EGlxCmdAiwEdit;
- txt = qtn_lgal_options_edit;
- flags = EEikMenuItemSpecificListQuery;},
- MENU_ITEM { command = EGlxCmdDetails;
- txt = qtn_lgal_options_details; },
- MENU_ITEM { command = EAknMarkAll;
- txt = qtn_options_list_mark_all;},
- MENU_ITEM { command = EAknUnmarkAll;
- txt = qtn_options_list_unmark_all;},
- MENU_ITEM { command = EGlxCmdAddToAlbum;
- txt = qtn_lgal_options_add_to_album;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdAddTag;
- txt = qtn_lgal_options_properties_add_tag;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EAknCmdHelp;
- txt = qtn_options_help; },
- MENU_ITEM { command = EAknCmdExit;
- txt = qtn_options_exit; }
- };
- }
+ items=
+ {
+ MENU_ITEM
+ {command = EGlxCmdPlay;
+ txt = qtn_lgal_options_play;},
+ MENU_ITEM
+ {command = EGlxCmdSend;
+ txt = qtn_options_send_via;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdAiwShareOnOvi;
+ /* txt comes from ShareOnline 4.3 */},
+ MENU_ITEM
+ {command = EGlxCmdRemoveFrom;
+ txt = qtn_lgal_options_remove_from_album;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdDelete;
+ txt = qtn_lgal_options_delete;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdSlideshowPlay;
+ txt = qtn_lgal_options_slideshow;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdSlideshow;
+ txt = qtn_lgal_options_slideshow;
+ cascade = r_grid_shw_menu;},
+ MENU_ITEM
+ {command = EGlxCmdAiwEdit;
+ txt = qtn_lgal_options_edit;
+ flags = EEikMenuItemSpecificListQuery;},
+ MENU_ITEM
+ {command = EGlxCmdDetails;
+ txt = qtn_lgal_options_details;},
+ MENU_ITEM
+ {command = EAknMarkAll;
+ txt = qtn_options_list_mark_all;},
+ MENU_ITEM
+ {command = EAknUnmarkAll;
+ txt = qtn_options_list_unmark_all;},
+ MENU_ITEM
+ {command = EGlxCmdAddToAlbum;
+ txt = qtn_lgal_options_add_to_album;},
+ MENU_ITEM
+ {command = EGlxCmdAddTag;
+ txt = qtn_lgal_options_properties_add_tag;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EAknCmdHelp;
+ txt = qtn_options_help;},
+ MENU_ITEM
+ {command = EAknCmdExit;
+ txt = qtn_options_exit;}
+ };
+ }
// Tags Grid
RESOURCE MENU_PANE r_taggrid_menu
- {
- items=
- {
- MENU_ITEM { command = EGlxCmdPlay;
- txt = qtn_lgal_options_play; },
- MENU_ITEM { command = EGlxCmdSend;
- txt = qtn_options_send_via;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdAiwShareOnOvi;
- /* txt comes from ShareOnline 4.3 */
- flags = EEikMenuItemSpecific;},
- MENU_ITEM { command=EGlxCmdRemoveFrom;
- txt = qtn_lgal_options_remove_from_tag;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdDelete;
- txt = qtn_lgal_options_delete;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdSlideshowPlay;
- txt = qtn_lgal_options_slideshow;
- flags = EEikMenuItemSpecific;},
- MENU_ITEM { command = EGlxCmdSlideshow;
- txt = qtn_lgal_options_slideshow;
- cascade = r_grid_shw_menu; },
- MENU_ITEM { command = EGlxCmdAiwEdit;
- txt = qtn_lgal_options_edit;
- flags = EEikMenuItemSpecificListQuery;},
- MENU_ITEM { command = EGlxCmdDetails;
- txt = qtn_lgal_options_details; },
- MENU_ITEM { command = EAknMarkAll;
- txt = qtn_options_list_mark_all;},
- MENU_ITEM { command = EAknUnmarkAll;
- txt = qtn_options_list_unmark_all;},
- MENU_ITEM { command = EGlxCmdAddToAlbum;
- txt = qtn_lgal_options_add_to_album;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EGlxCmdAddTag;
- txt = qtn_lgal_options_properties_add_tag;
- flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = EAknCmdHelp;
- txt = qtn_options_help; },
- MENU_ITEM { command = EAknCmdExit;
- txt = qtn_options_exit; }
- };
+ {
+ items=
+ {
+ MENU_ITEM
+ {command = EGlxCmdPlay;
+ txt = qtn_lgal_options_play;},
+ MENU_ITEM
+ {command = EGlxCmdSend;
+ txt = qtn_options_send_via;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdAiwShareOnOvi;
+ /* txt comes from ShareOnline 4.3 */},
+ MENU_ITEM
+ {command=EGlxCmdRemoveFrom;
+ txt = qtn_lgal_options_remove_from_tag;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdDelete;
+ txt = qtn_lgal_options_delete;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdSlideshowPlay;
+ txt = qtn_lgal_options_slideshow;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdSlideshow;
+ txt = qtn_lgal_options_slideshow;
+ cascade = r_grid_shw_menu;},
+ MENU_ITEM
+ {command = EGlxCmdAiwEdit;
+ txt = qtn_lgal_options_edit;
+ flags = EEikMenuItemSpecificListQuery;},
+ MENU_ITEM
+ {command = EGlxCmdDetails;
+ txt = qtn_lgal_options_details;},
+ MENU_ITEM
+ {command = EAknMarkAll;
+ txt = qtn_options_list_mark_all;},
+ MENU_ITEM
+ {command = EAknUnmarkAll;
+ txt = qtn_options_list_unmark_all;},
+ MENU_ITEM
+ {command = EGlxCmdAddToAlbum;
+ txt = qtn_lgal_options_add_to_album;
+ flags = EEikMenuItemSpecific;},
+ MENU_ITEM
+ {command = EGlxCmdAddTag;
+ txt = qtn_lgal_options_properties_add_tag;},
+ MENU_ITEM
+ {command = EAknCmdHelp;
+ txt = qtn_options_help;},
+ MENU_ITEM
+ {command = EAknCmdExit;
+ txt = qtn_options_exit;}
+ };
}
-
-
-
// ------------------------------------------------------------------------------------
// Submenu contents
// ------------------------------------------------------------------------------------
@@ -268,146 +304,153 @@
{
items=
{
- MENU_ITEM { command=EGlxCmdSlideshowPlay; txt=qtn_lgal_options_slideshow_play; },
- MENU_ITEM { command=EGlxCmdSlideshowSettings; txt=qtn_lgal_options_slideshow_settings_general; }
+ MENU_ITEM
+ {command=EGlxCmdSlideshowPlay;
+ txt=qtn_lgal_options_slideshow_play;},
+ MENU_ITEM
+ {command=EGlxCmdSlideshowSettings;
+ txt=qtn_lgal_options_slideshow_settings_general;}
};
}
-
// EditList sub menu for Marking
RESOURCE MENU_PANE r_viu_editlist_menu
{
items =
{
/*MENU_ITEM
- {
- command = EAknCmdMark;
- txt = qtn_options_list_mark_one;
- },*/
+ {
+ command = EAknCmdMark;
+ txt = qtn_options_list_mark_one;
+ },*/
MENU_ITEM
{
command = EAknMarkAll;
txt = qtn_options_list_mark_all;
},
/*MENU_ITEM
- {
- command = EAknCmdUnmark;
- txt = qtn_options_list_unmark_one;
- },*/
+ {
+ command = EAknCmdUnmark;
+ txt = qtn_options_list_unmark_one;
+ },*/
MENU_ITEM
{
command = EAknUnmarkAll;
txt = qtn_options_list_unmark_all;
- }
+ }
};
}
-// Rotate Sub menu
-//RESOURCE MENU_PANE r_rotate_sub_menu
-// {
-// items =
-// {
-// MENU_ITEM
-// {
-// command = EGlxCmdRotateLeft;
-// txt = qtn_lgal_options_rotate_left;
-// },
-// MENU_ITEM
-// {
-// command = EGlxCmdRotateRight;
-// txt = qtn_lgal_options_rotate_right;
-// }
-// };
-// }
-
// Home Network sub menu
RESOURCE MENU_PANE r_home_network_menu
{
items=
{
- MENU_ITEM { command=EGlxShowViaUpnpSubmenuVersion; txt=qtn_lgal_options_sub_show_ext; },
- MENU_ITEM { command=EGlxStopShowingSubmenuVersion; txt=qtn_lgal_options_sub_stop_show; },
- MENU_ITEM { command=EGlxCopyToHomeNetwork; txt=qtn_lgal_options_copy_to_home_net; }
+ MENU_ITEM
+ {command=EGlxShowViaUpnpSubmenuVersion;
+ txt=qtn_lgal_options_sub_show_ext;},
+ MENU_ITEM
+ {command=EGlxStopShowingSubmenuVersion;
+ txt=qtn_lgal_options_sub_stop_show;},
+ MENU_ITEM
+ {command=EGlxCopyToHomeNetwork;
+ txt=qtn_lgal_options_copy_to_home_net;}
};
}
-
// ------------------------------------------------------------------------------------
// Other Menubars
// ------------------------------------------------------------------------------------
RESOURCE MENU_BAR r_grid_ok_menubar
- {
- titles=
- {
- MENU_TITLE { menu_pane=r_grid_ok_menu; txt=""; }
- };
- }
-
+ {
+ titles=
+ {
+ MENU_TITLE
+ {menu_pane=r_grid_ok_menu; txt="";}
+ };
+ }
+
RESOURCE MENU_BAR r_grid_ok_menubar_album_gridview
- {
- titles=
- {
- MENU_TITLE { menu_pane=r_grid_ok_menu_album_gridview; txt=""; }
- };
- }
+ {
+ titles=
+ {
+ MENU_TITLE
+ {menu_pane=r_grid_ok_menu_album_gridview; txt="";}
+ };
+ }
RESOURCE MENU_BAR r_grid_ok_menubar_tag_gridview
{
titles=
{
- MENU_TITLE { menu_pane=r_grid_ok_menu_tag_gridview; txt=""; }
+ MENU_TITLE
+ {menu_pane=r_grid_ok_menu_tag_gridview; txt="";}
};
}
RESOURCE MENU_PANE r_grid_ok_menu
- {
- items=
- {
- MENU_ITEM { command = EGlxCmdDelete;
- txt = qtn_lgal_options_delete; },
- MENU_ITEM { command = EAknUnmarkAll;
- txt = qtn_options_list_unmark_all; },
- MENU_ITEM { command = EGlxCmdAddToAlbum;
- txt = qtn_lgal_options_add_to_album; },
- MENU_ITEM { command = EGlxCmdAddTag;
- txt = qtn_lgal_options_properties_add_tag; }
- };
- }
+ {
+ items=
+ {
+ MENU_ITEM
+ {command = EGlxCmdDelete;
+ txt = qtn_lgal_options_delete;},
+ MENU_ITEM
+ {command = EAknUnmarkAll;
+ txt = qtn_options_list_unmark_all;},
+ MENU_ITEM
+ {command = EGlxCmdAddToAlbum;
+ txt = qtn_lgal_options_add_to_album;},
+ MENU_ITEM
+ {command = EGlxCmdAddTag;
+ txt = qtn_lgal_options_properties_add_tag;}
+ };
+ }
RESOURCE MENU_PANE r_grid_ok_menu_album_gridview
- {
- items=
- {
- MENU_ITEM { command = EGlxCmdDelete;
- txt = qtn_lgal_options_delete; },
- MENU_ITEM { command = EAknUnmarkAll;
- txt = qtn_options_list_unmark_all; },
- MENU_ITEM { command = EGlxCmdAddToAlbum;
- txt = qtn_lgal_options_add_to_album; },
- MENU_ITEM { command = EGlxCmdAddTag;
- txt = qtn_lgal_options_properties_add_tag; },
- MENU_ITEM { command = EGlxCmdRemoveFrom;
- txt = qtn_lgal_options_remove_from_album; }
- };
- }
+ {
+ items=
+ {
+ MENU_ITEM
+ {command = EGlxCmdDelete;
+ txt = qtn_lgal_options_delete;},
+ MENU_ITEM
+ {command = EAknUnmarkAll;
+ txt = qtn_options_list_unmark_all;},
+ MENU_ITEM
+ {command = EGlxCmdAddToAlbum;
+ txt = qtn_lgal_options_add_to_album;},
+ MENU_ITEM
+ {command = EGlxCmdAddTag;
+ txt = qtn_lgal_options_properties_add_tag;},
+ MENU_ITEM
+ {command = EGlxCmdRemoveFrom;
+ txt = qtn_lgal_options_remove_from_album;}
+ };
+ }
RESOURCE MENU_PANE r_grid_ok_menu_tag_gridview
- {
- items=
- {
- MENU_ITEM { command = EGlxCmdDelete;
- txt = qtn_lgal_options_delete; },
- MENU_ITEM { command = EAknUnmarkAll;
- txt = qtn_options_list_unmark_all; },
- MENU_ITEM { command = EGlxCmdAddToAlbum;
- txt = qtn_lgal_options_add_to_album; },
- MENU_ITEM { command = EGlxCmdAddTag;
- txt = qtn_lgal_options_properties_add_tag; },
- MENU_ITEM { command=EGlxCmdRemoveFrom;
- txt=qtn_lgal_options_remove_from_tag; }
- };
- }
+ {
+ items=
+ {
+ MENU_ITEM
+ {command = EGlxCmdDelete;
+ txt = qtn_lgal_options_delete;},
+ MENU_ITEM
+ {command = EAknUnmarkAll;
+ txt = qtn_options_list_unmark_all;},
+ MENU_ITEM
+ {command = EGlxCmdAddToAlbum;
+ txt = qtn_lgal_options_add_to_album;},
+ MENU_ITEM
+ {command = EGlxCmdAddTag;
+ txt = qtn_lgal_options_properties_add_tag;},
+ MENU_ITEM
+ {command=EGlxCmdRemoveFrom;
+ txt=qtn_lgal_options_remove_from_tag;}
+ };
+ }
// ------------------------------------------------------------------------------------
// Softkey resources
@@ -435,7 +478,6 @@
};
}
-
RESOURCE CBA r_grid_softkeys_fullscreen
{
buttons =
@@ -463,7 +505,7 @@
// ------------------------------------------------------------------------------------
RESOURCE TBUF r_grid_empty_view_text
{
- buf = qtn_lgal_empty_grid_no_items;
+ buf = qtn_lgal_empty_grid_no_items;
}
RESOURCE TBUF r_grid_empty_view_text_image
@@ -495,57 +537,57 @@
items =
{
TBAR_CTRL
- {
- type = EAknCtButton;
- id = EGlxCmdSlideshowPlay;
- control = AVKON_BUTTON
- {
- flags = 0;
- states =
- {
- AVKON_BUTTON_STATE
- {
- bmpfile = "z:\\Resource\\apps\\glxicons.mif";
- bmpid = EMbmGlxiconsQgn_indi_tb_slideshow;
- bmpmask = EMbmGlxiconsQgn_indi_tb_slideshow_mask;
- press_bmpid = EMbmGlxiconsQgn_indi_tb_slideshow;
- press_bmpmask = EMbmGlxiconsQgn_indi_tb_slideshow_mask;
- helptxt = qtn_lgal_tooltip_slideshow;
- }
- };
- };
- },
- TBAR_CTRL
- {
- type = EAknCtButton;
- id = EGlxCmdStartMultipleMarking;
- control = AVKON_BUTTON
- {
- flags = 0;
- states =
- {
- AVKON_BUTTON_STATE
- {
- bmpfile = "z:\\Resource\\apps\\glxicons.mif";
- bmpid = EMbmGlxiconsQgn_indi_cam4_tb_mark;
- bmpmask = EMbmGlxiconsQgn_indi_cam4_tb_mark_mask;
- press_bmpid = EMbmGlxiconsQgn_indi_cam4_tb_mark;
- press_bmpmask = EMbmGlxiconsQgn_indi_cam4_tb_mark_mask;
- helptxt = qtn_lgal_tooltip_mark_items;
- },
- AVKON_BUTTON_STATE
- {
- flags = KAknButtonStateHasLatchedFrame;
- bmpfile = "z:\\Resource\\apps\\glxicons.mif";
- bmpid = EMbmGlxiconsQgn_indi_tb_unmark;
- bmpmask = EMbmGlxiconsQgn_indi_tb_unmark_mask;
- press_bmpid = EMbmGlxiconsQgn_indi_tb_unmark;
- press_bmpmask = EMbmGlxiconsQgn_indi_tb_unmark_mask;
- helptxt = qtn_lgal_tooltip_unmark_all;
- }
- };
- };
- },
+ {
+ type = EAknCtButton;
+ id = EGlxCmdSlideshowPlay;
+ control = AVKON_BUTTON
+ {
+ flags = 0;
+ states =
+ {
+ AVKON_BUTTON_STATE
+ {
+ bmpfile = "z:\\Resource\\apps\\glxicons.mif";
+ bmpid = EMbmGlxiconsQgn_indi_tb_slideshow;
+ bmpmask = EMbmGlxiconsQgn_indi_tb_slideshow_mask;
+ press_bmpid = EMbmGlxiconsQgn_indi_tb_slideshow;
+ press_bmpmask = EMbmGlxiconsQgn_indi_tb_slideshow_mask;
+ helptxt = qtn_lgal_tooltip_slideshow;
+ }
+ };
+ };
+ },
+ TBAR_CTRL
+ {
+ type = EAknCtButton;
+ id = EGlxCmdStartMultipleMarking;
+ control = AVKON_BUTTON
+ {
+ flags = 0;
+ states =
+ {
+ AVKON_BUTTON_STATE
+ {
+ bmpfile = "z:\\Resource\\apps\\glxicons.mif";
+ bmpid = EMbmGlxiconsQgn_indi_cam4_tb_mark;
+ bmpmask = EMbmGlxiconsQgn_indi_cam4_tb_mark_mask;
+ press_bmpid = EMbmGlxiconsQgn_indi_cam4_tb_mark;
+ press_bmpmask = EMbmGlxiconsQgn_indi_cam4_tb_mark_mask;
+ helptxt = qtn_lgal_tooltip_mark_items;
+ },
+ AVKON_BUTTON_STATE
+ {
+ flags = KAknButtonStateHasLatchedFrame;
+ bmpfile = "z:\\Resource\\apps\\glxicons.mif";
+ bmpid = EMbmGlxiconsQgn_indi_tb_unmark;
+ bmpmask = EMbmGlxiconsQgn_indi_tb_unmark_mask;
+ press_bmpid = EMbmGlxiconsQgn_indi_tb_unmark;
+ press_bmpmask = EMbmGlxiconsQgn_indi_tb_unmark_mask;
+ helptxt = qtn_lgal_tooltip_unmark_all;
+ }
+ };
+ };
+ },
TBAR_CTRL
{
type = EAknCtButton;
@@ -582,7 +624,7 @@
bmpid = EMbmGlxicons1click_default_icon_active;
bmpmask = EMbmGlxicons1click_default_icon_active_mask;
press_bmpid = EMbmGlxicons1click_default_icon_active;
- press_bmpmask = EMbmGlxicons1click_default_icon_active_mask;
+ press_bmpmask = EMbmGlxicons1click_default_icon_active_mask;
}
};
};
--- a/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -39,6 +39,7 @@
#include <glxresolutionutility.h>
#include <glxlog.h>
#include <glxtracer.h>
+#include <glxuiutility.h>
#include "mglxtextureobserver.h"
namespace
@@ -1236,6 +1237,18 @@
{
iZoomedList[aThumbnailIndex].iBitmap = aBitmap;
+ CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+ CleanupClosePushL(*uiUtility);
+ TBool foregroundStatus = uiUtility->GetForegroundStatus();
+ CleanupStack::PopAndDestroy(uiUtility);
+
+ // Photos not in foreground; do not create zoom texture
+ if (!foregroundStatus)
+ {
+ GLX_LOG_INFO("CGlxTextureManagerImpl HandleBitmapDecodedL - Not in foreground; do not create zoom texture");
+ return;
+ }
+
//if we already have a texture then dont unload the texture before creating
//the next one. It might happen that because of low memory we might not be able
//to create a new texture.
--- a/photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -704,7 +704,7 @@
TRACER("CGlxHdmiController::CreateImageDecoderL()");
// Create a decoder for the image in the named file
TRAPD(error, iImageDecoder = CImageDecoder::FileNewL(iFsSession,
- iImagePath->Des(), CImageDecoder::EOptionNone, KNullUid));
+ iImagePath->Des(), CImageDecoder::EOptionAlwaysThread, KNullUid));
GLX_LOG_INFO1("CreateImageDecoderL CImageDecoder:FileNewL error %d",
error);
User::LeaveIfError( error);
--- a/photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def Thu Aug 19 09:55:03 2010 +0300
@@ -25,51 +25,53 @@
?IsPenSupported@CGlxUiUtility@@QAEHXZ @ 24 NONAME ; int CGlxUiUtility::IsPenSupported(void)
?IsExitingState@CGlxUiUtility@@QAEHXZ @ 25 NONAME ; int CGlxUiUtility::IsExitingState(void)
?DisplayScreenClearerL@CGlxUiUtility@@QAEXXZ @ 26 NONAME ; void CGlxUiUtility::DisplayScreenClearerL(void)
- ?SetToolbarItemDimmed@CGlxScreenFurniture@@QAEXHH@Z @ 27 NONAME ; void CGlxScreenFurniture::SetToolbarItemDimmed(int, int)
- ?Display@CGlxUiUtility@@QBEPAVCAlfDisplay@@XZ @ 28 NONAME ; class CAlfDisplay * CGlxUiUtility::Display(void) const
- ?NewL@CGlxProgressIndicator@@SAPAV1@AAVMDialogDismisedObserver@@@Z @ 29 NONAME ; class CGlxProgressIndicator * CGlxProgressIndicator::NewL(class MDialogDismisedObserver &)
- ?SetViewNavigationDirection@CGlxUiUtility@@QAEXW4TGlxNavigationDirection@@@Z @ 30 NONAME ; void CGlxUiUtility::SetViewNavigationDirection(enum TGlxNavigationDirection)
- ?SetTNMDaemonPSKeyvalue@CGlxUiUtility@@QAEHXZ @ 31 NONAME ; int CGlxUiUtility::SetTNMDaemonPSKeyvalue(void)
- ?ConfirmQueryL@GlxGeneralUiUtilities@@SAHHABVTDesC16@@@Z @ 32 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(int, class TDesC16 const &)
- ?SetFocusL@CGlxScreenFurniture@@QAEXH@Z @ 33 NONAME ; void CGlxScreenFurniture::SetFocusL(int)
- ?GetGridIconSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 34 NONAME ; class TSize CGlxUiUtility::GetGridIconSize(void)
- ?VisibleItemsInPageGranularityL@CGlxUiUtility@@QAEHXZ @ 35 NONAME ; int CGlxUiUtility::VisibleItemsInPageGranularityL(void)
- ?GetKeyguardStatus@CGlxUiUtility@@QAEHXZ @ 36 NONAME ; int CGlxUiUtility::GetKeyguardStatus(void)
- ?GlxTextureManager@CGlxUiUtility@@QAEAAVCGlxTextureManager@@XZ @ 37 NONAME ; class CGlxTextureManager & CGlxUiUtility::GlxTextureManager(void)
- ?RegisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 38 NONAME ; void CGlxActiveMediaListRegistry::RegisterActiveMediaList(class MGlxMediaList *)
- ?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXH@Z @ 39 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(int)
- ?AppOrientation@CGlxUiUtility@@QBE?AW4TGlxOrientation@@XZ @ 40 NONAME ; enum TGlxOrientation CGlxUiUtility::AppOrientation(void) const
- ?FormatString@GlxGeneralUiUtilities@@SAXAAVTDes16@@ABVTDesC16@@HHH@Z @ 41 NONAME ; void GlxGeneralUiUtilities::FormatString(class TDes16 &, class TDesC16 const &, int, int, int)
- ?DismissProgressDialog@CGlxProgressIndicator@@QAEXXZ @ 42 NONAME ; void CGlxProgressIndicator::DismissProgressDialog(void)
- ?NewLC@CGlxScreenFurniture@@SAPAV1@AAVCGlxUiUtility@@@Z @ 43 NONAME ; class CGlxScreenFurniture * CGlxScreenFurniture::NewLC(class CGlxUiUtility &)
- ?LayoutIsMirrored@GlxGeneralUiUtilities@@SAHXZ @ 44 NONAME ; int GlxGeneralUiUtilities::LayoutIsMirrored(void)
- ?HandleTvStatusChangedL@CGlxUiUtility@@UAEXW4TTvChangeType@@@Z @ 45 NONAME ; void CGlxUiUtility::HandleTvStatusChangedL(enum TTvChangeType)
- ?Close@CGlxUiUtility@@QAEXXZ @ 46 NONAME ; void CGlxUiUtility::Close(void)
- ?ModifySoftkeyIdL@CGlxScreenFurniture@@QAEXW4TCommandPosition@CEikButtonGroupContainer@@HHABVTDesC16@@@Z @ 47 NONAME ; void CGlxScreenFurniture::ModifySoftkeyIdL(enum CEikButtonGroupContainer::TCommandPosition, int, int, class TDesC16 const &)
- ?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@AAV?$RPointerArray@VCAlfControlGroup@@@@@Z @ 48 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class RPointerArray<class CAlfControlGroup> &)
- ?ControlTNDaemon@CGlxProgressIndicator@@QAEXH@Z @ 49 NONAME ; void CGlxProgressIndicator::ControlTNDaemon(int)
- ?GetItemsLeftCount@CGlxUiUtility@@QAEHXZ @ 50 NONAME ; int CGlxUiUtility::GetItemsLeftCount(void)
- ?ShowProgressbarL@CGlxProgressIndicator@@QAEXXZ @ 51 NONAME ; void CGlxProgressIndicator::ShowProgressbarL(void)
- ?DisplaySize@CGlxUiUtility@@QBE?AVTSize@@XZ @ 52 NONAME ; class TSize CGlxUiUtility::DisplaySize(void) const
- ?SetActiveView@CGlxScreenFurniture@@QAEXH@Z @ 53 NONAME ; void CGlxScreenFurniture::SetActiveView(int)
- ?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 54 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(class TDesC16 const &, int)
- ?GetGridToolBar@CGlxUiUtility@@QAEPAVCAknToolbar@@XZ @ 55 NONAME ; class CAknToolbar * CGlxUiUtility::GetGridToolBar(void)
- ?NewL@CGlxRelaseGPUMemory@@SAPAV1@AAVMGoomNotifierObserver@@@Z @ 56 NONAME ; class CGlxRelaseGPUMemory * CGlxRelaseGPUMemory::NewL(class MGoomNotifierObserver &)
- ?SetLeftSoftKeyL@CGlxTextEntryPopup@@QAEXH@Z @ 57 NONAME ; void CGlxTextEntryPopup::SetLeftSoftKeyL(int)
- ?DestroyScreenClearer@CGlxUiUtility@@QAEXXZ @ 58 NONAME ; void CGlxUiUtility::DestroyScreenClearer(void)
- ?SetToolbarItemVisibility@CGlxScreenFurniture@@QAEXHH@Z @ 59 NONAME ; void CGlxScreenFurniture::SetToolbarItemVisibility(int, int)
- ?Env@CGlxUiUtility@@QAEPAVCAlfEnv@@XZ @ 60 NONAME ; class CAlfEnv * CGlxUiUtility::Env(void)
- ?RetrieveL@GlxAttributeRetriever@@SAHABVMGlxFetchContext@@AAVMGlxMediaList@@H@Z @ 61 NONAME ; int GlxAttributeRetriever::RetrieveL(class MGlxFetchContext const &, class MGlxMediaList &, int)
- ?TextStyleIdL@CGlxUiUtility@@QAEHHH@Z @ 62 NONAME ; int CGlxUiUtility::TextStyleIdL(int, int)
- ?InstanceL@CGlxActiveMediaListRegistry@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 63 NONAME ; class CGlxActiveMediaListRegistry * CGlxActiveMediaListRegistry::InstanceL(class MGlxActiveMediaListChangeObserver *)
- ?CreateImageLoadingAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@AAVCAlfVisual@@AAVCAlfTexture@@@Z @ 64 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateImageLoadingAnimationL(class CAlfVisual &, class CAlfTexture &)
- ?DeregisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 65 NONAME ; void CGlxActiveMediaListRegistry::DeregisterActiveMediaList(class MGlxMediaList *)
- ?SetAppOrientationL@CGlxUiUtility@@QAEXW4TGlxOrientation@@@Z @ 66 NONAME ; void CGlxUiUtility::SetAppOrientationL(enum TGlxOrientation)
- ?ConfirmQueryL@GlxGeneralUiUtilities@@SAHABVTDesC16@@@Z @ 67 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(class TDesC16 const &)
- ?RequestMemory@CGlxRelaseGPUMemory@@QAEXXZ @ 68 NONAME ; void CGlxRelaseGPUMemory::RequestMemory(void)
- ?NewL@CGlxTextEntryPopup@@SAPAV1@ABVTDesC16@@AAVTDes16@@@Z @ 69 NONAME ; class CGlxTextEntryPopup * CGlxTextEntryPopup::NewL(class TDesC16 const &, class TDes16 &)
- ?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@PAVCAlfControlGroup@@@Z @ 70 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class CAlfControlGroup *)
- ?ShowConfirmationNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 71 NONAME ; void GlxGeneralUiUtilities::ShowConfirmationNoteL(class TDesC16 const &, int)
- ?ScreenFurniture@CGlxUiUtility@@QAEPAVCGlxScreenFurniture@@XZ @ 72 NONAME ; class CGlxScreenFurniture * CGlxUiUtility::ScreenFurniture(void)
- ?InstanceL@MGlxActiveMediaListResolver@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 73 NONAME ; class MGlxActiveMediaListResolver * MGlxActiveMediaListResolver::InstanceL(class MGlxActiveMediaListChangeObserver *)
+ ?SetForegroundStatus@CGlxUiUtility@@QAEXH@Z @ 27 NONAME ; void CGlxUiUtility::SetForegroundStatus(int)
+ ?SetToolbarItemDimmed@CGlxScreenFurniture@@QAEXHH@Z @ 28 NONAME ; void CGlxScreenFurniture::SetToolbarItemDimmed(int, int)
+ ?Display@CGlxUiUtility@@QBEPAVCAlfDisplay@@XZ @ 29 NONAME ; class CAlfDisplay * CGlxUiUtility::Display(void) const
+ ?NewL@CGlxProgressIndicator@@SAPAV1@AAVMDialogDismisedObserver@@@Z @ 30 NONAME ; class CGlxProgressIndicator * CGlxProgressIndicator::NewL(class MDialogDismisedObserver &)
+ ?SetViewNavigationDirection@CGlxUiUtility@@QAEXW4TGlxNavigationDirection@@@Z @ 31 NONAME ; void CGlxUiUtility::SetViewNavigationDirection(enum TGlxNavigationDirection)
+ ?SetTNMDaemonPSKeyvalue@CGlxUiUtility@@QAEHXZ @ 32 NONAME ; int CGlxUiUtility::SetTNMDaemonPSKeyvalue(void)
+ ?RequestMemory@CGlxRelaseGPUMemory@@QAEXH@Z @ 33 NONAME ; void CGlxRelaseGPUMemory::RequestMemory(int)
+ ?ConfirmQueryL@GlxGeneralUiUtilities@@SAHHABVTDesC16@@@Z @ 34 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(int, class TDesC16 const &)
+ ?SetFocusL@CGlxScreenFurniture@@QAEXH@Z @ 35 NONAME ; void CGlxScreenFurniture::SetFocusL(int)
+ ?GetGridIconSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 36 NONAME ; class TSize CGlxUiUtility::GetGridIconSize(void)
+ ?VisibleItemsInPageGranularityL@CGlxUiUtility@@QAEHXZ @ 37 NONAME ; int CGlxUiUtility::VisibleItemsInPageGranularityL(void)
+ ?GetKeyguardStatus@CGlxUiUtility@@QAEHXZ @ 38 NONAME ; int CGlxUiUtility::GetKeyguardStatus(void)
+ ?GlxTextureManager@CGlxUiUtility@@QAEAAVCGlxTextureManager@@XZ @ 39 NONAME ; class CGlxTextureManager & CGlxUiUtility::GlxTextureManager(void)
+ ?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXH@Z @ 40 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(int)
+ ?RegisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 41 NONAME ; void CGlxActiveMediaListRegistry::RegisterActiveMediaList(class MGlxMediaList *)
+ ?AppOrientation@CGlxUiUtility@@QBE?AW4TGlxOrientation@@XZ @ 42 NONAME ; enum TGlxOrientation CGlxUiUtility::AppOrientation(void) const
+ ?FormatString@GlxGeneralUiUtilities@@SAXAAVTDes16@@ABVTDesC16@@HHH@Z @ 43 NONAME ; void GlxGeneralUiUtilities::FormatString(class TDes16 &, class TDesC16 const &, int, int, int)
+ ?DismissProgressDialog@CGlxProgressIndicator@@QAEXXZ @ 44 NONAME ; void CGlxProgressIndicator::DismissProgressDialog(void)
+ ?NewLC@CGlxScreenFurniture@@SAPAV1@AAVCGlxUiUtility@@@Z @ 45 NONAME ; class CGlxScreenFurniture * CGlxScreenFurniture::NewLC(class CGlxUiUtility &)
+ ?GetForegroundStatus@CGlxUiUtility@@QAEHXZ @ 46 NONAME ; int CGlxUiUtility::GetForegroundStatus(void)
+ ?LayoutIsMirrored@GlxGeneralUiUtilities@@SAHXZ @ 47 NONAME ; int GlxGeneralUiUtilities::LayoutIsMirrored(void)
+ ?HandleTvStatusChangedL@CGlxUiUtility@@UAEXW4TTvChangeType@@@Z @ 48 NONAME ; void CGlxUiUtility::HandleTvStatusChangedL(enum TTvChangeType)
+ ?Close@CGlxUiUtility@@QAEXXZ @ 49 NONAME ; void CGlxUiUtility::Close(void)
+ ?ModifySoftkeyIdL@CGlxScreenFurniture@@QAEXW4TCommandPosition@CEikButtonGroupContainer@@HHABVTDesC16@@@Z @ 50 NONAME ; void CGlxScreenFurniture::ModifySoftkeyIdL(enum CEikButtonGroupContainer::TCommandPosition, int, int, class TDesC16 const &)
+ ?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@AAV?$RPointerArray@VCAlfControlGroup@@@@@Z @ 51 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class RPointerArray<class CAlfControlGroup> &)
+ ?ControlTNDaemon@CGlxProgressIndicator@@QAEXH@Z @ 52 NONAME ; void CGlxProgressIndicator::ControlTNDaemon(int)
+ ?GetItemsLeftCount@CGlxUiUtility@@QAEHXZ @ 53 NONAME ; int CGlxUiUtility::GetItemsLeftCount(void)
+ ?ShowProgressbarL@CGlxProgressIndicator@@QAEXXZ @ 54 NONAME ; void CGlxProgressIndicator::ShowProgressbarL(void)
+ ?DisplaySize@CGlxUiUtility@@QBE?AVTSize@@XZ @ 55 NONAME ; class TSize CGlxUiUtility::DisplaySize(void) const
+ ?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 56 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(class TDesC16 const &, int)
+ ?SetActiveView@CGlxScreenFurniture@@QAEXH@Z @ 57 NONAME ; void CGlxScreenFurniture::SetActiveView(int)
+ ?GetGridToolBar@CGlxUiUtility@@QAEPAVCAknToolbar@@XZ @ 58 NONAME ; class CAknToolbar * CGlxUiUtility::GetGridToolBar(void)
+ ?NewL@CGlxRelaseGPUMemory@@SAPAV1@AAVMGoomNotifierObserver@@@Z @ 59 NONAME ; class CGlxRelaseGPUMemory * CGlxRelaseGPUMemory::NewL(class MGoomNotifierObserver &)
+ ?SetLeftSoftKeyL@CGlxTextEntryPopup@@QAEXH@Z @ 60 NONAME ; void CGlxTextEntryPopup::SetLeftSoftKeyL(int)
+ ?DestroyScreenClearer@CGlxUiUtility@@QAEXXZ @ 61 NONAME ; void CGlxUiUtility::DestroyScreenClearer(void)
+ ?SetToolbarItemVisibility@CGlxScreenFurniture@@QAEXHH@Z @ 62 NONAME ; void CGlxScreenFurniture::SetToolbarItemVisibility(int, int)
+ ?Env@CGlxUiUtility@@QAEPAVCAlfEnv@@XZ @ 63 NONAME ; class CAlfEnv * CGlxUiUtility::Env(void)
+ ?RetrieveL@GlxAttributeRetriever@@SAHABVMGlxFetchContext@@AAVMGlxMediaList@@H@Z @ 64 NONAME ; int GlxAttributeRetriever::RetrieveL(class MGlxFetchContext const &, class MGlxMediaList &, int)
+ ?TextStyleIdL@CGlxUiUtility@@QAEHHH@Z @ 65 NONAME ; int CGlxUiUtility::TextStyleIdL(int, int)
+ ?InstanceL@CGlxActiveMediaListRegistry@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 66 NONAME ; class CGlxActiveMediaListRegistry * CGlxActiveMediaListRegistry::InstanceL(class MGlxActiveMediaListChangeObserver *)
+ ?CreateImageLoadingAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@AAVCAlfVisual@@AAVCAlfTexture@@@Z @ 67 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateImageLoadingAnimationL(class CAlfVisual &, class CAlfTexture &)
+ ?DeregisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 68 NONAME ; void CGlxActiveMediaListRegistry::DeregisterActiveMediaList(class MGlxMediaList *)
+ ?SetAppOrientationL@CGlxUiUtility@@QAEXW4TGlxOrientation@@@Z @ 69 NONAME ; void CGlxUiUtility::SetAppOrientationL(enum TGlxOrientation)
+ ?ConfirmQueryL@GlxGeneralUiUtilities@@SAHABVTDesC16@@@Z @ 70 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(class TDesC16 const &)
+ ?NewL@CGlxTextEntryPopup@@SAPAV1@ABVTDesC16@@AAVTDes16@@@Z @ 71 NONAME ; class CGlxTextEntryPopup * CGlxTextEntryPopup::NewL(class TDesC16 const &, class TDes16 &)
+ ?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@PAVCAlfControlGroup@@@Z @ 72 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class CAlfControlGroup *)
+ ?ShowConfirmationNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 73 NONAME ; void GlxGeneralUiUtilities::ShowConfirmationNoteL(class TDesC16 const &, int)
+ ?ScreenFurniture@CGlxUiUtility@@QAEPAVCGlxScreenFurniture@@XZ @ 74 NONAME ; class CGlxScreenFurniture * CGlxUiUtility::ScreenFurniture(void)
+ ?InstanceL@MGlxActiveMediaListResolver@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 75 NONAME ; class MGlxActiveMediaListResolver * MGlxActiveMediaListResolver::InstanceL(class MGlxActiveMediaListChangeObserver *)
--- a/photosgallery/viewframework/uiutilities/data/glxuiutilities.rss Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/data/glxuiutilities.rss Thu Aug 19 09:55:03 2010 +0300
@@ -297,17 +297,15 @@
DLG_LINE
{
type = EAknCtQuery;
- id = EAknCtQuery;
+ id = EGeneralQuery;
control = AVKON_DATA_QUERY
{
- layout = EDataLayout;
- control=EDWIN
- {
- flags = EEikEdwinAutoSelection | KSingleLineHorizontalScrollingEditorFlags;
- maxlength = 128; // KMGXMaxFileName
- lines = 1;
- avkon_flags = EAknEditorFlagNoT9;
- };
+ layout = EDataLayout;
+ control=EDWIN
+ {
+ maxlength = 40; // KMaxMediaPopupTextLength
+ lines = 1;
+ };
};
}
};
@@ -856,3 +854,15 @@
}
};
}
+
+//resource for image viewer deletion failure note
+RESOURCE TBUF r_glx_deletion_failure_note
+ {
+ buf = qtn_fldr_cant_delete_item;
+ }
+
+//resource for illegal characters in file name note
+RESOURCE TBUF r_glx_qtn_fldr_illegal_characters
+ {
+ buf = qtn_fldr_illegal_characters;
+ }
--- a/photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def Thu Aug 19 09:55:03 2010 +0300
@@ -15,84 +15,86 @@
_ZN13CGlxUiUtility17GetKeyguardStatusEv @ 14 NONAME
_ZN13CGlxUiUtility17GlxTextureManagerEv @ 15 NONAME
_ZN13CGlxUiUtility18SetAppOrientationLE15TGlxOrientation @ 16 NONAME
- _ZN13CGlxUiUtility19GetRotatedImageSizeEv @ 17 NONAME
- _ZN13CGlxUiUtility19SetRotatedImageSizeE5TSize @ 18 NONAME
- _ZN13CGlxUiUtility20DestroyScreenClearerEv @ 19 NONAME
- _ZN13CGlxUiUtility21DisplayScreenClearerLEv @ 20 NONAME
- _ZN13CGlxUiUtility22AddSkinChangeObserverLER22MGlxSkinChangeObserver @ 21 NONAME
- _ZN13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 22 NONAME
- _ZN13CGlxUiUtility22SetTNMDaemonPSKeyvalueEv @ 23 NONAME
- _ZN13CGlxUiUtility23ViewNavigationDirectionEv @ 24 NONAME
- _ZN13CGlxUiUtility24RemoveSkinChangeObserverER22MGlxSkinChangeObserver @ 25 NONAME
- _ZN13CGlxUiUtility26SetViewNavigationDirectionE23TGlxNavigationDirection @ 26 NONAME
- _ZN13CGlxUiUtility30VisibleItemsInPageGranularityLEv @ 27 NONAME
- _ZN13CGlxUiUtility3EnvEv @ 28 NONAME
- _ZN13CGlxUiUtility5CloseEv @ 29 NONAME
- _ZN13CGlxUiUtility8UtilityLEv @ 30 NONAME
- _ZN14GlxSetAppState8AppStateEv @ 31 NONAME
- _ZN14GlxSetAppState8SetStateE12TGlxAppState @ 32 NONAME
- _ZN15CGlxMMCNotifier4NewLER24MStorageNotifierObserver @ 33 NONAME
- _ZN18CGlxTextEntryPopup15SetLeftSoftKeyLEi @ 34 NONAME
- _ZN18CGlxTextEntryPopup4NewLERK7TDesC16R6TDes16 @ 35 NONAME
- _ZN18CGlxTextEntryPopup9ExecuteLDEv @ 36 NONAME
- _ZN19CGlxRelaseGPUMemory13RequestMemoryEv @ 37 NONAME
- _ZN19CGlxRelaseGPUMemory4NewLER21MGoomNotifierObserver @ 38 NONAME
- _ZN19CGlxScreenFurniture11SetTooltipLEiN10CAknButton16TTooltipPositionERK7TDesC16 @ 39 NONAME
- _ZN19CGlxScreenFurniture13SetActiveViewEi @ 40 NONAME
- _ZN19CGlxScreenFurniture15ViewDeactivatedEi @ 41 NONAME
- _ZN19CGlxScreenFurniture16ModifySoftkeyIdLEN24CEikButtonGroupContainer16TCommandPositionEiiRK7TDesC16 @ 42 NONAME
- _ZN19CGlxScreenFurniture18SetToolbarPositionEv @ 43 NONAME
- _ZN19CGlxScreenFurniture20SetToolbarItemDimmedEii @ 44 NONAME
- _ZN19CGlxScreenFurniture20SetToolbarVisibilityEi @ 45 NONAME
- _ZN19CGlxScreenFurniture24SetToolbarItemVisibilityEii @ 46 NONAME
- _ZN19CGlxScreenFurniture4NewLER13CGlxUiUtility @ 47 NONAME
- _ZN19CGlxScreenFurniture5NewLCER13CGlxUiUtility @ 48 NONAME
- _ZN19CGlxScreenFurniture9SetFocusLEi @ 49 NONAME
- _ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionP16CAlfControlGroup @ 50 NONAME
- _ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionR13RPointerArrayI16CAlfControlGroupE @ 51 NONAME
- _ZN19GlxAnimationFactory28CreateImageLoadingAnimationLER10CAlfVisualR11CAlfTexture @ 52 NONAME
- _ZN21CGlxProgressIndicator15ControlTNDaemonEi @ 53 NONAME
- _ZN21CGlxProgressIndicator16ShowProgressbarLEv @ 54 NONAME
- _ZN21CGlxProgressIndicator21DismissProgressDialogEv @ 55 NONAME
- _ZN21CGlxProgressIndicator4NewLER23MDialogDismisedObserver @ 56 NONAME
- _ZN21GlxAttributeRetriever9RetrieveLERK16MGlxFetchContextR13MGlxMediaListi @ 57 NONAME
- _ZN21GlxGeneralUiUtilities11IsLandscapeEv @ 58 NONAME
- _ZN21GlxGeneralUiUtilities12FormatStringER6TDes16RK7TDesC16iii @ 59 NONAME
- _ZN21GlxGeneralUiUtilities13ConfirmQueryLERK7TDesC16 @ 60 NONAME
- _ZN21GlxGeneralUiUtilities13ConfirmQueryLEiRK7TDesC16 @ 61 NONAME
- _ZN21GlxGeneralUiUtilities13ShowInfoNoteLERK7TDesC16i @ 62 NONAME
- _ZN21GlxGeneralUiUtilities14ShowErrorNoteLERK7TDesC16i @ 63 NONAME
- _ZN21GlxGeneralUiUtilities14ShowErrorNoteLEi @ 64 NONAME
- _ZN21GlxGeneralUiUtilities16LayoutIsMirroredEv @ 65 NONAME
- _ZN21GlxGeneralUiUtilities21ShowConfirmationNoteLERK7TDesC16i @ 66 NONAME
- _ZN27CGlxActiveMediaListRegistry23RegisterActiveMediaListEP13MGlxMediaList @ 67 NONAME
- _ZN27CGlxActiveMediaListRegistry25DeregisterActiveMediaListEP13MGlxMediaList @ 68 NONAME
- _ZN27CGlxActiveMediaListRegistry9InstanceLEP33MGlxActiveMediaListChangeObserver @ 69 NONAME
- _ZN27MGlxActiveMediaListResolver9InstanceLEP33MGlxActiveMediaListChangeObserver @ 70 NONAME
- _ZNK13CGlxUiUtility11DisplaySizeEv @ 71 NONAME
- _ZNK13CGlxUiUtility14AppOrientationEv @ 72 NONAME
- _ZNK13CGlxUiUtility7DisplayEv @ 73 NONAME
- _ZTI13CGlxUiUtility @ 74 NONAME
- _ZTI15CGlxMMCNotifier @ 75 NONAME
- _ZTI17CGlxAnimationView @ 76 NONAME
- _ZTI18CGlxAnimationTimed @ 77 NONAME
- _ZTI18CGlxTextEntryPopup @ 78 NONAME
- _ZTI19CGlxRelaseGPUMemory @ 79 NONAME
- _ZTI21CGlxProgressIndicator @ 80 NONAME
- _ZTI21CGlxSkinChangeMonitor @ 81 NONAME
- _ZTI25CGlxAnimationImageLoading @ 82 NONAME
- _ZTI32CGlxWaitDialogAttributeRetriever @ 83 NONAME
- _ZTI33CGlxSynchronousAttributeRetriever @ 84 NONAME
- _ZTV13CGlxUiUtility @ 85 NONAME
- _ZTV15CGlxMMCNotifier @ 86 NONAME
- _ZTV17CGlxAnimationView @ 87 NONAME
- _ZTV18CGlxAnimationTimed @ 88 NONAME
- _ZTV18CGlxTextEntryPopup @ 89 NONAME
- _ZTV19CGlxRelaseGPUMemory @ 90 NONAME
- _ZTV21CGlxProgressIndicator @ 91 NONAME
- _ZTV21CGlxSkinChangeMonitor @ 92 NONAME
- _ZTV25CGlxAnimationImageLoading @ 93 NONAME
- _ZTV32CGlxWaitDialogAttributeRetriever @ 94 NONAME
- _ZTV33CGlxSynchronousAttributeRetriever @ 95 NONAME
- _ZThn4_N13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 96 NONAME
+ _ZN13CGlxUiUtility19GetForegroundStatusEv @ 17 NONAME
+ _ZN13CGlxUiUtility19GetRotatedImageSizeEv @ 18 NONAME
+ _ZN13CGlxUiUtility19SetForegroundStatusEi @ 19 NONAME
+ _ZN13CGlxUiUtility19SetRotatedImageSizeE5TSize @ 20 NONAME
+ _ZN13CGlxUiUtility20DestroyScreenClearerEv @ 21 NONAME
+ _ZN13CGlxUiUtility21DisplayScreenClearerLEv @ 22 NONAME
+ _ZN13CGlxUiUtility22AddSkinChangeObserverLER22MGlxSkinChangeObserver @ 23 NONAME
+ _ZN13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 24 NONAME
+ _ZN13CGlxUiUtility22SetTNMDaemonPSKeyvalueEv @ 25 NONAME
+ _ZN13CGlxUiUtility23ViewNavigationDirectionEv @ 26 NONAME
+ _ZN13CGlxUiUtility24RemoveSkinChangeObserverER22MGlxSkinChangeObserver @ 27 NONAME
+ _ZN13CGlxUiUtility26SetViewNavigationDirectionE23TGlxNavigationDirection @ 28 NONAME
+ _ZN13CGlxUiUtility30VisibleItemsInPageGranularityLEv @ 29 NONAME
+ _ZN13CGlxUiUtility3EnvEv @ 30 NONAME
+ _ZN13CGlxUiUtility5CloseEv @ 31 NONAME
+ _ZN13CGlxUiUtility8UtilityLEv @ 32 NONAME
+ _ZN14GlxSetAppState8AppStateEv @ 33 NONAME
+ _ZN14GlxSetAppState8SetStateE12TGlxAppState @ 34 NONAME
+ _ZN15CGlxMMCNotifier4NewLER24MStorageNotifierObserver @ 35 NONAME
+ _ZN18CGlxTextEntryPopup15SetLeftSoftKeyLEi @ 36 NONAME
+ _ZN18CGlxTextEntryPopup4NewLERK7TDesC16R6TDes16 @ 37 NONAME
+ _ZN18CGlxTextEntryPopup9ExecuteLDEv @ 38 NONAME
+ _ZN19CGlxRelaseGPUMemory13RequestMemoryEi @ 39 NONAME
+ _ZN19CGlxRelaseGPUMemory4NewLER21MGoomNotifierObserver @ 40 NONAME
+ _ZN19CGlxScreenFurniture11SetTooltipLEiN10CAknButton16TTooltipPositionERK7TDesC16 @ 41 NONAME
+ _ZN19CGlxScreenFurniture13SetActiveViewEi @ 42 NONAME
+ _ZN19CGlxScreenFurniture15ViewDeactivatedEi @ 43 NONAME
+ _ZN19CGlxScreenFurniture16ModifySoftkeyIdLEN24CEikButtonGroupContainer16TCommandPositionEiiRK7TDesC16 @ 44 NONAME
+ _ZN19CGlxScreenFurniture18SetToolbarPositionEv @ 45 NONAME
+ _ZN19CGlxScreenFurniture20SetToolbarItemDimmedEii @ 46 NONAME
+ _ZN19CGlxScreenFurniture20SetToolbarVisibilityEi @ 47 NONAME
+ _ZN19CGlxScreenFurniture24SetToolbarItemVisibilityEii @ 48 NONAME
+ _ZN19CGlxScreenFurniture4NewLER13CGlxUiUtility @ 49 NONAME
+ _ZN19CGlxScreenFurniture5NewLCER13CGlxUiUtility @ 50 NONAME
+ _ZN19CGlxScreenFurniture9SetFocusLEi @ 51 NONAME
+ _ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionP16CAlfControlGroup @ 52 NONAME
+ _ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionR13RPointerArrayI16CAlfControlGroupE @ 53 NONAME
+ _ZN19GlxAnimationFactory28CreateImageLoadingAnimationLER10CAlfVisualR11CAlfTexture @ 54 NONAME
+ _ZN21CGlxProgressIndicator15ControlTNDaemonEi @ 55 NONAME
+ _ZN21CGlxProgressIndicator16ShowProgressbarLEv @ 56 NONAME
+ _ZN21CGlxProgressIndicator21DismissProgressDialogEv @ 57 NONAME
+ _ZN21CGlxProgressIndicator4NewLER23MDialogDismisedObserver @ 58 NONAME
+ _ZN21GlxAttributeRetriever9RetrieveLERK16MGlxFetchContextR13MGlxMediaListi @ 59 NONAME
+ _ZN21GlxGeneralUiUtilities11IsLandscapeEv @ 60 NONAME
+ _ZN21GlxGeneralUiUtilities12FormatStringER6TDes16RK7TDesC16iii @ 61 NONAME
+ _ZN21GlxGeneralUiUtilities13ConfirmQueryLERK7TDesC16 @ 62 NONAME
+ _ZN21GlxGeneralUiUtilities13ConfirmQueryLEiRK7TDesC16 @ 63 NONAME
+ _ZN21GlxGeneralUiUtilities13ShowInfoNoteLERK7TDesC16i @ 64 NONAME
+ _ZN21GlxGeneralUiUtilities14ShowErrorNoteLERK7TDesC16i @ 65 NONAME
+ _ZN21GlxGeneralUiUtilities14ShowErrorNoteLEi @ 66 NONAME
+ _ZN21GlxGeneralUiUtilities16LayoutIsMirroredEv @ 67 NONAME
+ _ZN21GlxGeneralUiUtilities21ShowConfirmationNoteLERK7TDesC16i @ 68 NONAME
+ _ZN27CGlxActiveMediaListRegistry23RegisterActiveMediaListEP13MGlxMediaList @ 69 NONAME
+ _ZN27CGlxActiveMediaListRegistry25DeregisterActiveMediaListEP13MGlxMediaList @ 70 NONAME
+ _ZN27CGlxActiveMediaListRegistry9InstanceLEP33MGlxActiveMediaListChangeObserver @ 71 NONAME
+ _ZN27MGlxActiveMediaListResolver9InstanceLEP33MGlxActiveMediaListChangeObserver @ 72 NONAME
+ _ZNK13CGlxUiUtility11DisplaySizeEv @ 73 NONAME
+ _ZNK13CGlxUiUtility14AppOrientationEv @ 74 NONAME
+ _ZNK13CGlxUiUtility7DisplayEv @ 75 NONAME
+ _ZTI13CGlxUiUtility @ 76 NONAME
+ _ZTI15CGlxMMCNotifier @ 77 NONAME
+ _ZTI17CGlxAnimationView @ 78 NONAME
+ _ZTI18CGlxAnimationTimed @ 79 NONAME
+ _ZTI18CGlxTextEntryPopup @ 80 NONAME
+ _ZTI19CGlxRelaseGPUMemory @ 81 NONAME
+ _ZTI21CGlxProgressIndicator @ 82 NONAME
+ _ZTI21CGlxSkinChangeMonitor @ 83 NONAME
+ _ZTI25CGlxAnimationImageLoading @ 84 NONAME
+ _ZTI32CGlxWaitDialogAttributeRetriever @ 85 NONAME
+ _ZTI33CGlxSynchronousAttributeRetriever @ 86 NONAME
+ _ZTV13CGlxUiUtility @ 87 NONAME
+ _ZTV15CGlxMMCNotifier @ 88 NONAME
+ _ZTV17CGlxAnimationView @ 89 NONAME
+ _ZTV18CGlxAnimationTimed @ 90 NONAME
+ _ZTV18CGlxTextEntryPopup @ 91 NONAME
+ _ZTV19CGlxRelaseGPUMemory @ 92 NONAME
+ _ZTV21CGlxProgressIndicator @ 93 NONAME
+ _ZTV21CGlxSkinChangeMonitor @ 94 NONAME
+ _ZTV25CGlxAnimationImageLoading @ 95 NONAME
+ _ZTV32CGlxWaitDialogAttributeRetriever @ 96 NONAME
+ _ZTV33CGlxSynchronousAttributeRetriever @ 97 NONAME
+ _ZThn4_N13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 98 NONAME
--- a/photosgallery/viewframework/uiutilities/group/glxuiutilities.mmp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/group/glxuiutilities.mmp Thu Aug 19 09:55:03 2010 +0300
@@ -118,7 +118,8 @@
LIBRARY libstdcpp.lib
LIBRARY flogger.lib
//LIBRARY hgcontextutility.lib // For Teleport
-LIBRARY akntransitionutils.lib
-LIBRARY goommonitor.lib //For GOOM
+LIBRARY akntransitionutils.lib
+LIBRARY goommonitor.lib //For GOOM
+LIBRARY platformenv.lib //For DriveInfo
// End of File
--- a/photosgallery/viewframework/uiutilities/inc/glxmmcnotifier.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/inc/glxmmcnotifier.h Thu Aug 19 09:55:03 2010 +0300
@@ -90,6 +90,11 @@
* MMC state
*/
TGlxMMCState istate;
+
+ /**
+ * Default Memory Card drive identifier specified by TDriveNumber
+ */
+ TInt iDefaultMemoryCardDrive;
};
#endif /* GLXMMCNOTIFIER_H_ */
--- a/photosgallery/viewframework/uiutilities/inc/glxrequestfreegoom.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/inc/glxrequestfreegoom.h Thu Aug 19 09:55:03 2010 +0300
@@ -50,7 +50,7 @@
/*
* Start Memory release process
*/
- IMPORT_C void RequestMemory();
+ IMPORT_C void RequestMemory(TBool aRequest = ETrue);
private:
/**
* Default constructor
@@ -80,7 +80,7 @@
MGoomNotifierObserver& iNotify;
RGOomMonitorSession iGoom;
TBool iIsFirstRequest;
-
+ TBool iNotifyCaller;
#ifdef _DEBUG
TTime iStartTime;
TTime iStopTime;
--- a/photosgallery/viewframework/uiutilities/inc/glxuiutility.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/inc/glxuiutility.h Thu Aug 19 09:55:03 2010 +0300
@@ -258,6 +258,18 @@
*/
IMPORT_C TInt GetKeyguardStatus();
+ /**
+ * This method returns the foreground status
+ * @return ETrue if forground; otherwise EFalse.
+ */
+ IMPORT_C TBool GetForegroundStatus();
+
+ /**
+ * This method will store the foreground status
+ * @param aForeground the foreground status.
+ */
+ IMPORT_C void SetForegroundStatus(TBool aForeground);
+
public: // from class MGlxTvObserver
/**
@@ -395,6 +407,9 @@
CAknToolbar* iToolbar;
CPeriodic* iPeriodic;
CAknLocalScreenClearer* iClearer;
+
+ /** The foreground status flag */
+ TBool iIsForeground;
};
--- a/photosgallery/viewframework/uiutilities/inc/glxvisualutilities.h Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Alf visual utilities
-*
-*/
-
-
-
-
-#ifndef __GLXVISUALUTILITIES_H__
-#define __GLXVISUALUTILITIES_H__
-
-// EXTERNAL HEADERS
-#include <e32std.h>
-
-// FORWARD DECLARES
-class CHuiVisual;
-class CHuiControl;
-
-/**
- * Namespace to hold the CHuiVisual related algorithms.
- *
- * @author Kimmo Hoikka
- * @lib glxhuiutils.lib
- */
-namespace NGlxVisualUtilities
- {
- /**
- * Method to transfer the ownership of CHuiVisuals to a new CHuiControl.
- * In case of a Leave the ownership is held in the old owner so the ownership transfer
- * succeeds either completely or not at all.
- * @param aVisual reference to the topmost visual in the hierarchy
- * @param aNewParent the new parent to be applied to all visuals in the hierarchy
- */
- IMPORT_C void TransferVisualsL( CHuiVisual& aVisual, CHuiControl& aNewParent );
- }
-
-#endif // __GLXVISUALUTILITIES_H__
--- a/photosgallery/viewframework/uiutilities/src/glxmmcnotifier.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxmmcnotifier.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -18,7 +18,7 @@
#include <glxtracer.h>
#include <glxlog.h>
-
+#include <driveinfo.h>
#include "glxmmcnotifier.h"
// ---------------------------------------------------------
@@ -92,6 +92,11 @@
TRACER("CGlxMMCNotifier::ConstructL()");
TInt err = iFs.Connect();
GLX_LOG_INFO1("CGlxMMCNotifier::ConstructL iFs.Connect err %d",err );
+
+ User::LeaveIfError(DriveInfo::GetDefaultDrive(
+ DriveInfo::EDefaultRemovableMassStorage, iDefaultMemoryCardDrive));
+ GLX_LOG_INFO1("CGlxMMCNotifier::ConstructL iFs.Connect iDrive %d",
+ iDefaultMemoryCardDrive );
IssueRequest();
}
@@ -114,11 +119,13 @@
TRACER("CGlxMMCNotifier::RunL()");
TDriveInfo driveInfo;
// Get the drive info for memory card
- TInt err = iFs.Drive( driveInfo, EDriveF );
- GLX_LOG_INFO1("CGlxMMCNotifier::RunL err %d",err );
- if( err == KErrNone )
- {
- switch( driveInfo.iType )
+ TInt err = iFs.Drive(driveInfo, iDefaultMemoryCardDrive);
+ GLX_LOG_INFO1("CGlxMMCNotifier::RunL driveInfo err=%d", err);
+ if (err == KErrNone && (driveInfo.iDriveAtt & KDriveAttRemovable))
+ {
+ GLX_LOG_INFO1("CGlxMMCNotifier::RunL driveInfo.iDriveAtt=%d",
+ driveInfo.iDriveAtt);
+ switch (driveInfo.iType)
{
case EMediaNotPresent:
{
--- a/photosgallery/viewframework/uiutilities/src/glxrequestfreegoom.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxrequestfreegoom.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -20,7 +20,7 @@
#include "glxrequestfreegoom.h"
-const TInt KMinMemoryRequest = 3145728; // 3 MB
+const TInt KMinMemoryRequest = 16000000; // 2000 x 2000 x 4 (32 bit display mode)
// ----------------------------------------------------------------------------
// CGlxRelaseGPUMemory::NewL
@@ -55,7 +55,7 @@
//
CGlxRelaseGPUMemory::CGlxRelaseGPUMemory(MGoomNotifierObserver& aNotify) :
CActive(CActive::EPriorityStandard), iNotify(aNotify), iIsFirstRequest(
- ETrue)
+ ETrue),iNotifyCaller(ETrue)
{
TRACER("CGlxRelaseGPUMemory::CGlxRelaseGPUMemory()");
CActiveScheduler::Add(this);
@@ -104,9 +104,10 @@
// CGlxRelaseGPUMemory::RequestMemory()
// ----------------------------------------------------------------------------
//
-EXPORT_C void CGlxRelaseGPUMemory::RequestMemory()
+EXPORT_C void CGlxRelaseGPUMemory::RequestMemory(TBool aRequest)
{
TRACER("CGlxRelaseGPUMemory::RequestMemory()");
+ iNotifyCaller = aRequest;
IssueRequest();
}
@@ -143,5 +144,9 @@
}
// Notify observer on the RequestFreeMemory() status
- iNotify.HandleGoomMemoryReleased(iStatus.Int());
+ if(iNotifyCaller || (iStatus.Int() != KErrNone))
+ {
+ iNotify.HandleGoomMemoryReleased(iStatus.Int());
+ }
+ iNotifyCaller = EFalse;
}
--- a/photosgallery/viewframework/uiutilities/src/glxtextentrypopup.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxtextentrypopup.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -122,8 +122,9 @@
else
{
uiUtility->SetAppOrientationL( EGlxOrientationTextEntry );
- }
-
+ }
+ // Enable predictiveTextInput option in the query dialog!
+ SetPredictiveTextInputPermitted( ETrue );
TInt retVal = CAknTextQueryDialog::ExecuteLD(R_GLX_TEXT_ENTRY_QUERY);
CleanupStack::PopAndDestroy( &rollbackState ); // cleanupItem
--- a/photosgallery/viewframework/uiutilities/src/glxuiutility.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxuiutility.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -148,6 +148,7 @@
GridIconSizeL();
iScreenFurniture = CGlxScreenFurniture::NewL(*this);
+ iIsForeground = EFalse;
}
// -----------------------------------------------------------------------------
@@ -592,6 +593,27 @@
}
// -----------------------------------------------------------------------------
+// SetForegroundStatus
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CGlxUiUtility::SetForegroundStatus(TBool aForeground)
+ {
+ TRACER("CGlxUiUtility::SetForegroundStatus()");
+ iIsForeground = aForeground;
+ }
+
+// -----------------------------------------------------------------------------
+// GetForegroundStatus
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TBool CGlxUiUtility::GetForegroundStatus()
+ {
+ TRACER("CGlxUiUtility::GetForegroundStatus()");
+ GLX_DEBUG2("CGlxUiUtility::GetForegroundStatus() iIsForeground=%d", iIsForeground);
+ return iIsForeground;
+ }
+
+// -----------------------------------------------------------------------------
// SetRotatedImageSize
// -----------------------------------------------------------------------------
//
--- a/photosgallery/viewframework/uiutilities/src/glxvisualutilities.cpp Thu Jul 15 18:39:01 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ALF visual utilities
-*
-*/
-
-
-
-
-// CLASS HEADER
-#include "glxvisualutilities.h"
-
-// EXTERNAL HEADERS
-#include <uiacceltk/huicontrol.h>
-#include <uiacceltk/huivisual.h>
-
-namespace NGlxVisualUtilities
- {
- /**
- * TGlxVisualTransferCleanup
- * This class handles the awkward situation in visual ownership transfer
- * that some of the visuals are transferred to new parent and a leave occurs.
- * In leave case we need to undo the ownership transfer completely.
- * This class also removes the ownership from the old control in case
- * there was no leave.
- * @usage:
- * \code
- * RArray<CHuiVisual*> allvisuals;
- * TGlxVisualTransferCleanup cleanup( allvisuals );
- * // set the parent to remove from to be the new one
- * cleanup.iParentToRemoveFrom = aNewParent;
- * CleanupClosePushL( cleanup );
- * // start to append the visuals to the new parent
- * // in case of leave they are removed from new parent
- * RecurseAndTransferVisualsL( visualcleanup, aVisual, aNewParent );
- * // set the parent to remove to be the old one
- * cleanup.iParentToRemoveFrom = oldParent;
- * // remove the item from cleanupstack,
- * // this removes the visuals from their old parent
- * CleanupStack::PopAndDestroy( &cleanup );
- * \endcode
- */
- NONSHARABLE_CLASS( TGlxVisualTransferCleanup )
- {
- public:
-
- /**
- * Constructor.
- * @param aArray, the array of Visuals
- * @param aOldParent, the old parent of visuals
- * @param aNewParent, the new parent for visuals
- */
- inline TGlxVisualTransferCleanup(
- RArray<CHuiVisual*>& aArray )
- : iArray( aArray )
- {
- }
-
- /**
- * Close. Put this class to Cleanupstack with
- * CleanupClosePushL so that this gets called in case of a leave
- */
- inline void Close()
- {
- // need to remove all visuals from the given parent
- // loop through all the CHuiVisuals
- for( TInt i = 0; i < iArray.Count(); ++i )
- {
- // remove from the given parent
- iParentToRemoveFrom->Remove( iArray[ i ] );
- }
- // reset the array
- iArray.Reset();
- }
-
- /// Ref: the parent where to remove
- MHuiVisualOwner* iParentToRemoveFrom;
-
- private: // Implementation
-
- /// Ref: the array containing all the visuals
- RArray<CHuiVisual*>& iArray;
-
- };
-
- /**
- * Recursive helper method to transfer the ownership of visuals
- * @param aVisualCleanup an array containing all visuals in the hierarchy
- * @param aVisual the visual to move to new control
- * @param aNewParent the new parent for the visual
- */
- void RecurseAndTransferVisualsL(
- RArray<CHuiVisual*>& aVisualCleanup,
- CHuiVisual& aVisual, CHuiControl& aNewParent )
- {
- // make room to the pointer so that we always succeed in appending
- // Note that we need to make room for one new item, thus count + 1
- aVisualCleanup.ReserveL( aVisualCleanup.Count() + 1 );
- // append us to the new parent, Note that for a while we are
- // owner by two controls but thats not a problem as the other parent
- // is removed by either TGlxVisualTransferCleanup.Close() by CleanupStack
- // or destructor of TGlxVisualTransferCleanup and there is no other way
- // of getting out from this method (of course panic is ;)
- aNewParent.AppendL( &aVisual );
- // add us in the cleanuparray so that we can be removed from the
- // new parent in case some of the following AppendLs leave
- // this does not fail as reserve was called so no AppendL needed
- aVisualCleanup.Append( &aVisual );
- // check if the visual has childs
- TInt childCount = aVisual.Count();
- // transfer all the childs
- while( childCount-- > 0 )
- {
- // get the child
- CHuiVisual& childVisual = aVisual.Visual( childCount );
- // call transfer recursively on the child
- RecurseAndTransferVisualsL(
- aVisualCleanup, childVisual, aNewParent );
- }
- }
-
- // -------------------------------------------------------------------------
- // TransferVisualsL
- // -------------------------------------------------------------------------
- EXPORT_C void TransferVisualsL(
- CHuiVisual& aVisual, CHuiControl& aNewParent )
- {
- // check if parent is already correct
- if( &( aVisual.Owner() ) ==
- static_cast< MHuiVisualOwner* >( &aNewParent ) )
- {
- // nothing else to be done
- return;
- }
- // create an array for visual pointers on the stack
- RArray< CHuiVisual* > visualcleanup;
- // create the cleanup item from stack as well
- TGlxVisualTransferCleanup removeParent( visualcleanup );
- // set the parent to remove from to be the new one
- removeParent.iParentToRemoveFrom = &aNewParent;
- // need to remember the old parent
- MHuiVisualOwner* oldParent = &( aVisual.Owner() );
- // put it to cleanupstack so that close gets called in case of leave
- CleanupClosePushL( removeParent );
- // run the recursive loop, if it leaves the visuals are removed from
- // new parent by the Close method of cleanParents
- RecurseAndTransferVisualsL( visualcleanup, aVisual, aNewParent );
- // set the parent to remove to be the old one
- removeParent.iParentToRemoveFrom = oldParent;
- // remove the item from cleanupstack,
- // this removes the visuals from the old parent
- CleanupStack::PopAndDestroy( &removeParent );
- // close the array
- visualcleanup.Close();
- }
- }
--- a/photosgallery/viewframework/views/cloudview/group/glxcloudview.mmp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/cloudview/group/glxcloudview.mmp Thu Aug 19 09:55:03 2010 +0300
@@ -84,4 +84,6 @@
LIBRARY charconv.lib // For UtfConverter
LIBRARY commonengine.lib
LIBRARY gfxtrans.lib
+LIBRARY alfdecoderserverclient.lib //For CAlfEffectObserver
+LIBRARY akntransitionutils.lib //For CAknTransitionUtils
// End of File
\ No newline at end of file
--- a/photosgallery/viewframework/views/cloudview/inc/glxcloudviewcontrol.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/cloudview/inc/glxcloudviewcontrol.h Thu Aug 19 09:55:03 2010 +0300
@@ -370,11 +370,6 @@
* Set the middle point of the infobuble
**/
void SetBubleMidPoint(TPoint& aMidPoint);
-
- /**
- * Create the infobublecontainer
- **/
- void CreateBubleContainer();
/**
* Move the viewport up depending on the condition
--- a/photosgallery/viewframework/views/cloudview/inc/glxcloudviewimp.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/cloudview/inc/glxcloudviewimp.h Thu Aug 19 09:55:03 2010 +0300
@@ -32,6 +32,7 @@
#include "glxtagscontextmenucontrol.h" // MGlxItemMenuObserver
#include "glxmmcnotifier.h"
+#include <alf/alfcompositionutility.h> // MAlfEffectObserver
// FORWARD DECLARATIONS
class CGlxCloudViewControl;
@@ -54,7 +55,8 @@
public MGlxEnterKeyEventObserver,
public MGlxCloudViewLayoutObserver,
public MGlxItemMenuObserver,
- public MStorageNotifierObserver
+ public MStorageNotifierObserver,
+ public CAlfEffectObserver::MAlfEffectObserver
{
public:
@@ -120,6 +122,9 @@
* @param aCommand command to be handled
*/
void HandleGridMenuListL(TInt aCommand);
+public://From MAlfEffectObserver
+ void HandleEffectCallback(TInt aType, TInt aHandle, TInt aStatus);
+
public:
void HandleForegroundEventL(TBool aForeground);
@@ -258,6 +263,11 @@
CGlxMMCNotifier* iMMCNotifier;
TBool iMMCState;
+
+ //For Alf Effects
+ CAlfEffectObserver* iAlfEffectObs;
+ TInt iEffectHandle;
+
};
}
#endif // C_GLXTESTTILEVIEWIMP_H
--- a/photosgallery/viewframework/views/cloudview/src/glxcloudviewcontrol.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/cloudview/src/glxcloudviewcontrol.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -44,7 +44,6 @@
#include <glxattributecontext.h> //attribute context
#include <mglxmedialist.h> //for medialist
-#include "glxcontainerinfobubble.h" //intelligent class for data of infobubble
#include "glxcloudview.hrh"
#include "mglxcloudviewmskobserver.h" // For Msk Observer
#include "mglxenterkeyeventobserver.h" // For enterkey observer
@@ -62,7 +61,7 @@
const TInt KRowHeight = 72;
const TInt KLeftMargin = 10;
const TInt KNumMinRowSpace = 2;
-const TInt KColSpace = 20;
+const TInt KColSpace = 30;
const TInt KRightmargin = 10;//Aligning Right margin
const TInt KMinTagSize = 77;
const TInt KTagScreenHeight = 460;
@@ -272,20 +271,23 @@
TInt CGlxCloudViewControl::LayoutVisibleRows(TPoint aStartPoint,TInt aRowStartIndex
, TInt aRowEndIndex)
{
- TRACER("GLX_CLOUD::CGlxCloudViewControl::DrawRow");
+ TRACER("CGlxCloudViewControl::LayoutVisibleRows");
TSize vsize;
TPoint tl, br;
tl = aStartPoint;
+ br.iX = 0;
br.iY = tl.iY + KRowHeight;
+ const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW;
//drawing in reverse for arabic hebrew support
if ( GlxGeneralUiUtilities::LayoutIsMirrored ())
{
- br.iX = aStartPoint.iX;
- const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW;
+ GLX_LOG_INFO("Mirrorred Layout");
+ //In Mirrored layout, 'BottomRight' considers scrollpane width for each row
+ br.iX = aStartPoint.iX - iScrollPaneHandle.iW;
//Set the positions of tags in a row.
for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++)
{
- vsize = iLabels[j]->TextExtents ();
+ vsize = iLabels[j]->TextExtents();
if ( vsize.iWidth < KMinTagSize )
{
vsize.iWidth = KMinTagSize;
@@ -295,15 +297,15 @@
{
TAlfRealSize tagSize( KMaxScreenWidth, br.iY );
iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
- vsize = iLabels[j]->TextExtents ();
tl.iX -= aStartPoint.iX;
tl.iY = aStartPoint.iY;
br.iX = tagSize.iWidth;
}
else
{
- tl.iX -= (vsize.iWidth + KColSpace);
+ tl.iX = br.iX - vsize.iWidth;
}
+
//Set the anchor points for the tags
iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex,
EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
@@ -313,17 +315,17 @@
EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
TAlfTimedPoint (br.iX, br.iY));
+ //Bottom-Right corner for next tag in same row
br.iX -= (vsize.iWidth + KColSpace);
iLayoutIndex += 1;
}
-
}
else
{
- const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW;
+ GLX_LOG_INFO("NOT Mirrorred Layout");
for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++)
{
- vsize = iLabels[j]->TextExtents ();
+ vsize = iLabels[j]->TextExtents();
if( vsize.iWidth < KMinTagSize )
{
vsize.iWidth = KMinTagSize;
@@ -331,7 +333,6 @@
if (vsize.iWidth > KMaxScreenWidth)
{
TAlfRealSize tagSize( KMaxScreenWidth, br.iY );
- TAlfRealPoint startPos( aStartPoint.iX, 0 );
iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
tl.iX = aStartPoint.iX;
tl.iY = aStartPoint.iY;
@@ -339,8 +340,9 @@
}
else
{
- br.iX += vsize.iWidth + KColSpace;
+ br.iX = tl.iX + vsize.iWidth;
}
+
iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex,
EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
@@ -349,22 +351,21 @@
EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
TAlfTimedPoint (br.iX, br.iY));
- tl.iX = br.iX;
+ //Top-Left Corner for next tag in same row
+ tl.iX += (vsize.iWidth + KColSpace);
iLayoutIndex += 1;
}
}
return 0;
}
-
-
-
// ---------------------------------------------------------------------------
// LayoutVisibleArea()
//
// ---------------------------------------------------------------------------
void CGlxCloudViewControl::LayoutVisibleArea()
{
+ TRACER("CGlxCloudViewControl::LayoutVisibleArea");
//screen height for boundary check:how many rows fit in.
//find out how many rows can fit in.
//add upper and lower margin spacing 5 pixels
@@ -377,13 +378,13 @@
{
startpoint.iX = iTagScreenWidth - KRightmargin;
}
-
- //else start from biginning
+ //else start from beginning
else
{
startpoint.iX = KLeftMargin;
}
startpoint.iY = KNumMinRowSpace;
+
//associate the active visuals with anchor layout
GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Layout reset");
GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count after reset %d ", iLayout->Count ());
@@ -394,7 +395,6 @@
{
GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::FindEndRowIndex Entering layout append");
-
TAlfTimedValue opacity;
opacity.SetValueNow(1.0); // immediate change
iLabels[j]->SetOpacity(opacity);
@@ -447,9 +447,7 @@
iScrollEventData.mViewLength,
0);
DisplayScrollBar();
- }
- //constructing the bubblecontainer
- CreateBubleContainer();
+ }
iLayout->UpdateChildrenLayout (); //update layout
@@ -458,7 +456,6 @@
MoveDownIfRequired();
}
-
// ---------------------------------------------------------------------------
// OfferEventL()
// ---------------------------------------------------------------------------
@@ -649,7 +646,6 @@
iScrollDirection = 1;
}
-
// ---------------------------------------------------------------------------
// HandleKeyDown()
// ---------------------------------------------------------------------------
@@ -691,7 +687,6 @@
}
}
-
// ---------------------------------------------------------------------------
// FocusUpdate()
// ---------------------------------------------------------------------------
@@ -706,7 +701,6 @@
LayoutVisibleArea();
}
-
// ---------------------------------------------------------------------------
// ResetLayout()
// ---------------------------------------------------------------------------
@@ -723,25 +717,23 @@
iLabels.Reset();
}
-
// ---------------------------------------------------------------------------
// GetRownum()
// ---------------------------------------------------------------------------
//
TInt CGlxCloudViewControl::RowNumber(TInt aItemIndex) const
-{
-
-TRACER("GLX_CLOUD::CGlxCloudViewControl::GetRownum");
-//Get the rownumber of the given item index.
-TInt i;
-for (i = 0; i < iCloudInfo.Count (); i++)
- {
- if ( (aItemIndex >= iCloudInfo[i].iStartIndex) && (aItemIndex <=iCloudInfo[i].iEndIndex))
- break;
- }
-return i;
-
-}
+ {
+ TRACER("GLX_CLOUD::CGlxCloudViewControl::GetRownum");
+ //Get the rownumber of the given item index.
+ TInt i;
+ for (i = 0; i < iCloudInfo.Count(); i++)
+ {
+ if ((aItemIndex >= iCloudInfo[i].iStartIndex) && (aItemIndex
+ <= iCloudInfo[i].iEndIndex))
+ break;
+ }
+ return i;
+ }
// ---------------------------------------------------------------------------
// FetchAttributeFromCacheL()
@@ -775,7 +767,6 @@
}
}
-
//medialist Observers
// ---------------------------------------------------------------------------
@@ -814,7 +805,6 @@
InitPhysicsL();
}
-
// ---------------------------------------------------------------------------
// HandleMediaL().
// ---------------------------------------------------------------------------
@@ -969,7 +959,6 @@
// ---------------------------------------------------------------------------
//
void CGlxCloudViewControl::UpdateRowDataL()
-
{
TRACER("GLX_CLOUD::CGlxCloudViewControl::UpdateRowData()");
@@ -991,7 +980,7 @@
//Setting the Font Styles based on association counts
//Finding the maximum value of image association
//Determining the Font(Style) for each visual
- TInt maxCount= MaxUsageCount (); //Maximum Association count
+ TInt maxCount = MaxUsageCount (); //Maximum Association count
GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData mediaCount %d ", maxCount);
GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData iLabels.Count() %d ",iLabels.Count());
if ( 0 == maxCount )
@@ -1030,7 +1019,7 @@
}
// Current row width will be progressively incremented to fit as many tags as possible
- rowWidth += currentTagSize.iWidth + 10;
+ rowWidth += currentTagSize.iWidth + KColSpace;
GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData currentTagSize.iWidth %d ", currentTagSize.iWidth);
GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData rowWidth %d ", rowWidth);
@@ -1054,7 +1043,7 @@
// then we must fit the current visual into the next row.
// Do that check now and adjust accordingly.
// Fix for EAHN-7BZD78 is to exclude the gap value between the row's tags from the logic
- else if ( rowWidth - 10 > KMaxScreenWidth )
+ else if ( rowWidth - KColSpace > KMaxScreenWidth )
{
GLX_LOG_INFO("GLX_CLOUD :: CGlxCloudViewControl::UpdateRowData Row added");
lastRowStartTagIndex = currentTagIndex - 1;
@@ -1267,7 +1256,6 @@
iLabels[iMediaList.FocusIndex()]->SetColor (KAknsIIDQsnHighlightColors ,EAknsCIQsnHighlightColorsCG3);
}
-
// ---------------------------------------------------------------------------
// SetBubleMidPoint()
// ---------------------------------------------------------------------------
@@ -1281,14 +1269,6 @@
}
// ---------------------------------------------------------------------------
-// CreateBubleContainer()
-// ---------------------------------------------------------------------------
-//
-void CGlxCloudViewControl::CreateBubleContainer()
- {
- }
-
-// ---------------------------------------------------------------------------
// MoveUpIfRequired()
// ---------------------------------------------------------------------------
//
@@ -1323,7 +1303,6 @@
Scroll();
}
-
// ---------------------------------------------------------------------------
// MoveDownIfRequired()
// ---------------------------------------------------------------------------
@@ -1868,30 +1847,31 @@
AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
if ((rect.Width() != (iTagScreenWidth + KRightmargin)) || (rect.Height() != iScreenHeight))
{
- //set the new screen dimensions
- iScreenHeight=rect.Height();
- iTagScreenWidth = rect.Width()- KRightmargin;
- if(IsLandscape())
- {
- iTagScreenHeight = rect.Height();
- }
- else
- {
- iTagScreenHeight = KTagScreenHeight;
- }
+ //set the new screen dimensions
+ iScreenHeight = rect.Height();
+ iTagScreenWidth = rect.Width() - KRightmargin;
+ if (IsLandscape())
+ {
+ iTagScreenHeight = rect.Height();
+ }
+ else
+ {
+ iTagScreenHeight = KTagScreenHeight;
+ }
- iViewPortLayout->SetSize(TAlfRealSize(iTagScreenWidth,iTagScreenHeight), 0);
- //delete all layout associations
- if ( iCloudInfo.Count ()!= 0)//check for the empty cloud view
- {
- UpdateLayout();
- FetchAttributeFromCacheL();
- //generate row structures and draw rows on screen
- UpdateRowDataL ();
+ iViewPortLayout->SetSize(
+ TAlfRealSize(iTagScreenWidth, iTagScreenHeight), 0);
+ //delete all layout associations
+ if (iCloudInfo.Count() != 0)//check for the empty cloud view
+ {
+ UpdateLayout();
+ FetchAttributeFromCacheL();
+ //generate row structures and draw rows on screen
+ UpdateRowDataL();
- InitPhysicsL();
- }
- }
+ InitPhysicsL();
+ }
+ }
}
// ---------------------------------------------------------------------------
@@ -1963,6 +1943,7 @@
return EFalse;
}
}
+
// ---------------------------------------------------------------------------
// TimerCompleteL()
// ---------------------------------------------------------------------------
@@ -1990,6 +1971,7 @@
iTagsContextMenuControl->SetDisplay(midpoint);
}
}
+
// ---------------------------------------------------------------------------
// ShowContextItemMenuL()
// ---------------------------------------------------------------------------
--- a/photosgallery/viewframework/views/cloudview/src/glxcloudviewimp.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/cloudview/src/glxcloudviewimp.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -51,9 +51,14 @@
#include <akntranseffect.h>
#include <gfxtranseffect/gfxtranseffect.h>
#include "glxgfxtranseffect.h" // For transition effects
-
+#include <akntransitionutils.h> //For CAknTransitionUtils
+
const TInt KViewId = 0x200071B7;
+//Transition animation used for Cloud view activation
+_LIT( KTfxResourceActivate , "z:\\resource\\effects\\photos_gridview_appear.fxml");
+_LIT( KTfxResourceNoEffect, "");
+
using namespace Alf;
// ======== MEMBER FUNCTIONS ========
@@ -139,7 +144,11 @@
CGlxCloudViewImp::~CGlxCloudViewImp()
{
TRACER("GLX_CLOUD::CGlxCloudViewImp::~CGlxCloudViewImp");
-
+ if(iAlfEffectObs)
+ {
+ delete iAlfEffectObs;
+ }
+
CleanupVisuals ();
delete iEmptyListText;
if ( iResourceOffset )
@@ -212,27 +221,33 @@
{
TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewActivateL");
- TUint transitionID = (iUiUtility->ViewNavigationDirection()==
- EGlxNavigationForwards)?KActivateTransitionId:KDeActivateTransitionId;
-
- GfxTransEffect::BeginFullScreen( transitionID, TRect(),
- AknTransEffect::EParameterType,
- AknTransEffect::GfxTransParam( KPhotosUid,
- AknTransEffect::TParameter::EEnableEffects) );
-
-
if(StatusPane())
{
StatusPane()->MakeVisible(ETrue);
}
+
ConstructCloudControlL();
GLX_LOG_INFO("CGlxCloudViewImp::DoMLViewActivateL Cloud View Control Created" );
- GfxTransEffect::EndFullScreen();
-
// set app state to tag-browser view
GlxSetAppState::SetState (EGlxInTagBrowserView);
iMMCNotifier = CGlxMMCNotifier::NewL(*this);
+
+ //Set the ALF animation effect to CAlfAnchorLayout since the animation
+ //does not work for both avkon and alf together.
+ //Check if the transitions are enabled from themes
+ if (CAknTransitionUtils::TransitionsEnabled( AknTransEffect::EFullScreenTransitionsOff ))
+ {
+ if(!iAlfEffectObs)
+ {
+ iAlfEffectObs = CAlfEffectObserver::NewL();
+ }
+
+ iAnchorlayout->SetEffectL( KTfxResourceActivate );
+ iEffectHandle = iAnchorlayout->Identifier();
+ iAlfEffectObs->SubscribeCallbackL(this,iEffectHandle);
+ }
+
}
// ---------------------------------------------------------------------------
@@ -334,13 +349,13 @@
IAlfWidgetFactory& widgetFactory = AlfWidgetEnvExtension::widgetFactory(*(iUiUtility->Env ()));
- iViewWidget = widgetFactory.createViewWidget("viewwidget", 0,0,iDisplay);
-
- iViewWidget->setRect( ClientRect() );
- iViewWidget->show(true);
-
- IAlfLayoutManager* layoutmanager = IAlfInterfaceBase::makeInterface<IAlfLayoutManager>(iViewWidget->control());
- iViewWidget->setRect(ClientRect());
+ iViewWidget = widgetFactory.createViewWidget("viewwidget", 0, 0, iDisplay);
+ iViewWidget->setRect(ClientRect());
+ iViewWidget->show(true);
+
+ IAlfLayoutManager* layoutmanager = IAlfInterfaceBase::makeInterface<
+ IAlfLayoutManager>(iViewWidget->control());
+ iViewWidget->setRect(ClientRect());
// parent layout handle for scrollbar
iScrollPaneHandle = AknLayoutScalable_UiAccel::aa_scroll_pane(0).LayoutLine();
@@ -492,3 +507,19 @@
ProcessCommandL(EAknSoftkeyClose);
}
}
+
+// ---------------------------------------------------------------------------
+// HandleEffectCallback
+//
+// ---------------------------------------------------------------------------
+//
+void CGlxCloudViewImp::HandleEffectCallback(TInt aType, TInt aHandle, TInt /*aStatus*/)
+ {
+ TRACER("CGlxCloudViewImp::HandleEffectCallback()");
+ if (aHandle == iEffectHandle && aType == EAlfEffectComplete
+ && iAnchorlayout)
+ {
+ TRAP_IGNORE(iAnchorlayout->SetEffectL(KTfxResourceNoEffect));
+ }
+ }
+
--- a/photosgallery/viewframework/views/cloudview/src/glxtagscontextmenucontrol.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/cloudview/src/glxtagscontextmenucontrol.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -36,6 +36,7 @@
#include <alf/alfframebrush.h>
#include <StringLoader.h>
+#include <touchfeedback.h>
// Photos Headers
#include "glxtagscontextmenucontrol.h"
@@ -345,6 +346,7 @@
if (aEvent.IsPointerEvent() && iItemMenuVisibility )
{
+ MTouchFeedback* feedback = MTouchFeedback::Instance();
if (aEvent.PointerDown())
{
iCommandId = KErrNotFound;
@@ -389,6 +391,10 @@
iCommandId = EGlxCmdRename;
}
consumed = ETrue;
+ if (feedback)
+ {
+ feedback->InstantFeedback(ETouchFeedbackBasic);
+ }
CleanupStack::Pop(brush);
}//End of iItemMenuVisibility check
}//End of Pointer down event
@@ -421,6 +427,10 @@
{
HandleUpEventL();
}
+ else if (eventInsideControl && feedback)
+ {
+ feedback->InstantFeedback(ETouchFeedbackBasic);
+ }
consumed = ETrue;
}
consumed = ETrue;
--- a/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h Thu Aug 19 09:55:03 2010 +0300
@@ -52,6 +52,7 @@
class CGestureHelper;
class TGlxMedia;
class CGlxFullScreenBusyIcon;
+class CGlxNavigationalState;
namespace Alf
{
@@ -357,6 +358,8 @@
CPeriodic* iPeriodic;
CGlxFullScreenBusyIcon* iBusyIcon;
+ CGlxNavigationalState* iNaviState;
+
GestureHelper::CGestureHelper* iGestureHelper;
TBool iMultiTouchGestureOngoing ;
--- a/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -209,6 +209,8 @@
iPeriodic = CPeriodic::NewL(CActive::EPriorityStandard);
}
iGlxTvOut = CGlxTv::NewL(*this);
+
+ iNaviState = CGlxNavigationalState::InstanceL();
}
// ---------------------------------------------------------------------------
@@ -261,6 +263,11 @@
iPeriodic->Cancel();
delete iPeriodic;
}
+
+ if (iNaviState)
+ {
+ iNaviState->Close();
+ }
}
// ---------------------------------------------------------------------------
// From CGlxViewBase
@@ -326,33 +333,34 @@
// hide the toolbar
EnableFSToolbar(EFalse);
- CGlxNavigationalState* navigationalState = CGlxNavigationalState::InstanceL();
- CleanupClosePushL( *navigationalState );
- CMPXCollectionPath* naviState = navigationalState->StateLC();
-
- if(!iMediaList->Count())
- {
- //Fix For EPKA-7U5DT7-slideshow launched from FullScreen and connect USB in mass storage mode results in Photos crash
- navigationalState->ActivatePreviousViewL();
- }
- else
- {
- //fix for ESLM-7YYDXC: When in FullScreen View, view mode must be 'EView'
- //While coming back from SlideShow to FullScreen view, need to set view mode.
- if(navigationalState->ViewingMode() != NGlxNavigationalState::EView)
- {
- navigationalState->SetToViewMode();
- }
- }
-
- if(naviState->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid))
+ if (iMediaList->Count() == 0)
+ {
+ GLX_LOG_INFO("CGlxFullScreenViewImp::DoMLViewActivateL() - No items!");
+ // While in slideshow from fullscreen view,
+ // 1) Connect USB in mass storage mode or
+ // 2) Delete items through file manager
+ // shall result in activating fullscreen view with no items; so, goto grid view.
+ iNaviState->ActivatePreviousViewL();
+ }
+ else
+ {
+ //fix for ESLM-7YYDXC: When in FullScreen View, view mode must be 'EView'
+ //While coming back from SlideShow to FullScreen view, need to set view mode.
+ if (iMediaList->Count() && iNaviState->ViewingMode()
+ != NGlxNavigationalState::EView)
+ {
+ iNaviState->SetToViewMode();
+ }
+ }
+
+ CMPXCollectionPath* collPath = iNaviState->StateLC();
+ if (collPath->Id() == TMPXItemId(
+ KGlxCollectionPluginImageViewerImplementationUid))
{
iImgViewerMode = ETrue;
CreateImageViewerInstanceL();
}
- //destroy and close navistate and navipath
- CleanupStack::PopAndDestroy( naviState );
- CleanupStack::PopAndDestroy( navigationalState );
+ CleanupStack::PopAndDestroy(collPath);
iScrnSize = iUiUtility->DisplaySize();
iGridIconSize = iUiUtility->GetGridIconSize();
@@ -495,6 +503,7 @@
iSliderModel = widgetFactory.createModel<IMulSliderModel> ("mulslidermodel");
iSliderModel->SetTemplate(ESliderTemplate3);
iSliderWidget->setModel(iSliderModel);
+ iSliderWidget->control()->disableState(IAlfWidgetControl::Focusable);
//adding the range and slider tick value
if(iSliderModel)
@@ -672,7 +681,6 @@
HideUi(iSliderWidget->IsHidden());
}
}
- iViewWidget->show(ETrue);
}
// ---------------------------------------------------------------------------
@@ -692,7 +700,6 @@
{
iSliderWidget->AddEventHandler(*this);
}
- iViewWidget->show(ETrue);
iViewWidget->setRect(TRect(TPoint(0,0),AlfUtil::ScreenSize()));
GlxSetAppState::SetState(EGlxInFullScreenView);
}
@@ -930,6 +937,9 @@
{
TRACER("CGlxFullScreenViewImp::HandleForegroundEventL");
CAknView::HandleForegroundEventL(aForeground);
+
+ iUiUtility->SetForegroundStatus(aForeground);
+
if(iMMCState)
{
iMMCState =EFalse;
@@ -954,15 +964,13 @@
if (iMediaList)
{
/** if there is no image to show go back to the previous view */
- if (!iMediaList->Count())
- {
- iUiUtility->SetViewNavigationDirection(EGlxNavigationBackwards);
- CGlxNavigationalState* navigationalState =
- CGlxNavigationalState::InstanceL();
- CleanupClosePushL(*navigationalState);
- navigationalState ->ActivatePreviousViewL();
- CleanupStack::PopAndDestroy(navigationalState);
- }
+ if (!iMediaList->Count() && iNaviState->ViewingMode()
+ == NGlxNavigationalState::EView)
+ {
+ iUiUtility->SetViewNavigationDirection(
+ EGlxNavigationBackwards);
+ iNaviState->ActivatePreviousViewL();
+ }
else if (iMediaListMulModelProvider)
{
UpdateItems();
@@ -1119,11 +1127,17 @@
case ETypeRemove:
{
- // Handle the "C" key or the BackSpace key to Delete an item.
- ProcessCommandL(EGlxCmdDelete);
- return EEventConsumed;
+ // If From photos, delete the img.
+ // If Image-Viewer collection and not in private Path
+ // handle the "C" or BackSpace key to delete the item
+ if (!iImgViewerMode || (iImageViewerInstance
+ && !iImageViewerInstance->IsPrivate()))
+ {
+ ProcessCommandL(EGlxCmdDelete);
+ return EEventConsumed;
+ }
+ return EEventNotHandled;
}
-
case ETypeDoubleTap:
{
GLX_LOG_INFO("CGlxFullScreenViewImp::OfferEventL ETypeDoubleTap");
@@ -1148,8 +1162,19 @@
}
case ETypeItemRemoved:
{
+ GLX_LOG_INFO("CGlxFullScreenViewImp::OfferEventL ETypeItemRemoved");
+ TInt focusIndex = iMediaList->FocusIndex();
+ TInt mlCount = iMediaList->Count();
+ GLX_LOG_INFO2("CGlxFullScreenViewImp::OfferEventL focusIndex=%d, iOldFocusIndex=%d",
+ focusIndex, iOldFocusIndex);
+ if (mlCount && (iOldFocusIndex == focusIndex
+ || iOldFocusIndex == mlCount) && iZoomControl
+ && iZoomControl->Activated())
+ {
+ GLX_LOG_INFO("Fcused item is removed, Exit zoom view!");
+ DeactivateZoomControlL();
+ }
SetItemToHDMIL();
- TInt focusIndex = iMediaList->FocusIndex();
if (focusIndex != KErrNotFound && EUiOn == GetUiState())
{
// show/hide the slider
@@ -1159,20 +1184,20 @@
}
}
/** if this is the last image deleted when Photo is in foreground, go back to the previous view*/
- if (!iMediaList->Count() && IsForeground())
- {
- iUiUtility->SetViewNavigationDirection(
- EGlxNavigationBackwards);
- CGlxNavigationalState* navigationalState =
- CGlxNavigationalState::InstanceL();
- CleanupClosePushL(*navigationalState);
- navigationalState ->ActivatePreviousViewL();
- CleanupStack::PopAndDestroy(navigationalState);
- }
+ if (mlCount == 0 && IsForeground()
+ && iNaviState->ViewingMode()
+ == NGlxNavigationalState::EView)
+ {
+ iUiUtility->SetViewNavigationDirection(
+ EGlxNavigationBackwards);
+ iNaviState->ActivatePreviousViewL();
+ }
+ TRAP_IGNORE(ShowDrmExpiryNoteL());
return EEventConsumed;
}
case ETypeHighlight:
{
+ GLX_LOG_INFO("CGlxFullScreenViewImp::OfferEventL ETypeHighlight");
iMediaList->SetFocusL( NGlxListDefs::EAbsolute,(aEvent.CustomEventData()));
if (AknLayoutUtils::PenEnabled())
{
@@ -1196,6 +1221,7 @@
if(item.Category() == EMPXVideo)
{
ProcessCommandL(EGlxCmdPlay);
+ iViewWidget->show(false);
}
else
{
@@ -1278,6 +1304,21 @@
iIsDialogLaunched = ETrue;
break;
}
+ case EGlxCmdDialogDismissed:
+ {
+ if (iIsDialogLaunched && iIsMMCRemoved)
+ {
+ ProcessCommandL(EAknSoftkeyExit);
+ }
+ consumed = ETrue;
+ iIsDialogLaunched = EFalse;
+ break;
+ }
+ case EAknSoftkeyBack:
+ {
+ HideUi(ETrue);
+ break;
+ }
}
return consumed;
}
--- a/photosgallery/viewframework/views/gridview/bwins/glxgridviewu.def Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/bwins/glxgridviewu.def Thu Aug 19 09:55:03 2010 +0300
@@ -1,5 +1,5 @@
EXPORTS
?NewLC@CGlxGridView@@SAPAV1@PAVMGlxMediaListFactory@@ABVTGridViewResourceIds@@HABVTDesC16@@@Z @ 1 NONAME ; class CGlxGridView * CGlxGridView::NewLC(class MGlxMediaListFactory *, class TGridViewResourceIds const &, int, class TDesC16 const &)
?NewL@CGlxGridView@@SAPAV1@PAVMGlxMediaListFactory@@ABVTGridViewResourceIds@@HABVTDesC16@@@Z @ 2 NONAME ; class CGlxGridView * CGlxGridView::NewL(class MGlxMediaListFactory *, class TGridViewResourceIds const &, int, class TDesC16 const &)
- ?NewL@CGlxGridViewMLObserver@@SAPAV1@AAVMGlxMediaList@@PAVCHgGrid@@W4TGlxFilterItemType@@@Z @ 3 NONAME ; class CGlxGridViewMLObserver * CGlxGridViewMLObserver::NewL(class MGlxMediaList &, class CHgGrid *, enum TGlxFilterItemType)
+ ?NewL@CGlxGridViewMLObserver@@SAPAV1@AAVMHgScrollBufferObserver@@AAVMGlxMediaList@@PAVCHgGrid@@W4TGlxFilterItemType@@@Z @ 3 NONAME ; class CGlxGridViewMLObserver * CGlxGridViewMLObserver::NewL(class MHgScrollBufferObserver &, class MGlxMediaList &, class CHgGrid *, enum TGlxFilterItemType)
--- a/photosgallery/viewframework/views/gridview/eabi/glxgridviewu.def Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/eabi/glxgridviewu.def Thu Aug 19 09:55:03 2010 +0300
@@ -1,7 +1,7 @@
EXPORTS
_ZN12CGlxGridView4NewLEP20MGlxMediaListFactoryRK20TGridViewResourceIdsiRK7TDesC16 @ 1 NONAME
_ZN12CGlxGridView5NewLCEP20MGlxMediaListFactoryRK20TGridViewResourceIdsiRK7TDesC16 @ 2 NONAME
- _ZN22CGlxGridViewMLObserver4NewLER13MGlxMediaListP7CHgGrid18TGlxFilterItemType @ 3 NONAME
+ _ZN22CGlxGridViewMLObserver4NewLER23MHgScrollBufferObserverR13MGlxMediaListP7CHgGrid18TGlxFilterItemType @ 3 NONAME
_ZTI21CGlxGridViewContainer @ 4 NONAME
_ZTI22CGlxGridViewMLObserver @ 5 NONAME
_ZTV21CGlxGridViewContainer @ 6 NONAME
--- a/photosgallery/viewframework/views/gridview/inc/glxgridviewmlobserver.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/inc/glxgridviewmlobserver.h Thu Aug 19 09:55:03 2010 +0300
@@ -23,10 +23,15 @@
#include <mglxmedialistobserver.h>
#include <glxfiltergeneraldefs.h>
+// CONSTANTS
+const TInt KNoOfPages(3);
+const TInt KBufferTresholdSize(3); // in rows
+
// FORWARD DECLARATIONS
class CGlxMediaList;
class CHgGrid;
class CGlxDRMUtility;
+class MHgScrollBufferObserver;
//class CHgContextUtility;
// CLASS DECLARATION
@@ -41,9 +46,10 @@
*
* @return Pointer to newly created object.
*/
- IMPORT_C static CGlxGridViewMLObserver* NewL(MGlxMediaList& aMediaList,
- CHgGrid* aHgGrid, TGlxFilterItemType aFilterType =
- EGlxFilterVideoAndImages);
+ IMPORT_C static CGlxGridViewMLObserver* NewL(
+ MHgScrollBufferObserver& aHgScrollBufferObs,
+ MGlxMediaList& aMediaList, CHgGrid* aHgGrid,
+ TGlxFilterItemType aFilterType = EGlxFilterVideoAndImages);
/**
* Destructor.
@@ -71,7 +77,8 @@
/**
* C++ default constructor.
*/
- CGlxGridViewMLObserver(MGlxMediaList& aMediaList, CHgGrid* aHgGrid,
+ CGlxGridViewMLObserver(MHgScrollBufferObserver& aHgScrollBufferObs,
+ MGlxMediaList& aMediaList, CHgGrid* aHgGrid,
TGlxFilterItemType aFilterType);
/**
@@ -127,6 +134,8 @@
void SetIconL(TInt aItemIndex, TInt aBitmapId, TInt aMaskId, TInt aFlags);
private:
+ // Hg Grid scroll buffer observer
+ MHgScrollBufferObserver& iHgScrollBufferObs;
MGlxMediaList& iMediaList;
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -44,9 +44,6 @@
#include "glxgridviewimp.h"
#include "glxgridviewmlobserver.h" // medialist observer for Hg Grid
-const TInt KNoOfPages(3);
-const TInt KBufferTresholdSize(3); // in rows
-
// ======== MEMBER FUNCTIONS ========
// ---------------------------------------------------------------------------
@@ -343,7 +340,7 @@
{
TRACER("CGlxGridViewContainer::HandleOpenL()");
// Make sure that the Selection Index is inside medialist count
- if (aIndex <iMediaList->Count() && aIndex >=0)
+ if (!iIsDialogLaunched && aIndex <iMediaList->Count() && aIndex >=0)
{
if (!(iHgGrid->Flags() && CHgScroller::EHgScrollerSelectionMode))
{
@@ -526,7 +523,8 @@
{
TRACER("CGlxGridViewContainer::CreateGridMediaListObserverL()");
// Creating the Medialist observer for HG Grid
- iGlxGridMLObserver = CGlxGridViewMLObserver::NewL(*iMediaList, iHgGrid);
+ iGlxGridMLObserver = CGlxGridViewMLObserver::NewL(*this, *iMediaList,
+ iHgGrid);
}
// ---------------------------------------------------------------------------
@@ -962,6 +960,17 @@
iIsDialogLaunched = ETrue;
break;
}
+ case EGlxCmdDialogDismissed:
+ {
+ if (iIsDialogLaunched && iIsMMCRemoved)
+ {
+ iGlxGridViewObserver.HandleGridEventsL(EAknSoftkeyExit);
+ }
+
+ iIsDialogLaunched = EFalse;
+ retVal = ETrue;
+ break;
+ }
default:
break;
}
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -127,23 +127,10 @@
{
TRACER("CGlxGridViewImp::DoMLViewActivateL()");
- TUint transitionID = (iUiUtility->ViewNavigationDirection()==
- EGlxNavigationForwards)?KActivateTransitionId:KFSDeActivateTransitionId;
-
HBufC8* activationParam = HBufC8::NewLC(KMaxUidName);
activationParam->Des().AppendNum(KGlxActivationCmdShowAll);
- // Start Animating the view when launched from other views
- // except if launched from Camera App.
- if (aCustomMessage.Compare(activationParam->Des()) != 0)
- {
- GfxTransEffect::BeginFullScreen( transitionID, TRect(),
- AknTransEffect::EParameterType,
- AknTransEffect::GfxTransParam( KPhotosUid,
- AknTransEffect::TParameter::EEnableEffects) );
- GfxTransEffect::EndFullScreen();
- }
- else
+ if (aCustomMessage.Compare(activationParam->Des()) == 0)
{
// Launched from Camera App, Check if there is any existing filter
// and clear the 'MaxCount' filter, if supported to show all images.
@@ -159,7 +146,6 @@
}
}
- CleanupStack::PopAndDestroy(activationParam);
if(StatusPane())
{
@@ -191,14 +177,29 @@
iToolbar = CAknToolbar::NewL(R_GLX_GRID_VIEW_TOOLBAR);
SetGridToolBar(iToolbar);
SetToolbarObserver(this);
- //Make the toolbar visible only when the medialist is populated
- iToolbar->SetToolbarVisibility(iMediaList->IsPopulated());
+ iToolbar->SetDimmed(ETrue);
+ iToolbar->SetToolbarVisibility(ETrue);
}
//Create gridview container
iGlxGridViewContainer = CGlxGridViewContainer::NewL(iMediaList,
iUiUtility, *this, iToolbar);
iEikonEnv->AppUi()->AddToStackL(*this,iGlxGridViewContainer);
iUiUtility->DestroyScreenClearer();
+
+ // Start Animating the view when launched from other views
+ // except if launched from Camera App.
+ if (aCustomMessage.Compare(activationParam->Des()) != 0)
+ {
+ TUint transitionID = (iUiUtility->ViewNavigationDirection()
+ == EGlxNavigationForwards) ? KActivateTransitionId
+ : KFSDeActivateTransitionId;
+ GfxTransEffect::BeginFullScreen( transitionID, TRect(),
+ AknTransEffect::EParameterType,
+ AknTransEffect::GfxTransParam( KPhotosUid,
+ AknTransEffect::TParameter::EEnableEffects) );
+ iIsTransEffectStarted = ETrue;
+ }
+ CleanupStack::PopAndDestroy(activationParam);
}
// ---------------------------------------------------------------------------
@@ -334,12 +335,10 @@
static_cast<CAknButton*> (iToolbar->ControlOrNull(
EGlxCmdStartMultipleMarking));
- if (markButton && !markButton->IsDimmed())
+ if(markButton)
{
GLX_DEBUG1("CGlxGridViewImp::HandleLatchToolbar() - UnLatch");
- markButton->SetCurrentState(KGlxToolbarButtonUnLatched, ETrue);
- // Force to update the frame IDs
- markButton->SetDimmed(EFalse);
+ markButton->SetCurrentState( KGlxToolbarButtonUnLatched, ETrue );
}
}
// End of File
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewmlobserver.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewmlobserver.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -55,25 +55,30 @@
// ---------------------------------------------------------------------------
//
EXPORT_C CGlxGridViewMLObserver* CGlxGridViewMLObserver::NewL(
+ MHgScrollBufferObserver& aHgScrollBufferObs,
MGlxMediaList& aMediaList, CHgGrid* aHgGrid,
TGlxFilterItemType aFilterType)
{
TRACER("CGlxGridViewMLObserver::NewL()");
CGlxGridViewMLObserver* self = new (ELeave) CGlxGridViewMLObserver(
- aMediaList, aHgGrid, aFilterType);
+ aHgScrollBufferObs, aMediaList, aHgGrid, aFilterType);
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop(self);
return self;
}
+
// ---------------------------------------------------------------------------
// C++ default constructor can NOT contain any code, that
// might leave.
// ---------------------------------------------------------------------------
//
-CGlxGridViewMLObserver::CGlxGridViewMLObserver(MGlxMediaList& aMediaList,
- CHgGrid* aHgGrid, TGlxFilterItemType aFilterType) :
- iMediaList(aMediaList), iHgGrid(aHgGrid), iFilterType(aFilterType)
+CGlxGridViewMLObserver::CGlxGridViewMLObserver(
+ MHgScrollBufferObserver& aHgScrollBufferObs,
+ MGlxMediaList& aMediaList, CHgGrid* aHgGrid,
+ TGlxFilterItemType aFilterType) :
+ iHgScrollBufferObs(aHgScrollBufferObs), iMediaList(aMediaList), iHgGrid(
+ aHgGrid), iFilterType(aFilterType)
{
TRACER("CGlxGridViewMLObserver::CGlxGridViewMLObserver()");
}
@@ -81,7 +86,7 @@
// ---------------------------------------------------------------------------
// Symbian 2nd phase constructor can leave.
// ---------------------------------------------------------------------------
-//
+//
void CGlxGridViewMLObserver::ConstructL()
{
TRACER("CGlxGridViewMLObserver::ConstructL()");
@@ -94,19 +99,19 @@
iGridIconSize = uiUtility->GetGridIconSize();
iItemsPerPage = uiUtility->VisibleItemsInPageGranularityL();
CleanupStack::PopAndDestroy(uiUtility);
-
- iQualityTnAttrib = TMPXAttribute (KGlxMediaIdThumbnail,
- GlxFullThumbnailAttributeId( ETrue, iGridIconSize.iWidth,
+
+ iQualityTnAttrib = TMPXAttribute (KGlxMediaIdThumbnail,
+ GlxFullThumbnailAttributeId( ETrue, iGridIconSize.iWidth,
iGridIconSize.iHeight ) );
- iSpeedTnAttrib = TMPXAttribute (KGlxMediaIdThumbnail,
- GlxFullThumbnailAttributeId( EFalse, iGridIconSize.iWidth,
+ iSpeedTnAttrib = TMPXAttribute (KGlxMediaIdThumbnail,
+ GlxFullThumbnailAttributeId( EFalse, iGridIconSize.iWidth,
iGridIconSize.iHeight ) );
-
+
iIconsFileName.Append(KDC_APP_BITMAP_DIR);
iIconsFileName.Append(KGlxIconsFilename);
iIsDefaultIconSet = EFalse;
-
+
iDiskErrorIntimated = EFalse;
}
@@ -128,8 +133,8 @@
// ----------------------------------------------------------------------------
// HandleItemAddedL
// ----------------------------------------------------------------------------
-//
-void CGlxGridViewMLObserver::HandleItemAddedL( TInt aStartIndex, TInt aEndIndex,
+//
+void CGlxGridViewMLObserver::HandleItemAddedL( TInt aStartIndex, TInt aEndIndex,
MGlxMediaList* aList )
{
TRACER("CGlxGridViewMLObserver::HandleItemAddedL()");
@@ -147,14 +152,14 @@
TTime startTime;
GLX_LOG_INFO("CGlxGridViewMLObserver::HandleItemAddedL - ResizeL(+)");
startTime.HomeTime();
-#endif
+#endif
iHgGrid->ResizeL(aList->Count());
#ifdef _DEBUG
TTime stopTime;
stopTime.HomeTime();
GLX_DEBUG2("CGlxGridViewMLObserver::HandleItemAddedL - ResizeL(-) took <%d> us",
(TInt)stopTime.MicroSecondsFrom(startTime).Int64());
-#endif
+#endif
}
else
{
@@ -168,46 +173,65 @@
// ----------------------------------------------------------------------------
// HandleItemRemoved
// ----------------------------------------------------------------------------
-//
-void CGlxGridViewMLObserver::HandleItemRemovedL( TInt aStartIndex,
+//
+void CGlxGridViewMLObserver::HandleItemRemovedL( TInt aStartIndex,
TInt aEndIndex, MGlxMediaList* aList )
{
TRACER("CGlxGridViewMLObserver::HandleItemRemovedL()");
+ GLX_DEBUG3("CGlxGridViewMLObserver::HandleItemRemovedL() aStartIndex(%d), aEndIndex(%d)",
+ aStartIndex, aEndIndex);
if (iHgGrid)
{
- TInt mediaCount = aList->Count();
-
- for (TInt i = aEndIndex; i>= aStartIndex; i--)
+ TInt mediaCount = aList->Count();
+ // If the last item is also deleted, refresh the view
+ if (mediaCount <= 0)
{
- iHgGrid->RemoveItem(i);
+ if (iMediaList.VisibleWindowIndex() > iMediaList.Count())
+ {
+ iMediaList.SetVisibleWindowIndexL(0);
+ }
+ //This is done since the Hg doesnot refresh the screen
+ //when we remove all the items from the grid
+ GLX_LOG_INFO("CGlxGridViewMLObserver::HandleItemRemovedL - Hg Reset");
+ iHgGrid->DrawDeferred();
+ iHgGrid->Reset();
+ return;
}
- // If the last item is also deleted, this refreshes the view
- if (mediaCount <=0)
- {
- if(iMediaList.VisibleWindowIndex() > iMediaList.Count())
+ if (aStartIndex == aEndIndex)
+ {
+ iHgGrid->RemoveItem(aStartIndex);
+ }
+ else
+ {
+ GLX_LOG_INFO("CGlxGridViewMLObserver::HandleItemRemovedL - Hg RemoveItems(+)");
+ // Need to disable the buffering support until HgGrid data model
+ // is synced with Medialist; Otherwise, RequestL would result in
+ // requesting same index for the no of items removed.
+ iHgGrid->DisableScrollBuffer();
+ for (TInt i = aEndIndex; i >= aStartIndex; i--)
{
- iMediaList.SetVisibleWindowIndexL(0);
- }
- //This is done since the Hg doesnot refresh the screen
- //when we remove all the items from the grid
- iHgGrid->DrawDeferred();
- iHgGrid->Reset();
- return;
- }
- else if (iMediaList.VisibleWindowIndex() > iMediaList.Count())
+ iHgGrid->RemoveItem(i);
+ }
+ // Enable Buffer support
+ iHgGrid->EnableScrollBufferL(iHgScrollBufferObs, (KNoOfPages
+ * iItemsPerPage), KBufferTresholdSize);
+ GLX_LOG_INFO("CGlxGridViewMLObserver::HandleItemRemovedL - Hg RemoveItems(-)");
+ }
+
+ if (iMediaList.VisibleWindowIndex() > iMediaList.Count())
{
- iMediaList.SetVisibleWindowIndexL(iMediaList.Count()-1);
+ iMediaList.SetVisibleWindowIndexL(iMediaList.Count() - 1);
}
- iHgGrid->RefreshScreen(iHgGrid->FirstIndexOnScreen());
+ iHgGrid->RefreshScreen(iHgGrid->FirstIndexOnScreen());
}
}
// ----------------------------------------------------------------------------
// HandleAttributesAvailableL
// ----------------------------------------------------------------------------
-//
-void CGlxGridViewMLObserver::HandleAttributesAvailableL( TInt aItemIndex,
+//
+void CGlxGridViewMLObserver::HandleAttributesAvailableL( TInt aItemIndex,
const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* /*aList*/ )
{
TRACER("CGlxGridViewMLObserver::HandleAttributesAvailableL()");
@@ -266,20 +290,20 @@
CHgItem::EHgItemFlagsNone);
}
}
-
- //Now Update the items with the DRM/video icon and date/time
+
+ //Now Update the items with the DRM/video icon and date/time
UpdateItemsL(aItemIndex,aAttributes);
-
+
//Now refresh the screen based on the attributes available index
RefreshScreenL(aItemIndex,aAttributes);
}
-
+
// ----------------------------------------------------------------------------
// HandleFocusChangedL
// ----------------------------------------------------------------------------
-//
+//
void CGlxGridViewMLObserver::HandleFocusChangedL( NGlxListDefs::
- TFocusChangeType /*aType*/, TInt aNewIndex, TInt aOldIndex,
+ TFocusChangeType /*aType*/, TInt aNewIndex, TInt aOldIndex,
MGlxMediaList* /*aList*/ )
{
TRACER("CGlxGridViewMLObserver::HandleFocusChangedL()");
@@ -299,8 +323,8 @@
// ----------------------------------------------------------------------------
// HandleItemSelected
// ----------------------------------------------------------------------------
-//
-void CGlxGridViewMLObserver::HandleItemSelectedL(TInt /*aIndex*/,
+//
+void CGlxGridViewMLObserver::HandleItemSelectedL(TInt /*aIndex*/,
TBool /*aSelected*/, MGlxMediaList* /*aList*/ )
{
TRACER("CGlxGridViewMLObserver::HandleItemSelectedL()");
@@ -309,18 +333,18 @@
// ----------------------------------------------------------------------------
// HandleMessageL
// ----------------------------------------------------------------------------
-//
- void CGlxGridViewMLObserver::HandleMessageL( const CMPXMessage& /*aMessage*/,
+//
+ void CGlxGridViewMLObserver::HandleMessageL( const CMPXMessage& /*aMessage*/,
MGlxMediaList* /*aList*/ )
{
TRACER("CGlxGridViewMLObserver::HandleMessageL()");
}
-
+
// ----------------------------------------------------------------------------
// HandleError
// ----------------------------------------------------------------------------
//
-void CGlxGridViewMLObserver::HandleError( TInt /*aError*/ )
+void CGlxGridViewMLObserver::HandleError( TInt /*aError*/ )
{
TRACER("CGlxGridViewMLObserver::HandleError()");
TRAP_IGNORE(HandleErrorL());
@@ -335,15 +359,15 @@
TRACER("CGlxGridViewMLObserver::HandleErrorL()");
TInt bitmapId = EMbmGlxiconsQgn_prop_image_corrupted;
- TInt maskId = EMbmGlxiconsQgn_prop_image_corrupted_mask;
+ TInt maskId = EMbmGlxiconsQgn_prop_image_corrupted_mask;
TInt flags = CHgItem::EHgItemFlagsNone ;
-
+
for ( TInt i = 0; i < iMediaList.Count(); i++ )
{
const TGlxMedia& item = iMediaList.Item( i );
TInt thumbnailError = GlxErrorManager::HasAttributeErrorL(
item.Properties(), KGlxMediaIdThumbnail );
-
+
if (KErrNone != thumbnailError)
{
switch (thumbnailError)
@@ -378,19 +402,19 @@
}
}
- break;
+ break;
}
-
+
SetIconL(i, bitmapId, maskId, flags);
}
}
- iHgGrid->RefreshScreen(iHgGrid->FirstIndexOnScreen());
+ iHgGrid->RefreshScreen(iHgGrid->FirstIndexOnScreen());
}
// ----------------------------------------------------------------------------
// SetIconL
// ----------------------------------------------------------------------------
-//
+//
void CGlxGridViewMLObserver::SetIconL(TInt aItemIndex, TInt aBitmapId,
TInt aMaskId, TInt aFlags)
{
@@ -416,17 +440,17 @@
// ----------------------------------------------------------------------------
// HandleCommandCompleteL
// ----------------------------------------------------------------------------
-//
-void CGlxGridViewMLObserver::HandleCommandCompleteL( CMPXCommand* /*aCommandResult*/,
+//
+void CGlxGridViewMLObserver::HandleCommandCompleteL( CMPXCommand* /*aCommandResult*/,
TInt /*aError*/, MGlxMediaList* /*aList*/ )
{
TRACER("CGlxGridViewMLObserver::HandleCommandCompleteL()");
}
-
+
// ----------------------------------------------------------------------------
// HandleMediaL
// ----------------------------------------------------------------------------
-//
+//
void CGlxGridViewMLObserver::HandleMediaL( TInt /*aListIndex*/, MGlxMediaList* /*aList*/ )
{
TRACER("CGlxGridViewMLObserver::HandleMediaL()");
@@ -465,22 +489,22 @@
GLX_DEBUG2("GridMLObserver::HandlePopulatedL() iMediaList.Count()=%d",
iMediaList.Count());
-
+
if (iMediaList.Count() <= 0)
{
GLX_DEBUG1("GridMLObserver::HandlePopulatedL() - SetEmptyTextL()");
iHgGrid->DrawNow();
}
-
+
GLX_DEBUG1("GridMLObserver::HandlePopulatedL() - SetDefaultIconL()");
SetDefaultIconL(ETrue);
}
}
-
+
// ----------------------------------------------------------------------------
// HandleItemModifiedL
// ----------------------------------------------------------------------------
-//
+//
void CGlxGridViewMLObserver::HandleItemModifiedL(const RArray<TInt>& aItemIndexes,
MGlxMediaList* /*aList*/)
{
@@ -489,9 +513,9 @@
{
TInt modifiedIndex = aItemIndexes[index];
iModifiedIndexes.AppendL(modifiedIndex);
- }
+ }
}
-
+
// ----------------------------------------------------------------------------
// HasRelevantThumbnailAttribute
// ----------------------------------------------------------------------------
@@ -506,7 +530,7 @@
iSpeedTnAttrib );
if ( qualityTn || speedTn )
{
- GLX_DEBUG1("GridMLObserver::HasRelevantThumbnail() - TN avail");
+ GLX_DEBUG1("GridMLObserver::HasRelevantThumbnail() - TN avail");
return ETrue;
}
return EFalse;
@@ -516,7 +540,7 @@
// ----------------------------------------------------------------------------
// RefreshScreenL
// ----------------------------------------------------------------------------
-//
+//
void CGlxGridViewMLObserver::RefreshScreenL(TInt aItemIndex,
const RArray<TMPXAttribute>& aAttributes)
{
@@ -542,11 +566,11 @@
firstIndex))
{
GLX_DEBUG2("GridMLObserver::HandleAttributesAvailableL()"
- " RefreshScreen - aItemIndex(%d)", aItemIndex);
+ " RefreshScreen - aItemIndex(%d)", aItemIndex);
iHgGrid->RefreshScreen(aItemIndex);
}
}
-
+
if (!iIsDefaultIconSet)
{
GLX_DEBUG1("GridMLObserver::HandleAttributesAvailableL()"
@@ -565,17 +589,17 @@
if ( HasRelevantThumbnail(lastOnScreen) )
{
GLX_DEBUG2("GridMLObserver::HandleAttributesAvailableL()"
- " RefreshScreen - aItemIndex(%d)", aItemIndex);
+ " RefreshScreen - aItemIndex(%d)", aItemIndex);
iHgGrid->RefreshScreen(aItemIndex);
}
else if (aItemIndex == lastOnScreen)
{
GLX_DEBUG2("GridMLObserver::HandleAttributesAvailableL()"
- " RefreshScreen - lastOnScreen(%d)", lastOnScreen);
+ " RefreshScreen - lastOnScreen(%d)", lastOnScreen);
iHgGrid->RefreshScreen(lastOnScreen);
}
}
-
+
if (!iIsDefaultIconSet)
{
GLX_DEBUG1("GridMLObserver::HandleAttributesAvailableL()"
@@ -584,12 +608,12 @@
}
}
}
-
- if (iModifiedIndexes.Count() > 0)
+
+ if (iModifiedIndexes.Count() > 0)
{
for(TInt index = 0;index<iModifiedIndexes.Count();index++)
{
- if (iModifiedIndexes[index] == aItemIndex &&
+ if (iModifiedIndexes[index] == aItemIndex &&
HasRelevantThumbnail(aItemIndex))
{
GLX_DEBUG2("GridMLObserver::HandleAttributesAvailableL()"
@@ -601,19 +625,19 @@
}
}
}
-
+
// ----------------------------------------------------------------------------
// UpdateItemsL
// ----------------------------------------------------------------------------
-//
-void CGlxGridViewMLObserver::UpdateItemsL(TInt aItemIndex,
+//
+void CGlxGridViewMLObserver::UpdateItemsL(TInt aItemIndex,
const RArray<TMPXAttribute>& aAttributes)
{
TRACER("CGlxGridViewMLObserver::UpdateItemsL()");
TInt mediaCount = iMediaList.Count();
const TGlxMedia& item = iMediaList.Item( aItemIndex );
TIdentityRelation< TMPXAttribute > match ( &TMPXAttribute::Match );
-
+
if (aAttributes.Find(KMPXMediaDrmProtected, match) != KErrNotFound)
{
if (item.IsDrmProtected())
@@ -627,9 +651,9 @@
* fix for EABI-7RKHDG
* to show the invalid DRM icon
*/
- TMPXGeneralCategory cat = item.Category();
+ TMPXGeneralCategory cat = item.Category();
TBool checkViewRights = (cat==EMPXImage);
-
+
if(iDRMUtility->ItemRightsValidityCheckL(uri, checkViewRights))
{
iHgGrid->ItemL(aItemIndex).SetFlags(
@@ -641,11 +665,11 @@
CHgItem::EHgItemFlagsDrmRightsExpired);
}
}
- else
+ else
{
- TMPXGeneralCategory cat = item.Category();
+ TMPXGeneralCategory cat = item.Category();
TBool checkViewRights = (cat==EMPXImage);
-
+
if(iDRMUtility->ItemRightsValidityCheckL(uri, checkViewRights))
{
iHgGrid->ItemL(aItemIndex).SetFlags(
@@ -660,7 +684,7 @@
}
}
}
-
+
if (aAttributes.Find(KMPXMediaGeneralDate, match) != KErrNotFound)
{
TTime time(0);
@@ -669,20 +693,20 @@
iHgGrid->ItemL(aItemIndex).SetTime(time);
}
}
-
+
if (aAttributes.Find(KMPXMediaGeneralCategory, match) != KErrNotFound)
{
if (item.Category() == EMPXVideo)
{
iHgGrid->ItemL(aItemIndex).SetFlags(CHgItem::EHgItemFlagsVideo);
}
- }
+ }
}
-
+
// ----------------------------------------------------------------------------
// DisplayErrorNoteL
// ----------------------------------------------------------------------------
-//
+//
void CGlxGridViewMLObserver::DisplayErrorNoteL(TInt aError)
{
TRACER("CGlxGridViewMLObserver::DisplayErrorNoteL()");
@@ -696,7 +720,7 @@
// ----------------------------------------------------------------------------
// SetDefaultIconL
// ----------------------------------------------------------------------------
-//
+//
void CGlxGridViewMLObserver::SetDefaultIconL(TBool aTransparent)
{
TRACER("CGlxGridViewMLObserver::SetDefaultIconL()");
@@ -711,7 +735,7 @@
TSize bmpSize = CHgGrid::PreferredImageSize();
bitmap->Create(bmpSize, EColor16M);
mask->Create(bmpSize, EGray256); // Gray mask
- const TInt scanlineLength = bmpSize.iWidth; // 1 byte per pixel
+ const TInt scanlineLength = bmpSize.iWidth; // 1 byte per pixel
RBuf8 maskData;
maskData.Create(scanlineLength);
maskData.FillZ(scanlineLength); // Init with zero
@@ -726,7 +750,7 @@
mask->EndDataAccess();
iHgGrid->SetDefaultIconL(CGulIcon::NewL(bitmap, mask));
CleanupStack::Pop(mask);
- CleanupStack::Pop(bitmap);
+ CleanupStack::Pop(bitmap);
}
else if (!iIsDefaultIconSet)
{
--- a/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -182,22 +182,6 @@
{
TRACER("CGlxListViewImp::DoMLViewActivateL");
- TUint transitionID = (iUiUtility->ViewNavigationDirection()==
- EGlxNavigationForwards)?KActivateTransitionId:KDeActivateTransitionId;
-
- //Do the activate animation only for views other than mainlist view and
- //on backward navigation from any other views to main list view, since
- //for the app start the animation effect is by default provided.
- if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot ||
- transitionID == KDeActivateTransitionId)
- {
- GfxTransEffect::BeginFullScreen( transitionID, TRect(),
- AknTransEffect::EParameterType,
- AknTransEffect::GfxTransParam( KPhotosUid,
- AknTransEffect::TParameter::EEnableEffects) );
- GfxTransEffect::EndFullScreen();
- }
-
iNextViewActivationEnabled = ETrue;
if(StatusPane())
{
@@ -306,6 +290,23 @@
CreateListL();
iProgressIndicator = CGlxProgressIndicator::NewL(*this);
iMMCNotifier = CGlxMMCNotifier::NewL(*this);
+
+ TUint transitionID = (iUiUtility->ViewNavigationDirection()==
+ EGlxNavigationForwards)?KActivateTransitionId:KDeActivateTransitionId;
+
+ //Do the activate animation only for views other than mainlist view and
+ //on backward navigation from any other views to main list view, since
+ //for the app start the animation effect is by default provided.
+ if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot ||
+ transitionID == KDeActivateTransitionId)
+ {
+ GfxTransEffect::BeginFullScreen( transitionID, TRect(),
+ AknTransEffect::EParameterType,
+ AknTransEffect::GfxTransParam( KPhotosUid,
+ AknTransEffect::TParameter::EEnableEffects) );
+ iIsTransEffectStarted = ETrue;
+ }
+
}
// ---------------------------------------------------------------------------
--- a/photosgallery/viewframework/views/metadatadialog/data/glxmetadatadialog.rss Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/data/glxmetadatadialog.rss Thu Aug 19 09:55:03 2010 +0300
@@ -217,11 +217,9 @@
{
items=
{
- MENU_ITEM { command = KGlxViewBoundMenuCommandId; txt = qtn_lgal_options_view; },
- MENU_ITEM { command = EGlxCmdAiwShowMap; txt = qtn_lgal_option_show_on_map;},
MENU_ITEM { command = KGlxDeleteBoundMenuCommandId; txt = qtn_lgal_options_delete;flags = EEikMenuItemSpecific; },
MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; }
- };
+ };
}
// -----------------------------------------------------------------------------
@@ -437,9 +435,9 @@
},
AVKON_SETTING_ITEM
{
- identifier = EImgVwrDescriptionItem;
+ identifier = EImgVwrMimeTypeItem;
setting_page_resource = r_metadata_name_settings_page;
- name = qtn_lgal_details_description;
+ name = qtn_lgal_details_type;
empty_item_text = " ";
},
AVKON_SETTING_ITEM
--- a/photosgallery/viewframework/views/metadatadialog/inc/glximgvwrmetadatacontainer.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/inc/glximgvwrmetadatacontainer.h Thu Aug 19 09:55:03 2010 +0300
@@ -11,15 +11,9 @@
*
* Contributors:
*
-* Description:
+* Description: Image viewer metadata dialog container implementation
*
*/
-/*
- * glximgvwrmetadatacontainer.h
- *
- * Created on: Oct 22, 2009
- * Author: sourbasu
- */
#ifndef GLXIMGVWRMETADATACONTAINER_H_
#define GLXIMGVWRMETADATACONTAINER_H_
@@ -49,120 +43,117 @@
public MGlxMediaListObserver
{
-public: // Constructors and destructor
- void ViewDynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
+public:
+ // Constructors and destructor
/**
- * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
- *
- * @param aRect rect for control
- * @param aMediaList media list
- * @return Metadata container object
- */
- static CGlxImgVwrMetadataContainer* NewL( const TRect& aRect,const TDesC& aUri);
-
+ * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
+ *
+ * @param aRect rect for control
+ * @param aMediaList media list
+ * @return Metadata container object
+ */
+ static CGlxImgVwrMetadataContainer* NewL(const TRect& aRect,
+ const TDesC& aUri);
+
/**
- * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
- *
- * @param aRect rect for control
- * @param aMediaList media list
- * @return Metadata container object
- */
- static CGlxImgVwrMetadataContainer* NewLC( const TRect& aRect,const TDesC& aUri);
-
+ * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
+ *
+ * @param aRect rect for control
+ * @param aMediaList media list
+ * @return Metadata container object
+ */
+ static CGlxImgVwrMetadataContainer* NewLC(const TRect& aRect,
+ const TDesC& aUri);
+
/**
- * Destructor
- */
+ * Destructor
+ */
~CGlxImgVwrMetadataContainer();
-public:
-
- // @ref CAknSettingItemList::CreateSettingItemL
- CAknSettingItem* CreateSettingItemL(TInt aIdentifier);
-
- // @ref CAknSettingItemList::HandleListBoxEventL
- void HandleListBoxEventL(CEikListBox* aListBox,
- TListBoxEvent aEventType);
- void HandleListboxChangesL();
-
- //Enable disble the options based on the current selected item
- TBool IsItemModifiable();
- //Change MSK
+public:
+
+ // @ref CAknSettingItemList::CreateSettingItemL
+ CAknSettingItem* CreateSettingItemL(TInt aIdentifier);
+
+ // @ref CAknSettingItemList::HandleListBoxEventL
+ void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
+ void HandleListboxChangesL();
+
+ //Change MSK
void ChangeMskL();
+
//Enable marquee support
void EnableMarqueingL();
-
-
-
-
+
public:
- //MedialistObserver APIS
- void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList );
- void HandleItemRemovedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList*/* aList */);
- void HandleAttributesAvailableL( TInt aItemIndex,
- const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList );
- void HandleFocusChangedL( NGlxListDefs::TFocusChangeType aType,
- TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList );
- void HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList );
- void HandleMessageL( const CMPXMessage& aMessage, MGlxMediaList* aList );
- void HandleError( TInt aError );
- void HandleCommandCompleteL( CMPXCommand* aCommandResult, TInt aError,
- MGlxMediaList* aList );
- void HandleMediaL( TInt aListIndex, MGlxMediaList* aList );
- void HandleItemModifiedL( const RArray<TInt>& aItemIndexes, MGlxMediaList* aList );
- void HandleErrorL();
- MGlxMediaList& MediaList();
- void HandleCommandCompleteL(TAny* aSessionId,
- CMPXCommand* /*aCommandResult*/, TInt aError, MGlxMediaList* aList);
+ //MedialistObserver APIS
+ void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex,
+ MGlxMediaList* aList);
+ void
+ HandleItemRemovedL(TInt aStartIndex, TInt aEndIndex,
+ MGlxMediaList*/* aList */);
+ void HandleAttributesAvailableL(TInt aItemIndex, const RArray<
+ TMPXAttribute>& aAttributes, MGlxMediaList* aList);
+ void HandleFocusChangedL(NGlxListDefs::TFocusChangeType aType,
+ TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList);
+ void HandleItemSelectedL(TInt aIndex, TBool aSelected,
+ MGlxMediaList* aList);
+ void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList);
+ void HandleError(TInt aError);
+ void HandleCommandCompleteL(CMPXCommand* aCommandResult, TInt aError,
+ MGlxMediaList* aList);
+ void HandleMediaL(TInt aListIndex, MGlxMediaList* aList);
+ void HandleItemModifiedL(const RArray<TInt>& aItemIndexes,
+ MGlxMediaList* aList);
+ MGlxMediaList& MediaList();
+ void HandleCommandCompleteL(TAny* aSessionId,
+ CMPXCommand* /*aCommandResult*/, TInt aError,
+ MGlxMediaList* aList);
private:
- /**
- * C++ constructor.
- *
- * @param aMediaList media list
- */
- CGlxImgVwrMetadataContainer(const TDesC& aUri);
-
- /**
- * Symbian 2nd phase constructor
- * @param aRect rect for this control
- */
- void ConstructL( const TRect& aRect);
- void CreateMediaListForSelectedItemL();
- void SetAttributesL(TMPXAttribute attribute);
- void EditItemL(TInt aIndex, TBool aCalledFromMenu);
- void SetNameDescriptionL(TInt aItem);
- void SetDurationLIicenseItemVisibilityL();
- TBool IsLicenseItem();
+ /**
+ * C++ constructor.
+ *
+ * @param aMediaList media list
+ */
+ CGlxImgVwrMetadataContainer(const TDesC& aUri);
+
+ /**
+ * Symbian 2nd phase constructor
+ * @param aRect rect for this control
+ */
+ void ConstructL(const TRect& aRect);
+ void CreateMediaListForSelectedItemL();
+ void SetAttributesL(TMPXAttribute attribute);
+ void EditItemL(TInt aIndex, TBool aCalledFromMenu);
+ void SetLicenseItemVisibilityL();
- /**
- * Create Image Viewer manager Instance
- */
- void CreateImageViewerInstanceL();
-
- /**
- * Delete Image Viewer manager Instance
- */
- void DeleteImageViewerInstance();
+ /**
+ * Create Image Viewer manager Instance
+ */
+ void CreateImageViewerInstanceL();
+
+ /**
+ * Delete Image Viewer manager Instance
+ */
+ void DeleteImageViewerInstance();
-
-private: //data
-
- //Flag to check if the item is a video.
- TBool iVideo;
- //To check if marquee is enabled.
- TBool iMarquee;
- //to set visible license items based on the Item.
- TBool iSetVisible;
- RBuf iTextSetter;
- const TDesC& iUri ;
- MGlxMediaList* iItemMediaList;
- CGlxAttributeContext* iMainListAttributecontext;
- TGlxSelectionIterator iSelectionIterator;
- // For image viewer, not own
- CGlxImageViewerManager* iImageViewerInstance;
+private:
+ //data
+ //Flag to check if the item is a video.
+ TBool iVideo;
+ //To check if marquee is enabled.
+ TBool iMarquee;
+ //to set visible license items based on the Item.
+ TBool iSetVisible;
+ RBuf iTextSetter;
+ const TDesC& iUri;
+ MGlxMediaList* iItemMediaList;
+ CGlxAttributeContext* iMainListAttributecontext;
+ TGlxSelectionIterator iSelectionIterator;
+ // For image viewer, not own
+ CGlxImageViewerManager* iImageViewerInstance;
};
-
-
#endif /* GLXIMGVWRMETADATACONTAINER_H_ */
--- a/photosgallery/viewframework/views/metadatadialog/inc/glximgvwrmetadatadialog.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/inc/glximgvwrmetadatadialog.h Thu Aug 19 09:55:03 2010 +0300
@@ -25,41 +25,41 @@
// SYSTEM INCLUDES
#include <AknDialog.h>
-#include <alf/alfscreenbuffer.h>
#include <glximgvwrmetadatacontainer.h>
-// FORWARD DECLARATIONS
-class CGlxMetadataCommandHandler;
-class CGlxCommandHandlerAddToContainer;
-class CGlxUiUtility;
+
// CLASS DECLARATION
/**
* CGlxImgVwrMetadataDialog
*
- * Metadata dialog implementation
+ * Image Viewer Metadata dialog implementation
*/
class CGlxImgVwrMetadataDialog : public CAknDialog
-
{
-public: // Constructors and destructor
+public:
+ // Constructors and destructor
/**
* Two-phased constructor.
*
* @param aURI uri or file name of item
*/
- IMPORT_C static CGlxImgVwrMetadataDialog* NewL( const TDesC& aUri );
+ IMPORT_C static CGlxImgVwrMetadataDialog* NewL(const TDesC& aUri);
/**
* Destructor.
*/
virtual ~CGlxImgVwrMetadataDialog();
-private :
+private:
+ /**
+ * Constructor.
+ * @param aURI uri or file name of item
+ */
CGlxImgVwrMetadataDialog(const TDesC& aUri);
-
-public: // Functions from base classes
+public:
+ // Functions from base classes
/**
* Initializes the dialog and calls CAknDialog's
@@ -71,105 +71,64 @@
*/
IMPORT_C TInt ExecuteLD();
-
-protected: // Functions from base classes
-
+protected:
/**
* From MEikCommandObserver Prosesses menucommands
*
* @param aCommandId Commant value defined in resources.
*/
- void ProcessCommandL( TInt aCommandId );
-
- /**
- * From MEikMenuObserver Initializes items on the menu
- *
- * @param aMenuId Current menu's resource Id
- * @param aMenuPane Pointer to menupane
- */
- void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane);
- //hanldes orientation changes.
- void HandleResourceChange( TInt aType );
- void SizeChanged();
+ void ProcessCommandL(TInt aCommandId);
-private:
- /**
- * Initializes the dialog's controls before the dialog is sized and
- * layed out. Empty by default.
- */
- void PreLayoutDynInitL();
-
- /**
- * Initializes the dialog's controls after the dialog has been sized
- * but before it has been activated.
- */
- void PostLayoutDynInitL();
+private:
/**
* Symbian 2nd phase constructor.
- *
- * @param aURI
*/
void ConstructL();
/**
- * Constructs the Alf Environment and display
- */
- void ConstructAlfEnvL();
-
- /**
* Initalise the resource
- *
*/
- void InitResourceL();
-
- /**
- * To deal with any specific commands
- *
- * @param aCommand The command to respond to
- * @return ETrue if the command has been handled.
- *
- */
- TBool HandleViewCommandL(TInt aCommand);
-
-
+ void InitResourceL();
private:
-
- void Draw( const TRect& /*aRect*/ ) const;
- void HandlePointerEventL(const TPointerEvent& aPointerEvent);
/**
* SetTitleL
* Sets title for view
* @param aTitleText title of view to be set
*/
- void SetTitleL(const TDesC& aTitleText);
+ void SetTitleL(const TDesC& aTitleText);
/**
* SetPreviousTitleL
* Sets title of previous view
*/
void SetPreviousTitleL();
+ /**
+ * Sets the dialog toolbar visibility
+ * @param aVisible - ETrue for visible; EFalse otherwise.
+ */
void SetDetailsDlgToolbarVisibility(TBool aVisible);
-public: // from MEikDialogPageObserver
+public:
+ // from MEikDialogPageObserver
/**
* @ref MEikDialogPageObserver::CreateCustomControlL
*/
SEikControlInfo CreateCustomControlL(TInt aControlType);
public:
- /*
- *
- */
+ /**
+ * Handles the toolbar visiblity to be in sync with the calling app
+ * @param aVisible - ETrue for visible; EFalse otherwise.
+ */
void HandleToolbarResetting(TBool aVisible);
-private: //data
-
+private:
+ //data
TInt iResourceOffset;
TBool iStatusPaneAvailable;
- CGlxUiUtility* iUiUtility;
- HBufC* iPreviousTitle;
- const TDesC& iUri;
+ HBufC* iPreviousTitle;
+ const TDesC& iUri;
CGlxImgVwrMetadataContainer* iContainer;
};
--- a/photosgallery/viewframework/views/metadatadialog/inc/glxmetadatacontainer.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/inc/glxmetadatacontainer.h Thu Aug 19 09:55:03 2010 +0300
@@ -96,7 +96,6 @@
//Enable disble the options based on the current selected item
TBool IsItemModifiable();
- TBool IsLicenseItem();
TBool IsLocationItem();
//Delete the location information
--- a/photosgallery/viewframework/views/metadatadialog/inc/glxmetadatadialog.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/inc/glxmetadatadialog.h Thu Aug 19 09:55:03 2010 +0300
@@ -127,18 +127,9 @@
* @param aMenuPane Pointer to menupane
*/
void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane);
- //hanldes orientation changes.
- void HandleResourceChange( TInt aType );
- void SizeChanged();
private:
/**
- * Initializes the dialog's controls before the dialog is sized and
- * layed out. Empty by default.
- */
- void PreLayoutDynInitL();
-
- /**
* Initializes the dialog's controls after the dialog has been sized
* but before it has been activated.
*/
@@ -151,11 +142,6 @@
void ConstructL();
/**
- * Constructs the Alf Environment and display
- */
- void ConstructAlfEnvL();
-
- /**
* Initalise the resource
*
*/
@@ -177,8 +163,6 @@
MGlxMediaList& MediaList();
private:
-
- void Draw( const TRect& /*aRect*/ ) const;
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
/**
* SetTitleL
@@ -191,14 +175,23 @@
* Sets title of previous view
*/
void SetPreviousTitleL();
- /**
- * Find out the items nature to set the corresponding options
+
+ /**
+ * Sets the dialog toolbar visibility
+ * @param aVisible - ETrue for visible; EFalse otherwise.
*/
- void OnLocationEditL();
- void AddTagL();
- void AddAlbumL();
void SetDetailsDlgToolbarVisibility(TBool aVisible);
-
+
+public:
+ // from MGlxMetadataDialogObserver
+ /**
+ * Find out the items nature to set the corresponding options
+ */
+ void OnLocationEditL();
+ void AddTagL();
+ void AddAlbumL();
+ void HandleItemRemovedL();
+
public: // from MEikDialogPageObserver
/**
* @ref MEikDialogPageObserver::CreateCustomControlL
--- a/photosgallery/viewframework/views/metadatadialog/inc/mglxmetadatadialogobserver.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/inc/mglxmetadatadialogobserver.h Thu Aug 19 09:55:03 2010 +0300
@@ -34,6 +34,7 @@
virtual void OnLocationEditL() = 0;
virtual void AddTagL() = 0;
virtual void AddAlbumL() = 0;
+ virtual void HandleItemRemovedL() = 0;
};
#endif /*MGLXMETADATADIALOGOBSERVER_H_*/
--- a/photosgallery/viewframework/views/metadatadialog/src/glximgvwrmetadatacontainer.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/src/glximgvwrmetadatacontainer.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -1,68 +1,43 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-/*
- * glximgvwrmetadatacontainer.cpp
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
- * Created on: Oct 22, 2009
- * Author: sourbasu
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Image viewer metadata dialog implementation
*/
-
#include "glximgvwrmetadatacontainer.h"
#include "glxustringconverter.h" // converts the symbian types to UString type
-#include <AknUtils.h>
#include <StringLoader.h>
#include <glxmetadatadialog.rsg>
-#include <glxviewbase.rsg>
#include <glxlog.h>
#include <glxtracer.h>
#include <glxscreenfurniture.h>
#include <glxdetailsmulmodelprovider.h> //Details data provider
#include <glxdetailsboundcommand.hrh>
-#include <glxcommandhandleraddtocontainer.h> // For CGlxCommandHandlerAddToContainer
-#include <glxcommandhandlers.hrh> // for command handler id
-#include <glxcommandfactory.h> //for command factory
#include <mpxcommandgeneraldefs.h> // Content ID identifying general category of content provided
-
-#include <glxtextentrypopup.h>
-#include <glxcollectionpluginall.hrh>
-#include <glxuistd.h>
-#include <glxcollectionplugintags.hrh> // tag collection plugin uid
-#include <glxthumbnailattributeinfo.h> // KGlxMediaIdThumbnail
#include <glxattributeretriever.h> // CGlxAttributeReteiver
-#include <aknQueryControl.h>
#include <glxdrmutility.h> //For launching DRM details pane
-#include <glxgeneraluiutilities.h> // General utilties class definition
-#include <ExifModify.h>
-#include <glxuiutilities.rsg> //For CExifModify
+#include <glxuiutilities.rsg>
#include <mpxmediadrmdefs.h>
#include <glxfilterfactory.h>
-#include <glxcollectionpluginimageviewer.hrh>
-
-//marquee
+#include <glxcollectionpluginimageviewer.hrh>
+#include <eikfrlb.h> // For marquee
+#include <eikfrlbd.h> // For marquee
-#include <eikfrlb.h>
-#include <eikfrlbd.h>
-const TInt KMaxMediaPopupTitleLength = 0x100;
-const TInt KMediaListId = 0x2000D248;
-const TInt KMarqueeLoopCount = 3;
-const TInt KMarqueeScrollAmount = 20;
-const TInt KMarqueeScrollDelay = 1000000;
-const TInt KMarqueeScrollInterval = 200000;
+const TInt KMediaListId = 0x2000D248;
+const TInt KMarqueeLoopCount = 3;
+const TInt KMarqueeScrollAmount = 20;
+const TInt KMarqueeScrollDelay = 1000000;
+const TInt KMarqueeScrollInterval = 200000;
// ============================ MEMBER FUNCTIONS ===============================
@@ -70,10 +45,12 @@
// NewL
// ---------------------------------------------------------
//
-CGlxImgVwrMetadataContainer* CGlxImgVwrMetadataContainer::NewL( const TRect& aRect,const TDesC& item)
+CGlxImgVwrMetadataContainer* CGlxImgVwrMetadataContainer::NewL(
+ const TRect& aRect, const TDesC& item)
{
- TRACER("CGlxImgVwrMetadataContainer::NewL");
- CGlxImgVwrMetadataContainer* self = CGlxImgVwrMetadataContainer::NewLC( aRect,item);
+ TRACER("CGlxImgVwrMetadataContainer::NewL");
+ CGlxImgVwrMetadataContainer* self = CGlxImgVwrMetadataContainer::NewLC(
+ aRect, item);
CleanupStack::Pop(self);
return self;
}
@@ -82,12 +59,14 @@
// NewLC
// ---------------------------------------------------------
//
-CGlxImgVwrMetadataContainer* CGlxImgVwrMetadataContainer::NewLC( const TRect& aRect,const TDesC& aUri)
+CGlxImgVwrMetadataContainer* CGlxImgVwrMetadataContainer::NewLC(
+ const TRect& aRect, const TDesC& aUri)
{
- TRACER("CGlxImgVwrMetadataContainer::NewLC");
- CGlxImgVwrMetadataContainer* self = new(ELeave) CGlxImgVwrMetadataContainer(aUri);
+ TRACER("CGlxImgVwrMetadataContainer::NewLC");
+ CGlxImgVwrMetadataContainer* self =
+ new (ELeave) CGlxImgVwrMetadataContainer(aUri);
CleanupStack::PushL(self);
- self->ConstructL( aRect);
+ self->ConstructL(aRect);
return self;
}
@@ -95,18 +74,18 @@
// CGlxImgVwrMetadataContainer
// ---------------------------------------------------------
//
-CGlxImgVwrMetadataContainer::CGlxImgVwrMetadataContainer(const TDesC& aUri)
-:iUri(aUri)
- {
- // No implementation
- }
+CGlxImgVwrMetadataContainer::CGlxImgVwrMetadataContainer(
+ const TDesC& aUri) : iUri(aUri)
+ {
+ // No implementation
+ }
// ---------------------------------------------------------
// CGlxImgVwrMetadataContainer::ConstructL
// ---------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::ConstructL( const TRect& /*aRect*/ )
- {
+void CGlxImgVwrMetadataContainer::ConstructL(const TRect& /*aRect*/)
+ {
TRACER("CGlxMetadataContainer::ConstructLL()");
//Creating the RBuf texts for all the items except tags & albums
//which would be updated as whne the item is edited
@@ -121,19 +100,19 @@
CGlxImgVwrMetadataContainer::~CGlxImgVwrMetadataContainer()
{
TRACER("CGlxImgVwrMetadataContainer::~CGlxImgVwrMetadataContainer");
- if( iItemMediaList )
+ if (iItemMediaList)
{
iItemMediaList->RemoveContext(iMainListAttributecontext);
iItemMediaList->RemoveMediaListObserver(this);
iItemMediaList->Close();
- iItemMediaList = NULL;
- }
- if( iMainListAttributecontext )
+ iItemMediaList = NULL;
+ }
+ if (iMainListAttributecontext)
{
delete iMainListAttributecontext;
iMainListAttributecontext = NULL;
}
- if( IsVisible() )
+ if (IsVisible())
{
MakeVisible(EFalse);
}
@@ -147,43 +126,38 @@
{
TRACER("CGlxMetadataContainer::HandleAttributesAvailableL()");
//returns the active medialist.
- return *iItemMediaList;
+ return *iItemMediaList;
}
//-----------------------------------------------------------------------------
// CGlxImgVwrMetadataContainer::CreateSettingItemL
//-----------------------------------------------------------------------------
-CAknSettingItem* CGlxImgVwrMetadataContainer::CreateSettingItemL(TInt aResourceId)
+CAknSettingItem* CGlxImgVwrMetadataContainer::CreateSettingItemL(
+ TInt aResourceId)
{
- TRACER("CGlxImgVwrMetadataContainer::CreateSettingItemL");
+ TRACER("CGlxImgVwrMetadataContainer::CreateSettingItemL");
CAknSettingItem* settingItem = NULL; // No need to push onto cleanup stack
- iTextSetter.Zero();
+ iTextSetter.Zero();
//Creating a empty Settings list box which will be populated with metadata in handleattributeavailable
- switch(aResourceId)
+ switch (aResourceId)
{
case EImgVwrNameItem:
case EImgVwrDateAndTimeItem:
- case EImgVwrDescriptionItem:
- {
- settingItem = new (ELeave) CAknTextSettingItem(
- aResourceId, iTextSetter );
-
- break;
- }
- case EImgVwrSizeItem:
+ case EImgVwrMimeTypeItem:
+ case EImgVwrSizeItem:
case EImgVwrResolutionItem:
{
- settingItem = new (ELeave) CAknTextSettingItem(
- aResourceId, iTextSetter );
+ settingItem = new (ELeave) CAknTextSettingItem(aResourceId,
+ iTextSetter);
- break;
- }
+ break;
+ }
case EImgVwrlicenseItem:
{
- settingItem = new (ELeave) CAknTextSettingItem(
- aResourceId, iTextSetter );
+ settingItem = new (ELeave) CAknTextSettingItem(aResourceId,
+ iTextSetter);
//Hide the item until we get the attributes
//where in we check for the usage rights.
settingItem->SetHidden(ETrue);
@@ -194,57 +168,65 @@
default:
{
- break;
+ break;
}
}
return settingItem;
}
-//-----------------------------------------------------------------------------
-// CGlxImgVwrMetadataContainer::IsItemModifiable
-//-----------------------------------------------------------------------------
-TBool CGlxImgVwrMetadataContainer::IsItemModifiable()
- {
- TRACER("CGlxMetadataContainer::IsItemModifiable()");
- //Only items like name , description, tag and albums are modifiable
- //The check is for the items from ENameItem(0) tille ETagsItem(4)
- if(ListBox()->CurrentItemIndex()<=ETagsItem)
- {
- return EFalse;
- }
- //return ETrue to dim the item
- return ETrue;
-
- }
//-----------------------------------------------------------------------------
// CGlxImgVwrMetadataContainer::HandleListBoxEventL
//-----------------------------------------------------------------------------
-void CGlxImgVwrMetadataContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType)
+void CGlxImgVwrMetadataContainer::HandleListBoxEventL(
+ CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
{
- TRACER("CGlxMetadataContainer::HandleListBoxEventL()");
- GLX_LOG_INFO("CGlxImgVwrMetadataContainer::HandleListBoxEventL");
+ TRACER("CGlxImgVwrMetadataContainer::HandleListBoxEventL()");
if (aEventType == EEventItemSingleClicked)
{
- if(iItemMediaList->Count() == 0)
+ if (iItemMediaList->Count() == 0)
{
- GLX_LOG_INFO("CGlxImgVwrMetadataContainer:: NO Items");
+ GLX_LOG_INFO("CGlxImgVwrMetadataContainer:: NO Items");
return;
}
- TInt index = ListBox()->CurrentItemIndex() ;
- if(EImgVwrlicenseItem == index)
+ TInt index = ListBox()->CurrentItemIndex();
+ if (EImgVwrlicenseItem == index)
{
- GLX_LOG_INFO("CGlxImgVwrMetadataContainer::Licence item");
+ GLX_LOG_INFO("CGlxImgVwrMetadataContainer::Licence item");
CGlxDRMUtility* drmUtility = CGlxDRMUtility::InstanceL();
CleanupClosePushL(*drmUtility);
CreateImageViewerInstanceL();
- if(iImageViewerInstance->IsPrivate())
+ if (iImageViewerInstance->IsPrivate())
{
- drmUtility->ShowDRMDetailsPaneL(iImageViewerInstance->ImageFileHandle());
+ RFile64& fileHandle = iImageViewerInstance->ImageFileHandle();
+ // check if rights have expired
+ TBool expired = EFalse;
+ expired = !drmUtility->ItemRightsValidityCheckL(fileHandle,
+ ETrue);
+
+ if (expired)
+ {
+ drmUtility->ShowRightsInfoL(fileHandle);
+ }
+ else
+ {
+ drmUtility->ShowDRMDetailsPaneL(fileHandle);
+ }
}
else
{
- drmUtility->ShowDRMDetailsPaneL(iItemMediaList->Item(0).Uri());
+ const TDesC& uri = iItemMediaList->Item(0).Uri();
+ // check if rights have expired
+ TBool expired = EFalse;
+ expired = !drmUtility->ItemRightsValidityCheckL(uri, ETrue);
+
+ if (expired)
+ {
+ drmUtility->ShowRightsInfoL(uri);
+ }
+ else
+ {
+ drmUtility->ShowDRMDetailsPaneL(uri);
+ }
}
CleanupStack::PopAndDestroy(drmUtility);
DeleteImageViewerInstance();
@@ -252,139 +234,128 @@
}
}
-// ----------------------------------------------------------------------------
-// CGlxImgVwrMetadataContainer::ViewDynInitMenuPaneL
-// ----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataContainer::ViewDynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane)
- {
- TRACER("CGlxMetadataContainer::ViewDynInitMenuPaneL()");
- if( aMenuId == R_METADATA_MENU )
- {
- //Set dim the options based on the utem selected
- //Viewdetails option will be availble only for the license item
- aMenuPane->SetItemDimmed(KGlxViewBoundMenuCommandId,IsLicenseItem());
- }
- }
-
//Medialist callbacks.
// ----------------------------------------------------------------------------
// CGlxImgVwrMetadataContainer::HandleAttributesAvailableL
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleAttributesAvailableL( TInt /*aItemIndex*/,
- const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList )
+void CGlxImgVwrMetadataContainer::HandleAttributesAvailableL(
+ TInt /*aItemIndex*/, const RArray<TMPXAttribute>& aAttributes,
+ MGlxMediaList* aList)
{
TRACER("CGlxMetadataContainer::HandleAttributesAvailableL()");
//generic medialist for the item for all the attributes required other than tags and albums.
TInt x = aAttributes.Count();
- if(aList == iItemMediaList)
+ if (aList == iItemMediaList)
{
// Loop untill it checks for all the avialable attributes
- for (TInt i = aAttributes.Count() - 1; i >= 0 ; i--)
+ for (TInt i = aAttributes.Count() - 1; i >= 0; i--)
{
//set attributes to the items in the container
- SetAttributesL(aAttributes[i]);
+ SetAttributesL(aAttributes[i]);
}
}
-
}
// ----------------------------------------------------------------------------
// HandleItemAddedL
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleItemAddedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/,
- MGlxMediaList* aList )
+void CGlxImgVwrMetadataContainer::HandleItemAddedL(TInt /*aStartIndex*/,
+ TInt /*aEndIndex*/, MGlxMediaList* aList)
{
TRACER("CGlxMetadataContainer::HandleItemAddedL()");
- if(!iMarquee)
+ if (!iMarquee)
{
- EnableMarqueingL();
+ EnableMarqueingL();
}
- SetDurationLIicenseItemVisibilityL();
- if(aList == iItemMediaList)
+ SetLicenseItemVisibilityL();
+ if (aList == iItemMediaList)
{
- if(iItemMediaList->Count())
+ if (iItemMediaList->Count())
{
TGlxMedia item = iItemMediaList->Item(0);
- CGlxUStringConverter* stringConverter = CGlxUStringConverter::NewL();
- CleanupStack::PushL(stringConverter );
- for(TInt index = 0; index <= EImgVwrlicenseItem; index++)
+ CGlxUStringConverter* stringConverter =
+ CGlxUStringConverter::NewL();
+ CleanupStack::PushL(stringConverter);
+ for (TInt index = 0; index <= EImgVwrlicenseItem; index++)
{
- HBufC* string = NULL;
- iTextSetter.Zero();
+ HBufC* string = NULL;
+ iTextSetter.Zero();
- if(index == EImgVwrSizeItem)
+ if (index == EImgVwrSizeItem)
{
- stringConverter->AsStringL(item,
- KMPXMediaGeneralSize,0, string );
+ stringConverter->AsStringL(item, KMPXMediaGeneralSize, 0,
+ string);
}
- else if(index == EImgVwrNameItem)
+ else if (index == EImgVwrNameItem)
+ {
+ stringConverter->AsStringL(item, KMPXMediaGeneralTitle,
+ 0, string);
+ }
+ else if (index == EImgVwrDateAndTimeItem)
{
stringConverter->AsStringL(item,
- KMPXMediaGeneralTitle,0, string );
+ KGlxMediaGeneralLastModifiedDate,
+ R_QTN_DATE_USUAL_WITH_ZERO, string);
}
- else if(index == EImgVwrDateAndTimeItem)
- {
- stringConverter->AsStringL( item,
- KGlxMediaGeneralLastModifiedDate,
- R_QTN_DATE_USUAL_WITH_ZERO,string );
+ else if (index == EImgVwrMimeTypeItem)
+ {
+ stringConverter->AsStringL(item,
+ KMPXMediaGeneralMimeType, 0, string);
}
- else if(index == EImgVwrDescriptionItem)
+ else if (index == EImgVwrResolutionItem)
{
stringConverter->AsStringL(item,
- KMPXMediaGeneralComment,0, string );
+ KGlxMediaGeneralDimensions, 0, string);
}
- else if(index == EImgVwrResolutionItem)
+ else if (index == EImgVwrlicenseItem)
{
- stringConverter->AsStringL(item,
- KGlxMediaGeneralDimensions,0, string );
- }
- else if(index == EImgVwrlicenseItem)
- {
- // If an item is DRM protected, License field in details
- // should display "View Details"
- string = StringLoader::LoadL(R_GLX_METADATA_VIEW_OPTIONS_VIEW);
- }
- else
+ // If an item is DRM protected, License field in details
+ // should display "View Details"
+ string = StringLoader::LoadL(
+ R_GLX_METADATA_VIEW_OPTIONS_VIEW);
+ }
+ else
{
//no implementation
- }
- if(string)
+ }
+ if (string)
{
iTextSetter.Zero();
iTextSetter.Append(*string);
}
- CleanupStack::PushL( string );
- EditItemL(index,EFalse);
- CleanupStack::PopAndDestroy(string );
+ CleanupStack::PushL(string);
+ EditItemL(index, EFalse);
+ CleanupStack::PopAndDestroy(string);
}
- CleanupStack::PopAndDestroy(stringConverter );
- }
+ CleanupStack::PopAndDestroy(stringConverter);
+ }
}
-
+ }
- }
// ----------------------------------------------------------------------------
// EnableMarqueingL
// ----------------------------------------------------------------------------
//
void CGlxImgVwrMetadataContainer::EnableMarqueingL()
{
- TRACER("CGlxImgVwrMetadataContainer::EnableMarqueingL()");
+ TRACER("CGlxImgVwrMetadataContainer::EnableMarqueingL()");
iMarquee = ETrue;
ListBox()->UseLogicalToVisualConversion(ETrue);
- ListBox()->ItemDrawer()->ColumnData()->SetMarqueeParams (KMarqueeLoopCount,
- KMarqueeScrollAmount, KMarqueeScrollDelay, KMarqueeScrollInterval);
+ ListBox()->ItemDrawer()->ColumnData()->SetMarqueeParams(
+ KMarqueeLoopCount, KMarqueeScrollAmount, KMarqueeScrollDelay,
+ KMarqueeScrollInterval);
ListBox()->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
- }
+ }
+
// ----------------------------------------------------------------------------
// HandleCommandCompleteL
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleCommandCompleteL(TAny* /*aSessionId*/,
- CMPXCommand* /*aCommandResult*/, TInt /*aError*/, MGlxMediaList* /*aList*/)
+void CGlxImgVwrMetadataContainer::HandleCommandCompleteL(
+ TAny* /*aSessionId*/, CMPXCommand* /*aCommandResult*/,
+ TInt /*aError*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxImgVwrMetadataContainer::HandleCommandCompleteL()");
}
@@ -393,63 +364,58 @@
// HandleItemRemoved
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleItemRemovedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/,
- MGlxMediaList* /*aList*/ )
+void CGlxImgVwrMetadataContainer::HandleItemRemovedL(TInt /*aStartIndex*/,
+ TInt /*aEndIndex*/, MGlxMediaList* /*aList*/)
{
- TRACER("CGlxImgVwrMetadataContainer::HandleItemRemovedL()");
- }
+ TRACER("CGlxImgVwrMetadataContainer::HandleItemRemovedL()");
+ }
+
// ----------------------------------------------------------------------------
// HandleFocusChangedL
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleFocusChangedL( NGlxListDefs::
- TFocusChangeType /*aType*/, TInt /*aNewIndex*/, TInt /*aOldIndex*/,
- MGlxMediaList* /*aList*/ )
+void CGlxImgVwrMetadataContainer::HandleFocusChangedL(
+ NGlxListDefs::TFocusChangeType /*aType*/, TInt /*aNewIndex*/,
+ TInt /*aOldIndex*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxImgVwrMetadataContainer::HandleFocusChangedL()");
}
+
// ----------------------------------------------------------------------------
// HandleItemSelected
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleItemSelectedL(TInt /*aIndex*/,
- TBool /*aSelected*/, MGlxMediaList* /*aList*/ )
+void CGlxImgVwrMetadataContainer::HandleItemSelectedL(TInt /*aIndex*/,
+ TBool /*aSelected*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxImgVwrMetadataContainer::HandleItemSelectedL");
}
+
// ----------------------------------------------------------------------------
// HandleMessageL
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleMessageL( const CMPXMessage& /*aMessage*/,
- MGlxMediaList* /*aList*/ )
+void CGlxImgVwrMetadataContainer::HandleMessageL(
+ const CMPXMessage& /*aMessage*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxImgVwrMetadataContainer::HandleMessageL()");
}
+
// ----------------------------------------------------------------------------
// HandleError
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleError( TInt /*aError*/ )
+void CGlxImgVwrMetadataContainer::HandleError(TInt /*aError*/)
{
TRACER("CGlxImgVwrMetadataContainer::HandleError()");
- TRAP_IGNORE(HandleErrorL());
}
// ----------------------------------------------------------------------------
-// HandleErrorL
-// ----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataContainer::HandleErrorL()
- {
- TRACER("CGlxImgVwrMetadataContainer::HandleErrorL()");
- }
-// ----------------------------------------------------------------------------
// HandleCommandCompleteL
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleCommandCompleteL( CMPXCommand* /*aCommandResult*/,
- TInt /*aError*/, MGlxMediaList* /*aList*/ )
+void CGlxImgVwrMetadataContainer::HandleCommandCompleteL(
+ CMPXCommand* /*aCommandResult*/, TInt /*aError*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxImgVwrMetadataContainer::HandleCommandCompleteL()");
}
@@ -458,7 +424,8 @@
// HandleMediaL
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleMediaL( TInt /*aListIndex*/, MGlxMediaList* /*aList*/ )
+void CGlxImgVwrMetadataContainer::HandleMediaL(TInt /*aListIndex*/,
+ MGlxMediaList* /*aList*/)
{
TRACER("CGlxImgVwrMetadataContainer::HandleMediaL()");
}
@@ -467,48 +434,40 @@
// HandleItemModifiedL
// ----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataContainer::HandleItemModifiedL( const RArray<TInt>& /*aItemIndexes*/,
- MGlxMediaList* /*aList*/ )
+void CGlxImgVwrMetadataContainer::HandleItemModifiedL(
+ const RArray<TInt>& /*aItemIndexes*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxImgVwrMetadataContainer::HandleItemModifiedL()");
}
+
// ----------------------------------------------------------------------------
// ChangeMskL
-// ----------------------------------------------------------------------------
-//
+// ----------------------------------------------------------------------------
void CGlxImgVwrMetadataContainer::ChangeMskL()
{
- TRACER("CGlxImgVwrMetadataContainer::ChangeMsk()");
- TInt index = ListBox()->CurrentItemIndex();
- CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
- switch(index)
+ TRACER("CGlxImgVwrMetadataContainer::ChangeMskL()");
+ CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+ CleanupClosePushL(*uiUtility);
+ switch (ListBox()->CurrentItemIndex())
{
- case EImgVwrNameItem:
- case EImgVwrDescriptionItem:
- {
- uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
- EAknSoftkeyEdit,R_GLX_METADATA_MSK_EDIT);
- }
- break;
+ case EImgVwrNameItem:
+ case EImgVwrMimeTypeItem:
case EImgVwrDateAndTimeItem:
case EImgVwrSizeItem:
case EImgVwrResolutionItem:
case EImgVwrlicenseItem:
{
- uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
- EAknSoftkeyEdit,R_GLX_METADATA_MSK_BLANK);
- }
+ uiUtility->ScreenFurniture()->ModifySoftkeyIdL(
+ CEikButtonGroupContainer::EMiddleSoftkeyPosition,
+ EAknSoftkeyEdit, R_GLX_METADATA_MSK_BLANK);
+ }
break;
default:
{
- break;
+ break;
}
}
-
- if ( uiUtility )
- {
- uiUtility->Close();
- }
+ CleanupStack::PopAndDestroy(uiUtility);
}
//-----------------------------------------------------------------------------
@@ -520,103 +479,105 @@
//create the collection path for the medialist to be created
CMPXCollectionPath* path = CMPXCollectionPath::NewL();
- CleanupStack::PushL( path );
- //set the all collection path as the details dialog can be launched from any of the grid views and filter with URI
- path->AppendL(/*KGlxCollectionPluginAllImplementationUid*/KGlxCollectionPluginImageViewerImplementationUid);
+ CleanupStack::PushL(path);
+ // Set the Image viewer collection path as the details dialog
+ // can be launched from private or user data path
+ path->AppendL(KGlxCollectionPluginImageViewerImplementationUid);
//create the filter with the URI
- CMPXFilter* filter = TGlxFilterFactory::CreateURIFilterL(iUri);
- CleanupStack::PushL( filter );
+ CMPXFilter* filter = TGlxFilterFactory::CreateURIFilterL(iUri);
+ CleanupStack::PushL(filter);
//create the medialist
- iItemMediaList = MGlxMediaList::InstanceL(*path,TGlxHierarchyId(KMediaListId),filter);
+ iItemMediaList = MGlxMediaList::InstanceL(*path, TGlxHierarchyId(
+ KMediaListId), filter);
//Add the attributes which are required to be displayed.
- iMainListAttributecontext = new (ELeave) CGlxAttributeContext(&iSelectionIterator);
+ iMainListAttributecontext = new (ELeave) CGlxAttributeContext(
+ &iSelectionIterator);
iMainListAttributecontext->AddAttributeL(KMPXMediaDrmProtected);
iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralSize);
- iMainListAttributecontext->AddAttributeL(KGlxMediaGeneralDimensions);
+ iMainListAttributecontext->AddAttributeL(KGlxMediaGeneralDimensions);
iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralTitle);
iMainListAttributecontext->AddAttributeL(KGlxMediaGeneralLastModifiedDate);
- iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralComment);
+ iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralMimeType);
//Add Context so that we get the handleattributes call once the medialist is populated with above mentioned attributes.
- iItemMediaList->AddContextL( iMainListAttributecontext,
- KGlxFetchContextPriorityBlocking );
+ iItemMediaList->AddContextL(iMainListAttributecontext,
+ KGlxFetchContextPriorityBlocking);
//add to observer for callbacks.
iItemMediaList->AddMediaListObserverL(this);
- CleanupStack::PopAndDestroy( filter );
- CleanupStack::PopAndDestroy( path );
+ CleanupStack::PopAndDestroy(filter);
+ CleanupStack::PopAndDestroy(path);
}
+
// ----------------------------------------------------------------------------
-// CGlxImgVwrMetadataContainer::SetAttributes
+// CGlxImgVwrMetadataContainer::SetAttributesL
// ----------------------------------------------------------------------------
//
void CGlxImgVwrMetadataContainer::SetAttributesL(TMPXAttribute attribute)
{
- TRACER("CGlxImgVwrMetadataContainer::SetAttributesL");
+ TRACER("CGlxImgVwrMetadataContainer::SetAttributesL");
- if(!iSetVisible)
+ if (!iSetVisible)
{
iSetVisible = ETrue;
- SetDurationLIicenseItemVisibilityL();
+ SetLicenseItemVisibilityL();
}
TGlxMedia item = iItemMediaList->Item(0);
//Create the string convertor instance
//String convertor class with provide the specific format for date,location and duration and size.
CGlxUStringConverter* stringConverter = CGlxUStringConverter::NewL();
- CleanupStack::PushL(stringConverter );
- HBufC* string = NULL;
+ CleanupStack::PushL(stringConverter);
+ HBufC* string = NULL;
//if attribute is date and time we need to pass the format it as R_QTN_DATE_USUAL_WITH_ZERO else null
- if(attribute == KGlxMediaGeneralLastModifiedDate)
+ if (attribute == KGlxMediaGeneralLastModifiedDate)
{
- stringConverter->AsStringL(item,
- attribute,
- R_QTN_DATE_USUAL_WITH_ZERO, string );
- }
+ stringConverter->AsStringL(item, attribute,
+ R_QTN_DATE_USUAL_WITH_ZERO, string);
+ }
else
{
- stringConverter->AsStringL(item,
- attribute,0, string );
+ stringConverter->AsStringL(item, attribute, 0, string);
}
//get the settings item based on the attribute and set the text.
- if ( string )
+ if (string)
{
iTextSetter.Zero();
iTextSetter.Append(*string);
- if(attribute == KMPXMediaGeneralSize)
+ if (attribute == KMPXMediaGeneralSize)
{
- EditItemL(EImgVwrSizeItem,EFalse);
- }
- else if(attribute == KMPXMediaGeneralTitle)
+ EditItemL(EImgVwrSizeItem, EFalse);
+ }
+ else if (attribute == KMPXMediaGeneralTitle)
{
- EditItemL(EImgVwrNameItem,EFalse);
+ EditItemL(EImgVwrNameItem, EFalse);
}
- else if(attribute == KGlxMediaGeneralLastModifiedDate)
- {
- EditItemL(EImgVwrDateAndTimeItem,EFalse);
+ else if (attribute == KGlxMediaGeneralLastModifiedDate)
+ {
+ EditItemL(EImgVwrDateAndTimeItem, EFalse);
}
- else if(attribute == KMPXMediaGeneralComment)
+ else if (attribute == KMPXMediaGeneralMimeType)
{
- EditItemL(EImgVwrDescriptionItem,EFalse);
+ EditItemL(EImgVwrMimeTypeItem, EFalse);
}
- else if(attribute == KGlxMediaGeneralDimensions)
+ else if (attribute == KGlxMediaGeneralDimensions)
{
- EditItemL(EImgVwrResolutionItem,EFalse);
- }/*
+ EditItemL(EImgVwrResolutionItem, EFalse);
+ }
else if(attribute == KMPXMediaDrmProtected)
{
- EditItemL(EImgVwrlicenseItem,EFalse);
- }*/
+ EditItemL(EImgVwrlicenseItem, EFalse);
+ }
else
{
-
- }
+ //no implementation
+ }
delete string;
string = NULL;
}
- CleanupStack::PopAndDestroy(stringConverter );
+ CleanupStack::PopAndDestroy(stringConverter);
}
// ----------------------------------------------------------------------------
@@ -625,7 +586,7 @@
//
void CGlxImgVwrMetadataContainer::EditItemL(TInt aIndex, TBool /*aCalledFromMenu*/)
{
- TRACER("CGlxImgVwrMetadataContainer::EditItemL");
+ TRACER("CGlxImgVwrMetadataContainer::EditItemL");
CAknSettingItem* settingsitem = NULL;
settingsitem = (*SettingItemArray())[aIndex];
settingsitem->LoadL();
@@ -634,116 +595,30 @@
ListBox()->DrawNow();
}
-
-
-// ----------------------------------------------------------------------------
-// CGlxMetadataContainer::SetAttributes
// ----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataContainer::SetNameDescriptionL(TInt aItem)
- {
- TRACER("CGlxImgVwrMetadataContainer::SetNameDescriptionL");
- //This function is commn for updatng both name and description once modified
- //get the item handle to be modified
- CAknSettingItem* settingsitem = (*SettingItemArray())[aItem];
- HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTitleLength );
- (textBuf->Des()).Copy((settingsitem->SettingTextL()));
- TPtr textPtr = textBuf->Des();
- TBuf<KMaxMediaPopupTitleLength> titleText(*textBuf);
- HBufC *buf = NULL;
- if(aItem == ENameItem)
- {
- buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_TITLE_NSERIES);
- }
- else
- {
- buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_DESCRIPTION_NSERIES);
- }
-
- //Launch the text entry editor.
- CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr );
- CleanupStack::PopAndDestroy(buf);
- if(aItem == EImgVwrDescriptionItem)
- {
- popup->SetLeftSoftKeyL(ETrue);
- }
-
- //action upon selecting ok from the editor
- if ( popup->ExecuteLD() == EEikBidOk )
+// CGlxImgVwrMetadataContainer::SetLicenseItemVisibilityL()
+// ----------------------------------------------------------------------------
+void CGlxImgVwrMetadataContainer::SetLicenseItemVisibilityL()
{
- if(0 != (titleText.Compare(*textBuf)))
- {
- //Modify the MDS and setting list only if the entry is different from previous Item value
- iTextSetter.Zero();
- iTextSetter.Copy(*textBuf);
- EditItemL(aItem,EFalse);
- if( iItemMediaList->Count() > 0 )
- {
- iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item
- CMPXCollectionPath* path = iItemMediaList->PathLC();
- CMPXCommand* command = NULL;
- //Create the glx command based on the item
- if(aItem == ENameItem)
- {
- command = TGlxCommandFactory::RenameCommandLC(settingsitem->SettingTextL(),
- *path);
- }
- else
- {
- command = TGlxCommandFactory::SetDescriptionCommandLC(settingsitem->SettingTextL(),
- *path);
- }
- command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, static_cast<TAny*>(this));
- //issue command to the medialist which further calls data source to update MDS
- iItemMediaList->CommandL(*command);
- CleanupStack::PopAndDestroy(command);
- CleanupStack::PopAndDestroy(path);
- }
- }
- }
- CleanupStack::PopAndDestroy( textBuf );
-
- }
-// ----------------------------------------------------------------------------
-// CGlxImgVwrMetadataContainer::SetDurationLIicenseItemVisibilityL()
-// ----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataContainer::SetDurationLIicenseItemVisibilityL()
- {
- TRACER("CGlxMetadataContainer::SetDurationLIicenseItemVisibilityL()");
+ TRACER("CGlxMetadataContainer::SetLicenseItemVisibilityL()");
//get the media item.
const TGlxMedia& item = iItemMediaList->Item(0);
const CGlxMedia* media = item.Properties();
- //in order to check for video category and drm rights
-
- CAknSettingItem* hiddenItem = NULL;
-
- if( media && media->IsSupported(KMPXMediaDrmProtected))
+ // Check for DRM protection
+ if (media && media->IsSupported(KMPXMediaDrmProtected))
{
- if(item.IsDrmProtected())
- {
- hiddenItem = (*SettingItemArray())[EImgVwrlicenseItem];
- //Set the License item visible
- hiddenItem->SetHidden(EFalse);
- //Required to refresh the listbox when any items visiblity is changed
- this->HandleChangeInItemArrayOrVisibilityL();
- }
+ if (item.IsDrmProtected())
+ {
+ CAknSettingItem* hiddenItem =
+ (*SettingItemArray())[EImgVwrlicenseItem];
+ //Set the License item visible
+ hiddenItem->SetHidden(EFalse);
+ //Refresh the listbox when any items visiblity is changed
+ this->HandleChangeInItemArrayOrVisibilityL();
+ }
}
}
-//-----------------------------------------------------------------------------
-// CGlxImgVwrMetadataContainer::IsLicenseItem
-//-----------------------------------------------------------------------------
-TBool CGlxImgVwrMetadataContainer::IsLicenseItem()
- {
- TRACER("CGlxMetadataContainer::IsLicenseItem()");
- //Checks the item for DRMProtection.
- if((ListBox()->CurrentItemIndex()== EImgVwrlicenseItem))
- {
- return EFalse;
- }
- return ETrue;
- }
// -----------------------------------------------------------------------------
// CreateImageViewerInstanceL
@@ -752,7 +627,7 @@
void CGlxImgVwrMetadataContainer::CreateImageViewerInstanceL()
{
TRACER("CGlxImgVwrMetadataContainer::CreateImageViewerInstanceL");
- iImageViewerInstance = CGlxImageViewerManager::InstanceL();
+ iImageViewerInstance = CGlxImageViewerManager::InstanceL();
__ASSERT_ALWAYS(iImageViewerInstance, Panic(EGlxPanicNullPointer));
}
@@ -763,11 +638,10 @@
void CGlxImgVwrMetadataContainer::DeleteImageViewerInstance()
{
TRACER("CGlxImgVwrMetadataContainer::DeleteImageViewerInstance");
- if ( iImageViewerInstance )
+ if (iImageViewerInstance)
{
iImageViewerInstance->DeleteInstance();
}
}
-
//End of file
--- a/photosgallery/viewframework/views/metadatadialog/src/glximgvwrmetadatadialog.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/src/glximgvwrmetadatadialog.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -20,31 +20,18 @@
//system includes
#include <AknUtils.h> //for AknUtils
-#include <lbsposition.h>
#include <akntitle.h>
-#include <coeaui.h>
#include <data_caging_path_literals.hrh>// KDC_APP_RESOURCE_DIR
-#include <eikmenub.h> // for CEikMenuBar
#include <StringLoader.h>
#include <akntoolbar.h>
-#include <glxcommandhandleraddtocontainer.h> // For CGlxCommandHandlerAddToContainer
//User includes
#include <glxmetadatadialog.rsg>
#include <glxresourceutilities.h>
#include <glxlog.h>
#include <glxtracer.h>
-#include <glxcollectionpluginall.hrh>
-#include <glxfilterfactory.h> // for TGlxFilterFactory
-#include <glxuiutility.h>
#include <glxcommandhandlers.hrh>
-#include <hlplch.h> // for HlpLauncher
-#include <photos.hlp.hrh>
-#include <glxgallery.hrh>
#include <glxdetailsboundcommand.hrh>
-#include <glxscreenfurniture.h>
-#include <glxuiutilities.rsg>
-#include <glxpanic.h> // For Panics
#include "glxmetadatacommandhandler.h"
// ============================ MEMBER FUNCTIONS ===============================
@@ -64,10 +51,14 @@
return self;
}
+// -----------------------------------------------------------------------------
+// CGlxImgVwrMetadataDialog
+// -----------------------------------------------------------------------------
+//
CGlxImgVwrMetadataDialog::CGlxImgVwrMetadataDialog(const TDesC& aUri):iUri(aUri)
{
+ }
- }
// -----------------------------------------------------------------------------
// ConstructL
// -----------------------------------------------------------------------------
@@ -93,13 +84,11 @@
iStatusPaneAvailable = ETrue;
}
- // make the toolbar disabled
- SetDetailsDlgToolbarVisibility(EFalse);
-
// do we have status pane
if( statusPane )
{
- GLX_LOG_INFO1("GLX_UMP::CGlxImgVwrMetadataDialog::ConstructL::STATUS PANE = %d",statusPane->IsVisible());
+ GLX_LOG_INFO1("GLX_UMP::CGlxImgVwrMetadataDialog::ConstructL::STATUS PANE = %d",
+ statusPane->IsVisible());
// load the title text
HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS, iEikonEnv );
SetTitleL( *text );
@@ -109,9 +98,6 @@
}
iAvkonAppUi->StatusPane()->MakeVisible(ETrue);
}
-
- iUiUtility = CGlxUiUtility::UtilityL();
-
}
// -----------------------------------------------------------------------------
@@ -120,10 +106,8 @@
//
CGlxImgVwrMetadataDialog::~CGlxImgVwrMetadataDialog()
{
-
TRACER("CGlxImgVwrMetadataDialog::~CGlxImgVwrMetadataDialog");
-
//To Disable the status pane if the dialog is launched from fullscreenview
if (!iStatusPaneAvailable && iAvkonAppUi)
{
@@ -143,11 +127,6 @@
TRAP_IGNORE(iAvkonAppUi->ProcessCommandL(EGlxCmdResetView));
}
- if( iUiUtility )
- {
- iUiUtility->Close();
- }
-
if (iResourceOffset)
{
CCoeEnv::Static()->DeleteResourceFile(iResourceOffset);
@@ -179,56 +158,41 @@
TRACER("CGlxImgVwrMetadataDialog::ExecuteLD");
return CAknDialog::ExecuteLD( R_IMG_VIEWER_METADATA_DIALOG );
}
+
// -----------------------------------------------------------------------------
// ProcessCommandL
// -----------------------------------------------------------------------------
//
-void CGlxImgVwrMetadataDialog::ProcessCommandL( TInt aCommandId )
+void CGlxImgVwrMetadataDialog::ProcessCommandL(TInt /*aCommandId*/)
{
TRACER("CGlxImgVwrMetadataDialog::ProcessCommandL");
// hide menu bar
iMenuBar->StopDisplayingMenuBar();
}
+
//-----------------------------------------------------------------------------
// CGlxImgVwrMetadataDialog::CreateCustomControlL
//-----------------------------------------------------------------------------
SEikControlInfo CGlxImgVwrMetadataDialog::CreateCustomControlL(TInt
aControlType)
{
- GLX_LOG_INFO("CShwSlideshowSettingsDialog::CreateCustomControlL");
+ GLX_LOG_INFO("CGlxImgVwrMetadataDialog::CreateCustomControlL");
// create control info, no flags or trailer text set
SEikControlInfo controlInfo;
- controlInfo.iControl = NULL;
- controlInfo.iTrailerTextId = 0;
- controlInfo.iFlags = 0;
+ controlInfo.iControl = NULL;
+ controlInfo.iTrailerTextId = 0;
+ controlInfo.iFlags = 0;
if (aControlType == EMetaDataDialogListBox)
{
- iContainer = CGlxImgVwrMetadataContainer::NewL(iAvkonAppUi->ClientRect(),iUri);
+ iContainer = CGlxImgVwrMetadataContainer::NewL(
+ iAvkonAppUi->ClientRect(), iUri);
controlInfo.iControl = iContainer; // giving ownership
}
return controlInfo; // returns ownership of ItemList
}
// -----------------------------------------------------------------------------
-// CGlxImgVwrMetadataDialog::DynInitMenuPaneL
-// -----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataDialog::DynInitMenuPaneL(TInt /*aMenuId*/,
- CEikMenuPane* /*aMenuPane*/)
- {
- //no implementation
- }
-
-//-----------------------------------------------------------------------------
-// CGlxImgVwrMetadataDialog::SizeChanged
-//-----------------------------------------------------------------------------
-void CGlxImgVwrMetadataDialog::SizeChanged()
- {
- TRACER("CGlxImgVwrMetadataDialog::SizeChanged");
- CAknDialog::SizeChanged();
- }
-// -----------------------------------------------------------------------------
// CGlxImgVwrMetadataDialog::InitResourceL
// -----------------------------------------------------------------------------
//
@@ -246,65 +210,12 @@
iResourceOffset = CCoeEnv::Static()->AddResourceFileL(resourceFile);
}
-
-// -----------------------------------------------------------------------------
-// CGlxImgVwrMetadataDialog::HandleViewCommandL
-// -----------------------------------------------------------------------------
-//
-TBool CGlxImgVwrMetadataDialog::HandleViewCommandL( TInt /*aCommand*/ )
- {
- TRACER("CGlxImgVwrMetadataDialog::HandleViewCommandL");
- return EFalse;
- }
-// ---------------------------------------------------------------------------
-// CGlxImgVwrMetadataDialog::PreLayoutDynInitL
-// ---------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataDialog::PreLayoutDynInitL()
- {
- // No Implementation
- }
-
-//-----------------------------------------------------------------------------
-// CGlxImgVwrMetadataDialog::PostLayoutDynInitL
-//-----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataDialog::PostLayoutDynInitL()
- {}
-
-//-----------------------------------------------------------------------------
-// CGlxImgVwrMetadataDialog::Draw
-//-----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataDialog::Draw( const TRect& /*aRect*/ ) const
-{
-TRACER("CGlxImgVwrMetadataDialog::Draw");
-TRect rect;
-AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
-
-// Get the standard graphics context
-CWindowGc& gc = SystemGc();
-gc.SetBrushColor(KRgbWhite);
-gc.DrawRect(rect);
-}
-
-//-----------------------------------------------------------------------------
-// CGlxImgVwrMetadataDialog::HandlePointerEventL
-//-----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataDialog::HandlePointerEventL(
- const TPointerEvent& aPointerEvent)
- {
- TRACER("CGlxImgVwrMetadataDialog::HandlePointerEventL");
- CCoeControl::HandlePointerEventL( aPointerEvent );
- }
-
// ---------------------------------------------------------------------------
// CGlxImgVwrMetadataDialog::SetTitleL()
// ---------------------------------------------------------------------------
void CGlxImgVwrMetadataDialog::SetTitleL(const TDesC& aTitleText)
{
- TRACER("CGlxFetcherContainer::SetTitleL");
+ TRACER("CGlxImgVwrMetadataDialog::SetTitleL");
CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
CleanupStack::PushL(statusPane);
// get pointer to the default title pane control
@@ -328,7 +239,7 @@
// ---------------------------------------------------------------------------
void CGlxImgVwrMetadataDialog::SetPreviousTitleL()
{
- TRACER("CGlxFetcherContainer::SetPreviousTitleL");
+ TRACER("CGlxImgVwrMetadataDialog::SetPreviousTitleL");
CEikStatusPane* prevStatusPane = iEikonEnv->AppUiFactory()->StatusPane();
CleanupStack::PushL(prevStatusPane);
CAknTitlePane* prevTitlePane = ( CAknTitlePane* )prevStatusPane->ControlL(
@@ -342,16 +253,7 @@
CleanupStack::Pop(prevTitlePane);
CleanupStack::Pop(prevStatusPane);
}
-// -----------------------------------------------------------------------------
-// CGlxImgVwrMetadataDialog::HandleResourceChange
-// -----------------------------------------------------------------------------
-//
-void CGlxImgVwrMetadataDialog::HandleResourceChange( TInt aType )
- {
- TRACER("CGlxImgVwrMetadataDialog::HandleResourceChange");
- //Handle global resource changes, such as scalable UI or skin events and orientation change (override)
- CAknDialog::HandleResourceChange( aType );
- }
+
// -----------------------------------------------------------------------------
// CGlxImgVwrMetadataDialog::HandleToolbarResetting
// -----------------------------------------------------------------------------
--- a/photosgallery/viewframework/views/metadatadialog/src/glxmetadatacontainer.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/src/glxmetadatacontainer.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -17,47 +17,41 @@
#include "glxmetadatacontainer.h"
#include "glxustringconverter.h" // converts the symbian types to UString type
-#include <AknUtils.h>
+#include "mglxmetadatadialogobserver.h"
+
#include <StringLoader.h>
+#include <caf/manager.h> // For Filesystem
+#include <ExifModify.h> // For CExifModify
+#include <mpxcommandgeneraldefs.h> // Content ID identifying general category of content provided
+#include <mpxmediadrmdefs.h>
+#include <eikfrlb.h> // For marquee
+#include <eikfrlbd.h> // For marquee
+
#include <glxmetadatadialog.rsg>
-#include <glxviewbase.rsg>
-#include <glxlog.h>
-#include <glxtracer.h>
#include <glxscreenfurniture.h>
-#include <glxdetailsmulmodelprovider.h> //Details data provider
#include <glxdetailsboundcommand.hrh>
#include <glxcommandhandleraddtocontainer.h> // For CGlxCommandHandlerAddToContainer
#include <glxcommandhandlers.hrh> // for command handler id
-#include <glxcommandfactory.h> //for command factory
-#include <mpxcommandgeneraldefs.h> // Content ID identifying general category of content provided
-#include "mglxmetadatadialogobserver.h"
+#include <glxcommandfactory.h> // for command factory
#include <glxtextentrypopup.h>
-#include <glxcollectionpluginall.hrh>
#include <glxuistd.h>
#include <glxcollectionplugintags.hrh> // tag collection plugin uid
-#include <glxthumbnailattributeinfo.h> // KGlxMediaIdThumbnail
#include <glxattributeretriever.h> // CGlxAttributeReteiver
-#include <aknQueryControl.h>
-#include <glxdrmutility.h> //For launching DRM details pane
+#include <glxdrmutility.h> // For launching DRM details pane
#include <glxgeneraluiutilities.h> // General utilties class definition
-#include <ExifModify.h>
-#include <glxuiutilities.rsg> //For CExifModify
-#include <mpxmediadrmdefs.h>
+#include <glxuiutilities.rsg>
#include <glxfilterfactory.h>
-#include <caf/manager.h> //For Filesystem
+#include <glxlog.h>
+#include <glxtracer.h>
+#include <glxgeneraluiutilities.h>
-//marquee
-
-#include <eikfrlb.h>
-#include <eikfrlbd.h>
-const TInt KMaxMediaPopupTitleLength = 0x100;
const TInt KMediaListId = 0x2000D248;
const TInt KOffsets = 50;
const TInt KMarqueeLoopCount = 3;
const TInt KMarqueeScrollAmount = 20;
const TInt KMarqueeScrollDelay = 1000000;
const TInt KMarqueeScrollInterval = 200000;
-_LIT( KGlxTextSetter, "");
+
_LIT( KGlxComma, ",");
// ============================ MEMBER FUNCTIONS ===============================
@@ -66,39 +60,41 @@
// NewL
// ---------------------------------------------------------
//
-CGlxMetadataContainer* CGlxMetadataContainer::NewL( const TRect& aRect,
- MGlxMetadataDialogObserver& aDialogObserver,
- const TDesC& item,MToolbarResetObserver& aResetToolbarObs)
- {
- TRACER("CGlxMetadataContainer::NewL");
- CGlxMetadataContainer* self = CGlxMetadataContainer::NewLC( aRect,
- aDialogObserver,item,aResetToolbarObs);
- CleanupStack::Pop(self);
- return self;
- }
+CGlxMetadataContainer* CGlxMetadataContainer::NewL(const TRect& aRect,
+ MGlxMetadataDialogObserver& aDialogObserver, const TDesC& item,
+ MToolbarResetObserver& aResetToolbarObs)
+ {
+ TRACER("CGlxMetadataContainer::NewL");
+ CGlxMetadataContainer* self = CGlxMetadataContainer::NewLC(aRect,
+ aDialogObserver, item, aResetToolbarObs);
+ CleanupStack::Pop(self);
+ return self;
+ }
// ---------------------------------------------------------
// NewLC
// ---------------------------------------------------------
//
-CGlxMetadataContainer* CGlxMetadataContainer::NewLC( const TRect& aRect,
- MGlxMetadataDialogObserver& aDialogObserver,
- const TDesC& aUri,MToolbarResetObserver& aResetToolbarObs)
- {
- TRACER("CGlxMetadataContainer::NewLC");
- CGlxMetadataContainer* self = new(ELeave) CGlxMetadataContainer(aDialogObserver, aResetToolbarObs);
- CleanupStack::PushL(self);
- self->ConstructL( aRect, aUri);
- return self;
- }
+CGlxMetadataContainer* CGlxMetadataContainer::NewLC(const TRect& aRect,
+ MGlxMetadataDialogObserver& aDialogObserver, const TDesC& aUri,
+ MToolbarResetObserver& aResetToolbarObs)
+ {
+ TRACER("CGlxMetadataContainer::NewLC");
+ CGlxMetadataContainer* self = new (ELeave) CGlxMetadataContainer(
+ aDialogObserver, aResetToolbarObs);
+ CleanupStack::PushL(self);
+ self->ConstructL(aRect, aUri);
+ return self;
+ }
// ---------------------------------------------------------
// CGlxMetadataContainer
// ---------------------------------------------------------
//
-CGlxMetadataContainer::CGlxMetadataContainer(MGlxMetadataDialogObserver& aDialogObserver,
- MToolbarResetObserver& aResetToolbarObs)
- :iDialogObesrver ( aDialogObserver ),iResetToolbarObs(aResetToolbarObs)
+CGlxMetadataContainer::CGlxMetadataContainer(
+ MGlxMetadataDialogObserver& aDialogObserver,
+ MToolbarResetObserver& aResetToolbarObs) :
+ iDialogObesrver(aDialogObserver), iResetToolbarObs(aResetToolbarObs)
{
// No implementation
}
@@ -107,38 +103,39 @@
// CGlxMetadataContainer::ConstructL
// ---------------------------------------------------------
//
-void CGlxMetadataContainer::ConstructL( const TRect& /*aRect*/ , const TDesC& aUri)
- {
+void CGlxMetadataContainer::ConstructL(const TRect& /*aRect*/,
+ const TDesC& aUri)
+ {
+ TRACER("CGlxMetadataContainer::ConstructL");
- //media's uri
- iUri = aUri.AllocL();
+ //media's uri
+ iUri = aUri.AllocL();
- //Creating the RBuf texts for all the items except tags & albums
- //which would be updated as whne the item is edited
- iTextSetter.CreateL(KMaxFileName);
+ //Creating the RBuf texts for all the items except tags & albums
+ //which would be updated as whne the item is edited
+ iTextSetter.CreateL(KMaxFileName);
- //RBuf text which would be updated as when a tag is edited for the item.
- iTagSetter.CreateL(KMaxFileName);
+ //RBuf text which would be updated as when a tag is edited for the item.
+ iTagSetter.CreateL(KMaxFileName);
- //RBuf text which would be updated as when a album is edited for the item.
- iAlbumSetter.CreateL(KMaxFileName);
+ //RBuf text which would be updated as when a album is edited for the item.
+ iAlbumSetter.CreateL(KMaxFileName);
- //Create medialist filtered by uri - iUri
- CreateMediaListForSelectedItemL();
+ //Create medialist filtered by uri - iUri
+ CreateMediaListForSelectedItemL();
- //Setting the iVideo flag to EFalse initially
- iVideo = EFalse;
+ //Setting the iVideo flag to EFalse initially
+ iVideo = EFalse;
- //Setting the iMarquee flag to EFalse initially
+ //Setting the iMarquee flag to EFalse initially
iMarquee = EFalse;
//check when Remove location information is selected.
iLocationinfo = EFalse;
- //Flag to indicate rename command is started
- iRenameStarted = EFalse;
-
- }
+ //Flag to indicate rename command is started
+ iRenameStarted = EFalse;
+ }
// ---------------------------------------------------------
// ~CGlxMetadataContainer
@@ -214,69 +211,69 @@
{
TRACER("CGlxMetadataContainer::CreateSettingItemL");
CAknSettingItem* settingItem = NULL; // No need to push onto cleanup stack
- iTextSetter.Zero();
+ iTextSetter.Zero();
- //Creating a empty Settings list box which will be populated with metadata in handleattributeavailable
-
- switch(aResourceId)
+ // Creating a empty Settings list box which will be populated
+ // with metadata in handleattributeavailable
+ switch (aResourceId)
{
case ENameItem:
case EDateAndTimeItem:
case EDescriptionItem:
{
- settingItem = new (ELeave) CAknTextSettingItem(
- aResourceId, iTextSetter );
+ settingItem = new (ELeave) CAknTextSettingItem(aResourceId,
+ iTextSetter);
break;
}
case ETagsItem:
{
- iTagSetter.Copy(KGlxTextSetter);
- settingItem = new (ELeave) CAknTextSettingItem(
- aResourceId, iTagSetter );
+ settingItem = new (ELeave) CAknTextSettingItem(aResourceId,
+ iTagSetter);
break;
}
case EAlbumsItem:
{
- iAlbumSetter.Copy(KGlxTextSetter);
- settingItem = new (ELeave) CAknTextSettingItem(
- aResourceId, iAlbumSetter );
+ settingItem = new (ELeave) CAknTextSettingItem(aResourceId,
+ iAlbumSetter);
break;
}
case ELocationItem:
case ESizeItem:
case EResolutionItem:
{
- settingItem = new (ELeave) CAknTextSettingItem(
- aResourceId, iTextSetter );
-
- break;
- }
+ settingItem = new (ELeave) CAknTextSettingItem(aResourceId,
+ iTextSetter);
+
+ break;
+ }
case EDurationItem:
case ElicenseItem:
{
- settingItem = new (ELeave) CAknTextSettingItem(
- aResourceId, iTextSetter );
- //Hide the item until we get the attributes
- //where in we check for the usage rights.
- settingItem->SetHidden(ETrue);
- //Required to refresh the listbox when any items visiblity is changed
- this->HandleChangeInItemArrayOrVisibilityL();
- }
+ settingItem = new (ELeave) CAknTextSettingItem(aResourceId,
+ iTextSetter);
+ //Hide the item until we get the attributes
+ //where in we check for the usage rights.
+ settingItem->SetHidden(ETrue);
+ //Required to refresh the listbox when any items visiblity is changed
+ this->HandleChangeInItemArrayOrVisibilityL();
+ }
break;
-
+
default:
{
- break;
+ break;
}
}
return settingItem;
}
+
//-----------------------------------------------------------------------------
// CGlxMetadataContainer::IsItemModifiable
//-----------------------------------------------------------------------------
TBool CGlxMetadataContainer::IsItemModifiable()
{
+ TRACER("CGlxMetadataContainer::IsItemModifiable");
//Only items like name , description, tag and albums are modifiable
//The check is for the items from ENameItem(0) tille ETagsItem(4)
if(ListBox()->CurrentItemIndex()<=ETagsItem)
@@ -285,29 +282,14 @@
}
//return ETrue to dim the item
return ETrue;
-
}
-//-----------------------------------------------------------------------------
-// CGlxMetadataContainer::IsLicenseItem
-//-----------------------------------------------------------------------------
-TBool CGlxMetadataContainer::IsLicenseItem()
- {
- //Checks the item for DRMProtection.
- //if item is a video item index should be ELicense else check for EDuration Item.
- //because License Item index would become EDuration as the duration item is hidden in case of inage file.
- if((!iVideo && ListBox()->CurrentItemIndex()== EDurationItem)
- || (ListBox()->CurrentItemIndex()== ElicenseItem))
- {
- return EFalse;
- }
- return ETrue;
- }
-
+
//-----------------------------------------------------------------------------
// CGlxMetadataContainer::IsLocationItem
//-----------------------------------------------------------------------------
TBool CGlxMetadataContainer::IsLocationItem()
{
+ TRACER("CGlxMetadataContainer::IsLocationItem");
//if its location item - enable the delete option
if (iItemMediaList->Count() && ListBox()->CurrentItemIndex()
== ELocationItem)
@@ -348,15 +330,15 @@
//dont Edit Item's details if medialist is empty
//OR Rename command is in progress
- if(iItemMediaList->Count() == 0 || iRenameStarted)
- {
- GLX_LOG_INFO("MediaList empty or Rename command started");
- return;
- }
+ if (iItemMediaList->Count() == 0 || iRenameStarted)
+ {
+ GLX_LOG_INFO("MediaList empty or Rename command started");
+ return;
+ }
TInt index = ListBox()->CurrentItemIndex();
- switch(index)
+ switch (index)
{
case ENameItem:
case EDescriptionItem:
@@ -365,60 +347,87 @@
break;
}
case ETagsItem:
- {
- //Set the focus of the item
- iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute,0);
- //Launch add to container commandhandler via dialog observer.
- iDialogObesrver.AddTagL();
- break;
- }
+ {
+ //Set the focus of the item
+ iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute, 0);
+ //Launch add to container commandhandler via dialog observer.
+ iDialogObesrver.AddTagL();
+ break;
+ }
case EAlbumsItem:
- {
- //Set the focus of the item
- iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute,0);
- //Launch add to container commandhandler via dialog observer.
- iDialogObesrver.AddAlbumL();
- break;
- }
- case ELocationItem:
- {
- // Get the Media Item
- const TGlxMedia& media = iItemMediaList->Item(0);
- // Test to see if the Coordinate is Present
- TCoordinate coordinate;
- if( !media.GetCoordinate(coordinate) )
+ {
+ //Set the focus of the item
+ iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute, 0);
+ //Launch add to container commandhandler via dialog observer.
+ iDialogObesrver.AddAlbumL();
+ break;
+ }
+ case ELocationItem:
+ {
+ // Get the Media Item
+ const TGlxMedia& media = iItemMediaList->Item(0);
+ // Test to see if the Coordinate is Present
+ TCoordinate coordinate;
+ if (!media.GetCoordinate(coordinate))
+ {
+ HBufC *noLocationBuf = StringLoader::LoadLC(
+ R_GLX_METADATA_NOTE_INFO_NO_LOCATION);
+ GlxGeneralUiUtilities::ShowInfoNoteL(*noLocationBuf, ETrue);
+ CleanupStack::PopAndDestroy(noLocationBuf);
+ }
+ else
{
- HBufC *noLocationBuf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_INFO_NO_LOCATION);
- GlxGeneralUiUtilities::ShowInfoNoteL(*noLocationBuf,ETrue);
- CleanupStack::PopAndDestroy(noLocationBuf);
+ CAknSettingItem* settingsitem = (*SettingItemArray())[index];
+ GlxGeneralUiUtilities::ShowInfoNoteL(settingsitem->SettingTextL(),ETrue);
}
- break;
- }
+ break;
+ }
case EDurationItem:
- {
- //This is condition is useful when the license item is selected for a image file
- if(iVideo)
+ {
+ //This is condition is useful when the license item is selected for a image file
+ if (iVideo)
+ {
+ break;
+ }
+ }
+ case EResolutionItem:
+ {
+ //This is condition is useful when the license item is selected for a DRM Video file
+ if (!iVideo || !iItemMediaList->Item(0).IsDrmProtected())
{
break;
}
}
case ElicenseItem:
- {
- const TGlxMedia& item = iItemMediaList->Item(0);
- if( item.IsDrmProtected())
- {
+ {
+ const TGlxMedia& item = iItemMediaList->Item(0);
+ if (item.IsDrmProtected())
+ {
//Create DRM utility
CGlxDRMUtility* drmUtility = CGlxDRMUtility::InstanceL();
CleanupClosePushL(*drmUtility);
- drmUtility->ShowDRMDetailsPaneL(item.Uri());
+
+ // check if rights have expired
+ TBool expired = EFalse;
+ expired = !drmUtility->ItemRightsValidityCheckL(item.Uri(),
+ EMPXImage == item.Category());
+
+ if (expired)
+ {
+ drmUtility->ShowRightsInfoL(item.Uri());
+ }
+ else
+ {
+ drmUtility->ShowDRMDetailsPaneL(item.Uri());
+ }
CleanupStack::PopAndDestroy(drmUtility);
- }
- }
- break;
+ }
+ }
+ break;
default:
- {
- break;
- }
+ {
+ break;
+ }
}
}
//-----------------------------------------------------------------------------
@@ -427,40 +436,42 @@
void CGlxMetadataContainer::CreateMediaListForSelectedItemL( )
{
TRACER("CGlxMetadataContainer::CreateMediaListForSelectedItemL");
-
+
//create the collection path for the medialist to be created
CMPXCollectionPath* path = CMPXCollectionPath::NewL();
- CleanupStack::PushL( path );
+ CleanupStack::PushL(path);
//set the all collection path as the details dialog can be launched from any of the grid views and filter with URI
path->AppendL(KGlxCollectionPluginAllImplementationUid);
//create the filter with the URI
CMPXFilter* filter = TGlxFilterFactory::CreateURIFilterL(*iUri);
- CleanupStack::PushL( filter );
+ CleanupStack::PushL(filter);
//create the medialist
- iItemMediaList = MGlxMediaList::InstanceL(*path,TGlxHierarchyId(KMediaListId),filter);
+ iItemMediaList = MGlxMediaList::InstanceL(*path, TGlxHierarchyId(
+ KMediaListId), filter);
//Add the attributes which are required to be displayed.
- iMainListAttributecontext = new (ELeave) CGlxAttributeContext(&iSelectionIterator);
+ iMainListAttributecontext = new (ELeave) CGlxAttributeContext(
+ &iSelectionIterator);
iMainListAttributecontext->AddAttributeL(KMPXMediaDrmProtected);
iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralCategory);
iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralSize);
- iMainListAttributecontext->AddAttributeL(KGlxMediaGeneralDimensions);
+ iMainListAttributecontext->AddAttributeL(KGlxMediaGeneralDimensions);
iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralTitle);
- iMainListAttributecontext->AddAttributeL(KGlxMediaGeneralLastModifiedDate);
- iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralComment);
+ iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralDate);
+ iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralComment);
iMainListAttributecontext->AddAttributeL(KGlxMediaGeneralLocation);
- iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralDuration);
+ iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralDuration);
iMainListAttributecontext->AddAttributeL(KMPXMediaGeneralUri);
-
+
//Add Context so that we get the handleattributes call once the medialist is populated with above mentioned attributes.
- iItemMediaList->AddContextL( iMainListAttributecontext,
- KGlxFetchContextPriorityBlocking );
-
+ iItemMediaList->AddContextL(iMainListAttributecontext,
+ KGlxFetchContextPriorityBlocking);
+
//add to observer for callbacks.
iItemMediaList->AddMediaListObserverL(this);
-
- CleanupStack::PopAndDestroy( filter );
- CleanupStack::PopAndDestroy( path );
+
+ CleanupStack::PopAndDestroy(filter);
+ CleanupStack::PopAndDestroy(path);
}
//-----------------------------------------------------------------------------
@@ -469,209 +480,208 @@
void CGlxMetadataContainer::CreateTagsMediaListL()
{
TRACER("CGlxMetadataContainer::CreateTagsMediaListL");
- //create the collection path for the medialist to be created
- CMPXCollectionPath* path = CMPXCollectionPath::NewL();
- CleanupStack::PushL( path );
- //Set the Tags collection for the particular item
- path->AppendL(KGlxTagCollectionPluginImplementationUid);
- //get the media item for which we require the tags collection
- TGlxMedia item = iItemMediaList->Item(0);
- //create the medialist filter with media ID
- CMPXFilter* filter1 =
- TGlxFilterFactory::CreateExcludeContainersWithoutItemFilterL(item.Id());
- CleanupStack::PushL(filter1);
- //set the array order as required, here its alphabetical
- TGlxFilterProperties filterProperty;
- filterProperty.iSortOrder = EGlxFilterSortOrderAlphabetical;
- filterProperty.iSortDirection = EGlxFilterSortDirectionAscending;
- //combine the filter with filterProperty
- CMPXFilter* filter = TGlxFilterFactory::CreateCombinedFilterL( filterProperty,
- filter1,
- EFalse);
- CleanupStack::PushL(filter);
-
- //create the medialist to get the tags array.
- iTagMediaList = MGlxMediaList::InstanceL(*path,TGlxHierarchyId(KMediaListId),filter);
-
- //add the attribute KMPXMediaGeneralTitle to the context to get the tag name
- iTagContext = CGlxDefaultAttributeContext::NewL();
- iTagContext->AddAttributeL(KMPXMediaGeneralTitle);
- iTagContext->SetRangeOffsets(KOffsets,KOffsets);
-
- //Add Context so that we get the handleattributes call once the medialist is populated with tags.
- iTagMediaList->AddContextL( iTagContext,
- KGlxFetchContextPriorityUMPViewTagPane );
-
- //add to observer for callbacks.
- iTagMediaList->AddMediaListObserverL(this);
-
- CleanupStack::PopAndDestroy(filter);
- CleanupStack::PopAndDestroy(filter1);
- CleanupStack::PopAndDestroy(path);
-
+ //create the collection path for the medialist to be created
+ CMPXCollectionPath* path = CMPXCollectionPath::NewL();
+ CleanupStack::PushL(path);
+ //Set the Tags collection for the particular item
+ path->AppendL(KGlxTagCollectionPluginImplementationUid);
+ //get the media item for which we require the tags collection
+ TGlxMedia item = iItemMediaList->Item(0);
+ //create the medialist filter with media ID
+ CMPXFilter* filter1 =
+ TGlxFilterFactory::CreateExcludeContainersWithoutItemFilterL(
+ item.Id());
+ CleanupStack::PushL(filter1);
+ //set the array order as required, here its alphabetical
+ TGlxFilterProperties filterProperty;
+ filterProperty.iSortOrder = EGlxFilterSortOrderAlphabetical;
+ filterProperty.iSortDirection = EGlxFilterSortDirectionAscending;
+ //combine the filter with filterProperty
+ CMPXFilter* filter = TGlxFilterFactory::CreateCombinedFilterL(
+ filterProperty, filter1, EFalse);
+ CleanupStack::PushL(filter);
+
+ //create the medialist to get the tags array.
+ iTagMediaList = MGlxMediaList::InstanceL(*path, TGlxHierarchyId(
+ KMediaListId), filter);
+
+ //add the attribute KMPXMediaGeneralTitle to the context to get the tag name
+ iTagContext = CGlxDefaultAttributeContext::NewL();
+ iTagContext->AddAttributeL(KMPXMediaGeneralTitle);
+ iTagContext->SetRangeOffsets(KOffsets, KOffsets);
+
+ //Add Context so that we get the handleattributes call once the medialist is populated with tags.
+ iTagMediaList->AddContextL(iTagContext,
+ KGlxFetchContextPriorityUMPViewTagPane);
+
+ //add to observer for callbacks.
+ iTagMediaList->AddMediaListObserverL(this);
+
+ CleanupStack::PopAndDestroy(filter);
+ CleanupStack::PopAndDestroy(filter1);
+ CleanupStack::PopAndDestroy(path);
}
+
//-----------------------------------------------------------------------------
// CGlxMetadataContainer::CreateAlbumsMediaListL
//-----------------------------------------------------------------------------
void CGlxMetadataContainer::CreateAlbumsMediaListL()
{
TRACER("CGlxMetadataContainer::CreateAlbumsMediaListL");
- //create the collection path for the medialist to be created
- CMPXCollectionPath* path = CMPXCollectionPath::NewL();
- CleanupStack::PushL( path );
- //Set the albums collection for the particular item
- path->AppendL(KGlxCollectionPluginAlbumsImplementationUid);
- //get the media item for which we require the tags collection
- TGlxMedia item = iItemMediaList->Item(0);
- //create the medialist filter with media ID
- CMPXFilter* filter =
- TGlxFilterFactory::CreateExcludeContainersWithoutItemFilterL(item.Id());
- CleanupStack::PushL(filter);
- //create the albums medialist.
- iAlbumMediaList = MGlxMediaList::InstanceL(*path,
- TGlxHierarchyId(KMediaListId),
- filter);
-
- //add the attribute KMPXMediaGeneralTitle to the context to get the album name
- iAlbumContext = CGlxDefaultAttributeContext::NewL();
- iAlbumContext->AddAttributeL(KMPXMediaGeneralTitle);
- iAlbumContext->SetRangeOffsets(KOffsets,KOffsets);
- //Add Context to the medialist so that we get the handleattributes call once the medialist is populated with albums.
- iAlbumMediaList->AddContextL( iAlbumContext,
- KGlxFetchContextPriorityUMPViewAlbumPane );
-
- //add to observer for callbacks.
- iAlbumMediaList->AddMediaListObserverL(this);
-
- CleanupStack::PopAndDestroy(filter);
- CleanupStack::PopAndDestroy(path);
-
+ //create the collection path for the medialist to be created
+ CMPXCollectionPath* path = CMPXCollectionPath::NewL();
+ CleanupStack::PushL(path);
+ //Set the albums collection for the particular item
+ path->AppendL(KGlxCollectionPluginAlbumsImplementationUid);
+ //get the media item for which we require the tags collection
+ TGlxMedia item = iItemMediaList->Item(0);
+ //create the medialist filter with media ID
+ CMPXFilter* filter =
+ TGlxFilterFactory::CreateExcludeContainersWithoutItemFilterL(
+ item.Id());
+ CleanupStack::PushL(filter);
+ //create the albums medialist.
+ iAlbumMediaList = MGlxMediaList::InstanceL(*path, TGlxHierarchyId(
+ KMediaListId), filter);
+
+ //add the attribute KMPXMediaGeneralTitle to the context to get the album name
+ iAlbumContext = CGlxDefaultAttributeContext::NewL();
+ iAlbumContext->AddAttributeL(KMPXMediaGeneralTitle);
+ iAlbumContext->SetRangeOffsets(KOffsets, KOffsets);
+ //Add Context to the medialist so that we get the handleattributes call once the medialist is populated with albums.
+ iAlbumMediaList->AddContextL(iAlbumContext,
+ KGlxFetchContextPriorityUMPViewAlbumPane);
+
+ //add to observer for callbacks.
+ iAlbumMediaList->AddMediaListObserverL(this);
+
+ CleanupStack::PopAndDestroy(filter);
+ CleanupStack::PopAndDestroy(path);
}
-
// ----------------------------------------------------------------------------
// CGlxMetadataContainer::ViewDynInitMenuPaneL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::ViewDynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane)
+void CGlxMetadataContainer::ViewDynInitMenuPaneL(TInt aMenuId,
+ CEikMenuPane* aMenuPane)
{
- if( aMenuId == R_METADATA_MENU )
+ if (aMenuId == R_METADATA_MENU)
{
- //Set dim the options based on the utem selected
- //Viewdetails option will be availble only for the license item
- //Delete option will be available only for the location item
- aMenuPane->SetItemDimmed(KGlxViewBoundMenuCommandId,IsLicenseItem());
+ //Set dim the options based on the item selected
//location info will be enabled if the item has a location info
- aMenuPane->SetItemDimmed(KGlxDeleteBoundMenuCommandId,IsLocationItem());
- // Show on Map is no longer part of requirements and should not be shown in the
- // options menu. When show on map has to come back, replace the 'ETrue' below with
- // the function IsLocationItem.
- aMenuPane->SetItemDimmed(EGlxCmdAiwShowMap,ETrue);
+ aMenuPane->SetItemDimmed(KGlxDeleteBoundMenuCommandId,
+ IsLocationItem());
}
-
-
}
+
// ----------------------------------------------------------------------------
// CGlxMetadataContainer::RemoveLocationL
// ----------------------------------------------------------------------------
//
void CGlxMetadataContainer::RemoveLocationL()
{
- TRACER("CGlxMetadataContainer::RemoveLocationL");
-
+ TRACER("CGlxMetadataContainer::RemoveLocationL");
+
iLocationinfo = ETrue;
// get the media item
- const TGlxMedia& media = iItemMediaList->Item(0);
+ const TGlxMedia& media = iItemMediaList->Item(0);
// Test to see if the coordinate is present
TCoordinate coordinate;
TBool isSupported = media.GetCoordinate(coordinate);
- if( !isSupported )
+ if (!isSupported)
{
- HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_INFO_NO_LOCATION);
- GlxGeneralUiUtilities::ShowInfoNoteL(*buf,ETrue);
+ HBufC *buf = StringLoader::LoadLC(
+ R_GLX_METADATA_NOTE_INFO_NO_LOCATION);
+ GlxGeneralUiUtilities::ShowInfoNoteL(*buf, ETrue);
CleanupStack::PopAndDestroy(buf);
}
else
{
- HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_DELETE_LOCATION);
- TBool response = GlxGeneralUiUtilities::ConfirmQueryL(R_GLX_QUERY_YES_NO,*buf);
+ HBufC *buf =
+ StringLoader::LoadLC(R_GLX_METADATA_NOTE_DELETE_LOCATION);
+ TBool response = GlxGeneralUiUtilities::ConfirmQueryL(
+ R_GLX_QUERY_YES_NO, *buf);
CleanupStack::PopAndDestroy(buf);
-
- if( response )
+
+ if (response)
{
//user selected yes, so delete location
//send command for delete location after successfull removal of command remove this pane
- if( iItemMediaList->Count() > 0 )
- {
+ if (iItemMediaList->Count() > 0)
+ {
//set focus to first item
- iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute,0);
-
+ iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute, 0);
+
// Deleting location information from image file
RFs rFs;
- User::LeaveIfError( rFs.Connect() );
- CleanupClosePushL( rFs );
- RFile rFile;
- User::LeaveIfError( rFile.Open(rFs,
- iItemMediaList->Item(0).Uri()
- ,EFileWrite ));
- CleanupClosePushL( rFile );
-
+ User::LeaveIfError(rFs.Connect());
+ CleanupClosePushL(rFs);
+ RFile rFile;
+ User::LeaveIfError(rFile.Open(rFs,
+ iItemMediaList->Item(0).Uri(), EFileWrite));
+ CleanupClosePushL(rFile);
+
TInt imageFileSize = 0; // Image File Size
- User::LeaveIfError( rFile.Size( imageFileSize ) );
- HBufC8* imageData = HBufC8::NewL( imageFileSize ); //Actual Image Data
- CleanupStack::PushL( imageData );
-
+ User::LeaveIfError(rFile.Size(imageFileSize));
+ HBufC8* imageData = HBufC8::NewL(imageFileSize); //Actual Image Data
+ CleanupStack::PushL(imageData);
+
TPtr8 myImagePtr = imageData->Des();
- TInt readError = rFile.Read( myImagePtr );
- if ( readError != KErrNone )
+ TInt readError = rFile.Read(myImagePtr);
+ if (readError != KErrNone)
{
- User::Leave( KErrGeneral );
+ User::Leave(KErrGeneral);
}
-
+
//CExifModify Interface class for modifying existing Exif v2.2 (or prior)
//file format or creating Exif v2.2 file format using valid Jpeg image
CExifModify* exifWriter = NULL;
TRAPD(err,exifWriter = CExifModify::NewL( imageData->Des()));
- CleanupStack::PushL( exifWriter );
- if(err == KErrNone)
+ CleanupStack::PushL(exifWriter);
+ if (err == KErrNone)
{
- //Removes the specified IFD structure and all its tags from the Exif data
- exifWriter->DeleteIfd ( EIfdGps );
-
- HBufC8* modifiedExif = exifWriter->WriteDataL( imageData->Des() ); //Modified Image Data
- CleanupStack::PushL( modifiedExif );
-
- const TUint32 fileSize = modifiedExif->Des().Length(); //Size of Modified File
- TInt oldSize;
- rFile.Size( oldSize );
- // set position to begin of file & write the Modified data (Without Location Information)
- TInt pos = 0;
- User::LeaveIfError( rFile.Seek( ESeekStart, pos ) );
- User::LeaveIfError( rFile.Write( modifiedExif->Des(), fileSize ) );
+ //Removes the specified IFD structure and all its tags from the Exif data
+ exifWriter->DeleteIfd(EIfdGps);
+
+ HBufC8* modifiedExif = exifWriter->WriteDataL(
+ imageData->Des()); //Modified Image Data
+ CleanupStack::PushL(modifiedExif);
- TTime lastModified;
- lastModified.UniversalTime();
- User::LeaveIfError( rFile.SetModified( lastModified ) ); //Change the Modified Time
+ const TUint32 fileSize = modifiedExif->Des().Length(); //Size of Modified File
+ TInt oldSize;
+ rFile.Size(oldSize);
+ // set position to begin of file & write the Modified data (Without Location Information)
+ TInt pos = 0;
+ User::LeaveIfError(rFile.Seek(ESeekStart, pos));
+ User::LeaveIfError(rFile.Write(modifiedExif->Des(),
+ fileSize));
- CleanupStack::PopAndDestroy( modifiedExif);
+ TTime lastModified;
+ lastModified.UniversalTime();
+ User::LeaveIfError(rFile.SetModified(lastModified)); //Change the Modified Time
+
+ CleanupStack::PopAndDestroy(modifiedExif);
}
- CleanupStack::PopAndDestroy( exifWriter);
- CleanupStack::PopAndDestroy( imageData );
- CleanupStack::PopAndDestroy( &rFile );
- CleanupStack::PopAndDestroy( &rFs );
+ CleanupStack::PopAndDestroy(exifWriter);
+ CleanupStack::PopAndDestroy(imageData);
+ CleanupStack::PopAndDestroy(&rFile);
+ CleanupStack::PopAndDestroy(&rFs);
//Deleting location information from MDS database
- CMPXCollectionPath* path = iItemMediaList->PathLC();
- CMPXCommand* command = TGlxCommandFactory::DeleteLocationCommandLC(*path);
-
- command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId,
- static_cast<TAny*>(this));
-
- iItemMediaList->CommandL(*command);
+ CMPXCollectionPath* path = iItemMediaList->PathLC();
+ CMPXCommand* command =
+ TGlxCommandFactory::DeleteLocationCommandLC(*path);
+
+ command->SetTObjectValueL<TAny*> (
+ KMPXCommandGeneralSessionId,
+ static_cast<TAny*> (this));
+
+ iItemMediaList->CommandL(*command);
CleanupStack::PopAndDestroy(command);
CleanupStack::PopAndDestroy(path);
}
- }
+ }
}
}
// ----------------------------------------------------------------------------
@@ -689,89 +699,86 @@
ListBox()->DrawNow();
}
// ----------------------------------------------------------------------------
-// CGlxMetadataContainer::SetAttributes
+// CGlxMetadataContainer::SetAttributesL
// ----------------------------------------------------------------------------
//
void CGlxMetadataContainer::SetAttributesL(TMPXAttribute attribute)
{
- TRACER("CGlxMetadataContainer::SetAttributesL");
-
+ TRACER("CGlxMetadataContainer::SetAttributesL");
+
//create the tags and albums medialist once the item medialist is populated
//Tags and albums medialist can be created only with media ID.
- if(!iTagMediaList)
- {
- CreateTagsMediaListL();
- }
- if(!iAlbumMediaList)
- {
- CreateAlbumsMediaListL();
- }
- if(!iSetVisible)
- {
- iSetVisible = ETrue;
- SetDurationLIicenseItemVisibilityL();
- }
+ if (!iTagMediaList)
+ {
+ CreateTagsMediaListL();
+ }
+ if (!iAlbumMediaList)
+ {
+ CreateAlbumsMediaListL();
+ }
+ if (!iSetVisible)
+ {
+ iSetVisible = ETrue;
+ SetDurationLIicenseItemVisibilityL();
+ }
TGlxMedia item = iItemMediaList->Item(0);
//Create the string convertor instance
//String convertor class with provide the specific format for date,location and duration and size.
CGlxUStringConverter* stringConverter = CGlxUStringConverter::NewL();
- CleanupStack::PushL(stringConverter );
- HBufC* string = NULL;
-
+ CleanupStack::PushL(stringConverter);
+ HBufC* string = NULL;
+
//if attribute is date and time we need to pass the format it as R_QTN_DATE_USUAL_WITH_ZERO else null
- if(attribute == KGlxMediaGeneralLastModifiedDate)
+ if (attribute == KMPXMediaGeneralDate)
{
- stringConverter->AsStringL(item,
- attribute,
- R_QTN_DATE_USUAL_WITH_ZERO, string );
- }
+ stringConverter->AsStringL(item, attribute,
+ R_QTN_DATE_USUAL_WITH_ZERO, string);
+ }
else
{
- stringConverter->AsStringL(item,
- attribute,0, string );
+ stringConverter->AsStringL(item, attribute, 0, string);
}
//get the settings item based on the attribute and set the text.
- if ( string )
- {
+ if (string)
+ {
iTextSetter.Zero();
- iTextSetter.Append(*string);
- if(attribute == KMPXMediaGeneralSize)
- {
- EditItemL(ESizeItem,EFalse);
- }
- else if(attribute == KMPXMediaGeneralDuration)
- {
- EditItemL(EDurationItem,EFalse);
- }
- else if(attribute == KMPXMediaGeneralTitle)
- {
- EditItemL(ENameItem,EFalse);
- }
- else if(attribute == KGlxMediaGeneralLastModifiedDate)
- {
- EditItemL(EDateAndTimeItem,EFalse);
- }
- else if(attribute == KMPXMediaGeneralComment)
- {
- EditItemL(EDescriptionItem,EFalse);
- }
- else if(attribute == KGlxMediaGeneralLocation)
- {
- EditItemL(ELocationItem,EFalse);
- }
- else if(attribute == KGlxMediaGeneralDimensions)
- {
- EditItemL(EResolutionItem,EFalse);
- }
- else
- {
-
- }
- delete string;
- string = NULL;
- }
- CleanupStack::PopAndDestroy(stringConverter );
- }
+ iTextSetter.Append(*string);
+ if (attribute == KMPXMediaGeneralSize)
+ {
+ EditItemL(ESizeItem, EFalse);
+ }
+ else if (attribute == KMPXMediaGeneralDuration)
+ {
+ EditItemL(EDurationItem, EFalse);
+ }
+ else if (attribute == KMPXMediaGeneralTitle)
+ {
+ EditItemL(ENameItem, EFalse);
+ }
+ else if (attribute == KMPXMediaGeneralDate)
+ {
+ EditItemL(EDateAndTimeItem, EFalse);
+ }
+ else if (attribute == KMPXMediaGeneralComment)
+ {
+ EditItemL(EDescriptionItem, EFalse);
+ }
+ else if (attribute == KGlxMediaGeneralLocation)
+ {
+ EditItemL(ELocationItem, EFalse);
+ }
+ else if (attribute == KGlxMediaGeneralDimensions)
+ {
+ EditItemL(EResolutionItem, EFalse);
+ }
+ else
+ {
+ }
+ delete string;
+ string = NULL;
+ }
+ CleanupStack::PopAndDestroy(stringConverter);
+ }
// ----------------------------------------------------------------------------
// CGlxMetadataContainer::SetNameDescriptionL
@@ -779,17 +786,18 @@
//
void CGlxMetadataContainer::SetNameDescriptionL(TInt aItem)
{
- TRACER("CGlxMetadataContainer::SetNameDescriptionL");
+ TRACER("CGlxMetadataContainer::SetNameDescriptionL");
//This functions i commn for updatng both name and description once modified
//get the item handcle to be modified
- CAknSettingItem* settingsitem = (*SettingItemArray())[aItem];
- HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTitleLength );
- (textBuf->Des()).Copy((settingsitem->SettingTextL()));
+ CAknSettingItem* settingsitem = (*SettingItemArray())[aItem];
+ HBufC* textBuf = HBufC::NewLC(KMaxMediaPopupTextLength);
+ const TDesC& popupText = settingsitem->SettingTextL();
+ (textBuf->Des()).Copy(popupText.Left(KMaxMediaPopupTextLength));
TPtr textPtr = textBuf->Des();
//Remove preceeding & trailing spaces
textPtr.Trim();
- TBuf<KMaxMediaPopupTitleLength> titleText(*textBuf);
- HBufC *buf = NULL;
+ HBufC* buf = NULL;
+
if(aItem == ENameItem)
{
buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_TITLE_NSERIES);
@@ -798,146 +806,163 @@
{
buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_DESCRIPTION_NSERIES);
}
-
+
//Launch the text entry editor.
- CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr );
+ CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL(*buf, textPtr);
CleanupStack::PopAndDestroy(buf);
- if(aItem == EDescriptionItem)
+ if (aItem == EDescriptionItem)
{
popup->SetLeftSoftKeyL(ETrue);
}
-
+
//action upon selecting ok from the editor
- if ( popup->ExecuteLD() == EEikBidOk )
- {
- if(0 != (titleText.Compare(*textBuf)))
- {
-
- TFileName fileName = ParseFileName(*textBuf);
- //check If filename already exists
- if ((aItem == ENameItem) &&
- (BaflUtils::FileExists(ControlEnv()->FsSession(), fileName)))
- {
- //if changed title is same as existing one then showing the already use popup to user
- HBufC* info = StringLoader::LoadLC(R_GLX_NAME_ALREADY_USED, *textBuf);
- GlxGeneralUiUtilities::ShowInfoNoteL(*info, ETrue);
- CleanupStack::PopAndDestroy(info);
- }
- else
- {
- //Modify the MDS and setting list only if the entry is different from previous Item value
+ if (popup->ExecuteLD() == EEikBidOk)
+ {
+ if(0 != (popupText.Compare(*textBuf)))
+ {
+ TFileName fileName = ParseFileName(*textBuf);
+ //check If filename already exists
+ if ((aItem == ENameItem) && (BaflUtils::FileExists(
+ ControlEnv()->FsSession(), fileName)))
+ {
+ //if changed title is same as existing one then showing the already use popup to user
+ HBufC* info = StringLoader::LoadLC(R_GLX_NAME_ALREADY_USED,
+ *textBuf);
+ GlxGeneralUiUtilities::ShowInfoNoteL(*info, ETrue);
+ CleanupStack::PopAndDestroy(info);
+ }
+ // Check if the filename is valid
+ else if ((aItem == ENameItem)
+ && (!ControlEnv()->FsSession().IsValidName(*textBuf)))
+ {
+ //Show illegal characters error note
+ HBufC* info = StringLoader::LoadLC(
+ R_GLX_QTN_FLDR_ILLEGAL_CHARACTERS);
+ GlxGeneralUiUtilities::ShowInfoNoteL(*info, ETrue);
+ CleanupStack::PopAndDestroy(info);
+ }
+ else
+ {
+ //Modify the MDS and setting list only if the entry is different from previous Item value
iTextSetter.Zero();
- iTextSetter.Copy(*textBuf);
- EditItemL(aItem,EFalse);
- iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item
-
- if(aItem == ENameItem)
- {
- //indicate Rename command is started
- iRenameStarted = ETrue;
- //set Setting List Box to Dimmed status
- SetDimmed(iRenameStarted);
-
- const TGlxMedia& media = iItemMediaList->Item(0);
- ContentAccess::CManager *manager = ContentAccess::CManager::NewL();
- CleanupStack::PushL(manager);
- HBufC* modifiedName = fileName.AllocLC();
-
- //rename the media
- TInt error = manager->RenameFile(media.Uri(), *modifiedName);
- if(KErrNone == error)
- {
- //Redundant call But needed in case FileSystem is too slow
- //to notify MDS for updating title.
- //Create the glx command for updating Title in MDS
- CMPXCollectionPath* path = iItemMediaList->PathLC();
- CMPXCommand* command = TGlxCommandFactory::RenameCommandLC(
- settingsitem->SettingTextL(), *path);
- command->SetTObjectValueL<TAny*> (
- KMPXCommandGeneralSessionId,
- static_cast<TAny*> (this));
- //issue command to the medialist which further
- //calls data source to update MDS
- iItemMediaList->CommandL(*command);
- CleanupStack::PopAndDestroy(command);
- CleanupStack::PopAndDestroy(path);
- }
- else
- {
- //Renaming commmand failed
- iRenameStarted = EFalse;
- //reset Setting Items to undim status
- SetDimmed(iRenameStarted);
- //Reset the EName Settings field
- iTextSetter.Zero();
- iTextSetter.Copy(media.Title());
- EditItemL(ENameItem,EFalse);
-
- User::LeaveIfError(error);
- }
- CleanupStack::PopAndDestroy(modifiedName);
- CleanupStack::PopAndDestroy(manager);
- }
- else
- {
- //Create the glx command for changing description
- CMPXCollectionPath* path = iItemMediaList->PathLC();
- CMPXCommand* command =
- TGlxCommandFactory::SetDescriptionCommandLC(
- settingsitem->SettingTextL(), *path);
- command->SetTObjectValueL<TAny*> (
- KMPXCommandGeneralSessionId,
- static_cast<TAny*> (this));
- //issue command to the medialist which further
- //calls data source to update MDS
- iItemMediaList->CommandL(*command);
- CleanupStack::PopAndDestroy(command);
- CleanupStack::PopAndDestroy(path);
- }
-
- }
- }
- }
- CleanupStack::PopAndDestroy( textBuf );
-
+ iTextSetter.Copy(*textBuf);
+ EditItemL(aItem, EFalse);
+ iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute, 0);//set focus to first item
+
+ if (aItem == ENameItem)
+ {
+ //indicate Rename command is started
+ iRenameStarted = ETrue;
+ //set Setting List Box to Dimmed status
+ SetDimmed(iRenameStarted);
+
+ const TGlxMedia& media = iItemMediaList->Item(0);
+ ContentAccess::CManager *manager =
+ ContentAccess::CManager::NewL();
+ CleanupStack::PushL(manager);
+ HBufC* modifiedName = fileName.AllocLC();
+
+ //rename the media
+ TInt error = manager->RenameFile(media.Uri(),
+ *modifiedName);
+ if (KErrNone == error)
+ {
+ //Redundant call But needed in case FileSystem is too slow
+ //to notify MDS for updating title.
+ //Create the glx command for updating Title in MDS
+ CMPXCollectionPath* path = iItemMediaList->PathLC();
+ CMPXCommand* command =
+ TGlxCommandFactory::RenameCommandLC(
+ settingsitem->SettingTextL(), *path);
+ command->SetTObjectValueL<TAny*> (
+ KMPXCommandGeneralSessionId,
+ static_cast<TAny*> (this));
+ //issue command to the medialist which further
+ //calls data source to update MDS
+ iItemMediaList->CommandL(*command);
+ CleanupStack::PopAndDestroy(command);
+ CleanupStack::PopAndDestroy(path);
+ }
+ else
+ {
+ //Renaming commmand failed
+ iRenameStarted = EFalse;
+ //reset Setting Items to undim status
+ SetDimmed(iRenameStarted);
+ //Reset the EName Settings field
+ iTextSetter.Zero();
+ iTextSetter.Copy(media.Title());
+ EditItemL(ENameItem, EFalse);
+ GlxGeneralUiUtilities::ShowErrorNoteL(error);
+ }
+ CleanupStack::PopAndDestroy(modifiedName);
+ CleanupStack::PopAndDestroy(manager);
+ }
+ else
+ {
+ //Create the glx command for changing description
+ CMPXCollectionPath* path = iItemMediaList->PathLC();
+ CMPXCommand* command =
+ TGlxCommandFactory::SetDescriptionCommandLC(
+ settingsitem->SettingTextL(), *path);
+ command->SetTObjectValueL<TAny*> (
+ KMPXCommandGeneralSessionId,
+ static_cast<TAny*> (this));
+ //issue command to the medialist which further
+ //calls data source to update MDS
+ iItemMediaList->CommandL(*command);
+ CleanupStack::PopAndDestroy(command);
+ CleanupStack::PopAndDestroy(path);
+ }
+ }
+ }
+ }
+ CleanupStack::PopAndDestroy(textBuf);
+
//notify observer that some operation has happened. So refresh the toolbar area..
iResetToolbarObs.HandleToolbarResetting(EFalse);
}
+
// ----------------------------------------------------------------------------
// CGlxMetadataContainer::UpdateTagsL()
// ----------------------------------------------------------------------------
//
void CGlxMetadataContainer::UpdateTagsL()
{
+ TRACER("CGlxMetadataContainer::UpdateTagsL");
//Get the tag setting item handle to set the text
- CAknSettingItem* settingsitem =
- (*SettingItemArray())[ETagsItem];
- //Set the tag setter to empty string before filling in the data.
- iTagSetter.Copy(KGlxTextSetter);
- //Loop to appened all the tags to the iTagSetter.
- for( TInt index = 0 ; index < iTagMediaList->Count() ; index++ )
- {
- if(iTagSetter.Length())
- {
- iTagSetter.Append(KGlxComma);
- }
- const TGlxMedia& item = iTagMediaList->Item( index );
- const TDesC& title = item.Title();
- iTagSetter.Append(title);
- }
- EditItemL(ETagsItem,EFalse);
- }
+ CAknSettingItem* settingsitem = (*SettingItemArray())[ETagsItem];
+
+ //Set the tag setter to empty string before filling in the data.
+ iTagSetter.Zero();
+
+ //Loop to appened all the tags to the iTagSetter.
+ for (TInt index = 0; index < iTagMediaList->Count(); index++)
+ {
+ if (iTagSetter.Length())
+ {
+ iTagSetter.Append(KGlxComma);
+ }
+ const TGlxMedia& item = iTagMediaList->Item(index);
+ const TDesC& title = item.Title();
+ iTagSetter.Append(title);
+ }
+ EditItemL(ETagsItem, EFalse);
+ }
+
// ----------------------------------------------------------------------------
// CGlxMetadataContainer::UpdateAlbumsL()
// ----------------------------------------------------------------------------
//
void CGlxMetadataContainer::UpdateAlbumsL()
{
+ TRACER("CGlxMetadataContainer::UpdateAlbumsL");
//Get the tag setting item handle to set the text
- CAknSettingItem* settingsitem =
- (*SettingItemArray())[EAlbumsItem];
+ CAknSettingItem* settingsitem = (*SettingItemArray())[EAlbumsItem];
+
//Set the tag setter to empty string before filling in the data.
- iAlbumSetter.Copy(KGlxTextSetter);
+ iAlbumSetter.Zero();
+
//Loop to appened all the tags to the iAlbumSetter.
for( TInt index = 0 ; index < iAlbumMediaList->Count() ; index++ )
{
@@ -951,54 +976,63 @@
}
EditItemL(EAlbumsItem,EFalse);
}
+
// ----------------------------------------------------------------------------
// CGlxMetadataContainer::SetDurationLIicenseItemVisibilityL()
// ----------------------------------------------------------------------------
//
void CGlxMetadataContainer::SetDurationLIicenseItemVisibilityL()
{
+ TRACER("CGlxMetadataContainer::SetDurationLIicenseItemVisibilityL");
//get the media item.
const TGlxMedia& item = iItemMediaList->Item(0);
const CGlxMedia* media = item.Properties();
//in order to check for video category and drm rights
-
+
CAknSettingItem* hiddenItem = NULL;
- if( item.Category() == EMPXVideo)
- {
- if(!item.IsDrmProtected())
- {
- hiddenItem = (*SettingItemArray())[EDurationItem];
- //Set the duration item visible
- hiddenItem->SetHidden(EFalse);
- }
+ if (item.Category() == EMPXVideo)
+ {
+ if (!item.IsDrmProtected())
+ {
+ hiddenItem = (*SettingItemArray())[EDurationItem];
+ //Set the duration item visible
+ hiddenItem->SetHidden(EFalse);
+ }
+ else
+ {
+ hiddenItem = (*SettingItemArray())[EResolutionItem];
+ //Set the Resolution item in-visible for DRM protected Video
+ hiddenItem->SetHidden(ETrue);
+ }
//set the video flag which would be used to enable/disable the view details option.
this->HandleChangeInItemArrayOrVisibilityL();
iVideo = ETrue;
- }
- if( media && media->IsSupported(KMPXMediaDrmProtected))
+ }
+ if (media && media->IsSupported(KMPXMediaDrmProtected))
{
- if(item.IsDrmProtected())
- {
- hiddenItem = (*SettingItemArray())[ElicenseItem];
- //Set the License item visible
- hiddenItem->SetHidden(EFalse);
- //Required to refresh the listbox when any items visiblity is changed
- this->HandleChangeInItemArrayOrVisibilityL();
- }
+ if (item.IsDrmProtected())
+ {
+ hiddenItem = (*SettingItemArray())[ElicenseItem];
+ //Set the License item visible
+ hiddenItem->SetHidden(EFalse);
+ //Required to refresh the listbox when any items visiblity is changed
+ this->HandleChangeInItemArrayOrVisibilityL();
+ }
}
- }
+ }
+
//Medialist callbacks.
// ----------------------------------------------------------------------------
// CGlxMetadataContainer::HandleAttributesAvailableL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleAttributesAvailableL( TInt /*aItemIndex*/,
- const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList )
+void CGlxMetadataContainer::HandleAttributesAvailableL(TInt /*aItemIndex*/,
+ const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList)
{
TRACER("CGlxMetadataContainer::HandleAttributesAvailableL()");
//generic medialist for the item for all the attributes required other than tags and albums.
- if(aList == iItemMediaList)
+ if (aList == iItemMediaList)
{
// Loop untill it checks for all the avialable attributes
for (TInt i = aAttributes.Count() - 1; i >= 0; i--)
@@ -1016,36 +1050,38 @@
//Check if media's uri(i.e 'aModifiedUri') is different from 'iUri'
//i.e media is Renamed then Refesh Media list.
TMPXAttribute uriAttrib(KMPXMediaGeneralUri);
- TIdentityRelation< TMPXAttribute > match ( &TMPXAttribute::Match );
+ TIdentityRelation<TMPXAttribute> match(&TMPXAttribute::Match);
TInt index = aAttributes.Find(uriAttrib, match);
if (KErrNotFound != index)
- {
- HBufC* modifiedUri = NULL;
- TGlxMedia item = iItemMediaList->Item(0);
- //Create the string convertor instance
- CGlxUStringConverter* stringConverter = CGlxUStringConverter::NewL();
- CleanupStack::PushL(stringConverter);
-
- //fetch media uri
- stringConverter->AsStringL(item,aAttributes[index],0, modifiedUri );
- CleanupStack::PopAndDestroy(stringConverter);
+ {
+ HBufC* modifiedUri = NULL;
+ TGlxMedia item = iItemMediaList->Item(0);
+ //Create the string convertor instance
+ CGlxUStringConverter* stringConverter =
+ CGlxUStringConverter::NewL();
+ CleanupStack::PushL(stringConverter);
- //Check if media item was renamed
- if (modifiedUri && modifiedUri->Compare(*iUri) != 0)
- {
- //Set rename command as started since
- //Rename is also possible from File Manager
- iRenameStarted = ETrue;
- CleanupStack::PushL(modifiedUri);
- RefreshMediaListL(*modifiedUri);
- CleanupStack::PopAndDestroy(modifiedUri);
- }
- }
+ //fetch media uri
+ stringConverter->AsStringL(item, aAttributes[index], 0,
+ modifiedUri);
+ CleanupStack::PopAndDestroy(stringConverter);
+
+ //Check if media item was renamed
+ if (modifiedUri && modifiedUri->Compare(*iUri) != 0)
+ {
+ //Set rename command as started since
+ //Rename is also possible from File Manager
+ iRenameStarted = ETrue;
+ CleanupStack::PushL(modifiedUri);
+ RefreshMediaListL(*modifiedUri);
+ CleanupStack::PopAndDestroy(modifiedUri);
+ }
+ }
}
-
+
TMPXAttribute titleAttrib(KMPXMediaGeneralTitle);
- TIdentityRelation< TMPXAttribute > match ( &TMPXAttribute::Match );
+ TIdentityRelation<TMPXAttribute> match(&TMPXAttribute::Match);
if (KErrNotFound != aAttributes.Find(titleAttrib, match))
{
@@ -1058,118 +1094,117 @@
UpdateAlbumsL();
}
}
-
}
// ----------------------------------------------------------------------------
// HandleItemAddedL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleItemAddedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/,
- MGlxMediaList* aList )
+void CGlxMetadataContainer::HandleItemAddedL(TInt /*aStartIndex*/,
+ TInt /*aEndIndex*/, MGlxMediaList* aList)
{
TRACER("CGlxMetadataContainer::HandleItemAddedL()");
-
- if(!iTagMediaList)
- {
+
+ if (!iTagMediaList)
+ {
CreateTagsMediaListL();
- }
- if(!iAlbumMediaList)
- {
- CreateAlbumsMediaListL();
- }
- if(!iMarquee)
- {
+ }
+ if (!iAlbumMediaList)
+ {
+ CreateAlbumsMediaListL();
+ }
+ if (!iMarquee)
+ {
EnableMarqueingL();
- }
+ }
SetDurationLIicenseItemVisibilityL();
- if(aList == iTagMediaList)
- {
- UpdateTagsL();
- }
- else if(aList == iAlbumMediaList)
- {
- UpdateAlbumsL();
- }
- if(aList == iItemMediaList)
+ if (aList == iTagMediaList)
+ {
+ UpdateTagsL();
+ }
+ else if (aList == iAlbumMediaList)
+ {
+ UpdateAlbumsL();
+ }
+ if (aList == iItemMediaList)
{
- if(iItemMediaList->Count())
- {
- TGlxMedia item = iItemMediaList->Item(0);
- CGlxUStringConverter* stringConverter = CGlxUStringConverter::NewL();
- CleanupStack::PushL(stringConverter );
- for(TInt index = 0; index <= EDurationItem ; index++)
- {
- HBufC* string = NULL;
- iTextSetter.Zero();
-
- if(index == ESizeItem)
- {
- stringConverter->AsStringL(item,
- KMPXMediaGeneralSize,0, string );
- }
- else if(index == EDurationItem)
- {
- stringConverter->AsStringL(item,
- KMPXMediaGeneralDuration,0, string );
- }
- else if(index == ENameItem)
- {
- stringConverter->AsStringL(item,
- KMPXMediaGeneralTitle,0, string );
- }
- else if(index == EDateAndTimeItem)
- {
- stringConverter->AsStringL( item,
- KGlxMediaGeneralLastModifiedDate,
- R_QTN_DATE_USUAL_WITH_ZERO,string );
- }
- else if(index == EDescriptionItem)
- {
- stringConverter->AsStringL(item,
- KMPXMediaGeneralComment,0, string );
- }
- else if(index == ELocationItem)
- {
- stringConverter->AsStringL(item,
- KGlxMediaGeneralLocation,0, string );
- }
- else if(index == EResolutionItem)
- {
- stringConverter->AsStringL(item,
- KGlxMediaGeneralDimensions,0, string );
- }
- else if(index == ElicenseItem)
- {
- // If an item is DRM protected, License field in details
- // should display "View Details"
- string = StringLoader::LoadL(R_GLX_METADATA_VIEW_OPTIONS_VIEW);
- }
- else
- {
- //no implementation
- }
- if(string)
- {
- iTextSetter.Copy(KGlxTextSetter);
- iTextSetter.Append(*string);
- }
- CleanupStack::PushL( string );
- EditItemL(index,EFalse);
- CleanupStack::PopAndDestroy(string );
- }
- CleanupStack::PopAndDestroy(stringConverter );
+ if (iItemMediaList->Count())
+ {
+ TGlxMedia item = iItemMediaList->Item(0);
+ CGlxUStringConverter* stringConverter =
+ CGlxUStringConverter::NewL();
+ CleanupStack::PushL(stringConverter);
+ for (TInt index = 0; index <= EDurationItem; index++)
+ {
+ HBufC* string = NULL;
+ iTextSetter.Zero();
- //Reopening Media list is completed
- //& Rename Command is also completed
- if(iRenameStarted)
- {
- iRenameStarted = EFalse;
- //reset Setting Items to undimmed status
- SetDimmed(iRenameStarted);
- iAvkonAppUi->ProcessCommandL(EGlxCmdRenameCompleted);
- }
- }
+ if (index == ESizeItem)
+ {
+ stringConverter->AsStringL(item, KMPXMediaGeneralSize, 0,
+ string);
+ }
+ else if (index == EDurationItem)
+ {
+ stringConverter->AsStringL(item,
+ KMPXMediaGeneralDuration, 0, string);
+ }
+ else if (index == ENameItem)
+ {
+ stringConverter->AsStringL(item, KMPXMediaGeneralTitle,
+ 0, string);
+ }
+ else if (index == EDateAndTimeItem)
+ {
+ stringConverter->AsStringL(item, KMPXMediaGeneralDate,
+ R_QTN_DATE_USUAL_WITH_ZERO, string);
+ }
+ else if (index == EDescriptionItem)
+ {
+ stringConverter->AsStringL(item, KMPXMediaGeneralComment,
+ 0, string);
+ }
+ else if (index == ELocationItem)
+ {
+ stringConverter->AsStringL(item,
+ KGlxMediaGeneralLocation, 0, string);
+ }
+ else if (index == EResolutionItem)
+ {
+ stringConverter->AsStringL(item,
+ KGlxMediaGeneralDimensions, 0, string);
+ }
+ else if (index == ElicenseItem)
+ {
+ // If an item is DRM protected, License field in details
+ // should display "View Details"
+ string = StringLoader::LoadL(
+ R_GLX_METADATA_VIEW_OPTIONS_VIEW);
+ }
+ else
+ {
+ //no implementation
+ }
+ if (string)
+ {
+ iTextSetter.Append(*string);
+ }
+ CleanupStack::PushL(string);
+ EditItemL(index, EFalse);
+ CleanupStack::PopAndDestroy(string);
+ }
+ CleanupStack::PopAndDestroy(stringConverter);
+
+ //Reopening Media list is completed
+ //& Rename Command is also completed
+ if (iRenameStarted)
+ {
+ iRenameStarted = EFalse;
+ //reset Setting Items to undimmed status
+ SetDimmed(iRenameStarted);
+ iAvkonAppUi->ProcessCommandL(EGlxCmdRenameCompleted);
+ }
+ }
}
}
// ----------------------------------------------------------------------------
@@ -1178,102 +1213,113 @@
//
void CGlxMetadataContainer::EnableMarqueingL()
{
- TRACER("CGlxMetadataContainer::EnableMarqueingL()");
+ TRACER("CGlxMetadataContainer::EnableMarqueingL()");
iMarquee = ETrue;
ListBox()->UseLogicalToVisualConversion(ETrue);
- ListBox()->ItemDrawer()->ColumnData()->SetMarqueeParams (KMarqueeLoopCount,
- KMarqueeScrollAmount, KMarqueeScrollDelay, KMarqueeScrollInterval);
+ ListBox()->ItemDrawer()->ColumnData()->SetMarqueeParams(
+ KMarqueeLoopCount, KMarqueeScrollAmount, KMarqueeScrollDelay,
+ KMarqueeScrollInterval);
ListBox()->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
-
+
//Fetch the current item index
TInt index = ListBox()->CurrentItemIndex();
//Reset the disable marquee flag, so that marquee effect can continue (this is normally reset by
//base class of glxmetaDatadialog::HandlePointerEventL()
ListBox()->ItemDrawer()->ClearFlags(CListItemDrawer::EDisableMarquee);
-
+
//This is the function which actually starts marquee effect. It is anyway being called from base
//implementation of OfferKeyEventL(), but for pointer event, we have to call
//this function
ListBox()->DrawItem(index);
- }
+ }
+
// ----------------------------------------------------------------------------
// HandleCommandCompleteL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleCommandCompleteL(TAny* aSessionId,
+void CGlxMetadataContainer::HandleCommandCompleteL(TAny* aSessionId,
CMPXCommand* aCommandResult, TInt aError, MGlxMediaList* aList)
{
TRACER("CGlxMetadataContainer::HandleCommandCompleteL()");
-
+
//Callback from MDS when rename the Title
- if(aError == KErrNone)
- {
- if(aList == iItemMediaList && aCommandResult->IsSupported(KMPXMediaGeneralTitle))
- {
- GLX_LOG_INFO("RenameCMD to MDS completed");
- //Since RenameCommand to MDS is redundant and FileSystem has
- //already renamed the file, so there is no need to do anything here
- }
- }
-
+ if (aError == KErrNone)
+ {
+ if (aList == iItemMediaList && aCommandResult->IsSupported(
+ KMPXMediaGeneralTitle))
+ {
+ GLX_LOG_INFO("RenameCMD to MDS completed");
+ //Since RenameCommand to MDS is redundant and FileSystem has
+ //already renamed the file, so there is no need to do anything here
+ }
+ }
+
//To update the location information once the delete operation is successful.
- if(aList == iItemMediaList && iLocationinfo
- && static_cast<TAny*>( this ) == aSessionId)
- {
- TGlxMedia media = iItemMediaList->Item(0) ;
- media.DeleteLocationAttribute();
- iLocationinfo = EFalse;
- if ( aError == KErrNone )
- {
+ if (aList == iItemMediaList && iLocationinfo && static_cast<TAny*> (this)
+ == aSessionId)
+ {
+ TGlxMedia media = iItemMediaList->Item(0);
+ media.DeleteLocationAttribute();
+ iLocationinfo = EFalse;
+ if (aError == KErrNone)
+ {
iTextSetter.Zero();
- EditItemL(ELocationItem,EFalse);
- }
- }
- }
-
+ EditItemL(ELocationItem, EFalse);
+ }
+ }
+ }
+
// ----------------------------------------------------------------------------
-// HandleItemRemoved
+// HandleItemRemovedL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleItemRemovedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/,
- MGlxMediaList* /*aList*/ )
+void CGlxMetadataContainer::HandleItemRemovedL(TInt /*aStartIndex*/,
+ TInt /*aEndIndex*/, MGlxMediaList* /*aList*/)
{
- TRACER("CGlxMetadataContainer::HandleItemRemovedL()");
- }
+ TRACER("CGlxMetadataContainer::HandleItemRemovedL()");
+ if (iItemMediaList->Count() == 0)
+ {
+ iDialogObesrver.HandleItemRemovedL();
+ }
+ }
+
// ----------------------------------------------------------------------------
// HandleFocusChangedL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleFocusChangedL( NGlxListDefs::
- TFocusChangeType /*aType*/, TInt /*aNewIndex*/, TInt /*aOldIndex*/,
- MGlxMediaList* /*aList*/ )
+void CGlxMetadataContainer::HandleFocusChangedL(
+ NGlxListDefs::TFocusChangeType /*aType*/, TInt /*aNewIndex*/,
+ TInt /*aOldIndex*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxMetadataContainer::HandleFocusChangedL()");
}
+
// ----------------------------------------------------------------------------
-// HandleItemSelected
+// HandleItemSelectedL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleItemSelectedL(TInt /*aIndex*/,
- TBool /*aSelected*/, MGlxMediaList* /*aList*/ )
+void CGlxMetadataContainer::HandleItemSelectedL(TInt /*aIndex*/,
+ TBool /*aSelected*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxMetadataContainer::HandleItemSelectedL");
}
+
// ----------------------------------------------------------------------------
// HandleMessageL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleMessageL( const CMPXMessage& /*aMessage*/,
- MGlxMediaList* /*aList*/ )
+void CGlxMetadataContainer::HandleMessageL(const CMPXMessage& /*aMessage*/,
+ MGlxMediaList* /*aList*/)
{
TRACER("CGlxMetadataContainer::HandleMessageL()");
}
+
// ----------------------------------------------------------------------------
// HandleError
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleError( TInt /*aError*/ )
+void CGlxMetadataContainer::HandleError(TInt /*aError*/)
{
TRACER("CGlxMetadataContainer::HandleError()");
TRAP_IGNORE(HandleErrorL());
@@ -1287,115 +1333,117 @@
{
TRACER("CGlxMetadataContainer::HandleErrorL()");
}
+
// ----------------------------------------------------------------------------
// HandleCommandCompleteL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleCommandCompleteL( CMPXCommand* /*aCommandResult*/,
- TInt /*aError*/, MGlxMediaList* /*aList*/ )
+void CGlxMetadataContainer::HandleCommandCompleteL(
+ CMPXCommand* /*aCommandResult*/, TInt /*aError*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxMetadataContainer::HandleCommandCompleteL()");
}
-
+
// ----------------------------------------------------------------------------
// HandleMediaL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleMediaL( TInt /*aListIndex*/, MGlxMediaList* /*aList*/ )
+void CGlxMetadataContainer::HandleMediaL(TInt /*aListIndex*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxMetadataContainer::HandleMediaL()");
}
-
+
// ----------------------------------------------------------------------------
// HandleItemModifiedL
// ----------------------------------------------------------------------------
//
-void CGlxMetadataContainer::HandleItemModifiedL( const RArray<TInt>& /*aItemIndexes*/,
- MGlxMediaList* /*aList*/ )
+void CGlxMetadataContainer::HandleItemModifiedL(
+ const RArray<TInt>& /*aItemIndexes*/, MGlxMediaList* /*aList*/)
{
TRACER("CGlxMetadataContainer::HandleItemModifiedL()");
}
+
// ----------------------------------------------------------------------------
// ChangeMskL
// ----------------------------------------------------------------------------
//
void CGlxMetadataContainer::ChangeMskL()
- {
- TRACER("CGlxMetadataContainer::ChangeMsk()");
- TInt index = ListBox()->CurrentItemIndex();
- CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
- switch(index)
+ {
+ TRACER("CGlxMetadataContainer::ChangeMskL()");
+ CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+ CleanupClosePushL(*uiUtility);
+ switch (ListBox()->CurrentItemIndex())
{
- case ENameItem:
+ case ENameItem:
case EDescriptionItem:
- case ETagsItem:
- case EAlbumsItem:
+ case ETagsItem:
+ case EAlbumsItem:
{
- uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
- EAknSoftkeyEdit,R_GLX_METADATA_MSK_EDIT);
- }
- break;
+ uiUtility->ScreenFurniture()->ModifySoftkeyIdL(
+ CEikButtonGroupContainer::EMiddleSoftkeyPosition,
+ EAknSoftkeyEdit, R_GLX_METADATA_MSK_EDIT);
+ }
+ break;
case EDateAndTimeItem:
case ELocationItem:
case ESizeItem:
case EDurationItem:
case ElicenseItem:
case EResolutionItem:
- {
- uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
- EAknSoftkeyEdit,R_GLX_METADATA_MSK_BLANK);
- }
- break;
+ {
+ uiUtility->ScreenFurniture()->ModifySoftkeyIdL(
+ CEikButtonGroupContainer::EMiddleSoftkeyPosition,
+ EAknSoftkeyEdit, R_GLX_METADATA_MSK_BLANK);
+ }
+ break;
default:
- {
- break;
- }
+ {
+ break;
+ }
}
-
- if ( uiUtility )
- {
- uiUtility->Close();
- }
- }
-
+
+ CleanupStack::PopAndDestroy(uiUtility);
+ }
+
// ---------------------------------------------------------------------------
// Parse the drive, path & extension from the old uri,
// And return the modified uri by appending the new title
// ---------------------------------------------------------------------------
TFileName CGlxMetadataContainer::ParseFileName(const TDesC& aTitleText)
- {
- TRACER("CGlxMetadataContainer::ParseFileName()");
- const TGlxMedia& media = iItemMediaList->Item(0);
- TParsePtrC parsePtr(media.Uri());
+ {
+ TRACER("CGlxMetadataContainer::ParseFileName()");
+ const TGlxMedia& media = iItemMediaList->Item(0);
+ TParsePtrC parsePtr(media.Uri());
- TFileName destinationFileName;
- destinationFileName.Append(parsePtr.DriveAndPath());
- destinationFileName.Append(aTitleText);
- destinationFileName.Append(parsePtr.Ext());
+ TFileName destinationFileName;
+ destinationFileName.Append(parsePtr.DriveAndPath());
+ destinationFileName.Append(aTitleText);
+ destinationFileName.Append(parsePtr.Ext());
- return destinationFileName;
- }
+ return destinationFileName;
+ }
// ---------------------------------------------------------------------------
// Refresh MediaList with modified FileName.
// ---------------------------------------------------------------------------
void CGlxMetadataContainer::RefreshMediaListL(const TDesC& aModifiedUri)
- {
- //Refresh media list since media is renamed
- TRACER("CGlxMetadataContainer::RefreshMediaList()");
+ {
+ //Refresh media list since media is renamed
+ TRACER("CGlxMetadataContainer::RefreshMediaListL()");
+ GLX_LOG_URI("CGlxMetadataContainer::RefreshMediaListL(%S)", &aModifiedUri);
if (iUri)
- {
- delete iUri;
- iUri = NULL;
- }
- //always points to current media name
- iUri = aModifiedUri.AllocL();
- CMPXFilter* filter = TGlxFilterFactory::CreateURIFilterL(*iUri);
- CleanupStack::PushL(filter);
+ {
+ delete iUri;
+ iUri = NULL;
+ }
+ //always points to current media name
+ iUri = aModifiedUri.AllocL();
+ CMPXFilter* filter = TGlxFilterFactory::CreateURIFilterL(*iUri);
+ CleanupStack::PushL(filter);
- //Update media list's filter
- iItemMediaList->SetFilterL(filter);
- CleanupStack::PopAndDestroy(filter);
+ //Update media list's filter
+ iItemMediaList->SetFilterL(filter);
+ CleanupStack::PopAndDestroy(filter);
}
//End of file
--- a/photosgallery/viewframework/views/metadatadialog/src/glxmetadatadialog.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/metadatadialog/src/glxmetadatadialog.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -28,6 +28,7 @@
#include <akntoolbar.h>
#include <glxcommandhandleraddtocontainer.h> // For CGlxCommandHandlerAddToContainer
#include <aknphysics.h> // For Kinetic Scrolling
+#include <eikdialogext.h>
//User includes
#include <glxmetadatadialog.rsg>
@@ -54,83 +55,85 @@
// NewL
// -----------------------------------------------------------------------------
//
-EXPORT_C CGlxMetadataDialog* CGlxMetadataDialog::NewL( const TDesC& aUri )
- {
- TRACER("CGlxMetadataDialog::NewL");
-
- CGlxMetadataDialog* self = new(ELeave) CGlxMetadataDialog(aUri );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
+EXPORT_C CGlxMetadataDialog* CGlxMetadataDialog::NewL(const TDesC& aUri)
+ {
+ TRACER("CGlxMetadataDialog::NewL");
-CGlxMetadataDialog::CGlxMetadataDialog(const TDesC& aUri):iUri(aUri)
-{
+ CGlxMetadataDialog* self = new (ELeave) CGlxMetadataDialog(aUri);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
-}
+CGlxMetadataDialog::CGlxMetadataDialog(const TDesC& aUri) :
+ iUri(aUri)
+ {
+ }
+
// -----------------------------------------------------------------------------
// ConstructL
// -----------------------------------------------------------------------------
//
void CGlxMetadataDialog::ConstructL()
{
- TRACER("CGlxMetadataDialog::ConstructL");
+ TRACER("CGlxMetadataDialog::ConstructL");
- // Load dialog's resource file
- InitResourceL();
+ // Load dialog's resource file
+ InitResourceL();
- iStatusPaneAvailable = EFalse;
- // set the title to the dialog, Note that avkon dialogs do not support
- // setting the title in the status pane so we need to do it the hard way
- // get status pane
- CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
+ iStatusPaneAvailable = EFalse;
+ // set the title to the dialog, Note that avkon dialogs do not support
+ // setting the title in the status pane so we need to do it the hard way
+ // get status pane
+ CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
- if (statusPane && statusPane->IsVisible())
- {
- iStatusPaneAvailable = ETrue;
- }
+ if (statusPane && statusPane->IsVisible())
+ {
+ iStatusPaneAvailable = ETrue;
+ }
- // make the toolbar disabled
- SetDetailsDlgToolbarVisibility(EFalse);
+ // make the toolbar disabled
+ SetDetailsDlgToolbarVisibility(EFalse);
- // do we have status pane
- if (statusPane)
- {
- GLX_LOG_INFO1("GLX_UMP::CGlxMetadataDialog::ConstructL::STATUS PANE = %d",statusPane->IsVisible());
- // load the title text
- HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS,
- iEikonEnv );
- SetTitleL(*text);
- if (text)
- {
- delete text;
- }
- iAvkonAppUi->StatusPane()->MakeVisible(ETrue);
- }
-
- iUiUtility = CGlxUiUtility::UtilityL();
- TFileName uiutilitiesrscfile;
- uiutilitiesrscfile.Append(CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL());
+ // do we have status pane
+ if (statusPane)
+ {
+ GLX_LOG_INFO1("GLX_UMP::CGlxMetadataDialog::ConstructL::STATUS PANE = %d",statusPane->IsVisible());
+ // load the title text
+ HBufC* text = StringLoader::LoadL(R_GLX_METADATA_VIEW_TITLE_DETAILS,
+ iEikonEnv);
+ SetTitleL(*text);
+ if (text)
+ {
+ delete text;
+ }
+ iAvkonAppUi->StatusPane()->MakeVisible(ETrue);
+ }
- iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag,
- EFalse, uiutilitiesrscfile);
- iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this,
- EGlxCmdAddToAlbum, EFalse, uiutilitiesrscfile);
+ iUiUtility = CGlxUiUtility::UtilityL();
+ TFileName uiutilitiesrscfile;
+ uiutilitiesrscfile.Append(
+ CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL());
- // Call the base class' two-phased constructor
- CAknDialog::ConstructL(R_METADATA_MENUBAR);
+ iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag,
+ EFalse, uiutilitiesrscfile);
+ iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this,
+ EGlxCmdAddToAlbum, EFalse, uiutilitiesrscfile);
- // Instantiate the command handler
- iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this);
+ // Call the base class' two-phased constructor
+ CAknDialog::ConstructL(R_METADATA_MENUBAR);
+
+ // Instantiate the command handler
+ iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this);
- //steps to find kinetic scroll threshold value
- CAknPhysics* physics = CAknPhysics::NewL(*this, NULL);
- CleanupStack::PushL(physics);
- iKineticDragThreshold = physics->DragThreshold();
- CleanupStack::PopAndDestroy(physics);
- physics = NULL;
- }
+ //steps to find kinetic scroll threshold value
+ CAknPhysics* physics = CAknPhysics::NewL(*this, NULL);
+ CleanupStack::PushL(physics);
+ iKineticDragThreshold = physics->DragThreshold();
+ CleanupStack::PopAndDestroy(physics);
+ physics = NULL;
+ }
// -----------------------------------------------------------------------------
// ~CGlxMetadataDialog
@@ -217,74 +220,76 @@
// return the refernce of media list
return iContainer->MediaList();
}
+
// -----------------------------------------------------------------------------
// ProcessCommandL
// -----------------------------------------------------------------------------
//
void CGlxMetadataDialog::ProcessCommandL( TInt aCommandId )
{
- TRACER("CGlxMetadataDialog::ProcessCommandL");
-
- // hide menu bar
- iMenuBar->StopDisplayingMenuBar();
+ TRACER("CGlxMetadataDialog::ProcessCommandL");
+
+ // hide menu bar
+ iMenuBar->StopDisplayingMenuBar();
- switch( aCommandId )
- {
- case EAknSoftkeyEdit:
- case EAknSoftkeyCancel:
- case EAknSoftkeySelect:
- case EAknSoftkeyOk:
- {
- TryExitL( aCommandId );
- break;
- }
+ switch (aCommandId)
+ {
+ case EAknSoftkeyEdit:
+ case EAknSoftkeyCancel:
+ case EAknSoftkeySelect:
+ case EAknSoftkeyOk:
+ {
+ TryExitL(aCommandId);
+ break;
+ }
- case EAknCmdHelp:
- {
- TCoeHelpContext helpContext;
- helpContext.iMajor = TUid::Uid( KGlxGalleryApplicationUid );
- helpContext.iContext.Copy( LGAL_HLP_DETAILS_VIEW );
- const TInt KListSz = 1;
- CArrayFix<TCoeHelpContext>* contextList =
- new (ELeave) CArrayFixFlat<TCoeHelpContext>( KListSz );
- CleanupStack::PushL(contextList);
- contextList->AppendL(helpContext);
- HlpLauncher::LaunchHelpApplicationL(
- iEikonEnv->WsSession(), contextList );
- CleanupStack::Pop( contextList );
- break;
- }
- case KGlxDeleteBoundMenuCommandId:
- {
- //Event passed on to container to handle
- //Delete the location information of the data.
- iContainer->RemoveLocationL();
- break;
- }
- case KGlxEditBoundMenuCommandId:
- case KGlxViewBoundMenuCommandId:
- {
- //To edit the details - forward the event to container to edit
- //Both edit and view details command are handled in the same function based on the item.
- iContainer->HandleListboxChangesL();
- break;
- }
- case EGlxCmdAiwBase:
- {
- // pass aCommandId to command handler
- iMetadataCmdHandler->DoExecuteL( aCommandId, MediaList() );
- }
- default:
- break;
- }
- }
+ case EAknCmdHelp:
+ {
+ TCoeHelpContext helpContext;
+ helpContext.iMajor = TUid::Uid(KGlxGalleryApplicationUid);
+ helpContext.iContext.Copy(LGAL_HLP_DETAILS_VIEW);
+ const TInt KListSz = 1;
+ CArrayFix<TCoeHelpContext>* contextList =
+ new (ELeave) CArrayFixFlat<TCoeHelpContext> (KListSz);
+ CleanupStack::PushL(contextList);
+ contextList->AppendL(helpContext);
+ HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(),
+ contextList);
+ CleanupStack::Pop(contextList);
+ break;
+ }
+ case KGlxDeleteBoundMenuCommandId:
+ {
+ //Event passed on to container to handle
+ //Delete the location information of the data.
+ iContainer->RemoveLocationL();
+ break;
+ }
+ case KGlxEditBoundMenuCommandId:
+ case KGlxViewBoundMenuCommandId:
+ {
+ //To edit the details - forward the event to container to edit
+ //Both edit and view details command are handled in the same function based on the item.
+ iContainer->HandleListboxChangesL();
+ break;
+ }
+ case EGlxCmdAiwBase:
+ {
+ // pass aCommandId to command handler
+ iMetadataCmdHandler->DoExecuteL(aCommandId, MediaList());
+ }
+ default:
+ break;
+ }
+ }
+
//-----------------------------------------------------------------------------
// CGlxMetadataDialog::CreateCustomControlL
//-----------------------------------------------------------------------------
SEikControlInfo CGlxMetadataDialog::CreateCustomControlL(TInt
aControlType)
{
- GLX_LOG_INFO("CShwSlideshowSettingsDialog::CreateCustomControlL");
+ TRACER("CGlxMetadataDialog::CreateCustomControlL");
// create control info, no flags or trailer text set
SEikControlInfo controlInfo;
@@ -300,7 +305,6 @@
return controlInfo; // returns ownership of ItemList
}
-
// -----------------------------------------------------------------------------
// CGlxMetadataDialog::OfferKeyEventL
// -----------------------------------------------------------------------------
@@ -308,34 +312,34 @@
TKeyResponse CGlxMetadataDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
TEventCode aType )
{
- TRACER("CGlxMetadataDialog::OfferKeyEventL");
- TKeyResponse response = EKeyWasNotConsumed;
- switch(aKeyEvent.iCode)
- {
- case EKeyUpArrow:
- case EKeyDownArrow:
- {
- if(!iUiUtility->IsPenSupported())
- {
- iContainer->ChangeMskL();
- }
- iContainer->EnableMarqueingL();
- break;
- }
- default:
- break;
- }
- if ( response == EKeyWasNotConsumed )
- {
- // container didn't consume the key so try the base class
- // this is crucial as platform uses a key event to dismiss dialog
- // when a view changes to another. the base class also consumes all
- // the keys we dont want to handle automatically as this is a
- // blocking dialog
- response = CAknDialog::OfferKeyEventL( aKeyEvent, aType );
- }
- return response;
- }
+ TRACER("CGlxMetadataDialog::OfferKeyEventL");
+ TKeyResponse response = EKeyWasNotConsumed;
+ switch (aKeyEvent.iCode)
+ {
+ case EKeyUpArrow:
+ case EKeyDownArrow:
+ {
+ if (!iUiUtility->IsPenSupported())
+ {
+ iContainer->ChangeMskL();
+ }
+ iContainer->EnableMarqueingL();
+ break;
+ }
+ default:
+ break;
+ }
+ if (response == EKeyWasNotConsumed)
+ {
+ // container didn't consume the key so try the base class
+ // this is crucial as platform uses a key event to dismiss dialog
+ // when a view changes to another. the base class also consumes all
+ // the keys we dont want to handle automatically as this is a
+ // blocking dialog
+ response = CAknDialog::OfferKeyEventL(aKeyEvent, aType);
+ }
+ return response;
+ }
// -----------------------------------------------------------------------------
// CGlxMetadataDialog::DynInitMenuPaneL
@@ -400,14 +404,6 @@
return retVal;
}
-//-----------------------------------------------------------------------------
-// CGlxMetadataDialog::SizeChanged
-//-----------------------------------------------------------------------------
-void CGlxMetadataDialog::SizeChanged()
- {
- TRACER("CGlxMetadataDialog::SizeChanged");
- CAknDialog::SizeChanged();
- }
// -----------------------------------------------------------------------------
// CGlxMetadataDialog::InitResourceL
// -----------------------------------------------------------------------------
@@ -415,7 +411,6 @@
void CGlxMetadataDialog::InitResourceL()
{
TRACER("CGlxMetadataDialog::InitResourceL");
-
_LIT(KGlxMetadataDialogResource,"glxmetadatadialog.rsc");
//add resource file
TParse parse;
@@ -426,7 +421,6 @@
iResourceOffset = CCoeEnv::Static()->AddResourceFileL(resourceFile);
}
-
// -----------------------------------------------------------------------------
// CGlxMetadataDialog::HandleViewCommandL
// -----------------------------------------------------------------------------
@@ -436,44 +430,21 @@
TRACER("CGlxMetadataDialog::HandleViewCommandL");
return EFalse;
}
-// ---------------------------------------------------------------------------
-// CGlxMetadataDialog::PreLayoutDynInitL
-// ---------------------------------------------------------------------------
-//
-void CGlxMetadataDialog::PreLayoutDynInitL()
- {
- // No Implementation
- }
-
+
//-----------------------------------------------------------------------------
// CGlxMetadataDialog::PostLayoutDynInitL
//-----------------------------------------------------------------------------
//
void CGlxMetadataDialog::PostLayoutDynInitL()
- {
- TRACER("CGlxMetadataDialog::PostLayoutDynInitL");
- if(!iUiUtility->IsPenSupported())
- {
- iUiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
- EAknSoftkeyEdit,R_GLX_METADATA_MSK_EDIT);
- }
- }
-
-//-----------------------------------------------------------------------------
-// CGlxMetadataDialog::Draw
-//-----------------------------------------------------------------------------
-//
-void CGlxMetadataDialog::Draw( const TRect& /*aRect*/ ) const
- {
- TRACER("CGlxMetadataDialog::Draw");
- TRect rect;
- AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
-
- // Get the standard graphics context
- CWindowGc& gc = SystemGc();
- gc.SetBrushColor(KRgbWhite);
- gc.DrawRect(rect);
- }
+ {
+ TRACER("CGlxMetadataDialog::PostLayoutDynInitL");
+ if (!iUiUtility->IsPenSupported())
+ {
+ iUiUtility->ScreenFurniture()->ModifySoftkeyIdL(
+ CEikButtonGroupContainer::EMiddleSoftkeyPosition,
+ EAknSoftkeyEdit, R_GLX_METADATA_MSK_EDIT);
+ }
+ }
//-----------------------------------------------------------------------------
// CGlxMetadataDialog::HandlePointerEventL
@@ -482,50 +453,51 @@
void CGlxMetadataDialog::HandlePointerEventL(
const TPointerEvent& aPointerEvent)
{
-
TRACER("CGlxMetadataDialog::HandlePointerEventL");
//This has to be called first, as base class implementation sets the flag
// of settings dialog with EDisableMarquee
- CCoeControl::HandlePointerEventL( aPointerEvent );
-
+ CCoeControl::HandlePointerEventL(aPointerEvent);
+
//After the above call we can call our implementation to reset the marque
// flag and start marqueeing if needed
- if(aPointerEvent.iType == TPointerEvent::EButton1Down
+ if (aPointerEvent.iType == TPointerEvent::EButton1Down
|| aPointerEvent.iType == TPointerEvent::EButton2Down
|| aPointerEvent.iType == TPointerEvent::EButton3Down
|| aPointerEvent.iType == TPointerEvent::EDrag)
{
- if(aPointerEvent.iType != TPointerEvent::EDrag)
+ if (aPointerEvent.iType != TPointerEvent::EDrag)
{
- iViewDragged = EFalse;
+ iViewDragged = EFalse;
}
-
- if(aPointerEvent.iType == TPointerEvent::EDrag)
+
+ if (aPointerEvent.iType == TPointerEvent::EDrag)
{
- TInt delta = iPrev.iY - aPointerEvent.iPosition.iY;
- //Check for physics threshold, if not more than threshold, we can
- //still continue marqueeing
- TInt deltaAbs = delta < 0 ? -delta : delta;
- if(!iViewDragged && deltaAbs >= iKineticDragThreshold)
- iViewDragged = ETrue;
+ TInt delta = iPrev.iY - aPointerEvent.iPosition.iY;
+ //Check for physics threshold, if not more than threshold, we can
+ //still continue marqueeing
+ TInt deltaAbs = delta < 0 ? -delta : delta;
+ if (!iViewDragged && deltaAbs >= iKineticDragThreshold)
+ {
+ iViewDragged = ETrue;
+ }
}
-
- //This has to done at every above mentioned event, since the
- //disable marquee flag is set by base implementation, forcing
- //us the need to reset it everytime.
- if(!iViewDragged)
+
+ //This has to done at every above mentioned event, since the
+ //disable marquee flag is set by base implementation, forcing
+ //us the need to reset it everytime.
+ if (!iViewDragged)
{
- iContainer->EnableMarqueingL();
+ iContainer->EnableMarqueingL();
}
}
-
+
//record positions unless it is drag event
- if(aPointerEvent.iType != TPointerEvent::EDrag)
+ if (aPointerEvent.iType != TPointerEvent::EDrag)
{
iPrev = aPointerEvent.iPosition;
}
- }
+ }
// ---------------------------------------------------------------------------
// CGlxMetadataDialog::OnLocationEditL
@@ -538,28 +510,43 @@
}
// ---------------------------------------------------------------------------
-// CGlxMetadataDialog::AddTag
+// CGlxMetadataDialog::AddTagL
// ---------------------------------------------------------------------------
//
void CGlxMetadataDialog::AddTagL()
-{
+ {
+ TRACER("CGlxMetadataDialog::AddTagL");
iAddToTag->ExecuteL(EGlxCmdAddTag);
-}
+ }
+
// ---------------------------------------------------------------------------
-// CGlxMetadataDialog::AddAlbum
+// CGlxMetadataDialog::AddAlbumL
// ---------------------------------------------------------------------------
//
void CGlxMetadataDialog::AddAlbumL()
-{
+ {
+ TRACER("CGlxMetadataDialog::AddAlbumL");
iAddToAlbum->ExecuteL(EGlxCmdAddToAlbum);
-}
+ }
+
+// ---------------------------------------------------------------------------
+// CGlxMetadataDialog::HandleItemRemovedL
+// ---------------------------------------------------------------------------
+//
+void CGlxMetadataDialog::HandleItemRemovedL()
+ {
+ TRACER("CGlxMetadataDialog::HandleItemRemovedL");
+ Extension()->iPublicFlags.Set(CEikDialogExtension::EDelayedExit);
+ ProcessCommandL(EAknSoftkeyCancel);
+ Extension()->iPublicFlags.Clear(CEikDialogExtension::EDelayedExit);
+ }
// ---------------------------------------------------------------------------
// CGlxMetadataDialog::SetTitleL()
// ---------------------------------------------------------------------------
void CGlxMetadataDialog::SetTitleL(const TDesC& aTitleText)
{
- TRACER("CGlxFetcherContainer::SetTitleL");
+ TRACER("CGlxMetadataDialog::SetTitleL");
CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
CleanupStack::PushL(statusPane);
// get pointer to the default title pane control
@@ -583,7 +570,7 @@
// ---------------------------------------------------------------------------
void CGlxMetadataDialog::SetPreviousTitleL()
{
- TRACER("CGlxFetcherContainer::SetPreviousTitleL");
+ TRACER("CGlxMetadataDialog::SetPreviousTitleL");
CEikStatusPane* prevStatusPane = iEikonEnv->AppUiFactory()->StatusPane();
CleanupStack::PushL(prevStatusPane);
CAknTitlePane* prevTitlePane = ( CAknTitlePane* )prevStatusPane->ControlL(
@@ -597,16 +584,6 @@
CleanupStack::Pop(prevTitlePane);
CleanupStack::Pop(prevStatusPane);
}
-// -----------------------------------------------------------------------------
-// CGlxMetadataDialog::HandleResourceChange
-// -----------------------------------------------------------------------------
-//
-void CGlxMetadataDialog::HandleResourceChange( TInt aType )
- {
- TRACER("CGlxMetadataDialog::HandleResourceChange");
- //Handle global resource changes, such as scalable UI or skin events and orientation change (override)
- CAknDialog::HandleResourceChange( aType );
- }
// -----------------------------------------------------------------------------
// CGlxMetadataDialog::HandleToolbarResetting
@@ -615,7 +592,6 @@
void CGlxMetadataDialog::HandleToolbarResetting(TBool aVisible)
{
TRACER("CGlxMetadataDialog::HandleToolbarResetting");
-
CAknToolbar* popupToolbar = iAvkonAppUi->PopupToolbar();
if(popupToolbar)
{
@@ -635,7 +611,8 @@
}
}
-void CGlxMetadataDialog::ViewPositionChanged( const TPoint& /*aNewPosition*/, TBool /*aDrawNow*/, TUint /*aFlags*/ )
+void CGlxMetadataDialog::ViewPositionChanged(const TPoint& /*aNewPosition*/,
+ TBool /*aDrawNow*/, TUint /*aFlags*/)
{
//Dummy implementation
}
--- a/photosgallery/viewframework/views/viewbase/bwins/glxviewbaseu.def Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/bwins/glxviewbaseu.def Thu Aug 19 09:55:03 2010 +0300
@@ -27,17 +27,17 @@
?DoViewAnimationL@CGlxViewBase@@MAEXW4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@@Z @ 26 NONAME ; void CGlxViewBase::DoViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection)
??1CGlxViewBase@@UAE@XZ @ 27 NONAME ; CGlxViewBase::~CGlxViewBase(void)
?SetTitleL@CGlxViewBase@@QAEXABVTDesC16@@@Z @ 28 NONAME ; void CGlxViewBase::SetTitleL(class TDesC16 const &)
- ??0CGlxMediaListViewBase@@QAE@XZ @ 29 NONAME ; CGlxMediaListViewBase::CGlxMediaListViewBase(void)
- ?DisableTitle@CGlxViewBase@@QAEXXZ @ 30 NONAME ; void CGlxViewBase::DisableTitle(void)
- ?HandleCommandL@CGlxViewBase@@EAEXH@Z @ 31 NONAME ; void CGlxViewBase::HandleCommandL(int)
- ?FetchAttributesForCommandL@CGlxViewBase@@MAEXH@Z @ 32 NONAME ; void CGlxViewBase::FetchAttributesForCommandL(int)
- ??1CGlxTitleFetcher@@UAE@XZ @ 33 NONAME ; CGlxTitleFetcher::~CGlxTitleFetcher(void)
- ?OfferToolbarEventL@CGlxViewBase@@MAEXH@Z @ 34 NONAME ; void CGlxViewBase::OfferToolbarEventL(int)
- ?ViewDeactivated@CGlxViewBase@@MAEXXZ @ 35 NONAME ; void CGlxViewBase::ViewDeactivated(void)
- ?FetchAttributesL@CGlxViewBase@@MAEXXZ @ 36 NONAME ; void CGlxViewBase::FetchAttributesL(void)
- ?DoPrepareCommandHandlerL@CGlxMediaListViewBase@@MAEXPAVCGlxCommandHandler@@@Z @ 37 NONAME ; void CGlxMediaListViewBase::DoPrepareCommandHandlerL(class CGlxCommandHandler *)
- ?FetchAttributesForCommandL@CGlxMediaListViewBase@@EAEXH@Z @ 38 NONAME ; void CGlxMediaListViewBase::FetchAttributesForCommandL(int)
- ?SetToolbarStateL@CGlxViewBase@@MAEXXZ @ 39 NONAME ; void CGlxViewBase::SetToolbarStateL(void)
- ?GetToolBar@CGlxViewBase@@QAEPAVCAknToolbar@@XZ @ 40 NONAME ; class CAknToolbar * CGlxViewBase::GetToolBar(void)
- ?SetGridToolBar@CGlxViewBase@@QAEXPAVCAknToolbar@@@Z @ 41 NONAME ; void CGlxViewBase::SetGridToolBar(class CAknToolbar *)
+ ?GetToolBar@CGlxViewBase@@QAEPAVCAknToolbar@@XZ @ 29 NONAME ; class CAknToolbar * CGlxViewBase::GetToolBar(void)
+ ??0CGlxMediaListViewBase@@QAE@XZ @ 30 NONAME ; CGlxMediaListViewBase::CGlxMediaListViewBase(void)
+ ?DisableTitle@CGlxViewBase@@QAEXXZ @ 31 NONAME ; void CGlxViewBase::DisableTitle(void)
+ ?SetGridToolBar@CGlxViewBase@@QAEXPAVCAknToolbar@@@Z @ 32 NONAME ; void CGlxViewBase::SetGridToolBar(class CAknToolbar *)
+ ?HandleCommandL@CGlxViewBase@@EAEXH@Z @ 33 NONAME ; void CGlxViewBase::HandleCommandL(int)
+ ?FetchAttributesForCommandL@CGlxViewBase@@MAEXH@Z @ 34 NONAME ; void CGlxViewBase::FetchAttributesForCommandL(int)
+ ??1CGlxTitleFetcher@@UAE@XZ @ 35 NONAME ; CGlxTitleFetcher::~CGlxTitleFetcher(void)
+ ?OfferToolbarEventL@CGlxViewBase@@MAEXH@Z @ 36 NONAME ; void CGlxViewBase::OfferToolbarEventL(int)
+ ?ViewDeactivated@CGlxViewBase@@MAEXXZ @ 37 NONAME ; void CGlxViewBase::ViewDeactivated(void)
+ ?FetchAttributesL@CGlxViewBase@@MAEXXZ @ 38 NONAME ; void CGlxViewBase::FetchAttributesL(void)
+ ?DoPrepareCommandHandlerL@CGlxMediaListViewBase@@MAEXPAVCGlxCommandHandler@@@Z @ 39 NONAME ; void CGlxMediaListViewBase::DoPrepareCommandHandlerL(class CGlxCommandHandler *)
+ ?FetchAttributesForCommandL@CGlxMediaListViewBase@@EAEXH@Z @ 40 NONAME ; void CGlxMediaListViewBase::FetchAttributesForCommandL(int)
+ ?SetToolbarStateL@CGlxViewBase@@MAEXXZ @ 41 NONAME ; void CGlxViewBase::SetToolbarStateL(void)
--- a/photosgallery/viewframework/views/viewbase/eabi/glxviewbaseu.def Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/eabi/glxviewbaseu.def Thu Aug 19 09:55:03 2010 +0300
@@ -52,8 +52,8 @@
_ZTV20MGlxMediaListFactory @ 51 NONAME
_ZTV21CGlxMediaListViewBase @ 52 NONAME
_ZThn12_N12CGlxViewBase16DynInitMenuPaneLEiP12CEikMenuPane @ 53 NONAME
- _ZThn168_N21CGlxMediaListViewBase9MediaListEv @ 54 NONAME
- _ZThn172_N21CGlxMediaListViewBase21HandleTitleAvailableLERK7TDesC16 @ 55 NONAME
+ _ZThn172_N21CGlxMediaListViewBase9MediaListEv @ 54 NONAME
+ _ZThn176_N21CGlxMediaListViewBase21HandleTitleAvailableLERK7TDesC16 @ 55 NONAME
_ZThn4_N12CGlxViewBase14ViewActivatedLERK10TVwsViewId4TUidRK6TDesC8 @ 56 NONAME
_ZThn4_N12CGlxViewBase15ViewDeactivatedEv @ 57 NONAME
_ZThn80_N12CGlxViewBase17AnimationCompleteEP13MGlxAnimation @ 58 NONAME
--- a/photosgallery/viewframework/views/viewbase/group/glxviewbase.mmp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/group/glxviewbase.mmp Thu Aug 19 09:55:03 2010 +0300
@@ -109,7 +109,8 @@
LIBRARY libc.lib
LIBRARY libglib.lib
LIBRARY glxcommandhandlerbase.lib
-LIBRARY glxcommonui.lib //added as per single clk chngs
+LIBRARY glxcommonui.lib //added as per single clk chngs
+LIBRARY gfxtrans.lib //For GfxTransEffect
// End of File
SOURCEPATH ../src
\ No newline at end of file
--- a/photosgallery/viewframework/views/viewbase/inc/glxviewbase.h Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/inc/glxviewbase.h Thu Aug 19 09:55:03 2010 +0300
@@ -253,6 +253,9 @@
/// The view animation time
TInt iViewAnimationTime;
+
+ /// Status of FullScreen Transition is started
+ TBool iIsTransEffectStarted;
private:
/**
* Functions to handle view activate asynchronously
--- a/photosgallery/viewframework/views/viewbase/src/glxtoolbarcontroller.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/src/glxtoolbarcontroller.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -192,10 +192,6 @@
{
EnableLatch(EGlxCmdStartMultipleMarking, ETrue);
}
- else if (aList->SelectionCount() == 0)
- {
- EnableLatch(EGlxCmdStartMultipleMarking, EFalse);
- }
}
//----------------------------------------------------------------------------
@@ -229,7 +225,10 @@
TRAPD(err, CheckShareonlineVersionL());
GLX_LOG_INFO2("CGlxToolbarController::SetStatusOnViewActivationL(%d),"
" err(%d)", aList->Count(), err);
-
+ if (iToolbar->IsDimmed())
+ {
+ iToolbar->SetDimmed(EFalse);
+ }
CGlxNavigationalState* navigationalState =
CGlxNavigationalState::InstanceL();
CleanupClosePushL(*navigationalState);
@@ -348,11 +347,9 @@
CAknButton* toolbarButton =
static_cast<CAknButton*> (iToolbar->ControlOrNull(aCommandId));
- if (toolbarButton && !toolbarButton->IsDimmed())
+ if( toolbarButton )
{
toolbarButton->SetCurrentState(aLatched, ETrue);
- // Force to update the frame IDs
- toolbarButton->SetDimmed(EFalse);
}
}
--- a/photosgallery/viewframework/views/viewbase/src/glxviewbase.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/src/glxviewbase.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -43,6 +43,9 @@
#include <aknbutton.h> // for getting the button state
+// For transition effects
+#include <gfxtranseffect/gfxtranseffect.h>
+
_LIT(KGlxViewBaseResource, "glxviewbase.rsc");
/// Length of time a view-switch animation should take
@@ -54,6 +57,7 @@
//
EXPORT_C CGlxViewBase::CGlxViewBase(TBool aSyncActivation) :
iViewAnimationTime(KGlxViewSwitchAnimationDuration),
+ iIsTransEffectStarted(EFalse),
iViewAnimationInProgress(EGlxViewAnimationNone),
iSyncActivation(aSyncActivation)
{
@@ -156,6 +160,8 @@
{
if ( EAknSoftkeyBack == aCommand )
{
+ // Pass it to view
+ DoHandleCommandL(aCommand);
iUiUtility->SetViewNavigationDirection(EGlxNavigationBackwards);
}
else if ( EAknCmdOpen == aCommand )
@@ -708,6 +714,14 @@
iCommandHandlerList[i]->ActivateL(Id().iUid);
i++;
}
+
+ //Check if transition effect is already started.
+ //Calling the 'EndFullScreen()' actually starts the FS transition effect.
+ if(iIsTransEffectStarted)
+ {
+ GfxTransEffect::EndFullScreen();
+ iIsTransEffectStarted = EFalse;
+ }
InitAnimationL(EGlxViewAnimationEntry);
}
--- a/photosgallery/viewframework/views/zoomview/src/glxzoomcontrol.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/src/glxzoomcontrol.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -282,6 +282,9 @@
{
TRACER("CGlxZoomControl::ActivateL()");
+ //Request to release GPU mem parallelly
+ iGPUMemMonitor->RequestMemory(EFalse);
+
if ( !iZoomActive )
{
//To Retrive the image details
--- a/photosgallery/viewframework/visuallistmanager/src/glxvisuallistwindow.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/visuallistmanager/src/glxvisuallistwindow.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -146,9 +146,9 @@
object.SetScaleMode(CAlfImageVisual::EScaleNormal);
}
- // show the object. do this before notifying control, to show
- // at the image if control leaves
- object.SetVisible( ETrue );
+ // Keep the visual invisible to avoid showing wrong visual in the starting,
+ // Effect control will make it visisble
+ object.SetVisible( EFalse );
// notify observer
iControl->HandleVisualAddedL( object.Visual(), aIndex );