--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/phonebook_2_rcl_api/tsrc/rcl_dummy_db/group/dummyadapter.pkg Wed Apr 14 15:45:35 2010 +0300
@@ -0,0 +1,33 @@
+;
+; 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:
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"RCL DUMMY ADAPTER"},(0x20029F8C),1,0,0
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+;Dummy Plugin
+"\epoc32\release\armv5\urel\dummyadapter.dll"-"!:\sys\bin\dummyadapter.dll"
+"\EPOC32\DATA\Z\Resource\Plugins\dummyadapter.RSC"-"!:\resource\plugins\dummyadapter.rsc"
\ No newline at end of file
--- a/contacts_plat/phonebook_internal_data_management_api/inc/Phonebook/MPbkGlobalSetting.h Wed Mar 31 21:13:53 2010 +0300
+++ b/contacts_plat/phonebook_internal_data_management_api/inc/Phonebook/MPbkGlobalSetting.h Wed Apr 14 15:45:35 2010 +0300
@@ -138,7 +138,7 @@
* Returns one of the system wide error codes.
* @param aKey Subcategory of the value to set.
*/
- virtual TInt Set(TPbkGlobalSetting aKey, TReal aValue) = 0;
+ virtual TInt Set(TPbkGlobalSetting aKey, TReal aValue) __SOFTFP = 0;
/**
* Registers an observer for setting changes. Only one setting can be
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/inc/CContactStore.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/inc/CContactStore.h Wed Apr 14 15:45:35 2010 +0300
@@ -53,6 +53,7 @@
class CFieldsInfo;
class CContactStoreInfo;
class CNamedRemoteViewHandle;
+class CContactStoreOpenOperation;
#ifdef _DEBUG
enum TContactStorePanic
@@ -61,7 +62,8 @@
EPreCond_ContactDestroyed,
EPreCond_CreateNewContactGroupLC,
EPreCond_ContactGroupsLC,
- EPreCond_OwnContactLinkL
+ EPreCond_OwnContactLinkL,
+ EPreCond_OpenOperationState
};
void ContactStorePanic( TContactStorePanic aPanic );
@@ -247,6 +249,31 @@
const CContact& aContactItem,
MVPbkContactObserver& aObserver );
+ /**
+ * Asynchronous store opening is complete.
+ *
+ * @see CContactStoreOpenOperation.
+ * @param aDB Opened native contacts store database.
+ */
+ void StoreOpenedL( CContactDatabase* aDB );
+
+ /**
+ * Asynchronous store opening has failed.
+ *
+ * @see CContactStoreOpenOperation.
+ * @param aError Generic synbian error code.
+ */
+ void StoreOpenFailed( TInt aError );
+
+ /**
+ * Request free disk space.
+ * NOTE: Request is put on cleanupstack only if return value is ETrue.
+ *
+ * @param aSpace Amount of free space requested.
+ * @return ETrue if request was successful.
+ */
+ TBool RequestFreeDiskSpaceLC( TInt aSpace );
+
public: // From MVPbkContactStore
const MVPbkContactStoreProperties& StoreProperties() const;
void OpenL(
@@ -360,6 +387,10 @@
VPbkEngUtils::CVPbkDiskSpaceCheck* iDiskSpaceCheck;
/// Own: named remote view container
RPointerArray<CNamedRemoteViewHandle> iNamedViewContainer;
+ /// Own: Contact store open operation
+ CContactStoreOpenOperation* iOpenOperation;
+ /// Has golden template been updated
+ TBool iGoldenTemplateUpdated;
};
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/inc/CContactStoreInfo.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/inc/CContactStoreInfo.h Wed Apr 14 15:45:35 2010 +0300
@@ -99,6 +99,7 @@
private: // Data
CContactStore& iStore;
CContactStoreDomain& iDomain;
+ mutable TBool iGroupsFetched;
};
} // namespace VPbkCntModel
#endif // VPBKCNTMODEL_CCONTACTSTOREINFO_H
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/inc/CFindViewBase.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/inc/CFindViewBase.h Wed Apr 14 15:45:35 2010 +0300
@@ -282,6 +282,8 @@
TBool iOwnsContacts;
/// Own: ETrue if this view is ready
TBool iViewReady;
+ /// Own: Mark if this object be destroyed
+ TBool* iDestroyed;
};
} // namespace VPbkCntModel
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CContactStore.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CContactStore.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -298,7 +298,256 @@
} // unnamed namespace
+// --------------------------------------------------------------------------
+// CContactStoreOpenOperation
+// --------------------------------------------------------------------------
+//
+class CContactStoreOpenOperation : public CActive
+{
+public: // construction & destruction
+ /**
+ * Open native contact database operation. Started automatically.
+ *
+ * @param aStore Store that will receive events when operation is complete
+ * @param aReplace replace contact database (instead of open)
+ */
+ CContactStoreOpenOperation( CContactStore& aStore, TBool aReplace );
+
+ ~CContactStoreOpenOperation();
+
+private: // From CActive
+ void DoCancel();
+ void RunL();
+ TInt RunError( TInt aError );
+
+private: // data types
+
+ /// Operation states
+ enum TStates
+ {
+ // Operation: Replace default store
+ // Next states: [EStateDone]
+ EStateReplaceStore,
+
+ // Operation: Open default store
+ // Next states: [EStateStoreOpened]
+ EStateOpenStore,
+
+ // Result: State when store has been opened (success or failure)
+ // Next states: [EStateStoreOpenedAfterError, EStateDone]
+ EStateStoreOpened,
+
+ // Result: State after second attempt to open store (first have failed).
+ // Next states: [EStateDone]
+ EStateStoreOpenedAfterError,
+
+ // Result: DB has been opened successfully. Report it to store.
+ // Next states: -
+ EStateDone,
+ };
+
+private: // implementation
+
+ /**
+ * Move to next state asynchronously
+ */
+ void IssueRequest( TStates aNextState, TInt aError = KErrNone );
+
+ /**
+ * Handle state EStateStoreOpened
+ */
+ void HandleStoreOpenedL( TInt aError );
+
+private: // data
+
+ /// Active state
+ TStates iState;
+ /// Ref: Contact store
+ CContactStore& iStore;
+ /// Own: Native contact database
+ CContactDatabase* iDb;
+ /// Own: Native contact database open operation
+ CContactOpenOperation* iOperation;
+};
+
+// --------------------------------------------------------------------------
+// CContactStoreOpenOperation::~CContactStoreOpenOperation
+// --------------------------------------------------------------------------
+//
+CContactStoreOpenOperation::~CContactStoreOpenOperation()
+ {
+ Cancel();
+ delete iDb;
+ delete iOperation;
+ }
+
+// --------------------------------------------------------------------------
+// CContactStoreOpenOperation::DoCancel
+// --------------------------------------------------------------------------
+//
+void CContactStoreOpenOperation::DoCancel()
+ {
+ delete iOperation;
+ iOperation = NULL;
+ }
+
+// --------------------------------------------------------------------------
+// CContactStoreOpenOperation::RunL
+// --------------------------------------------------------------------------
+//
+void CContactStoreOpenOperation::RunL()
+ {
+ switch( iState )
+ {
+ case EStateReplaceStore:
+ {
+ iDb = CContactDatabase::ReplaceL(
+ iStore.StoreProperties().Name().UriDes() );
+ IssueRequest( EStateDone );
+ break;
+ }
+ case EStateOpenStore:
+ {
+ iOperation = CContactDatabase::Open(
+ iStore.StoreProperties().Name().UriDes(), iStatus );
+ SetActive();
+ iState = EStateStoreOpened;
+ break;
+ }
+ case EStateStoreOpened:
+ {
+ HandleStoreOpenedL( iStatus.Int() );
+ break;
+ }
+ case EStateStoreOpenedAfterError:
+ {
+ User::LeaveIfError( iStatus.Int() ); // report errors immediately
+ iDb = iOperation->TakeDatabase();
+ IssueRequest( EStateDone );
+ break;
+ }
+ case EStateDone:
+ {
+ CContactDatabase* db = iDb;
+ iDb = NULL; // give ownership
+ CContactStore& store = iStore;
+
+ TRAPD( err, store.StoreOpenedL( db ) );
+ // NOTE! Don't touch members after this call.
+ // This instance could be deleted
+ if( err )
+ {
+ store.StoreOpenFailed( err );
+ }
+ break;
+ }
+ default:
+ {
+ // unknown state
+ __ASSERT_DEBUG( EFalse,
+ ContactStorePanic( EPreCond_OpenOperationState ) );
+ iStore.StoreOpenFailed( KErrUnknown );
+ }
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CContactStoreOpenOperation::RunError
+// --------------------------------------------------------------------------
+//
+TInt CContactStoreOpenOperation::RunError( TInt aError )
+ {
+ iStore.StoreOpenFailed( aError );
+ return KErrNone;
+ }
+
+// --------------------------------------------------------------------------
+// CContactStoreOpenOperation::CContactStoreOpenOperation
+// --------------------------------------------------------------------------
+//
+CContactStoreOpenOperation::CContactStoreOpenOperation(
+ CContactStore& aStore, TBool aReplace ) :
+ CActive( EPriorityLow ),
+ iStore( aStore )
+ {
+ CActiveScheduler::Add( this );
+ IssueRequest( aReplace ? EStateReplaceStore : EStateOpenStore ); // start working
+ }
+
+// --------------------------------------------------------------------------
+// CContactStoreOpenOperation::IssueRequest
+// --------------------------------------------------------------------------
+//
+void CContactStoreOpenOperation::IssueRequest( TStates aNextState, TInt aError )
+ {
+ if( !IsActive() )
+ {
+ TRequestStatus* status = &iStatus;
+ User::RequestComplete( status, aError );
+ SetActive();
+ iState = aNextState;
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CContactStoreOpenOperation::HandleStoreOpenedL
+// --------------------------------------------------------------------------
+//
+void CContactStoreOpenOperation::HandleStoreOpenedL( TInt aError )
+ {
+ if( aError == KErrNone )
+ {
+ // Store opened succesfully
+ iDb = iOperation->TakeDatabase();
+ IssueRequest( EStateDone );
+ }
+ else // some error happened
+ {
+ delete iOperation;
+ iOperation = NULL;
+
+ const TDesC& dbName = iStore.StoreProperties().Name().UriDes();
+ TInt creating = EFalse;
+
+ if( aError == KErrNotFound )
+ {
+ // Database not found --> Creating it
+ creating = ETrue;
+ TRAP( aError, iDb = CContactDatabase::CreateL( dbName ) );
+ }
+
+ if ( KErrDiskFull == aError )
+ {
+ // Try to release space for contact db opening
+ if( iStore.RequestFreeDiskSpaceLC( KDiskSpaceForDbOpening ) )
+ {
+ aError = KErrNone;
+ if( creating )
+ {
+ // Databse was not found --> Creating it
+ iDb = CContactDatabase::CreateL( dbName );
+ }
+ else
+ {
+ // Opening database
+ iOperation = CContactDatabase::Open( dbName, iStatus );
+ SetActive();
+ iState = EStateStoreOpenedAfterError;
+ }
+ CleanupStack::PopAndDestroy(); // RequestFreeDiskSpaceLC
+ }
+ }
+
+ // leave on unhandled error
+ User::LeaveIfError( aError );
+
+ if( iDb )
+ {
+ IssueRequest( EStateDone );
+ }
+ }
+ }
// --------------------------------------------------------------------------
// CContactStore::CContactStore
@@ -331,6 +580,7 @@
delete iFieldsInfo;
delete iProperties;
delete iDiskSpaceCheck;
+ delete iOpenOperation;
FeatureManager::UnInitializeLib();
}
@@ -878,6 +1128,100 @@
}
// --------------------------------------------------------------------------
+// CContactStore::StoreOpenedL
+// --------------------------------------------------------------------------
+//
+void CContactStore::StoreOpenedL( CContactDatabase* aDB )
+ {
+ VPBK_DEBUG_PRINT(VPBK_DEBUG_STRING
+ ("VPbkCntModel: CContactStore::StoreOpenedL"));
+
+ CleanupStack::PushL( aDB );
+
+ delete iOpenOperation;
+ iOpenOperation = NULL;
+
+ if( !iGoldenTemplateUpdated )
+ {
+ iSysTemplate = aDB->OpenContactL(aDB->TemplateId());
+ // set contact model template label texts according to localisation
+ // must be done in order for contact field labels to be correct after language change
+ if( UpdateSystemTemplateFieldsL( *iSysTemplate, *iFieldsInfo ) )
+ {
+ aDB->CommitContactL( *iSysTemplate );
+ iGoldenTemplateUpdated = ETrue;
+ }
+ CloseSystemTemplate( aDB );
+
+ // reopen the contact database if the golden template has been changed
+ if( iGoldenTemplateUpdated )
+ {
+ // template updated -> reopen store
+ CleanupStack::PopAndDestroy( aDB );
+ iOpenOperation = new(ELeave) CContactStoreOpenOperation( *this, EFalse );
+ return;
+ }
+ }
+
+ // read the system template and create the field factory accordingly
+ iSysTemplate = aDB->ReadContactL(aDB->TemplateId());
+ iFieldFactory = CFieldFactory::NewL(iStoreDomain.FieldTypeMap(),
+ iSysTemplate, MasterFieldTypeList(), iStoreDomain.FsSession() );
+ iSysTemplate = NULL;
+
+ // set supported fields for this store
+ iProperties->SetSupportedFields(*iFieldFactory);
+ SetStaticPropertiesL();
+
+ iDbNotifier = CContactChangeNotifier::NewL(*aDB, this);
+ CleanupStack::Pop(aDB);
+ iContactDb = aDB;
+
+ // Activate remote views so that contacts server will build
+ // the view as soon as possible when system boots.
+ // This is trapped because it's not wanted to block
+ // the store opening if the view building failed.
+ TRAP_IGNORE( DoActivateRemoteViewsL() );
+
+ // Send event to all observers. This means that multiple pending open requests
+ // are all signalled as complete here and we can cancel all other open operations.
+ SendEventL(iObservers, &MVPbkContactStoreObserver::StoreReady, *this);
+ iAsyncOpenOp->Purge();
+ }
+
+// --------------------------------------------------------------------------
+// CContactStore::StoreOpenFailed
+// --------------------------------------------------------------------------
+//
+void CContactStore::StoreOpenFailed( TInt aError )
+ {
+ VPBK_DEBUG_PRINT(VPBK_DEBUG_STRING
+ ("VPbkCntModel: CContactStore::StoreOpenFailed(%d)"), aError);
+
+ delete iOpenOperation;
+ iOpenOperation = NULL;
+
+ SendErrorEvent(iObservers, &MVPbkContactStoreObserver::StoreUnavailable,
+ *this, aError );
+ }
+
+// --------------------------------------------------------------------------
+// CContactStore::RequestFreeDiskSpaceLC
+// --------------------------------------------------------------------------
+//
+TBool CContactStore::RequestFreeDiskSpaceLC( TInt aSpace )
+ {
+ RSharedDataClient* sharedDataClient = iStoreDomain.SharedDataClient();
+ if( sharedDataClient )
+ {
+ // Try to release space for contact db opening
+ sharedDataClient->RequestFreeDiskSpaceLC( aSpace );
+ return ETrue;
+ }
+ return EFalse;
+ }
+
+// --------------------------------------------------------------------------
// CContactStore::CreateContactRetrieverL
// --------------------------------------------------------------------------
//
@@ -1162,62 +1506,11 @@
if (!iContactDb)
{
- CContactDatabase* db = NULL;
- if (aReplace)
- {
- db = CContactDatabase::ReplaceL(StoreProperties().Name().UriDes());
- }
- else
- {
- db = OpenInternalL();
- }
- CleanupStack::PushL(db);
-
- // opens the Symbian Contacts model golden template
- TBool updated = EFalse;
- iSysTemplate = db->OpenContactL(db->TemplateId());
- // set contact model template label texts according to localisation
- // must be done in order for contact field labels to be correct after language change
- if (UpdateSystemTemplateFieldsL(*iSysTemplate, *iFieldsInfo))
- {
- db->CommitContactL(*iSysTemplate);
- updated = ETrue;
- }
- CloseSystemTemplate(db);
-
- // reopen the contact database if the golden template has been changed
- if(updated)
+ // start opening store if it's not already pending
+ if( !iOpenOperation )
{
- CleanupStack::PopAndDestroy(db);
- db = NULL;
- // db already exists so we just reopen it
- db = OpenInternalL();
- CleanupStack::PushL(db);
+ iOpenOperation = new(ELeave) CContactStoreOpenOperation( *this, EFalse );
}
- // read the system template and create the field factory accordingly
- iSysTemplate = db->ReadContactL(db->TemplateId());
- iFieldFactory = CFieldFactory::NewL(iStoreDomain.FieldTypeMap(),
- iSysTemplate, MasterFieldTypeList(), iStoreDomain.FsSession() );
- iSysTemplate = NULL;
-
- // set supported fields for this store
- iProperties->SetSupportedFields(*iFieldFactory);
- SetStaticPropertiesL();
-
- iDbNotifier = CContactChangeNotifier::NewL(*db, this);
- CleanupStack::Pop(db);
- iContactDb = db;
-
- // Activate remote views so that contacts server will build
- // the view as soon as possible when system boots.
- // This is trapped because it's not wanted to block
- // the store opening if the view building failed.
- TRAP_IGNORE( DoActivateRemoteViewsL() );
-
- // Send event to all observers. This means that multiple pending open requests
- // are all signalled as complete here and we can cancel all other open operations.
- SendEventL(iObservers, &MVPbkContactStoreObserver::StoreReady, *this);
- iAsyncOpenOp->Purge();
}
else
{
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CContactStoreInfo.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CContactStoreInfo.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -74,8 +74,7 @@
//
TInt CContactStoreInfo::NumberOfContactsL() const
{
- TInt groupCount = iStore.NativeDatabase().GroupCount();
- return iStore.NativeDatabase().CountL() - groupCount;
+ return iStore.NativeDatabase().CountL() - NumberOfGroupsL();
}
// -----------------------------------------------------------------------------
@@ -116,6 +115,14 @@
//
TInt CContactStoreInfo::NumberOfGroupsL() const
{
+ if( !iGroupsFetched )
+ {
+ CContactIdArray* arr = iStore.NativeDatabase().GetGroupIdListL();
+ iGroupsFetched = ETrue;
+ const TInt count = arr->Count();
+ delete arr;
+ return count;
+ }
return iStore.NativeDatabase().GroupCount();
}
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CDeleteContactsOperation.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CDeleteContactsOperation.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -26,6 +26,7 @@
// Virtual Phonebook engine
#include <MVPbkBatchOperationObserver.h>
+#include <MVPbkContactStoreInfo.h>
// Contact Model
#include <cntdef.h>
@@ -101,7 +102,7 @@
iRemainingContactIds = CContactIdArray::NewL();
iCurrentContactIds = CContactIdArray::NewL();
- iGroupCount = iContactStore.NativeDatabase().GroupCount();
+ iGroupCount = iContactStore.StoreInfo().NumberOfGroupsL();
const TInt count = aLinks.Count();
for ( TInt i=0 ; i < count; ++i )
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CFindViewBase.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CFindViewBase.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -87,7 +87,8 @@
TBool aOwnsContacts ) :
iParentView( aParentView ),
iBaseView( aBaseView ),
- iOwnsContacts( aOwnsContacts )
+ iOwnsContacts( aOwnsContacts ),
+ iDestroyed( NULL )
{
}
@@ -136,6 +137,10 @@
delete iViewContact;
delete iFieldTypeRefsList;
delete iFindStrings;
+ if ( iDestroyed )
+ {
+ *iDestroyed = ETrue;
+ }
}
// --------------------------------------------------------------------------
@@ -501,6 +506,10 @@
{
ContactViewError( aView, error, EFalse );
}
+ else
+ {
+ ContactViewReady( aView );
+ }
}
// --------------------------------------------------------------------------
@@ -786,13 +795,21 @@
void CFindViewBase::SendContactViewErrorEvent( TInt aError,
TBool aErrorNotified )
{
+ TBool destroy = EFalse;
+ iDestroyed = &destroy;
+
// Send first to external observers...
- VPbkEng::SendEventToObservers( *this, aError, aErrorNotified, iObservers,
- &MVPbkContactViewObserver::ContactViewError );
+ VPbkEng::SendEventToObserversWhenNotDestroyed( *this, aError, aErrorNotified, iObservers,
+ &MVPbkContactViewObserver::ContactViewError, destroy );
// ...then to internal. This ensures that events come first from lower
// level find view.
- VPbkEng::SendEventToObservers( *this, aError, aErrorNotified,
- iFilteringObservers, &MVPbkContactViewObserver::ContactViewError );
+ VPbkEng::SendEventToObserversWhenNotDestroyed( *this, aError, aErrorNotified,
+ iFilteringObservers, &MVPbkContactViewObserver::ContactViewError, destroy );
+
+ if ( !destroy )
+ {
+ iDestroyed = NULL;
+ }
}
} // namespace VPbkCntModel
// End of File
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CViewBase.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CViewBase.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -744,7 +744,7 @@
aObserver.ContactViewReadyForFiltering( *this );
// Then let the filtered view to send event to its external
// observers.
- aObserver.ContactViewReady( *this );
+ // aObserver.ContactViewReady( *this ); // removed to function CFindViewBase::ContactViewReadyForFiltering(...)
}
else if (!iViewReady && !iParentStore.IsOpened())
{
--- a/phonebookengines/VirtualPhonebook/VPbkEng/rss/VPbkFieldTypeSelectors.rss Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkEng/rss/VPbkFieldTypeSelectors.rss Wed Apr 14 15:45:35 2010 +0300
@@ -669,6 +669,9 @@
excludedParameters = {EVPbkVersitParamFAX,EVPbkVersitParamVIDEO};
}
+/**
+ * Warning: this selector has very poor performance.
+ */
RESOURCE VPBK_FIELD_TYPE_SELECTOR r_vpbk_unieditor_action_selector
{
versitProperties =
@@ -703,6 +706,9 @@
excludedParameters = {EVPbkVersitParamPAGER,EVPbkVersitParamFAX,EVPbkVersitParamVIDEO};
}
+/**
+ * Warning: this selector has very poor performance.
+ */
RESOURCE VPBK_FIELD_TYPE_SELECTOR r_vpbk_unieditor_email_action_selector
{
versitProperties =
--- a/phonebookengines/VirtualPhonebook/VPbkEng/src/VPbkFieldTypeSelectorFactory.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkEng/src/VPbkFieldTypeSelectorFactory.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -232,7 +232,7 @@
CleanupStack::PushL(localVariation);
if ( localVariation->LocallyVariatedFeatureEnabled(
- EVPbkLVShowEmailInSendMsg ) )
+ EVPbkLVShowEmailInSendMsg ) )
{
result.AppendL(R_VPBK_UNIEDITOR_EMAIL_ACTION_SELECTOR);
}
--- a/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CRemoteView.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkSimStore/src/CRemoteView.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: The remote sim view implementation
-* Version : %version: he1s60#21.1.3 %
+* Version : %version: be1neux1#21.1.4 %
*
*/
@@ -302,10 +302,13 @@
}
case EVPbkSimContactAdded:
{
- SendEvent(iObservers, &MVPbkSimViewObserver::ViewContactEvent,
- MVPbkSimViewObserver::EContactAdded,
- iEventData.iData, iEventData.iOpData );
- break;
+ if( iEventData.iData != KErrNotFound )
+ {
+ SendEvent(iObservers, &MVPbkSimViewObserver::ViewContactEvent,
+ MVPbkSimViewObserver::EContactAdded,
+ iEventData.iData, iEventData.iOpData );
+ }
+ break;
}
case EVPbkSimContactDeleted:
{
--- a/phonebookengines/VirtualPhonebook/VPbkVCardEng/inc/CVPbkVCardPropertyExporter.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkVCardEng/inc/CVPbkVCardPropertyExporter.h Wed Apr 14 15:45:35 2010 +0300
@@ -168,6 +168,10 @@
void DoNextL();
void HandleOwnCardL();
void HandleGroupCardL();
+ void AddRevL();
+ CParserPropertyValueDateTime* CreateDateTimePropertyL(
+ const TTime& aDateTime,
+ TVersitDateTime::TRelativeTime aRelativeTime);
private:
CParserVCard* iParser;
--- a/phonebookengines/VirtualPhonebook/VPbkVCardEng/src/CVPbkVCardPropertyExporter.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkVCardEng/src/CVPbkVCardPropertyExporter.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -47,12 +47,16 @@
#include <VPbkDebug.h>
#include <centralrepository.h>
+#include <MVPbkStoreContactProperties.h>
// CONSTANTS
const TInt KNsmlDsGeoField = 0x0000; // defined in DS cenrep
const TUid KCRUidGeoFieldInternalKeys = { 0x20022EE1 }; // 0x20022EE1 defined in DS cenrep
_LIT8(KGEO, "GEO");
+_LIT8(KREV, "REV");
+
+
namespace
{
@@ -630,6 +634,10 @@
TRAP( err, HandleOwnCardL() );
if(err == KErrNone )
TRAP( err, HandleGroupCardL() );
+
+ // Parse the REV (Revision) field if any
+ if(err == KErrNone )
+ TRAP( err, AddRevL() );
}
return err;
}
@@ -720,5 +728,45 @@
}
}
+void CVPbkVCardPropertyExporter::AddRevL()
+ {
+ MVPbkStoreContact* tempContact = const_cast<MVPbkStoreContact*>(iContact);
+ if( tempContact )
+ {
+ MVPbkStoreContact2* tempContact2 = reinterpret_cast<MVPbkStoreContact2*>
+ (tempContact->StoreContactExtension (KMVPbkStoreContactExtension2Uid) );
+ if(tempContact2)
+ {
+ MVPbkStoreContactProperties* propreties = tempContact2->PropertiesL();
+ CleanupDeletePushL(propreties);
+
+ // Convert the last_modified field defined in Contact Model database
+ // to REV (Revision) field in vCard Specification 2.1
+ CParserPropertyValueDateTime* valueDateTime =
+ CreateDateTimePropertyL(
+ propreties->LastModifiedL(),
+ TVersitDateTime::EIsUTC );
+ CleanupStack::PopAndDestroy(propreties);
+
+ CleanupStack::PushL(valueDateTime);
+ CParserProperty* property =
+ CParserGroupedProperty::NewL(*valueDateTime, KREV, NULL, NULL);
+
+ CleanupStack::PushL( property );
+ iParser->AddPropertyL(property); //takes ownership
+ CleanupStack::Pop(2);//valueDateTime and property
+ }
+ }
+ }
+
+CParserPropertyValueDateTime* CVPbkVCardPropertyExporter::CreateDateTimePropertyL
+ (const TTime& aDateTime, TVersitDateTime::TRelativeTime aRelativeTime)
+ {
+ TVersitDateTime* dateTime= new(ELeave)TVersitDateTime(aDateTime.DateTime(), aRelativeTime);
+ CleanupStack::PushL(dateTime);
+ CParserPropertyValueDateTime* dateTimeValue=new(ELeave) CParserPropertyValueDateTime(dateTime);
+ CleanupStack::Pop(dateTime);
+ return dateTimeValue;
+ }
// End of file
--- a/phonebookengines/VirtualPhonebook/inc/VPbkSendEventUtility.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/inc/VPbkSendEventUtility.h Wed Apr 14 15:45:35 2010 +0300
@@ -68,6 +68,23 @@
}
}
+template<typename RefParam1, typename ValParam2, typename RefParam3,
+ typename Observer, typename NotifyFunc>
+void SendEventToObserversWhenNotDestroyed( RefParam1& aRefParam1, ValParam2 aValParam2,
+ RefParam3& aRefParam3, RPointerArray<Observer>& aObservers,
+ NotifyFunc aNotifyFunc, TBool& aDestroy )
+ {
+ Observer* obs = NULL;
+ for ( TInt i = aObservers.Count() - 1; !aDestroy && i >= 0; --i )
+ {
+ if ( i < aObservers.Count() && obs != aObservers[i] )
+ {
+ obs = aObservers[i];
+ (obs->*aNotifyFunc)( aRefParam1, aValParam2,
+ aRefParam3 );
+ }
+ }
+ }
// -----------------------------------------------------------------------------
// CopyPointerArrayL
--- a/phonebookengines/contactsmodel/cntmodel/src/ccontactdatabase.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntmodel/src/ccontactdatabase.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -674,9 +674,15 @@
@return A pointer to an array of sort preferences of the contact database.
*/
EXPORT_C const CArrayFix<CContactDatabase::TSortPref>* CContactDatabase::SortOrder() const
- {
- return iCntSvr->GetSortPreferenceL(); // this can leave
- }
+ {
+ CArrayFix<CContactDatabase::TSortPref>* prefs = NULL;
+ TRAPD( err, prefs = iCntSvr->GetSortPreferenceL() );
+ if ( err != KErrNone )
+ {
+ prefs = NULL; // return NULL if have some error
+ }
+ return prefs;
+ }
/**
@@ -2326,21 +2332,22 @@
doCommitContactL(*cntItem,ETrue,ETrue);
if (!count)
- {
- doDeleteContactL(aContactId,ETrue,ETrue);
- delete cntItem;
- cntItem = NULL;
- }
+ {
+ doDeleteContactL(aContactId,ETrue,ETrue);
+ CleanupStack::PopAndDestroy(cntItem); // Pop and destroy cntItem
+
+ cntItem = NULL;
+ CleanupStack::PushL(cntItem); // push a NULL ptr to cleanup stack
+ }
if(cntItem != NULL)
- {
- CleanupStack::Pop(cntItem);
- CleanupStack::Pop(); // Pop the lock
- CleanupStack::PopAndDestroy(viewDef);
- CheckTemplateField(*cntItem);
-
- CleanupStack::PushL(cntItem);
- }
+ {
+ CheckTemplateField(*cntItem);
+ }
+ CleanupStack::Pop(); // cntItem
+ CleanupStack::Pop(); // Pop the lock
+ CleanupStack::PopAndDestroy(viewDef);
+ CleanupStack::PushL(cntItem);
return(cntItem);
}
--- a/phonebookengines/contactsmodel/cntplsql/src/cntpplviewsession.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntplsql/src/cntpplviewsession.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -691,34 +691,39 @@
TBool CCntPplViewSession::ContactCorrectType(TUid aContactTypeUid, TContactViewPreferences aTypeToInclude)
- {
- TBool correctType(EFalse);
- if (aContactTypeUid==KUidContactCard || aContactTypeUid==KUidContactOwnCard)
- {
- // Ignore Unsorted Contacts flags & White Space flag
- // catch non- contact views
- // Should be EContactsOnly, EContactAndGroups & EICCEntriesAndContacts
- if (0 == ((aTypeToInclude & ~(ESingleWhiteSpaceIsEmptyField | EIgnoreUnSorted | EUnSortedAtBeginning | EUnSortedAtEnd))
- & (EGroupsOnly | EICCEntriesOnly))) // Ignore 'UnSorted' flags, exclude Groups Only & ICC Only
- {
- correctType = ETrue;
- }
- }
- else if (aContactTypeUid == KUidContactGroup)
- {
- if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
- {
- correctType = ETrue;
- }
- }
- else if (aContactTypeUid == KUidContactICCEntry)
- {
- if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
- {
- correctType = ETrue;
- }
- }
- return correctType;
- }
+ {
+ TBool correctType = EFalse;
+
+ if (aContactTypeUid == KUidContactCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactOwnCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactGroup)
+ {
+ if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactICCEntry)
+ {
+ if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
+ {
+ correctType = ETrue;
+ }
+ }
+
+ return correctType;
+ }
--- a/phonebookengines/contactsmodel/cntplsql/src/cplcollectioniterator.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntplsql/src/cplcollectioniterator.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -63,7 +63,7 @@
EFindCompanyNamePronunciation
};
-// Collation level that ignore accents (i.e. 'a' == '?).
+// Collation level that ignore accents (i.e. a == ä ).
const TInt KCollationLevel= 0;
//
--- a/phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntplsql/src/cviewcontactmanager.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -383,35 +383,40 @@
@return ETrue if the uid match or reverse.
*/
TBool CViewContactManager::ContactCorrectType(TUid aContactTypeUid, TContactViewPreferences aTypeToInclude)
- {
- TBool correctType(EFalse);
- if (aContactTypeUid==KUidContactCard || aContactTypeUid==KUidContactOwnCard)
- {
- // Ignore Unsorted Contacts flags & White Space flag
- // catch non- contact views
- // Should be EContactsOnly, EContactAndGroups & EICCEntriesAndContacts
- if (0 == ((aTypeToInclude & ~(ESingleWhiteSpaceIsEmptyField | EIgnoreUnSorted | EUnSortedAtBeginning | EUnSortedAtEnd))
- & (EGroupsOnly | EICCEntriesOnly))) // Ignore 'UnSorted' flags, exclude Groups Only & ICC Only
- {
- correctType = ETrue;
- }
- }
- else if (aContactTypeUid == KUidContactGroup)
- {
- if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
- {
- correctType = ETrue;
- }
- }
- else if (aContactTypeUid == KUidContactICCEntry)
- {
- if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
- {
- correctType = ETrue;
- }
- }
- return correctType;
- }
+ {
+ TBool correctType = EFalse;
+
+ if (aContactTypeUid == KUidContactCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactOwnCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactGroup)
+ {
+ if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aContactTypeUid == KUidContactICCEntry)
+ {
+ if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
+ {
+ correctType = ETrue;
+ }
+ }
+
+ return correctType;
+ }
/**
--- a/phonebookengines/contactsmodel/cntsrv/src/CViewSubSessions.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntsrv/src/CViewSubSessions.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -668,6 +668,10 @@
idMap.iMapping=i;
User::LeaveIfError(array.Append(idMap));
}
+
+ //Always keep server side local view in memory saving mode, so we
+ //change the view contact object stored in iView into lightweight object
+ const_cast<CViewContact&>( contact ).ChangeToLightweightObject();
}
// Externalize array to client.
--- a/phonebookengines/contactsmodel/cntview/LocalView.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntview/LocalView.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -1681,36 +1681,40 @@
}
TBool CContactLocalView::ContactCorrectType(TUid aType,TContactViewPreferences aTypeToInclude)
- {
- TBool correctType(EFalse);
- if (aType==KUidContactCard || aType==KUidContactOwnCard)
- {
- // Ignore Unsorted Contacts flags & White Space flag
- // catch non- contact views
- // Should be EContactsOnly, EContactAndGroups & EICCEntriesAndContacts
- if (0 == ((aTypeToInclude & ~(ESingleWhiteSpaceIsEmptyField | EIgnoreUnSorted | EUnSortedAtBeginning | EUnSortedAtEnd))
- & (EGroupsOnly | EICCEntriesOnly))) // Ignore 'UnSorted' flags, exclude Groups Only & ICC Only
- {
- correctType = ETrue;
- }
- }
+ {
+ TBool correctType = EFalse;
+
+ if (aType == KUidContactCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
+ else if (aType == KUidContactOwnCard)
+ {
+ if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
+ {
+ correctType = ETrue;
+ }
+ }
else if (aType==KUidContactGroup)
{
- if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
- {
- correctType = ETrue;
- }
- }
+ if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
+ {
+ correctType = ETrue;
+ }
+ }
else if (aType == KUidContactICCEntry)
- {
- if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
- {
- correctType = ETrue;
- }
- }
- return correctType;
- }
+ {
+ if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
+ {
+ correctType = ETrue;
+ }
+ }
+ return correctType;
+ }
void CIdleContactSorter::ContactPhbkSyncEventHandler(TPhonebookState aPhbkState)
{
--- a/phonebookengines/contactsmodel/inc/cntviewbase.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/inc/cntviewbase.h Wed Apr 14 15:45:35 2010 +0300
@@ -77,7 +77,10 @@
EICCEntriesOnly =0x00000040,
/** Only contact cards and ICC entries (of type KUidContactCard, KUidContactOwnCard
or KUidContactICCEntry) are included in the view. */
- EICCEntriesAndContacts =0x00000080
+ EICCEntriesAndContacts =0x00000080,
+ /** Only contact cards (of type KUidContactCard) are included
+ in the view. Own card not included. */
+ EContactCardsOnly =0x00000100
};
--- a/phonebookui/Phonebook2/BWINS/Pbk2UiControlsU.DEF Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/BWINS/Pbk2UiControlsU.DEF Wed Apr 14 15:45:35 2010 +0300
@@ -119,4 +119,5 @@
?HandleViewForegroundEventL@CPbk2NamesListControl@@QAEXH@Z @ 118 NONAME ; void CPbk2NamesListControl::HandleViewForegroundEventL(int)
?MapVPbkFieldTypeToAddressGroupId@Pbk2AddressTools@@SA?AW4TPbk2FieldGroupId@@PBVMVPbkFieldType@@@Z @ 119 NONAME ; enum TPbk2FieldGroupId Pbk2AddressTools::MapVPbkFieldTypeToAddressGroupId(class MVPbkFieldType const *)
?IsAddressPreviewEmptyL@Pbk2AddressTools@@SAHAAVMVPbkStoreContact@@W4TPbk2FieldGroupId@@@Z @ 120 NONAME ; int Pbk2AddressTools::IsAddressPreviewEmptyL(class MVPbkStoreContact &, enum TPbk2FieldGroupId)
+ ?MassUpdateSkipProgressNote@CPbk2NamesListControl@@QAEXH@Z @ 121 NONAME ; void CPbk2NamesListControl::MassUpdateSkipProgressNote(int)
--- a/phonebookui/Phonebook2/Commands/inc/CPbk2CallCmd.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/Commands/inc/CPbk2CallCmd.h Wed Apr 14 15:45:35 2010 +0300
@@ -23,6 +23,7 @@
#include <e32base.h>
#include <MPbk2Command.h>
#include <VPbkFieldTypeSelectorFactory.h>
+#include <spdefinitions.h>
// FORWARD DECLARATIONS
class CAiwServiceHandler;
@@ -31,6 +32,7 @@
class MVPbkStoreContact;
class CPbk2CallTypeSelector;
class CAiwDialDataExt;
+class MVPbkContactFieldData;
// CLASS DECLARATION
@@ -109,6 +111,11 @@
VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aActionSelector );
void SetCallTypeL( CAiwDialDataExt& dialData );
+ TBool ExtractXspId(
+ const MVPbkStoreContactField* aSelectedField,
+ TPtrC& aXSPId) const;
+ TServiceId GetMatchedServiceIdL( const TDesC& aXSPId );
+ TPtrC GetFieldData( const MVPbkContactFieldData& aFieldData ) const;
private: // Data
/// Ref: Contact to call to
--- a/phonebookui/Phonebook2/Commands/src/CPbk2CallCmd.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/Commands/src/CPbk2CallCmd.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -48,6 +48,10 @@
#include <aiwdialdataext.h>
#include <spsettingsvoiputils.h>
+//SPSettings
+#include <spsettings.h>
+#include <spproperty.h>
+
// Debugging headers
#include <Pbk2Debug.h>
@@ -276,6 +280,20 @@
// We also have select call type by ourselves
SetCallTypeL( *dialData );
+
+ // If field data has service prefix, extract it and find matched service id
+ // from SP setting, then set the matched service id to daildata.
+ // Service prefix from field data has higher priority over preferred service
+ TPtrC xspId;
+ if ( ExtractXspId( iSelectedField, xspId ) )
+ {
+ TUint srcId = GetMatchedServiceIdL( xspId );
+
+ if ( srcId != (TUint)KErrNotFound )
+ {
+ dialData->SetServiceId( srcId );
+ }
+ }
}
else
{
@@ -426,4 +444,93 @@
}
}
+// --------------------------------------------------------------------------
+// CPbk2CallCmd::ExtractXspId
+// --------------------------------------------------------------------------
+//
+TBool CPbk2CallCmd::ExtractXspId(
+ const MVPbkStoreContactField* aSelectedField, TPtrC& aXSPId ) const
+ {
+ TBool found = EFalse;
+ _LIT( KColon, ":" );
+
+ const MVPbkContactFieldData& fieldData = aSelectedField->FieldData();
+ TPtrC data = GetFieldData( fieldData );
+ TInt pos = data.Find( KColon );
+
+ if ( pos > 0 )
+ {
+ aXSPId.Set( data.Left( pos ) );
+ found = ETrue;
+ }
+
+ return found;
+ }
+
+// --------------------------------------------------------------------------
+// CPbk2CallCmd::GetMatchedServiceIdL
+// --------------------------------------------------------------------------
+//
+TServiceId CPbk2CallCmd::GetMatchedServiceIdL( const TDesC& aXSPId )
+ {
+ TUint ret = ( TUint )KErrNotFound;
+ CDesCArrayFlat* nameArray = NULL;
+
+ RIdArray ids;
+ CleanupClosePushL( ids );
+
+ nameArray = new (ELeave) CDesCArrayFlat( 2 );
+ CleanupStack::PushL( nameArray );
+
+ CSPSettings* settings = CSPSettings::NewLC();
+
+ settings->FindServiceIdsL( ids );
+ settings->FindServiceNamesL( ids, *nameArray );
+
+ const TInt count = nameArray->MdcaCount();
+ for ( TInt i=0; i < count; i++ )
+ {
+ // Find the mathched service
+ TPtrC name = nameArray->MdcaPoint( i );
+ if ( !name.CompareF( aXSPId ) )
+ {
+ // Service found
+ ret = ids[i];
+ break;
+ }
+ }
+ CleanupStack::PopAndDestroy( 3 ); // ids, nameArray, settings
+
+ return ret;
+ }
+
+// --------------------------------------------------------------------------
+// CPbk2CallCmd::GetFieldData
+// --------------------------------------------------------------------------
+//
+TPtrC CPbk2CallCmd::GetFieldData( const MVPbkContactFieldData& aFieldData ) const
+ {
+ TPtrC text ( KNullDesC() );
+
+ switch ( aFieldData.DataType() )
+ {
+ // Text storage type
+ case EVPbkFieldStorageTypeText:
+ {
+ const MVPbkContactFieldTextData& textData = MVPbkContactFieldTextData::Cast( aFieldData );
+ text.Set( textData.Text() );
+ break;
+ }
+ // URI storage type
+ case EVPbkFieldStorageTypeUri:
+ {
+ const MVPbkContactFieldUriData& textData = MVPbkContactFieldUriData::Cast( aFieldData );
+ text.Set( textData.Text() );
+ break;
+ }
+ }
+
+ return text;
+ }
+
// End of File
--- a/phonebookui/Phonebook2/CommandsExtension/rss/MergeContactsCmd.rss Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/CommandsExtension/rss/MergeContactsCmd.rss Wed Apr 14 15:45:35 2010 +0300
@@ -22,17 +22,17 @@
//
RESOURCE DIALOG r_pbk2_merge_contacts_error_note
{
-flags = EAknWaitNoteFlags;
+flags = EAknDialogGenericNoteFlags;
buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
items =
{
DLG_LINE
{
- type = EAknCtNote;
- id = EGeneralQuery;
- control= AVKON_NOTE
- {
- layout = EGeneralLayout;
+ type=EAknCtQuery;
+ id=EGeneralQuery;
+ control=AVKON_CONFIRMATION_QUERY
+ {
+ layout = EConfirmationQueryLayout;
animation = R_QGN_NOTE_ERROR_ANIM;
};
}
@@ -45,17 +45,17 @@
//
RESOURCE DIALOG r_pbk2_merge_contacts_confirmation_note
{
-flags = EAknWaitNoteFlags;
+flags = EAknDialogGenericNoteFlags;
buttons = R_AVKON_SOFTKEYS_OK_EMPTY__OK;
items =
{
DLG_LINE
{
- type = EAknCtNote;
- id = EGeneralQuery;
- control= AVKON_NOTE
- {
- layout = EGeneralLayout;
+ type=EAknCtQuery;
+ id=EGeneralQuery;
+ control=AVKON_CONFIRMATION_QUERY
+ {
+ layout = EConfirmationQueryLayout;
animation = R_QGN_NOTE_OK_ANIM;
};
}
--- a/phonebookui/Phonebook2/CommandsExtension/src/CPbk2DeleteContactsCmd.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/CommandsExtension/src/CPbk2DeleteContactsCmd.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -239,13 +239,16 @@
iContactIterator->SetToFirst();
if ( iContactIterator->HasNext() )
{
- MVPbkContactLink* link = iContactIterator->NextL();
- CleanupDeletePushL( link );
- if ( link )
+ while ( MVPbkContactLink* link = iContactIterator->NextL() )
{
- RetrieveContactL( *link );
- }
- CleanupStack::PopAndDestroy(); // link
+ if ( !IsFromReadOnlyStore( *link ) )
+ {
+ CleanupDeletePushL( link );
+ RetrieveContactL( *link );
+ CleanupStack::PopAndDestroy(); // link
+ break;
+ }
+ }
}
}
else
--- a/phonebookui/Phonebook2/CommandsExtension/src/CPbk2MergeContactsCmd.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/CommandsExtension/src/CPbk2MergeContactsCmd.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -468,10 +468,9 @@
prompt = StringLoader::LoadLC( R_QTN_PHOB_NOTE_UNNAMED_CONTACTS_WERE_MERGED , *strings );
}
- CAknNoteDialog* dlg = new( ELeave ) CAknNoteDialog( CAknNoteDialog::ENoTone );
- dlg->PrepareLC( R_PBK2_MERGE_CONTACTS_CONFIRMATION_NOTE );
- dlg->SetTextL( *prompt );
- dlg->RunLD();
+ CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+ dlg->ExecuteLD( R_PBK2_MERGE_CONTACTS_CONFIRMATION_NOTE, *prompt );
+
CleanupStack::PopAndDestroy( prompt );
CleanupStack::PopAndDestroy( strings );
CleanupStack::PopAndDestroy( unnamed );
@@ -590,10 +589,8 @@
// Show a note
HBufC* prompt = NULL;
prompt = StringLoader::LoadLC( R_QTN_PHOB_NOTE_SELECT_2_TO_MERGE );
- CAknNoteDialog* dlg = new( ELeave ) CAknNoteDialog( CAknNoteDialog::ENoTone );
- dlg->PrepareLC( R_PBK2_MERGE_CONTACTS_ERROR_NOTE );
- dlg->SetTextL( *prompt );
- dlg->RunLD();
+ CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+ dlg->ExecuteLD( R_PBK2_MERGE_CONTACTS_ERROR_NOTE, *prompt );
CleanupStack::PopAndDestroy( prompt );
}
}
--- a/phonebookui/Phonebook2/CommonUI/src/CPbk2RingingToneFetch.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/CommonUI/src/CPbk2RingingToneFetch.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -84,18 +84,13 @@
TBool result = list->ShowMediaFileListL( &aRingingToneFile,
&nullItem, NULL, NULL );
CleanupStack::PopAndDestroy( list );
-
- // Set result to be ETrue if nullItem (like default tone)
- // is selected in media file list.
- if ( KErrNotFound != nullItem )
+
+ //if DefaultTone is selected, then empty aRingingToneFile
+ if( !ringingToneFile.Compare(aRingingToneFile) )
{
- //if DefaultTone is selected, then empty aRingingToneFile
- if( !ringingToneFile.Compare(aRingingToneFile) )
- {
- aRingingToneFile.Zero();
- }
- result = ETrue;
+ aRingingToneFile.Zero();
}
+
return result;
}
--- a/phonebookui/Phonebook2/EABI/Pbk2UiControlsU.DEF Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/EABI/Pbk2UiControlsU.DEF Wed Apr 14 15:45:35 2010 +0300
@@ -201,4 +201,5 @@
_ZN21CPbk2NamesListControl26HandleViewForegroundEventLEi @ 200 NONAME
_ZN16Pbk2AddressTools22IsAddressPreviewEmptyLER17MVPbkStoreContact17TPbk2FieldGroupId @ 201 NONAME
_ZN16Pbk2AddressTools32MapVPbkFieldTypeToAddressGroupIdEPK14MVPbkFieldType @ 202 NONAME
+ _ZN21CPbk2NamesListControl26MassUpdateSkipProgressNoteEi @ 203 NONAME
--- a/phonebookui/Phonebook2/GroupExtension/src/CPguSendMessageGroupCmd.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/GroupExtension/src/CPguSendMessageGroupCmd.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -51,6 +51,9 @@
#include <SenduiMtmUids.h>
#include <CMessageData.h>
#include <eikenv.h>
+#include <akntitle.h>
+#include <eikspane.h>
+#include <avkon.hrh>
// Debugging headers
#include <Pbk2Debug.h>
@@ -365,8 +368,21 @@
PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING
("CPguSendMessageGroupCmd::DoSendMessageL() start") );
+ // Gets current tile pane and saves it to title
+ HBufC* title = NULL;
+ CAknTitlePane* titlePane = NULL;
+ CEikStatusPane *sp = CEikonEnv::Static()->AppUiFactory()->StatusPane();
+ titlePane = STATIC_CAST( CAknTitlePane*,
+ sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+ title = titlePane->Text()->AllocLC();
+
Phonebook2::Pbk2AppUi()->ApplicationServices().SendUiL()->
CreateAndSendMessageL( iMtmUid, iMessageData );
+
+ // Sets title pane for tile which was save
+ titlePane->SetText( title );
+ CleanupStack::Pop();
+
iState = EStopping;
IssueRequest();
}
--- a/phonebookui/Phonebook2/NamesListExtension/rss/Pbk2ExNamesListRes.rss Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/NamesListExtension/rss/Pbk2ExNamesListRes.rss Wed Apr 14 15:45:35 2010 +0300
@@ -187,6 +187,8 @@
mbmFileName = KPbk2EceMifFile;
iconId = EMbmPhonebook2eceQgn_prop_pb_thumb_unknown;
maskId = EMbmPhonebook2eceQgn_prop_pb_thumb_unknown_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnPropPbThumbUnknown;
},
PBK2_ICON_INFO
{
@@ -199,6 +201,8 @@
mbmFileName = KPbk2EceMifFile;
iconId = EMbmPhonebook2eceQgn_prop_pb_thump_mycard;
maskId = EMbmPhonebook2eceQgn_prop_pb_thump_mycard_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnPropPbThumpMycard;
},
PBK2_ICON_INFO
{
@@ -211,6 +215,8 @@
mbmFileName = KPbk2EceMifFile;
iconId = EMbmPhonebook2eceQgn_prop_pb_add_top;
maskId = EMbmPhonebook2eceQgn_prop_pb_add_top_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnPropPbAddTop;
}
};
}
--- a/phonebookui/Phonebook2/NamesListExtension/src/NamesListExView.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/NamesListExtension/src/NamesListExView.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -1297,6 +1297,7 @@
}
iControl->HideThumbnail();
+ iControl->MassUpdateSkipProgressNote( ETrue );
}
}
@@ -1311,6 +1312,8 @@
if ( iControl )
{
+ iControl->MassUpdateSkipProgressNote( EFalse );
+
// There are some special cases that the names list view would be hide in backgroud
// before one command is executing, and then get foreground later after the command
// finished, which would cause the control to be set invisible. So reset the flag
--- a/phonebookui/Phonebook2/Presentation/rss/Pbk2PresentationCommon.rss Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/Presentation/rss/Pbk2PresentationCommon.rss Wed Apr 14 15:45:35 2010 +0300
@@ -2141,6 +2141,21 @@
{
serviceName = "Skype";
localizedName = qtn_xsp_skype;
+ },
+ PHONEBOOK2_WELL_KNOWN_SERVICE
+ {
+ serviceName = "AIM";
+ localizedName = qtn_xsp_aim;
+ },
+ PHONEBOOK2_WELL_KNOWN_SERVICE
+ {
+ serviceName = "MySpace";
+ localizedName = qtn_xsp_myspace;
+ },
+ PHONEBOOK2_WELL_KNOWN_SERVICE
+ {
+ serviceName = "ICQ";
+ localizedName = qtn_xsp_icq;
}
};
}
--- a/phonebookui/Phonebook2/Presentation/src/CPbk2ServiceManager.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/Presentation/src/CPbk2ServiceManager.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -243,8 +243,19 @@
CleanupStack::Pop(name);
name->Des().Copy(aServiceName);
- aService.iName.Set(*name);
- aService.iDisplayName.Set(*name);
+ //iName & iDisplayName will not be set if the service
+ //doesnt belong to the list of well known services
+ //Thus it makes sense that We copy the ServiceName provisioned
+ //in the Service Table to both iName as well as iDisplayName
+ //This iDisplayName will be visible to the end user.
+ if ( !aService.iName.Length() )
+ {
+ aService.iName.Set(*name);
+ }
+ if ( !aService.iDisplayName.Length() )
+ {
+ aService.iDisplayName.Set(*name);
+ }
aService.iFlags = EInstalled;
aService.iBitmap = aService.iMask = NULL;
aService.iBitmapId = 0;
--- a/phonebookui/Phonebook2/ServerApplication/inc/CPbk2CommAddressSelectPhase.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ServerApplication/inc/CPbk2CommAddressSelectPhase.h Wed Apr 14 15:45:35 2010 +0300
@@ -235,6 +235,8 @@
RPointerArray<CPbk2PresenceIconInfo> iPresenceIconArray;
/// Own: ETrue, if presence icon has been retrieved
TBool iPresenceIconsRetrieved;
+ /// Own: ETrue, if contact has been retrieved
+ TBool iContactRetrieved;
/// Own: Communication method
VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector iCommMethod;
};
--- a/phonebookui/Phonebook2/ServerApplication/src/CPbk2CommAddressSelectPhase.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ServerApplication/src/CPbk2CommAddressSelectPhase.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -130,7 +130,8 @@
iPriorities( aPriorities ),
iRskBack( aRskBack ),
iFieldTypeSelector ( aFieldTypeSelector ),
- iCommMethod( aCommSelector )
+ iCommMethod( aCommSelector ),
+ iContactRetrieved( EFalse )
{
}
@@ -243,6 +244,7 @@
{
// Start by retrieving first contact
iState = EMainContactRetrieving;
+ iContactRetrieved = ETrue;
RetrieveContactL();
}
@@ -581,13 +583,18 @@
// Error occured, destroy presence icon array
iPresenceIconsRetrieved = ETrue;
iPresenceIconArray.ResetAndDestroy();
-
- // start address fetch dialog, if it waits for presence icons
- TRAPD( err, DoSelectAddressesL() );
- if ( err != KErrNone )
+ //Needn't to launch address fetch dialog if contact had been retrieved,
+ //because it will start this dialog after retrieve the contact,
+ //avoid multiple launching of the select dialog
+ if ( !iContactRetrieved )
{
- iObserver.PhaseError( *this, err );
- }
+ // Launch the address fetch dialog if it's waiting for presence icons.
+ TRAPD( err, DoSelectAddressesL() );
+ if ( err != KErrNone )
+ {
+ iObserver.PhaseError( *this, err );
+ }
+ }
}
}
--- a/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorDlgImpl.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorDlgImpl.h Wed Apr 14 15:45:35 2010 +0300
@@ -67,7 +67,8 @@
public MPbk2ContactEditorControl,
public MPbk2ContactEditorControlExtension,
public MVPbkContactStoreObserver,
- public MPbk2ImageFieldObserver
+ public MPbk2ImageFieldObserver,
+ public MCoeForegroundObserver
{
public: // Constructors and destructor
@@ -281,6 +282,10 @@
*
*/
TInt ImageLoadingCancelled();
+
+ private: // From MCoeForegroundObserver
+ void HandleGainingForeground();
+ void HandleLosingForeground();
private: // From CEikDialog
void LineChangedL(
@@ -456,6 +461,9 @@
HBufC* iTitleText;
/// Own: Converts text between Unicode and SMS 7-bit
CCnvCharacterSetConverter* iConverter;
+ /// Ref: A pointer to stack variable in CloseDialog() for knowing
+ /// if the destructor has already been called
+ TBool* iDestroyedPtr;
};
#endif // CPBK2CONTACTEDITORDLGIMPL_H
--- a/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorImageField.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorImageField.h Wed Apr 14 15:45:35 2010 +0300
@@ -82,7 +82,8 @@
public:
void SetTextL();
- TInt TextState();
+ TInt TextState();
+ CPbk2PresentationContactField& ContactField();
private: // From MPbk2ContactEditorField
CEikEdwin* Control() const;
--- a/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactViewListBox.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactViewListBox.h Wed Apr 14 15:45:35 2010 +0300
@@ -168,6 +168,16 @@
*/
void SetListCommands( const RPointerArray<MPbk2UiControlCmdItem>* aCommands );
+ /**
+ * Handle showing of popupcharacter when user scrolls name list
+ * using scroll bar.
+ *
+ * @param CWindowGc.
+ * @param TRect.
+ */
+ void HandlePopupCharacter( CWindowGc* aGc,
+ const TRect& aRectOfListBoxItem ) const;
+
public: // From MPbk2ClipListBoxText
TBool ClipFromBeginning(
TDes& aBuffer,
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2AddItemToContactDlg.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2AddItemToContactDlg.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -392,6 +392,18 @@
CModel* listBoxModel = new(ELeave) CModel( aAddItems, *iconArray );
iListBox->Model()->SetItemTextArray(listBoxModel);
iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
+
+ CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
+ if (statusPane)
+ {
+ TInt currentStatusPaneResId = statusPane->CurrentLayoutResId();
+ // Make the statusPane update when it was already set to EMPTY status,
+ // in other case it'll update itself automaticlly
+ if( currentStatusPaneResId == R_AVKON_STATUS_PANE_LAYOUT_EMPTY )
+ {
+ statusPane->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL );
+ }
+ }
}
// --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlg.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlg.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -89,6 +89,8 @@
//
CPbk2ContactEditorDlg::~CPbk2ContactEditorDlg()
{
+ ForceExit();
+
delete iTitleText;
if ( iSelfPtr )
{
@@ -104,7 +106,7 @@
delete iEditorStrategy;
delete iContactRelocator;
delete iStoreContact;
- delete iAddItemFieldTypeXspName;
+ delete iAddItemFieldTypeXspName;
}
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlgImpl.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlgImpl.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -186,6 +186,8 @@
//
CPbk2ContactEditorDlgImpl::~CPbk2ContactEditorDlgImpl()
{
+ iCoeEnv->RemoveForegroundObserver( *this );
+
if ( iWaitFinish && iWaitFinish->IsStarted() )
{
iWaitFinish->AsyncStop();
@@ -197,6 +199,11 @@
{
*iSelfPtr = NULL;
}
+ // Make the variable in CloseDialog() to ETrue.
+ if ( iDestroyedPtr )
+ {
+ *iDestroyedPtr = ETrue;
+ }
if( iAppServices )
{
@@ -299,6 +306,7 @@
void CPbk2ContactEditorDlgImpl::ConstructL()
{
CAknDialog::ConstructL(R_PBK2_CONTACTEDITOR_MENUBAR);
+ iCoeEnv->AddForegroundObserverL( *this );
if(iParams.iActiveView != TPbk2ContactEditorParams::EEditorView)
{
@@ -353,7 +361,6 @@
StoreTitlePaneTextL();
ConstructContextMenuL();
- ConstructNaviPaneL();
iExtensionManager = CPbk2UIExtensionManager::InstanceL();
@@ -790,6 +797,8 @@
// This is needed here because previous settings might override extension's
// buttons.
iEditorExtension->ModifyButtonGroupContainerL(ButtonGroupContainer());
+
+ ConstructNaviPaneL();
}
// --------------------------------------------------------------------------
@@ -1461,10 +1470,26 @@
EVPbkFieldStorageTypeText &&
!aCurrentField.ContactField().FieldData().IsEmpty() )
{
- //'View' shown even if there would be cold file name, i.e. no file
- //available the moment (e.g other mem card). Gallery takes care of
- //error message. So just dim add option.
DimItem( aMenuPane, EPbk2CmdEditorAddImage );
+
+ //Dim 'View image' if currently cold file name, e.g mem card not there.
+ TBool dimView(ETrue);
+ TPbk2FieldCtrlType type = aCurrentField.FieldProperty().CtrlType();
+ TAny* ext = aCurrentField.ContactEditorFieldExtension(TUid::Uid(NULL));
+ if (type == EPbk2FieldCtrlTypeImageEditor && ext)
+ {
+ CPbk2ContactEditorImageField* fld =
+ static_cast<CPbk2ContactEditorImageField*> (ext);
+ TPtrC dataPtr(MVPbkContactFieldTextData::Cast(
+ fld->ContactField().FieldData()).Text());
+ TEntry entry;
+ RFs& fs( iCoeEnv->FsSession() );
+ dimView = fs.Entry( dataPtr, entry ) == 0 ? EFalse : ETrue;
+ }
+ if( dimView )
+ {
+ DimItem( aMenuPane, EPbk2CmdEditorViewImage);
+ }
}
else
{
@@ -2606,6 +2631,10 @@
void CPbk2ContactEditorDlgImpl::CloseDialog(
MVPbkContactObserver::TContactOp aOpCode, TBool aInformObserver)
{
+ // For knowing if the destructor has been called
+ TBool destroyed = EFalse;
+ iDestroyedPtr = &destroyed;
+
if (aInformObserver && iParams.iActiveView
== TPbk2ContactEditorParams::EEditorView || iAddressViewStandalone)
{
@@ -2634,6 +2663,14 @@
};
}
+ // In VOIP/new contacts/exit case, this object will be destructed by
+ // iContactObserver.ContactEditingComplete() above.
+ // If this object is destructed, don't excute the following anymore
+ if ( destroyed )
+ {
+ return;
+ }
+
// Don't save any contact data (already saved)
iExitRecord.Set(EOkToExitWithoutHandlingIt);
iExitRecord.Clear(EExitOrdered);
@@ -2957,6 +2994,10 @@
{
CloseDialog();
}
+ else
+ {
+ iExitRecord.Clear( EExitOrdered );
+ }
}
}
}
@@ -3368,4 +3409,23 @@
}
}
+// --------------------------------------------------------------------------
+// CPbk2ContactEditorDlgImpl::HandleLosingForeground
+// --------------------------------------------------------------------------
+//
+void CPbk2ContactEditorDlgImpl::HandleLosingForeground()
+ {
+ //Fix for ou1cimx1#308012
+ iEditorStrategy.StopQuery();
+ }
+
+// --------------------------------------------------------------------------
+// CPbk2ContactEditorDlgImpl::HandleGainingForeground
+// --------------------------------------------------------------------------
+//
+void CPbk2ContactEditorDlgImpl::HandleGainingForeground()
+ {
+ }
+
+
// End of File
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorImageField.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorImageField.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -211,7 +211,7 @@
//
HBufC* CPbk2ContactEditorImageField::ControlTextL() const
{
- return CPbk2ContactEditorFieldBase::ControlTextL();;
+ return CPbk2ContactEditorFieldBase::ControlTextL();
}
// --------------------------------------------------------------------------
@@ -307,6 +307,15 @@
}
// -----------------------------------------------------------------------------
+// CPbk2ContactEditorImageField::ContactField
+// -----------------------------------------------------------------------------
+//
+CPbk2PresentationContactField& CPbk2ContactEditorImageField::ContactField()
+ {
+ return iContactField;
+ }
+
+// -----------------------------------------------------------------------------
// CPbk2ContactEditorImageField::ContactEditorFieldExtension
// -----------------------------------------------------------------------------
//
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactViewListBox.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactViewListBox.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -580,63 +580,7 @@
void CPbk2ContactViewListBox::Draw( const TRect& aRect ) const
{
CAknSingleGraphicStyleListBox::Draw(aRect);
-
- CPbk2NamesListControl& listControl = static_cast<CPbk2NamesListControl&>(iContainer);
- TInt itemIndex = TopItemIndex() - listControl.CommandItemCount();
-
- // itemIndex >= 0 filter out command item
- if ( itemIndex >= 0 && iShowPopupChar )
- {
- // Handle showing of popupcharacter when user scrolls list using using scroll bar
- CWindowGc& gc = SystemGc();
-
- TRgb normal;
- AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
- normal,
- KAknsIIDQsnTextColors,
- EAknsCIQsnTextColorsCG6 );
-
- TAknLayoutRect layout;
- layout.LayoutRect(Rect(), AknLayoutScalable_Apps::popup_navstr_preview_pane(0));
-
- TAknLayoutRect cornerRect;
- // skinned draw uses submenu popup window skin (skinned border)
-
- cornerRect.LayoutRect(
- layout.Rect(),
- SkinLayout::Submenu_skin_placing_Line_2() );
-
- TRect innerRect( layout.Rect() );
- innerRect.Shrink( cornerRect.Rect().Width(), cornerRect.Rect().Height() );
-
- if ( !AknsDrawUtils::DrawFrame(
- AknsUtils::SkinInstance(),
- gc,
- layout.Rect(),
- innerRect,
- KAknsIIDQsnFrPopupSub,
- KAknsIIDQsnFrPopupCenterSubmenu ) )
- {
- // skinned border failed -> black border
- gc.SetPenStyle( CGraphicsContext::ESolidPen );
- gc.SetBrushColor( KRgbBlack );
- gc.DrawRect( layout.Rect() );
- }
-
- TAknLayoutText textLayout;
- textLayout.LayoutText(layout.Rect(), AknLayoutScalable_Apps::popup_navstr_preview_pane_t1(0).LayoutLine());
-
- TPtrC desc(Model()->ItemTextArray()->MdcaPoint(View()->TopItemIndex()));
-
- HBufC* buf = desc.Mid(desc.Find(_L("\t")) + 1, 1).AllocL();
- TPtr textPtr = buf->Des();
- textPtr.UpperCase();
-
- textLayout.DrawText(gc, textPtr, ETrue, normal );
-
- delete buf;
- }
-
+ HandlePopupCharacter(NULL, Rect());
}
// --------------------------------------------------------------------------
@@ -684,4 +628,77 @@
DrawDeferred();
}
}
+
+// --------------------------------------------------------------------------
+// CPbk2ContactViewListBox::HandlePopupCharacter
+// --------------------------------------------------------------------------
+//
+void CPbk2ContactViewListBox::HandlePopupCharacter( CWindowGc* aGc, const TRect& aRectOfListBoxItem ) const
+ {
+ CPbk2NamesListControl& listControl = static_cast<CPbk2NamesListControl&>(iContainer);
+ TInt itemIndex = TopItemIndex() - listControl.CommandItemCount();
+
+ // itemIndex >= 0 filter out command item
+ if ( itemIndex >= 0 && iShowPopupChar )
+ {
+ TAknLayoutRect layout;
+ layout.LayoutRect(Rect(), AknLayoutScalable_Apps::popup_navstr_preview_pane(0));
+
+ if (!layout.Rect().Intersects(aRectOfListBoxItem))
+ {
+ // If the rect of PopupCharacter not overlapped
+ // with aRectOfListBoxItem, do nothing.
+ return;
+ }
+
+ // Handle showing of popupcharacter when user scrolls list using using scroll bar
+ CWindowGc* gc = aGc;
+ if (!gc)
+ {
+ gc = &SystemGc();
+ }
+
+ TRgb normal;
+ AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+ normal,
+ KAknsIIDQsnTextColors,
+ EAknsCIQsnTextColorsCG6 );
+
+ TAknLayoutRect cornerRect;
+ // skinned draw uses submenu popup window skin (skinned border)
+ cornerRect.LayoutRect(
+ layout.Rect(),
+ SkinLayout::Submenu_skin_placing_Line_2() );
+
+ TRect innerRect( layout.Rect() );
+ innerRect.Shrink( cornerRect.Rect().Width(), cornerRect.Rect().Height() );
+
+ if ( !AknsDrawUtils::DrawFrame(
+ AknsUtils::SkinInstance(),
+ *gc,
+ layout.Rect(),
+ innerRect,
+ KAknsIIDQsnFrPopupSub,
+ KAknsIIDQsnFrPopupCenterSubmenu ) )
+ {
+ // skinned border failed -> black border
+ gc->SetPenStyle( CGraphicsContext::ESolidPen );
+ gc->SetBrushColor( KRgbBlack );
+ gc->DrawRect( layout.Rect() );
+ }
+
+ TAknLayoutText textLayout;
+ textLayout.LayoutText(layout.Rect(), AknLayoutScalable_Apps::popup_navstr_preview_pane_t1(0).LayoutLine());
+
+ TPtrC desc(Model()->ItemTextArray()->MdcaPoint(View()->TopItemIndex()));
+
+ HBufC* buf = desc.Mid(desc.Find(_L("\t")) + 1, 1).AllocL();
+ TPtr textPtr = buf->Des();
+ textPtr.UpperCase();
+
+ textLayout.DrawText(*gc, textPtr, ETrue, normal );
+
+ delete buf;
+ }
+ }
// End of File
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2MemoryEntryDefaultsDlg.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2MemoryEntryDefaultsDlg.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -34,6 +34,10 @@
#include <Phonebook2PrivateCRKeys.h>
#include <TPbk2DestructionIndicator.h>
#include <phonebook2ece.mbg>
+#include <CPbk2ApplicationServices.h>
+#include <CPbk2ServiceManager.h>
+#include <MPbk2ApplicationServices.h>
+#include <ccappcommlauncherpluginrsc.rsg>
// Virtual Phonebook
#include <CVPbkContactManager.h>
@@ -58,6 +62,13 @@
#include <eikclbd.h>
#include <aknlists.h>
#include <aknPopup.h>
+#include <aknlayoutscalable_avkon.cdl.h>
+
+//SpSettings
+#include <spsettings.h>
+#include <spentry.h>
+#include <spproperty.h>
+
// For checking mailbox accounts
#include <emailinterfacefactory.h>
@@ -482,7 +493,7 @@
inline CPbk2MemoryEntryDefaultsDlg::CPbk2MemoryEntryDefaultsDlg
( CPbk2PresentationContact& aContact,
CVPbkContactManager& aManager ):
- iContact( aContact ), iManager( aManager ), iLVFlags( 0 )
+ iContact( aContact ), iManager( aManager ), iLVFlags( 0 ), iServiceName( NULL )
{
// Do nothing
}
@@ -502,6 +513,7 @@
delete iListBox;
delete iAttributeProcess;
delete iDefaultsTable;
+ delete iServiceName;
FeatureManager::UnInitializeLib();
@@ -721,18 +733,35 @@
}
// Allocate and format the listbox line
- HBufC* lineBuf = HBufC::NewLC( KFormat().Length()
- + defaultFieldText->Length() + label.Length() );
- TPtr line( lineBuf->Des() );
-
- // Important: iconArray positions matchs with
- // iDefaultsTable positions. idx -> icon position
- line.Format( KFormat, idx, defaultFieldText, &label);
-
- lines->AppendL( line ) ;
+ HBufC* lineBuf = NULL;
+ // If only one Voip service avaliable, use voip service name on internet call item
+ if ( iServiceName &&
+ ( iDefaultsTable->At( idx ) == VPbkFieldTypeSelectorFactory::EVOIPCallSelector ) )
+ {
+ // Use Voip service name
+ HBufC* str = StringLoader::LoadLC( R_QTN_CCA_VOIP_CALL_WITH_SERVICENAME,
+ *iServiceName,
+ iCoeEnv );
+ lineBuf = HBufC::NewLC( KFormat().Length()
+ + str->Length() + label.Length() );
+ TPtr line( lineBuf->Des() );
+ line.Format( KFormat, idx, str, &label);
+ lines->AppendL( line ) ;
+ CleanupStack::PopAndDestroy(2); // lineBuf, str
+ }
+ else
+ {
+ // Use default text
+ lineBuf = HBufC::NewLC( KFormat().Length()
+ + defaultFieldText->Length() + label.Length() );
+ TPtr line( lineBuf->Des() );
+ line.Format( KFormat, idx, defaultFieldText, &label);
+ lines->AppendL( line ) ;
+ CleanupStack::PopAndDestroy(); // lineBuf
+ }
// Cleanup
- CleanupStack::PopAndDestroy( 2 ); // lineBuf, defaultFieldText
+ CleanupStack::PopAndDestroy(); // defaultFieldText
}
CleanupStack::PopAndDestroy(); // noDefault
@@ -928,6 +957,24 @@
// with iDefaultsTable positions
iconArray->AppendL( icon );
+ // If only one Voip service avaliable, use brand icon on internet call item
+ TServiceId serviceId;
+ if ( ( iDefaultsTable->At( idx ) == VPbkFieldTypeSelectorFactory::EVOIPCallSelector ) &&
+ ( SupportedVOIPServicesL( serviceId ) == 1 ) )
+ {
+ CFbsBitmap* bitmap (NULL);
+ CFbsBitmap* mask (NULL);
+
+ // Load Voip brand bitmap and mask
+ LoadVoipServiceInfoL( serviceId, bitmap, mask );
+
+ if ( bitmap || mask )
+ {
+ iconArray->At(idx)->SetBitmap(bitmap);
+ iconArray->At(idx)->SetMask(mask);
+ }
+ }
+
CleanupStack::Pop(1); // icon
}
// iListBox takes ownership of iconArray
@@ -1055,4 +1102,104 @@
iAttributeProcess->RemoveDefaultsL( defaultProperties );
}
+// --------------------------------------------------------------------------
+// CPbk2MemoryEntryDefaultsDlg::SupportedVOIPServicesL
+// Get supported Voip services
+// --------------------------------------------------------------------------
+//
+TInt CPbk2MemoryEntryDefaultsDlg::SupportedVOIPServicesL( TServiceId& aServiceId )
+ {
+ TInt availableVoipService = 0;
+ RIdArray idArray;
+ CleanupClosePushL(idArray);
+
+ CSPSettings* settings = CSPSettings::NewL();
+ CleanupStack::PushL( settings );
+
+ User::LeaveIfError( settings->FindServiceIdsL(idArray) );
+
+ const TInt count = idArray.Count();
+ for (TInt i = 0; i < count; ++i)
+ {
+ TBool supported( EFalse );
+ CSPEntry* entry = CSPEntry::NewLC();
+ TServiceId id = idArray[i];
+ User::LeaveIfError( settings->FindEntryL(id, *entry) );
+ const CSPProperty* property = NULL;
+
+ if (entry->GetProperty(property, EPropertyServiceAttributeMask) == KErrNone)
+ {
+ TInt value = 0;
+ property->GetValue(value);
+ supported = value & ESupportsInternetCall;
+ }
+
+ if ( supported )
+ {
+ availableVoipService++;
+ aServiceId = id;
+ }
+ CleanupStack::PopAndDestroy(); // entry
+ }
+ CleanupStack::PopAndDestroy(2); // settings, idArray
+
+ return availableVoipService;
+ }
+
+// ---------------------------------------------------------------------------
+// CPbk2MemoryEntryDefaultsDlg::LoadVoipServiceInfoL
+// Load Voip service info
+// ---------------------------------------------------------------------------
+//
+void CPbk2MemoryEntryDefaultsDlg::LoadVoipServiceInfoL(
+ TServiceId aServiceId,
+ CFbsBitmap*& aBitmap, CFbsBitmap*& aMask )
+ {
+ CPbk2ApplicationServices* appServices =
+ CPbk2ApplicationServices::InstanceLC();
+
+ CPbk2ServiceManager& servMan = appServices->ServiceManager();
+ const CPbk2ServiceManager::RServicesArray& services = servMan.Services();
+
+ const TInt count = services.Count();
+ for ( TInt i = 0; i < count; i++ )
+ {
+ const CPbk2ServiceManager::TService& service = services[i];
+
+ if ( service.iServiceId == aServiceId )
+ {
+ // Calculate preferred size for xsp service icon
+ TRect mainPane;
+ AknLayoutUtils::LayoutMetricsRect(
+ AknLayoutUtils::EMainPane, mainPane );
+ TAknLayoutRect listLayoutRect;
+ listLayoutRect.LayoutRect(
+ mainPane,
+ AknLayoutScalable_Avkon::list_double_large_graphic_pane_g1(0).LayoutLine() );
+ TSize size(listLayoutRect.Rect().Size());
+
+ AknIconUtils::SetSize(
+ service.iBitmap,
+ size );
+ AknIconUtils::SetSize(
+ service.iMask,
+ size );
+
+ aBitmap = new (ELeave) CFbsBitmap;
+ CleanupStack::PushL( aBitmap );
+ aBitmap->Duplicate( service.iBitmap->Handle() );
+
+ aMask = new (ELeave) CFbsBitmap;
+ CleanupStack::PushL( aMask );
+ aMask->Duplicate( service.iMask->Handle() );
+
+ iServiceName = service.iDisplayName.AllocL();
+ CleanupStack::Pop( 2 ); // aMask, aBitmap
+
+ break;
+ }
+ }
+ CleanupStack::PopAndDestroy(); // appServices
+ }
+
// End of File
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -328,21 +328,31 @@
* @return ETrue if mass update process is ongoing.
*/
TBool MassUpdateDetected();
+
+ /**
+ * Call this function to skip the showing of blocking progress note.
+ * When done MassUpdateSkipProgressNote( EFalse ) must be called to reset.
+ */
+ void MassUpdateSkipProgressNote( TBool aSkip );
private:
CPbk2HandleMassUpdate(CEikListBox& iListBox);
void ConstructL();
TBool HandleMassUpdateCheckL();
- void HandleMassUpdateCheckReset();
+ void HandleMassUpdateBurstL(
+ const TTimeIntervalMicroSeconds aFromFirst,
+ const TInt64 aDeltaMax64);
+ void HandleMassUpdateResetCounters();
void HandleMassUpdateDone();
static TInt HandleMassUpdateTimerCallBack(TAny* aAny);
private:
CEikListBox& iListBox;
- TBool iHandleMassUpdate;
+ TBool iHandleMassUpdateDetected;
TTime iHandleMassUpdateFirst;
TTime iHandleMassUpdatePrev;
TInt iHandleMassUpdateCount;
+ TBool iHandleMassUpdateSkipDialog;
CPeriodic* iHandleMassUpdateTimer;
CAknWaitDialog* iHandleMassUpdateDialog;
};
@@ -692,8 +702,8 @@
}
else
{
- //very first update, set time & counter
- HandleMassUpdateCheckReset();
+ //very first update, reset time & counter
+ HandleMassUpdateResetCounters();
}
return ret;
}
@@ -704,10 +714,20 @@
//
TBool CPbk2HandleMassUpdate::MassUpdateDetected()
{
- return iHandleMassUpdate;
+ return iHandleMassUpdateDetected;
}
// --------------------------------------------------------------------------
+// CPbk2HandleMassUpdate::MassUpdateSkipProgressNote
+// --------------------------------------------------------------------------
+//
+void CPbk2HandleMassUpdate::MassUpdateSkipProgressNote( TBool aSkip )
+ {
+ iHandleMassUpdateSkipDialog = aSkip;
+ HandleMassUpdateResetCounters();
+ }
+
+// --------------------------------------------------------------------------
// CPbk2HandleMassUpdate::HandleMassUpdateCheckL
// --------------------------------------------------------------------------
//
@@ -724,34 +744,19 @@
TTime now;
now.UniversalTime();
- TTimeIntervalMicroSeconds fs = now.MicroSecondsFrom(iHandleMassUpdateFirst);
- TTimeIntervalMicroSeconds ps = now.MicroSecondsFrom(iHandleMassUpdatePrev);
+ TTimeIntervalMicroSeconds fromFirst =
+ now.MicroSecondsFrom(iHandleMassUpdateFirst);
+ TTimeIntervalMicroSeconds fromPrev =
+ now.MicroSecondsFrom(iHandleMassUpdatePrev);
TTimeIntervalMicroSeconds maxCumu(KDeltaAverage * iHandleMassUpdateCount);
- if( fs < maxCumu && ps < KMaxPrev )
+ if( fromFirst < maxCumu && fromPrev < KMaxPrev )
{
//mass update burst ongoing
- iHandleMassUpdate=ETrue;
- iHandleMassUpdateCount++;
- iHandleMassUpdatePrev.UniversalTime();
- iListBox.UpdateScrollBarsL();
-
- if( !iHandleMassUpdateDialog )
- {
- iHandleMassUpdateDialog = new(ELeave) CAknWaitDialog
- (reinterpret_cast<CEikDialog**>(&iHandleMassUpdateDialog), EFalse);
- iHandleMassUpdateDialog->SetTone(CAknNoteDialog::ENoTone);
- iHandleMassUpdateDialog->ExecuteLD(R_QTN_GEN_NOTE_SYNCHRONIZING_PROGRESS);
- //ExecuteLD above handles validity of pointer iHandleMassUpdateDialog plus
- //cleanupstack
- }
-
- TCallBack callback(HandleMassUpdateTimerCallBack, this);
- TTimeIntervalMicroSeconds32 delta32(KDeltaMax);
- iHandleMassUpdateTimer->Start( delta32, delta32, callback );
- ret = ETrue;
+ HandleMassUpdateBurstL(fromFirst, KDeltaMax);
+ ret = ETrue;
}
- else if(iHandleMassUpdate)
+ else if(iHandleMassUpdateDetected)
{
//mass update burst ended
HandleMassUpdateDone();
@@ -759,19 +764,60 @@
}
else
{
- //just normal update, set time & counter
- HandleMassUpdateCheckReset();
+ //just normal update so reset counters
+ HandleMassUpdateResetCounters();
}
return ret;
}
+// --------------------------------------------------------------------------
+// CPbk2HandleMassUpdate::HandleMassUpdateBurstL
+// --------------------------------------------------------------------------
+//
+void CPbk2HandleMassUpdate::HandleMassUpdateBurstL(
+ const TTimeIntervalMicroSeconds aFromFirst,
+ const TInt64 aDeltaMax64)
+ {
+ const TInt64 KMinWaitBeforeBlockUi(1500000);
+ const TTimeIntervalMicroSeconds KWait(KMinWaitBeforeBlockUi);
+
+ //mass update burst ongoing, nameslist behaviour can be altered
+ iHandleMassUpdateDetected=ETrue;
+ iHandleMassUpdateCount++;
+ iHandleMassUpdatePrev.UniversalTime();
+ iListBox.UpdateScrollBarsL();
+
+ if( !iHandleMassUpdateDialog &&
+ !iHandleMassUpdateSkipDialog &&
+ aFromFirst > KWait)
+ {
+ //mass update burst ongoing, ok also to block ui
+ iHandleMassUpdateDialog = new(ELeave) CAknWaitDialog
+ (reinterpret_cast<CEikDialog**>(&iHandleMassUpdateDialog), EFalse);
+ iHandleMassUpdateDialog->SetTone(CAknNoteDialog::ENoTone);
+ iHandleMassUpdateDialog->ExecuteLD(R_QTN_GEN_NOTE_SYNCHRONIZING_PROGRESS);
+ //ExecuteLD above handles validity of pointer iHandleMassUpdateDialog plus
+ //cleanupstack
+ }
+ else if( iHandleMassUpdateDialog && iHandleMassUpdateSkipDialog)
+ {
+ //burst ongoing but do not not block ui
+ TRAP_IGNORE(iHandleMassUpdateDialog->ProcessFinishedL());
+ delete iHandleMassUpdateDialog;
+ iHandleMassUpdateDialog = NULL;
+ }
+
+ TCallBack callback(HandleMassUpdateTimerCallBack, this);
+ TTimeIntervalMicroSeconds32 delta32(aDeltaMax64);
+ iHandleMassUpdateTimer->Start( delta32, delta32, callback );
+ }
+
// ----------------------------------------------------------------------------
-// CPbk2HandleMassUpdate::HandleMassUpdateCheckReset
+// CPbk2HandleMassUpdate::HandleMassUpdateResetCounters
// ----------------------------------------------------------------------------
//
-void CPbk2HandleMassUpdate::HandleMassUpdateCheckReset()
+void CPbk2HandleMassUpdate::HandleMassUpdateResetCounters()
{
- iHandleMassUpdate=EFalse;
iHandleMassUpdateCount = 1; //set as first candidate for next burst
iHandleMassUpdateFirst.UniversalTime();
iHandleMassUpdatePrev=iHandleMassUpdateFirst;
@@ -803,7 +849,8 @@
iHandleMassUpdateDialog = NULL;
}
- HandleMassUpdateCheckReset();
+ iHandleMassUpdateDetected = EFalse;
+ HandleMassUpdateResetCounters();
iListBox.SetCurrentItemIndex(0);
iListBox.SetTopItemIndex(0);
}
@@ -1227,6 +1274,15 @@
}
// --------------------------------------------------------------------------
+// CPbk2NamesListControl::MassUpdateSkipProgressNote
+// --------------------------------------------------------------------------
+//
+EXPORT_C void CPbk2NamesListControl::MassUpdateSkipProgressNote( TBool aSkip )
+ {
+ iCheckMassUpdate->MassUpdateSkipProgressNote( aSkip );
+ }
+
+// --------------------------------------------------------------------------
// CPbk2NamesListControl::View
// --------------------------------------------------------------------------
//
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListReadyState.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListReadyState.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -2081,7 +2081,10 @@
}
}
-
+// --------------------------------------------------------------------------
+// CPbk2NamesListReadyState::CmdItemVisibilityChanged
+// --------------------------------------------------------------------------
+//
void CPbk2NamesListReadyState::CmdItemVisibilityChanged( TInt aCmdItemId, TBool aVisible )
{
TInt cmdItemIndex = FindCommand(aCmdItemId);
--- a/phonebookui/Phonebook2/UIControls/src/cpbk2contactviewcustomlistboxdata.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/cpbk2contactviewcustomlistboxdata.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -50,6 +50,7 @@
#include <MPbk2UiControlCmdItem.h>
#include <AknFepInternalCRKeys.h>
#include <AknLayoutFont.h>
+#include "CPbk2ContactViewListBox.h"
//from PCS engine
#include <CPcsDefs.h>
@@ -2007,11 +2008,18 @@
#endif // RD_UI_TRANSITION_EFFECTS_LIST
}
+ CEikListBox* list = static_cast<CEikListBox*>( iExtension->iControl );
+ if ( iExtension->iCurrentRow < list->BottomItemIndex() )
+ {
+ AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
+ }
DrawHighLight( aGc, aRect, aHighlight, skin );
// The column draw loop
column = 0;
TInt subCellIndex = 0;
+ // Whether need to redraw the PopupCharacter
+ TBool redrawPopup = EFalse;
if ( !iExtension ) { return; }
@@ -2296,6 +2304,14 @@
}
aGc.SetPenStyle(CGraphicsContext::ESolidPen);
}
+ if ( !redrawPopup && column > 1 )
+ {
+ // column > 1 means that this contact has more than
+ // one column information to show, for excample name
+ // and phonenumber. In this case, perhaps need to
+ // redraw the popupCharacter
+ redrawPopup = ETrue;
+ }
}
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
if ( transApi )
@@ -2304,6 +2320,18 @@
transApi->StopDrawing();
}
#endif //RD_UI_TRANSITION_EFFECTS_LIST
+
+ // When scroll name list quickly using scroll bar, the popup charcter
+ // will be overlaped by redraw of usrs' phonenumbers, to fix this,
+ // show the popup charcter after the refresh
+ if ( redrawPopup )
+ {
+ CPbk2ContactViewListBox* contactViewListBox = static_cast<CPbk2ContactViewListBox*>( iExtension->iControl );
+ if ( contactViewListBox )
+ {
+ contactViewListBox->HandlePopupCharacter(&aGc, aRect);
+ }
+ }
}
@@ -2479,6 +2507,12 @@
#endif // RD_UI_TRANSITION_EFFECTS_LIST
}
+ CEikListBox* list = static_cast<CEikListBox*>( iExtension->iControl );
+ if ( iExtension->iCurrentRow < list->BottomItemIndex() )
+ {
+ AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin );
+ }
+
// LISTBOX LINES NEED TO BE DRAWN HERE.
DrawHighLight( aGc, aRect, aHighlight, skin );
--- a/phonebookui/Phonebook2/UIControls/src/cpbk2contactviewcustomlistboxitemdrawer.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/cpbk2contactviewcustomlistboxitemdrawer.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -170,24 +170,6 @@
// not used in S60
}
-inline void DrawSeparator(
- CGraphicsContext& aGc,
- const TRect& aRect, const TRgb& aColor )
- {
- aGc.SetBrushStyle( CGraphicsContext::ENullBrush );
- aGc.SetPenStyle( CGraphicsContext::ESolidPen );
- TRgb color( aColor );
- color.SetAlpha( 32 );
- aGc.SetPenColor( color );
- TRect lineRect( aRect );
- TInt gap = AknLayoutScalable_Avkon::listscroll_gen_pane( 0 ).LayoutLine().it;
- lineRect.Shrink( gap, 0 );
- lineRect.Move( 0, -1 );
- aGc.DrawLine( TPoint( lineRect.iTl.iX, lineRect.iBr.iY ),
- TPoint( lineRect.iBr.iX, lineRect.iBr.iY ) );
- }
-
-
void CPbk2ContactViewCustomListBoxItemDrawer::DrawItemText( TInt aItemIndex,
const TRect& aItemTextRect,
TBool aItemIsCurrent,
@@ -262,13 +244,6 @@
}
ColumnData()->SetCurrentItemIndex(aItemIndex);
ColumnData()->Draw(Properties(aItemIndex), *iGc,&des,aItemTextRect,(aItemIsCurrent /*|| aViewIsEmphasized*/),colors, aItemIndex);
-
- const TInt itemCount(iModel->NumberOfItems());
- if( itemCount - 1 > aItemIndex )
- {
- DrawSeparator( *iGc, aItemTextRect, iTextColor );
- }
-
#ifdef RD_UI_TRANSITION_EFFECTS_LIST
if ( transApi )
--- a/phonebookui/Phonebook2/UIControls/src/cpbk2contactviewdoublelistboxmodel.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/cpbk2contactviewdoublelistboxmodel.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -41,7 +41,7 @@
#include <MVPbkContactLink.h>
// CONSTANTS
-
+namespace {
// Character used to replace invalid characters for UI
const TText KGraphicReplaceCharacter = ' ';
@@ -59,6 +59,13 @@
MPbk2ContactNameFormatter::EUseSeparator |
MPbk2ContactNameFormatter::EPreserveLeadingSpaces;
+// iBuffer max size is EMaxListBoxText = 256
+// -> max length for name data is 100 and max lenght for status data is 100
+// rest 56 are reserved for icon data
+const TInt KMaxTxtLength = 100;
+
+}
+
// --------------------------------------------------------------------------
// CPbk2ContactViewDoubleListBoxModel::CPbk2ContactViewDoubleListBoxModel
// --------------------------------------------------------------------------
@@ -222,7 +229,8 @@
// No element support needed for thumbnail at the moment
// (2) Contact name
- AppendName( aElement.TextPtr( MPbk2DoubleListboxDataElement::EName ) );
+ AppendName( aElement.TextPtr(
+ MPbk2DoubleListboxDataElement::EName ).Left( KMaxTxtLength ) );
iBuffer.Append( KListColumnSeparator );
// (3) Secondary text
@@ -249,7 +257,7 @@
AknTextUtils::ReplaceCharacters(
aText, KAknReplaceListControlChars, KGraphicReplaceCharacter );
- iBuffer.Append( aText );
+ iBuffer.Append( aText.Left( KMaxTxtLength ) );
iBuffer.Append( KListColumnSeparator );
}
--- a/phonebookui/Phonebook2/UIControls/src/cpbk2doublelistboxmodelcmddecorator.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/cpbk2doublelistboxmodelcmddecorator.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -114,7 +114,7 @@
{
// List model format:
// [thumbnail icon] \t [contact name] \t [secondary text] \t
- // [secondary icon] \t [trailing icon]
+ // [trailing icon]
// fetch status text
iElement->SetText( MPbk2DoubleListboxDataElement::EStatusText, NULL,
@@ -141,20 +141,6 @@
// status text
iBuffer.Append( KSeparator );
AppendText( status );
-#if 0 // Service icon is removed for now.
- // add service icon
- iBuffer.Append( KSeparator );
- // get icon id
- TPbk2IconId serviceId = element->IconId( MPbk2DoubleListboxDataElement::EServiceIcon );
- // try to find the icon
- TInt indx = iIconArray.FindIcon( serviceId );
- // if not found, use default
- if( indx < 0 )
- {
- indx = iconIndex;
- }
- iBuffer.AppendNum( indx );
-#endif
}
}
}
@@ -189,6 +175,9 @@
aText, KGraphicReplaceCharacter );
AknTextUtils::ReplaceCharacters(
aText, KAknReplaceListControlChars, KGraphicReplaceCharacter );
-
- iBuffer.Append( aText );
+
+ // iBuffer max size is EMaxListBoxText = 256
+ // don't allow set too long status txt to iBuffer
+ const TInt KMaxTxtLength = 100;
+ iBuffer.Append( aText.Left( KMaxTxtLength ) );
}
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlaunchercontainer.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlaunchercontainer.h Wed Apr 14 15:45:35 2010 +0300
@@ -221,6 +221,14 @@
* @since S60 v5.0
*/
const TBool IsListBoxHighlightEnabled();
+
+ /**
+ * Get the amount of the list box
+ *
+ * @return the amount of the list box.
+ * @since S60 v5.0
+ */
+ const TInt GetListBoxItemAmount() const;
private: // New
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncherlpadmodel.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncherlpadmodel.h Wed Apr 14 15:45:35 2010 +0300
@@ -72,13 +72,14 @@
enum TFlags
{
- EDefaultSet = 1
+ EDefaultSet = 0x01,
+ EHasPresenceIcon = 0x02
};
VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector iContactAction;
TBuf<KCCAppCommLauncherMaxButtonDataTextLength> iText;
TInt iNumberOfAddresses;
- TInt iFlags;
+ TUint iFlags;
TBuf<KCCAppCommLauncherMaxButtonDataTextLength> iPopupText;
TBool iClipFromBegining;
};
@@ -170,7 +171,8 @@
EVideocallIconIndex,
EAddressValIconIndex,
EAddressNotValIconIndex,
- EMultiIconIndex
+ EMultiIconIndex,
+ EPresenceIconIndex
};
/**
@@ -240,20 +242,10 @@
/**
- * Loads the VOIP Button Icon & Label
- * Usecase : If we have only one voip service, the voip(Internet Call)
- * button should have the Branded Icon of that Service and the label
- * must be "ServiceName" appended with "Call".
- * eg : If we have a service named SKYPE installed in the Phone
- * and if SKYPE supports VOIP, then the VOIP Button Icon should be
- * the Branded Icon of SKYPE and the Button Label should be
- * "SKYPE CALL".
- * @return TInt - Stores the Info regd whether Image/Text was set for the
- * VOIP Buttton or not. We use KVOIPButtonImageSet && with the returnval
- * to know whether Image has been set or not
- * Will be used in HandleNotifyChange
- */
- TInt LoadVoipButtonInfoL();
+ * Handle resource change
+ *
+ */
+ void ResourceChangedL();
private: // New
@@ -293,20 +285,6 @@
TDes& aText );
/**
- * Replace the bitmap with original default bitmap. Supports only
- * ECmsPresenceVoIPNotification and ECmsPresenceChatNotification.
- * Will leave with KErrArgument if tried with other type.
- *
- * @since S60 v5.0
- * @param aBitmap, aMask bitmaps to be replaced
- * @param aServiceType service type identifying the bitmap
- */
- void ReplaceWithDefaultIconL(
- CFbsBitmap*& aBitmap,
- CFbsBitmap*& aMask,
- const TUint32 aServiceType );
-
- /**
* Draws find/show on map button
*
* @param aNumberOfAddresses number of addresses
@@ -369,11 +347,27 @@
*/
void DoHandleNotifyChangeL() ;
- /**
- * Get the size of service bitmap
- * @return - Size of the bitmap
- */
- TSize GetServiceBitmapSize();
+ /**
+ * Loads the VOIP Button Icon & Label
+ * Usecase : If we have only one voip service, the voip(Internet Call)
+ * button should have the Branded Icon of that Service and the label
+ * must be "ServiceName" appended with "Call".
+ * eg : If we have a service named SKYPE installed in the Phone
+ * and if SKYPE supports VOIP, then the VOIP Button Icon should be
+ * the Branded Icon of SKYPE and the Button Label should be
+ * "SKYPE CALL".
+ * @return TInt - Stores the Info regd whether Image/Text was set for the
+ * VOIP Buttton or not. We use KVOIPButtonImageSet && with the returnval
+ * to know whether Image has been set or not
+ * Will be used in HandleNotifyChange
+ */
+ TInt LoadVoipButtonInfoL();
+
+ /*
+ * Calculate the layout size
+ */
+ void CalculateLayoutSize();
+
private:
//From MSPNotifyChangeObserver
@@ -484,7 +478,14 @@
//Owns - Service provider settings change notifer
CSPNotifyChange* iSPNotifyChange;
- HBufC* iTextBuf;
+ // Owns - Text buffer
+ HBufC* iTextBuf;
+
+ // Size for service icon
+ TSize iServiceIconSize;
+
+ // Size for presence icon
+ TSize iPresenceIconSize;
inline void RunLaunchLogger()
{
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchercontainer.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchercontainer.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -132,13 +132,15 @@
iHeaderCtrl->SetStatusButtonVisibility( EFalse );
CFbsBitmap* bmp = NULL;
CFbsBitmap* bmpMask = NULL;
-
- AknIconUtils::CreateIconL(
+
+ AknsUtils::CreateIconL(
+ AknsUtils::SkinInstance(),
+ KAknsIIDQgnPropWmlBmOvi,
bmp,
bmpMask,
KCcaIconDefaultFileName,
EMbmPhonebook2eceQgn_prop_wml_bm_ovi,
- EMbmPhonebook2eceQgn_prop_wml_bm_ovi_mask );
+ EMbmPhonebook2eceQgn_prop_wml_bm_ovi_mask );
CGulIcon* guiIcon = CGulIcon::NewL( bmp, bmpMask );
iStatusControl->SetDefaultStatusIconL( guiIcon );
@@ -293,9 +295,9 @@
{
if ( aType == KEikDynamicLayoutVariantSwitch )
{
- TRAP_IGNORE( iModel->LoadVoipButtonInfoL() );
- CCCAppViewPluginAknContainer::HandleResourceChange(aType);
+ TRAP_IGNORE( iModel->ResourceChangedL() );
}
+ CCCAppViewPluginAknContainer::HandleResourceChange(aType);
}
// ----------------------------------------------------------------------------
@@ -889,5 +891,12 @@
}
-
+//-----------------------------------------------------------------------------
+// CCCAppCommLauncherContainer::GetListBoxItemAmount()
+//-----------------------------------------------------------------------------
+//
+const TInt CCCAppCommLauncherContainer::GetListBoxItemAmount() const
+ {
+ return iModel->MdcaCount();
+ }
// End of File
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherheadercontrol.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherheadercontrol.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -439,10 +439,16 @@
switch(aPointerEvent.iType)
{
case TPointerEvent::EButton1Down:
-
+ {
+ TCmsContactStore cntStore = iPlugin.ContactHandler().ContactStore();
// Image selection popup
- if( iPlugin.ContactHandler().ContactStore() != ECmsContactStoreSdn
- && IsPhoneMemoryInConfigurationL()
+ // Image selection popup should not be shown for contact's that belong to sdn store
+ // Image selection popup can be shown only if the default
+ // saving memory includes local contact db (contacts.cdb) or if the contact belongs to
+ // local contact DB
+ if( cntStore != ECmsContactStoreSdn
+ && ( IsPhoneMemoryInConfigurationL()
+ || (cntStore != ECmsContactStoreSim) )
&& iImage->Rect().Contains(aPointerEvent.iPosition) )
{
// Show the feedback
@@ -454,6 +460,7 @@
LaunchStylusPopupL( aPointerEvent );
}
break;
+ }
default:
break;
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -302,7 +302,8 @@
TPtr textPtr(iTextBuf->Des());
textPtr.Zero();
TPtrC popupText;
- TRAPD( error, popupText.Set( const_cast <CCCAppCommLauncherLPadModel*>(this)->TextForPopUpL( aIndex ) ) );
+ TRAPD( error, popupText.Set(
+ const_cast <CCCAppCommLauncherLPadModel*>(this)->TextForPopUpL( aIndex ) ) );
if ( KErrNone == error )
{
textPtr.Copy( popupText );
@@ -334,8 +335,13 @@
tempText.Append( textPtr );
}
tempText.Append( KColumnListSeparator );
-
- // TODO: Check presence icon
+
+ // Check presence icon
+ if ( iButtonDataArray[ aIndex ].iFlags &
+ TCommLauncherButtonData::EHasPresenceIcon )
+ {
+ tempText.AppendNum( EPresenceIconIndex );
+ }
tempText.Append( KColumnListSeparator );
// Check if show multi icon at the right end of second row
@@ -403,6 +409,8 @@
//
void CCCAppCommLauncherLPadModel::FillButtonArrayL()
{
+ CalculateLayoutSize();
+
RArray<VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector>&
preferredCommMethods = iContainer.Plugin().PreferredCommMethods();//not owned
const TInt buttonCount = preferredCommMethods.Count();
@@ -955,47 +963,7 @@
void CCCAppCommLauncherLPadModel::Reset()
{
iButtonDataArray.Reset();
- }
-
-// ---------------------------------------------------------------------------
-// CCCAppCommLauncherLPadModel::ReplaceWithDefaultIconL
-// ---------------------------------------------------------------------------
-//
-void CCCAppCommLauncherLPadModel::ReplaceWithDefaultIconL(
- CFbsBitmap*& aBitmap,
- CFbsBitmap*& aMask,
- const TUint32 aServiceType )
- {
- delete aBitmap;
- delete aMask;
- CGulIcon* icon = NULL;
-
- switch ( aServiceType )
- {
- /* The VOIP Button doesnt show presence CCA UI Spec will be
- * updated with this info.
- * Thats why this part of code is commeneted
- case CCmsContactFieldItem::ECmsPresenceVoIPNotification:
- icon = LoadIconLC(
- EMbmPhonebook2eceQgn_prop_nrtyp_voip,
- EMbmPhonebook2eceQgn_prop_nrtyp_voip_mask );
- break;*/
- case CCmsContactFieldItem::ECmsPresenceChatNotification:
- icon = LoadIconLC(
- EMbmPhonebook2eceQgn_prop_nrtyp_chat,
- EMbmPhonebook2eceQgn_prop_nrtyp_chat_mask );
- break;
- default:
- // Only ECmsPresenceVoIPNotification and
- // ECmsPresenceChatNotification supported
- User::Leave( KErrArgument );
- break;
- }
-
- aBitmap = icon->Bitmap();
- aMask = icon->Mask();
- icon->SetBitmapsOwnedExternally( ETrue );
- CleanupStack::PopAndDestroy( icon );
+ iButtonIconArray->Reset();
}
// ---------------------------------------------------------------------------
@@ -1005,52 +973,65 @@
void CCCAppCommLauncherLPadModel::ContactPresenceChangedL(
const CCmsContactField& aContactField )
{
- //Get the size of icon for Voip presence
- TRect mainPane = iPlugin.ClientRect();
- TAknLayoutRect listLayoutRect;
- listLayoutRect.LayoutRect(
- mainPane,
- AknLayoutScalable_Avkon::list_single_large_graphic_pane_g1(0).LayoutLine() );
- TSize size(listLayoutRect.Rect().Size());
-
const TInt count = aContactField.ItemCount();
for (TUint i=0; i < count; i++)
{
CCmsPresenceData& presData = ( CCmsPresenceData& )aContactField.ItemL( i );
- presData.PreparePresenceDataL( size );
- TUint32 serviceType = presData.ServiceType();
- TInt iconInd = KErrNotFound;
- switch (serviceType)
- {
- /* The VOIP Button doesnt show presence CCA UI Spec will be
- * updated with this info.
- * Thats why this part of code is commeneted
- case CCmsContactFieldItem::ECmsPresenceVoIPNotification:
- iconInd = MapCommMethodToIcon(
- VPbkFieldTypeSelectorFactory::EVOIPCallSelector );
- break;*/
- case CCmsContactFieldItem::ECmsPresenceChatNotification:
- iconInd = MapCommMethodToIcon(
- VPbkFieldTypeSelectorFactory::EInstantMessagingSelector );
- break;
- }
- if (iconInd > 0 && iconInd < iButtonIconArray->Count())
+ presData.PreparePresenceDataL( iPresenceIconSize );
+ TUint32 serviceType = presData.ServiceType();
+
+ if ( serviceType == CCmsContactFieldItem::ECmsPresenceChatNotification )
{
CFbsBitmap* mask = presData.Mask();
CFbsBitmap* bitmap = presData.Bitmap();
-
- if ( bitmap && NULL == bitmap->Handle() )
- {
- // There should not be a case with empty bitmaps, so
- // replace with the default icons.
- ReplaceWithDefaultIconL( bitmap, mask, serviceType );
- }
-
- if ( bitmap || mask )
- {
- iButtonIconArray->At(iconInd)->SetBitmap(bitmap);
- iButtonIconArray->At(iconInd)->SetMask(mask);
- }
+
+ // Find the index for chat item
+ TInt index = KErrNotFound;
+ const TInt dataCount = iButtonDataArray.Count();
+ for ( TInt i = 0; i < dataCount; i++ )
+ {
+ if ( iButtonDataArray[ i ].iContactAction
+ == VPbkFieldTypeSelectorFactory::EInstantMessagingSelector )
+ {
+ index = i;
+ break;
+ }
+ }
+
+ if ( index != KErrNotFound )
+ {
+ TBool hasPresenceIcon = iButtonDataArray[ index ].iFlags &
+ TCommLauncherButtonData::EHasPresenceIcon;
+
+ if ( bitmap && ( NULL == bitmap->Handle() ) )
+ {
+ if ( hasPresenceIcon )
+ {
+ // Delete presence icon from icon array
+ iButtonDataArray[ index ].iFlags &= ~(TCommLauncherButtonData::EHasPresenceIcon);
+ iButtonIconArray->Delete( EPresenceIconIndex );
+ }
+ }
+ else if ( bitmap )
+ {
+ if ( hasPresenceIcon )
+ {
+ // Update presence icon
+ iButtonIconArray->At( EPresenceIconIndex )->SetBitmap(bitmap);
+ iButtonIconArray->At( EPresenceIconIndex )->SetMask(mask);
+ }
+ else
+ {
+ // Append presence icon to icon array
+ CGulIcon* icon = CGulIcon::NewLC();
+ icon->SetBitmap( bitmap );
+ icon->SetMask( mask );
+ iButtonIconArray->AppendL( icon );
+ iButtonDataArray[ index ].iFlags |= TCommLauncherButtonData::EHasPresenceIcon;
+ CleanupStack::Pop(); // icon
+ }
+ }
+ }
}
else
{
@@ -1455,18 +1436,15 @@
const CPbk2ServiceManager::TService& service = services[i];
//Found the appropriate service info
if ( service.iServiceId == aServiceId )
- {
- // Get service bitmap size
- TSize size = GetServiceBitmapSize();
-
+ {
// Set service bitmap size
- AknIconUtils::SetSize( service.iBitmap, size );
- AknIconUtils::SetSize( service.iMask, size );
+ AknIconUtils::SetSize( service.iBitmap, iServiceIconSize );
+ AknIconUtils::SetSize( service.iMask, iServiceIconSize );
//Trickiest Bitmap cloning
//No direct way of cloning a bitmap
- aBitmap = CloneBitmapLC(size, service.iBitmap);
- aMask = CloneBitmapLC(size, service.iMask);
+ aBitmap = CloneBitmapLC( iServiceIconSize, service.iBitmap );
+ aMask = CloneBitmapLC( iServiceIconSize, service.iMask );
aLocalisedServiceName = service.iDisplayName.AllocL();
@@ -1477,14 +1455,12 @@
}
// ---------------------------------------------------------------------------
-// CCCAppCommLauncherLPadModel::GetServiceBitmapSize
+// CCCAppCommLauncherLPadModel::CalculateLayoutSize()
// ---------------------------------------------------------------------------
//
-TSize CCCAppCommLauncherLPadModel::GetServiceBitmapSize()
+void CCCAppCommLauncherLPadModel::CalculateLayoutSize()
{
- /*
- * Calculate the rect of list_double_large_graphic_phob2_cc_pane_g1
- * and select its size as service bitmap size.
+ /* Calculate the layout size for Voip service icon and presence icon.
* Since the layoutRect is relative to the layoutRect of its parent, so
* we calculate from the topmost-mainPane, then follow below sequence:
* phob2_contact_card_pane
@@ -1520,9 +1496,16 @@
listLayoutRect3.Rect(),
AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_g1(0).LayoutLine() );
- TSize size(listLayoutRect4.Rect().Size());
+ TAknLayoutRect listLayoutRect5;
+ listLayoutRect5.LayoutRect(
+ listLayoutRect3.Rect(),
+ AknLayoutScalable_Apps::list_double_large_graphic_phob2_cc_pane_g2(0).LayoutLine() );
- return size;
+ // Size for service icon
+ iServiceIconSize = listLayoutRect4.Rect().Size();
+
+ // Size for presence icon
+ iPresenceIconSize = listLayoutRect5.Rect().Size();
}
// ---------------------------------------------------------------------------
// CCCAppCommLauncherLPadModel::HandleNotifyChange
@@ -1684,4 +1667,17 @@
return result;
}
+// ----------------------------------------------------------
+// CCCAppCommLauncherLPadModel::ResourceChangedL
+//
+// ----------------------------------------------------------
+void CCCAppCommLauncherLPadModel::ResourceChangedL()
+ {
+ // When layout variant changed, calculate the layout size which will be
+ // used in listbox, eg: the size for service icon and presence icon
+ CalculateLayoutSize();
+
+ LoadVoipButtonInfoL();
+ }
+
// End of File
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchermenuhandler.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchermenuhandler.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -20,6 +20,9 @@
#include <mccacontactobserver.h>
#include <mccappengine.h>
+#include <mnproviderfinder.h>
+#include <mnprovider.h>
+
using namespace AiwContactAssign;
// ======== MEMBER FUNCTIONS ========
@@ -256,7 +259,12 @@
CEikMenuPane* aMenuPane )
{
CCA_DP(KCommLauncherLogFile, CCA_L("->CCCAppCommLauncherMenuHandler::DynInitSelectMenuItemL()"));
-
+
+ // Used for checking whether some maps have been installed or not.
+ RPointerArray<CMnProvider> providers;
+ CleanupClosePushL( providers );
+ MnProviderFinder::FindProvidersL( providers, CMnProvider::EServiceMapView );
+
if ( !iPlugin.Container().CommMethodsAvailable() )
{// no comm methods available
aMenuPane->DeleteMenuItem( ECCAppCommLauncherSelectCmd );
@@ -266,7 +274,28 @@
aMenuPane->DeleteMenuItem( ECCAppCommLauncherDefaultsCmd );
}
}
+ // If the count equals to 0, it means:
+ // No map is installed and there must be no adress item displayed in launcher view.
+ else if ( providers.Count() > 0 )
+ {
+ CCCAppCommLauncherContactHandler& contactHandler = iPlugin.ContactHandler();
+
+ // Get the number how many addresses are defined.
+ TInt addressAmount =
+ contactHandler.AddressAmount( VPbkFieldTypeSelectorFactory::EFindOnMapSelector);
+
+ // If the amount of address is not 0 and the amount of listbox in launcher view is 1.
+ // That means only address is defined in the contact.
+ if ( ( addressAmount > 0 )
+ && ( iPlugin.Container().GetListBoxItemAmount() == 1 ) )
+ {
+ aMenuPane->DeleteMenuItem( ECCAppCommLauncherDefaultsCmd );
+ }
+ }
+ providers.ResetAndDestroy();
+ CleanupStack::PopAndDestroy( &providers );
+
CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherMenuHandler::DynInitSelectMenuItemL()"));
}
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherplugin.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherplugin.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -301,7 +301,7 @@
AknsUtils::CreateIconL(
AknsUtils::SkinInstance(),
- KAknsIIDDefault,//todo; get a proper skin
+ KAknsIIDQgnPropPbCommTab3,
bmp,
bmpMask,
KPbk2ECEIconFileName,
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/inc/ccappdetailsviewmenuhandler.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/inc/ccappdetailsviewmenuhandler.h Wed Apr 14 15:45:35 2010 +0300
@@ -120,7 +120,7 @@
void DoCopyAddressCmdL();
void DoCopyNumberCmdL();
void DoShowOnMapCmdL();
- TBool HasAddressFieldL();
+ TBool IsFocusedAddressFieldL();
TBool IsAddressValidatedL();
/**
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/inc/ccappdetailsviewplugin.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/inc/ccappdetailsviewplugin.h Wed Apr 14 15:45:35 2010 +0300
@@ -33,6 +33,7 @@
class MCCAParameter;
class CCCAppCmsContactFetcherWrapper;
class CCAContactorService;
+class MVPbkContactLink;
/**
* Class implementing CCCAppViewPluginBase interface. This is
@@ -266,6 +267,9 @@
/// Own: Pointer to contactor service.
CCAContactorService* iContactorService;
+
+ ///Contact Link - Owns
+ MVPbkContactLink* iLink;
};
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewmenuhandler.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewmenuhandler.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Implementation of ccappdetailsview menuhandler
-* Version : %version: he1s60#31.1.16 %
+* Version : %version: be1neux1#31.1.17 %
*
*/
@@ -223,7 +223,7 @@
&& aMenuPane->MenuItemExists(
ECCAppDetailsViewShowOnMapCmd, pos ) )
{
- if ( iMapViewProvider && HasAddressFieldL() )
+ if ( iMapViewProvider && IsFocusedAddressFieldL())
{
if ( IsAddressValidatedL() )
{
@@ -842,37 +842,33 @@
}
// ---------------------------------------------------------------------------
-// CCCAppDetailsViewMenuHandler::HasAddressFieldL
+// CCCAppDetailsViewMenuHandler::IsFocusedAddressFieldL
// ---------------------------------------------------------------------------
//
-TBool CCCAppDetailsViewMenuHandler::HasAddressFieldL()
+TBool CCCAppDetailsViewMenuHandler::IsFocusedAddressFieldL()
{
TBool addressField = EFalse;
const CCCAppDetailsViewContainer& container =
static_cast<const CCCAppDetailsViewContainer&>( iPlugin.GetContainer() );
- TInt countFields =
- container.FocusedStoreContact()->Fields().FieldCount();
- for ( TInt i = 0; i < countFields; i++ )
- {
- const MVPbkStoreContactField& field =
- container.FocusedStoreContact()->Fields().FieldAt( i );
- const MVPbkFieldType* fieldType = field.BestMatchingFieldType();
- if ( fieldType )
+
+ MVPbkBaseContactField* field = container.ListBoxModel().FocusedFieldLC();
+ const MVPbkFieldType* fieldType = field->BestMatchingFieldType();
+ if ( fieldType )
+ {
+ TInt countProps = fieldType->VersitProperties().Count();
+ TArray<TVPbkFieldVersitProperty> props =
+ fieldType->VersitProperties();
+ for (TInt ii = 0; ii < countProps; ii++ )
{
- TInt countProps = fieldType->VersitProperties().Count();
- TArray<TVPbkFieldVersitProperty> props =
- fieldType->VersitProperties();
- for (TInt ii = 0; ii < countProps; ii++ )
+ if ( props[ii].Name() == EVPbkVersitNameADR )
{
- if ( props[ii].Name() == EVPbkVersitNameADR )
- {
- addressField = ETrue;
- break;
- }
+ addressField = ETrue;
+ break;
}
}
- }
+ }
+ CleanupStack::PopAndDestroy(field);
return addressField;
}
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewplugin.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewplugin.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Implementation of details view plugin
-* Version : %version: he1s60#23.1.1.2.16 %
+* Version : %version: he1s60#23.1.1.2.17 %
*
*/
@@ -37,6 +37,8 @@
#include <VPbkContactStoreUris.h>
#include <mccappengine.h>
#include <ccacontactorservice.h>
+#include <MVPbkContactStoreProperties.h>
+#include <MVPbkContactStore.h>
#include <Pbk2DataCaging.hrh>
@@ -97,6 +99,9 @@
{
//CCA_DP(KDetailsViewLogFile, CCA_L(">>> CCCAppDetailsViewPlugin::~CCCAppDetailsViewPlugin()"));
+ //Delete the Contact Link
+ delete iLink;
+
//BG task for checking the visibility of this plugin
if (iBgTaskForCheckingVisibility)
{
@@ -193,6 +198,29 @@
storeManager.RegisterStoreEventsL(*this);
storeManager.OpenStoresL();
+ //Get the Contact Link
+ HBufC& contactData = AppEngine()->Parameter().ContactDataL();
+ HBufC8* contactData8 = HBufC8::NewLC( contactData.Size() );
+ TPtr8 contactData8Ptr( contactData8->Des() );
+ contactData8Ptr.Copy( contactData.Des() );
+ CVPbkContactManager* vPbkContactManager = &iAppServices->ContactManager();
+
+ if( vPbkContactManager )
+ {
+ MVPbkContactLinkArray* contactArray = NULL;
+ contactArray = vPbkContactManager->CreateLinksLC( contactData8Ptr );
+ if( contactArray->Count() > 0 )
+ {
+ iLink = contactArray->At( 0 ).CloneLC();
+ CleanupStack::Pop(); //link
+ }
+ if( contactArray )
+ {
+ CleanupStack::PopAndDestroy(); // contactArray
+ }
+ }
+ CleanupStack::PopAndDestroy(); // contactData8
+
iSchedulerWait.Start();
BaseConstructL(R_CCAPPDETAILSVIEW_MAINVIEW);
@@ -443,12 +471,35 @@
// CCCAppDetailsViewPlugin::StoreReady
// --------------------------------------------------------------------------
//
-void CCCAppDetailsViewPlugin::StoreReady(MVPbkContactStore& /*aContactStore*/)
+void CCCAppDetailsViewPlugin::StoreReady(MVPbkContactStore& aContactStore)
{
- if (iSchedulerWait.IsStarted())
+ if( iLink )
{
- iSchedulerWait.AsyncStop();
+ const MVPbkContactStoreProperties& storeProperties =
+ iLink->ContactStore().StoreProperties();
+ TVPbkContactStoreUriPtr uri = storeProperties.Uri();
+ if( 0 == uri.Compare( aContactStore.StoreProperties().Uri(),
+ TVPbkContactStoreUriPtr::EContactStoreUriAllComponents ) )
+ {
+ delete iLink;
+ iLink = NULL;
+ if ( iSchedulerWait.IsStarted() )
+ {
+ iSchedulerWait.AsyncStop();
+ }
+ }
}
+ else
+ {
+ //We shouldnt get here
+ //but if so, lets be safe
+ if ( iSchedulerWait.IsStarted() )
+ {
+ iSchedulerWait.AsyncStop();
+ }
+ }
+
+
}
// --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycard.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycard.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -800,7 +800,12 @@
{
TRAPD( err, LaunchContactEditorL( TPbk2ContactEditorParams::EModified |
TPbk2ContactEditorParams::EOwnContact) );
- if( err != KErrNone )
+
+ if( err == KLeaveExit )
+ {
+ iCloseCallBack->Call();
+ }
+ else if( err != KErrNone )
{
LoadContact();
iPlugin.HandleError( err );
--- a/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardcontainer.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardcontainer.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -77,8 +77,8 @@
#include <CPbk2IconInfo.h>
#include <csxhelp/phob.hlp.hrh>
#include <Pbk2UID.h>
-
#include <f32file.h>
+#include <AknsConstants.h>
// unnamed namespace
namespace
@@ -411,7 +411,12 @@
}
else
{
- TRAP_IGNORE( iImageLoader->ResizeImageL(iHeaderCtrl->ThumbnailSize()));
+ // No need to call ResizeImageL() which would invoke the image decoder re-stating
+ // to show the previous user-assigned image if MyCard image is not set.
+ if ( iMyCardImageSet )
+ {
+ TRAP_IGNORE( iImageLoader->ResizeImageL(iHeaderCtrl->ThumbnailSize()));
+ }
}
DrawDeferred();
@@ -585,7 +590,10 @@
{
CFbsBitmap* bitmap = NULL;
CFbsBitmap* mask = NULL;
- TRAPD( err, AknIconUtils::CreateIconL(
+
+ TRAPD( err, AknsUtils::CreateIconL(
+ AknsUtils::SkinInstance(),
+ KAknsIIDQgnPropPbThumpMycard,
bitmap,
mask,
KMyCardIconDefaultFileName,
--- a/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardheadercontrol.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardheadercontrol.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -93,7 +93,9 @@
CFbsBitmap* bmp = NULL;
CFbsBitmap* bmpMask = NULL;
- AknIconUtils::CreateIconL(
+ AknsUtils::CreateIconL(
+ AknsUtils::SkinInstance(),
+ KAknsIIDQgnPropWmlBmOvi,
bmp,
bmpMask,
KMyCardIconDefaultFileName,
--- a/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardimageloader.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardimageloader.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -94,6 +94,8 @@
iImageBuffer = NULL;
delete iImageFileName;
iImageFileName = NULL;
+ delete iImageDecoding;
+ iImageDecoding = NULL;
const TInt fieldCount = fields.FieldCount();
@@ -122,9 +124,6 @@
if( iImageBuffer )
{
- delete iImageDecoding;
- iImageDecoding = NULL;
-
RFs& fs = CEikonEnv::Static()->FsSession();
iImageDecoding = CCCAppImageDecoding::NewL(
*this,
--- a/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/inc/ccappstatuscontrol.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/inc/ccappstatuscontrol.h Wed Apr 14 15:45:35 2010 +0300
@@ -50,7 +50,7 @@
/**
* Class implements the status control
*
- * @lib ccapputil.dll
+ * @lib ccapputil.lib
* @since S60 9.2
*/
NONSHARABLE_CLASS( CCCAppStatusControl ) :
@@ -61,7 +61,9 @@
/**
* Two-phased constructor.
*/
- IMPORT_C static CCCAppStatusControl* NewL( CSpbContentProvider& aContentProvider, MCCAStatusControlObserver& aObserver );
+ IMPORT_C static CCCAppStatusControl* NewL(
+ CSpbContentProvider& aContentProvider,
+ MCCAStatusControlObserver& aObserver );
/**
* Destructor.
@@ -75,7 +77,8 @@
*
* @aLink Link to current contact
*/
- IMPORT_C void SetContactLinkL( MVPbkContactLink& aLink );
+ IMPORT_C void SetContactLinkL(
+ MVPbkContactLink& aLink );
/**
* Change buttons state between pressed and released.
@@ -83,27 +86,20 @@
* @param aPressed ETrue to make the button pressed
*/
void SetPressed( TBool aPressed );
-
+
/**
- * Check if button is pressed down
- *
- * @return ETrue if button is pressed
- */
- TBool IsPressed();
-
- /**
- * Set the default status icon
+ * Set the default status icon
*
* @aDefaultStatusIcon Default status icon
*/
- IMPORT_C void SetDefaultStatusIconL( CGulIcon* aDefaultStatusIcon );
+ IMPORT_C void SetDefaultStatusIconL( CGulIcon* aDefaultStatusIcon );
- /**
+ /**
* Set the default status text
*
* @aDefaultStatusText Default status text
*/
- IMPORT_C void SetDefaultStatusTextL( HBufC* aDefaultStatusText );
+ IMPORT_C void SetDefaultStatusTextL( HBufC* aDefaultStatusText );
public: // From CCoeControl
@@ -124,12 +120,12 @@
/**
* From CoeControl
- */
+ */
void HandlePointerEventL( const TPointerEvent& aPointerEvent );
/**
* From CoeControl
- */
+ */
void SetContainerWindowL( const CCoeControl& aContainer );
/**
--- a/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/src/ccappstatuscontrol.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/src/ccappstatuscontrol.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -60,11 +60,13 @@
CFbsBitmap* mask = aIcon->Mask();
if( bitmap )
{
- AknIconUtils::SetSize( bitmap, aSize, EAspectRatioPreservedAndUnusedSpaceRemoved );
+ AknIconUtils::SetSize(
+ bitmap, aSize, EAspectRatioPreservedAndUnusedSpaceRemoved );
}
if( mask )
{
- AknIconUtils::SetSize( mask, aSize, EAspectRatioPreservedAndUnusedSpaceRemoved );
+ AknIconUtils::SetSize(
+ mask, aSize, EAspectRatioPreservedAndUnusedSpaceRemoved );
}
}
}
@@ -76,9 +78,11 @@
// ---------------------------------------------------------------------------
//
EXPORT_C CCCAppStatusControl* CCCAppStatusControl::NewL(
- CSpbContentProvider& aContentProvider, MCCAStatusControlObserver& aObserver )
+ CSpbContentProvider& aContentProvider,
+ MCCAStatusControlObserver& aObserver )
{
- CCCAppStatusControl* self= new(ELeave) CCCAppStatusControl( aContentProvider, aObserver );
+ CCCAppStatusControl* self= new(ELeave) CCCAppStatusControl(
+ aContentProvider, aObserver );
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop(self);
@@ -90,7 +94,8 @@
// ---------------------------------------------------------------------------
//
CCCAppStatusControl::CCCAppStatusControl(
- CSpbContentProvider& aContentProvider, MCCAStatusControlObserver& aObserver ) :
+ CSpbContentProvider& aContentProvider,
+ MCCAStatusControlObserver& aObserver ) :
iContentProvider( aContentProvider ),
iObserver( aObserver ),
iState( EStateUndefined )
@@ -186,15 +191,6 @@
}
// ---------------------------------------------------------------------------
-// CCCAppStatusControl::IsPressed
-// ---------------------------------------------------------------------------
-//
-TBool CCCAppStatusControl::IsPressed()
- {
- return iPressed;
- }
-
-// ---------------------------------------------------------------------------
// CCCAppStatusControl::CountComponentControls
// ---------------------------------------------------------------------------
//
@@ -216,7 +212,8 @@
// CCCAppStatusControl::SetDefaultStatusIconL
// ---------------------------------------------------------------------------
//
-EXPORT_C void CCCAppStatusControl::SetDefaultStatusIconL( CGulIcon* aDefaultStatusIcon )
+EXPORT_C void CCCAppStatusControl::SetDefaultStatusIconL(
+ CGulIcon* aDefaultStatusIcon )
{
delete iDefaultIcon;
iDefaultIcon = aDefaultStatusIcon;
@@ -231,7 +228,8 @@
// CCCAppStatusControl::SetDefaultStatusTextL
// ---------------------------------------------------------------------------
//
-EXPORT_C void CCCAppStatusControl::SetDefaultStatusTextL( HBufC* aDefaultStatusText )
+EXPORT_C void CCCAppStatusControl::SetDefaultStatusTextL(
+ HBufC* aDefaultStatusText )
{
delete iDefaultStatusText;
iDefaultStatusText = aDefaultStatusText;
@@ -283,21 +281,21 @@
{
const TRect rect(Rect());
// set background graphics layout
- TAknWindowComponentLayout innerLayout(
+ const TAknWindowComponentLayout innerLayout(
AknLayoutScalable_Apps::bg_button_pane_cp033( aOption ) );
TAknLayoutRect innerLayoutRect;
innerLayoutRect.LayoutRect( rect, innerLayout.LayoutLine() );
- TRect innerRect( innerLayoutRect.Rect() );
+ const TRect innerRect( innerLayoutRect.Rect() );
iBgContext->SetFrameRects( rect, innerRect );
// status icon
- TAknWindowComponentLayout statusIconLayout(
+ const TAknWindowComponentLayout statusIconLayout(
AknLayoutScalable_Apps::phob2_cc_button_pane_g1( aOption ) );
TAknLayoutRect statusIconLayoutRect;
statusIconLayoutRect.LayoutRect( Rect(), statusIconLayout.LayoutLine() );
- TRect statusIconRect( statusIconLayoutRect.Rect() );
+ const TRect statusIconRect( statusIconLayoutRect.Rect() );
iStatusIconSize = statusIconRect.Size();
iStatusImage->SetRect( statusIconRect );
@@ -405,7 +403,7 @@
CCoeControl::SetContainerWindowL( aContainer );
// Assign window for child controls too
- TInt childCount = CountComponentControls();
+ const TInt childCount = CountComponentControls();
for( TInt i = 0; i < childCount; ++i )
{
ComponentControl( i )->SetContainerWindowL( *this );
@@ -452,10 +450,11 @@
iStatusText = NULL;
TPbk2IconId iconId;
- CSpbContentProvider::TSpbContentType type = CSpbContentProvider::ETypeNone;
+ CSpbContentProvider::TSpbContentType type =
+ CSpbContentProvider::ETypeNone;
iContentProvider.GetContentL( aLink, iStatusText, iconId, type );
- TInt count( RewrapStatusTextL() );
+ const TInt count( RewrapStatusTextL() );
TInt option( 1 );
if( count > 1 )
{
@@ -584,7 +583,7 @@
//
void CCCAppStatusControl::Draw( const TRect& /*aRect*/ ) const
{
- TRect rect( Rect() );
+ const TRect rect( Rect() );
MAknsSkinInstance* skin = AknsUtils::SkinInstance();
CWindowGc& gc = SystemGc();
@@ -622,7 +621,13 @@
HBufC* txt = iDefaultStatusText->AllocL();
delete iStatusText;
iStatusText = txt;
- RewrapStatusTextL();
+ const TInt count( RewrapStatusTextL() );
+ TInt option( 1 );
+ if( count > 1 )
+ {
+ option = 0;
+ }
+ SetVariableLayouts( option );
}
}
}
Binary file phonebookui/Phonebook2/conf/phonebook2.confml has changed
--- a/phonebookui/Phonebook2/inc/CPbk2MemoryEntryDefaultsDlg.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/inc/CPbk2MemoryEntryDefaultsDlg.h Wed Apr 14 15:45:35 2010 +0300
@@ -23,6 +23,7 @@
#include <aknPopup.h> // CAknPopupList
#include <MPbk2DefaultAttributeProcessObserver.h>
#include <VPbkFieldTypeSelectorFactory.h>
+#include <spdefinitions.h>
// FORWARD DECLARATIONS
class CEikColumnListBox;
@@ -30,6 +31,7 @@
class CVPbkContactManager;
class CPbk2DefaultAttributeProcess;
class MVPbkStoreContactField;
+class CFbsBitmap;
// CLASS DECLARATION
@@ -108,7 +110,11 @@
void RemoveDefaultL(
const VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aSelectorID );
void CreateTableOfDefaultsL();
- void ReadDefaultsFromRepositoryL();
+ void ReadDefaultsFromRepositoryL();
+ TInt SupportedVOIPServicesL( TServiceId& aServiceId );
+ void LoadVoipServiceInfoL(
+ TServiceId aServiceId,
+ CFbsBitmap*& aBitmap, CFbsBitmap*& aMask );
private: // Data
/// Ref: The contact
@@ -129,6 +135,8 @@
CArrayFixFlat<VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector>* iDefaultsTable;
/// Own: Indicates if focus has been dragged around the list, helps with single tap launching
TBool iHasBeenDragged;
+ /// Voip service name
+ HBufC* iServiceName;
};
#endif // CPBK2MEMORYENTRYDEFAULTSDLG_H
--- a/phonebookui/Phonebook2/inc/CPbk2NamesListControl.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/inc/CPbk2NamesListControl.h Wed Apr 14 15:45:35 2010 +0300
@@ -242,7 +242,14 @@
IMPORT_C void HandleViewForegroundEventL( TBool aForeground );
-
+ /**
+ * For special case: Call this function to skip showing the
+ * blocking progress note when mass update is going on in nameslistview.
+ * When done, MassUpdateSkipProgressNote(EFalse) must always be
+ * called to reset back to original state (even if a Leave would happen in between)
+ * @param aSkip - ETrue if progress note should not be displayed. EFalse reset to normal.
+ */
+ IMPORT_C void MassUpdateSkipProgressNote( TBool aSkip );
public: // From CCoeControl
void MakeVisible(
--- a/phonebookui/Phonebook2/loc/phonebook2ece.loc Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/loc/phonebook2ece.loc Wed Apr 14 15:45:35 2010 +0300
@@ -940,4 +940,20 @@
//
#define qtn_phob_opt_change_image "Change image"
+//AIM service localized name
+//l:list_single_graphic_pane_t1_cp2
+//r:9.2
+#define qtn_xsp_aim "AIM"
+
+//MySpace service localized name
+//l:list_single_graphic_pane_t1_cp2
+//r:9.2
+#define qtn_xsp_myspace "MySpace"
+
+//ICQ service localized name
+//l:list_single_graphic_pane_t1_cp2
+//r:9.2
+#define qtn_xsp_icq "ICQ"
+
+
// End of File
--- a/phonebookui/Phonebook2/remotecontactlookup/contactactionservice/saveascontactplugin/inc/cfscsaveascontactpluginimpl.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/contactactionservice/saveascontactplugin/inc/cfscsaveascontactpluginimpl.h Wed Apr 14 15:45:35 2010 +0300
@@ -267,11 +267,6 @@
MFscContactSet& aContactSet,
TBool aIsExecute );
- /**
- * Dismisses wait note
- */
- void DismissWaitNote();
-
private:
// data
--- a/phonebookui/Phonebook2/remotecontactlookup/contactactionservice/saveascontactplugin/src/cfscsaveascontactpluginimpl.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/contactactionservice/saveascontactplugin/src/cfscsaveascontactpluginimpl.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -91,7 +91,6 @@
CFscSaveAsContactPluginImpl::~CFscSaveAsContactPluginImpl()
{
FUNC_LOG;
- DismissWaitNote();
delete iNewStoreContact;
delete iContactSaveAsContactAction;
delete iActionList;
@@ -252,11 +251,6 @@
case EActionEventCanExecuteFinished:
{
-
- iWaitDialog = new(ELeave)CAknWaitDialog(
- (REINTERPRET_CAST(CEikDialog**,&iWaitDialog)), EFalse);
- iWaitDialog->ExecuteLD(R_FS_WAIT_NOTE);
-
if (iCanDisplay == KErrNone)
{
iLastEvent = EActionEventContactRetrieve;
@@ -290,7 +284,6 @@
void CFscSaveAsContactPluginImpl::CancelExecute()
{
FUNC_LOG;
- DismissWaitNote();
iLastEvent = EActionEventCanceled;
ResetData();
}
@@ -644,7 +637,6 @@
TRAP_IGNORE( iContactSet->CancelNextGroupL() );
iContactSet = NULL;
}
- DismissWaitNote();
iLastEvent = EActionEventIdle;
iActionMenuVisibility = NULL;
@@ -708,7 +700,6 @@
}
case EContactCommit:
{
- DismissWaitNote();
TRAP( err, iParams.iUtils->ShowCnfNoteL(
R_FS_ACTION_SAVED_NOTE ) );
ResetData();
@@ -758,28 +749,10 @@
{
FUNC_LOG;
iLastEvent = EActionEventIdle;
- DismissWaitNote();
ResetData();
iPluginObserver->ExecuteFailed(aErrorCode);
}
-// ---------------------------------------------------------------------------
-// CFscSaveAsContactPluginImpl::DismissWaitDialog
-// ---------------------------------------------------------------------------
-//
-void CFscSaveAsContactPluginImpl::DismissWaitNote()
- {
- FUNC_LOG;
- if (iWaitDialog != NULL)
- {
- TRAPD( err, iWaitDialog->ProcessFinishedL() );
- if (err != KErrNone)
- {
- delete iWaitDialog;
- iWaitDialog = NULL;
- }
- }
- }
// ======== GLOBAL FUNCTIONS ========
// ---------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/remotecontactlookup/contactactionservice/src/cfsccontactactionpluginengine.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/contactactionservice/src/cfsccontactactionpluginengine.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -100,6 +100,7 @@
// service totaly unusable
if ( error == KErrNoMemory )
{
+ implArray.ResetAndDestroy();
User::Leave( error );
}
}
@@ -275,11 +276,14 @@
TFscContactActionVisibility::EFscActionHidden )
{
iContactActionQueryResult.iAction = &action;
- iActionList->AppendL( iContactActionQueryResult );
+ if( iActionList )
+ {
+ iActionList->AppendL( iContactActionQueryResult );
+ }
}
// if only one action is needed we stop method execution
- if ( iStopWhenOneActionFound && iActionList->Count() )
+ if ( iStopWhenOneActionFound && iActionList && iActionList->Count() )
{
iLastEvent = ECasEventIdle;
iObserver->QueryActionsComplete();
@@ -323,7 +327,10 @@
iLastEvent = ECasEventIdle;
iCurrentActionPlugin = 0;
iCurrentAction = 0;
- iActionList->Reset();
+ if( iActionList )
+ {
+ iActionList->Reset();
+ }
break;
}
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/data/engine.rss Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/data/engine.rss Wed Apr 14 15:45:35 2010 +0300
@@ -88,7 +88,7 @@
MENU_ITEM { command = ERclCmdNewSearchPrefilled; txt = qtn_rcl_opt_new_search; },
MENU_ITEM { command = ERclCmdCall; cascade = r_rcl_call_menu_pane; txt = qtn_rcl_opt_call; flags = EEikMenuItemSpecific; },
MENU_ITEM { command = ERclCmdSend; cascade = r_rcl_send_menu_pane; txt = qtn_rcl_opt_send; flags = EEikMenuItemSpecific; },
- MENU_ITEM { command = ERclCmdHelp; txt = qtn_options_help; },
+ MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
MENU_ITEM { command = EAknCmdExit; txt = qtn_options_exit; }
};
}
@@ -176,7 +176,7 @@
MENU_ITEM { command = ERclCmdTalk; cascade = r_rcl_info_talk_menu_pane; txt = qtn_rcl_opt_talk; },
MENU_ITEM { command = ERclCmdSend; cascade = r_rcl_info_send_menu_pane; txt = qtn_rcl_opt_send; },
MENU_ITEM { command = ERclCmdCopyDetail; txt = qtn_cca_options_copy_detail; flags = EEikMenuItemAction; },
- MENU_ITEM { command = ERclCmdHelp; txt = qtn_options_help; },
+ MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
MENU_ITEM { command = EAknCmdExit; txt = qtn_options_exit; }
};
}
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/group/pbk2rclengine.mmp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/group/pbk2rclengine.mmp Wed Apr 14 15:45:35 2010 +0300
@@ -106,6 +106,6 @@
START RESOURCE engine.rss
HEADER
TARGET pbk2rclengine.rsc
-TARGETPATH APP_RESOURCE_DIR
+TARGETPATH RESOURCE_FILES_DIR
LANGUAGE_IDS
END
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/inc/cpbkxrclbasedlg.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/inc/cpbkxrclbasedlg.h Wed Apr 14 15:45:35 2010 +0300
@@ -91,11 +91,6 @@
* Updates graphics used in the component.
*/
void UpdateGraphics();
-
- /**
- * Updates colors used in the component.
- */
- void UpdateColors();
private: // data
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/inc/cpbkxrclsearchresultdlg.h Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/inc/cpbkxrclsearchresultdlg.h Wed Apr 14 15:45:35 2010 +0300
@@ -35,7 +35,7 @@
class CGulIcon;
class CFscContactActionMenu;
class CAknLongTapDetector;
-
+class CIdle;
/**
* Dialog for showing remote contact lookup search results.
*
@@ -164,6 +164,21 @@
*/
void InfoDlgVisible( TBool aVisible );
+ /**
+ * Set the internal flag telling wether last search found more than
+ * maximum number of results.
+ *
+ * @param aMoreThanMax ETrue\EFalse
+ */
+ void SetMoreThanMaxResults(TBool aMoreThanMax);
+
+ /**
+ * The state of the internal flag telling wether last search
+ * found more than maximum number of results.
+ *
+ * @return TBool ETrue\EFalse
+ */
+ TBool MoreThanMaxResults();
protected: // redefinition of functions of the base class
@@ -341,6 +356,16 @@
CAknLongTapDetector& LongTapDetectorL();
+ /**
+ * Idle callback for the "more than 50 results" info note.
+ *
+ * For smooth showing of the note, an idle object is used to
+ * schedule the display of the note.
+ *
+ * @param aSelf - handle for the object that made the request
+ */
+ static TInt TooManyResultsIdleCallbackL(TAny* aSelf );
+
private: // data
// Indexes of icon array.
@@ -420,6 +445,10 @@
HBufC* iOriginalTitleText;
// Pointer reference to title pane. Not owned.
CAknTitlePane* iTitlePane;
+
+ /// own. idle object for scheduling the showing of the "more than 50 results"
+ /// info note
+ CIdle* iIdleNote;
};
#endif
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/inc/engine.hrh Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/inc/engine.hrh Wed Apr 14 15:45:35 2010 +0300
@@ -40,8 +40,7 @@
ERclCmdToContact,
ERclCmdSendCallbackReq,
ERclCmdCopyDetail,
- ERclCmdTalk,
- ERclCmdHelp
+ ERclCmdTalk
};
enum TListBoxType
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclbasedlg.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclbasedlg.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -85,11 +85,6 @@
if ( aType == KAknsMessageSkinChange )
{
UpdateGraphics();
- UpdateColors();
- }
- else if ( aType == KEikMessageColorSchemeChange )
- {
- UpdateColors();
}
else if ( aType == KEikDynamicLayoutVariantSwitch )
{
@@ -99,7 +94,6 @@
if ( !iColumnListBox )
{
UpdateGraphics();
- UpdateColors();
}
}
}
@@ -241,96 +235,3 @@
}
-// ---------------------------------------------------------------------------
-// CPbkxRclBaseDlg::UpdateColors
-// ---------------------------------------------------------------------------
-//
-void CPbkxRclBaseDlg::UpdateColors()
- {
- FUNC_LOG;
-
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-
- CPbkxRclResultInfoItemDrawer* fItemDrawer = NULL;
- CPbkxRclSearchResultItemDrawer* cItemDrawer = NULL;
-
- if ( iColumnListBox )
- {
- CEikColumnListBox* listBox =
- static_cast<CEikColumnListBox*>( ListBox() );
- cItemDrawer = static_cast<CPbkxRclSearchResultItemDrawer*>(
- listBox->ItemDrawer() );
- }
- else
- {
- CEikFormattedCellListBox* listBox =
- static_cast<CEikFormattedCellListBox*>( ListBox() );
- fItemDrawer = static_cast<CPbkxRclResultInfoItemDrawer*>(
- listBox->ItemDrawer() );
- }
-
- TRgb newColor;
-
- // highlight text color
- TInt error = AknsUtils::GetCachedColor(
- skin,
- newColor,
- iHighlightTextColorId,
- EAknsCIFsHighlightColorsCG1 );
-
-
- if ( error == KErrNone )
- {
- if ( iColumnListBox )
- {
- cItemDrawer->SetHighlightColor( newColor );
- }
- else
- {
- fItemDrawer->SetHighlightColor( newColor );
- }
- }
- else
- {
- if ( iColumnListBox )
- {
- cItemDrawer->ResetColors( ETrue );
- }
- else
- {
- fItemDrawer->ResetColors( ETrue );
- }
- }
-
- // text color
- error = AknsUtils::GetCachedColor(
- skin,
- newColor,
- iTextColorId,
- EAknsCIFsTextColorsCG7 );
-
-
- if ( error == KErrNone )
- {
- if ( iColumnListBox )
- {
- cItemDrawer->SetColor( newColor );
- }
- else
- {
- fItemDrawer->SetColor( newColor );
- }
- }
- else
- {
- if ( iColumnListBox )
- {
- cItemDrawer->ResetColors();
- }
- else
- {
- fItemDrawer->ResetColors();
- }
- }
- }
-
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclresultinfodlg.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclresultinfodlg.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -511,7 +511,6 @@
PrepareLC( R_RCL_RESULT_INFO_DIALOG );
UpdateGraphics();
- UpdateColors();
iMenuBar->SetContextMenuTitleResourceId(
R_RCL_RESULT_INFO_DIALOG_CONTEXT_MENU_BAR );
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclresultinfolistbox.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclresultinfolistbox.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -162,18 +162,12 @@
ptr->iHighlightedTextColor = iHighlightColor;
}
- // Disable AVKON skinning so that our own color definitions apply
- TBool skinEnabled = AknsUtils::AvkonSkinEnabled();
- // Safe to ignore error
- TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( EFalse ) );
CFormattedCellListBoxItemDrawer::DrawItemText(
aItemIndex,
aItemTextRect,
aItemIsCurrent,
aViewIsEmphasized,
aItemIsSelected );
- // Safe to ignore error
- TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( skinEnabled ) );
}
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclsearchresultdlg.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclsearchresultdlg.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -55,6 +55,8 @@
#include "cpbkxrclvcardsender.h"
#include "cpbkxrclactionservicewrapper.h"
+#include <e32base.h>
+
// list box field formats
_LIT( KFieldFormat, "\t%S %S" );
_LIT( KFieldFormatWithIcon, "\t%S %S\t%d" );
@@ -137,6 +139,10 @@
// add foreground observer
CCoeEnv::Static()->AddForegroundObserverL( *this );
+
+ // Idle object for scheduling showing of the
+ // "more than 50 results..." note
+ iIdleNote = CIdle::NewL(CActive::EPriorityIdle);
}
// ---------------------------------------------------------------------------
@@ -165,10 +171,29 @@
delete iActionMenu;
iActionMenu = NULL;
}
+
+ delete iIdleNote;
}
+// ---------------------------------------------------------------------------
+// CPbkxRclSearchResultDlg::SetMoreThanMaxResults
+// ---------------------------------------------------------------------------
+//
+void CPbkxRclSearchResultDlg::SetMoreThanMaxResults(TBool aMoreThanMax)
+ {
+ iMoreThanMaxResults = aMoreThanMax;
+ }
// ---------------------------------------------------------------------------
+// CPbkxRclSearchResultDlg::MoreThanMaxResults
+// ---------------------------------------------------------------------------
+//
+TBool CPbkxRclSearchResultDlg::MoreThanMaxResults()
+ {
+ return iMoreThanMaxResults;
+ }
+
+// ---------------------------------------------------------------------------
// CPbkxRclSearchResultDlg::DisplayTooManyResultsInfoNoteL
// ---------------------------------------------------------------------------
//
@@ -176,12 +201,14 @@
{
FUNC_LOG;
// For making sure the note is not shown again set the flag off.
- iMoreThanMaxResults = EFalse;
+ SetMoreThanMaxResults(EFalse);
HBufC* text = StringLoader::LoadLC(
R_QTN_RCL_TOO_MANY_RESULTS_NOTE,
KMaxMatches );
-
+
+ // Note is non blocking and is displayed above the search results until
+ // the note expires and closes itself.
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
informationNote->SetTimeout(CAknNoteDialog::ELongTimeout);
informationNote->ExecuteLD(*text);
@@ -200,7 +227,6 @@
PrepareLC( R_RCL_SEARCH_RESULT_DIALOG );
UpdateGraphics();
- UpdateColors();
HBufC* noItemText = StringLoader::LoadLC( R_QTN_RCL_NO_RESULTS );
ListBox()->View()->SetListEmptyTextL( *noItemText );
@@ -216,17 +242,31 @@
ConstructMenuBarL( R_RCL_OPTIONS_BACK_CONTEXTMENU );
}
- // If there was more than max number of results show an info note to user.
- // Note is non blocking and is displayed above the search results until
- // the note expires and closes by itself.
- if (iMoreThanMaxResults)
- {
- DisplayTooManyResultsInfoNoteL();
+ if ( MoreThanMaxResults() )
+ {
+ // If there was more than max number of results found
+ // show a "more than 50 results..." info note to user.
+ iIdleNote->Cancel();
+ // For smooth display of the note, request
+ // an idle callback for launching the note later.
+ iIdleNote->Start( TCallBack(
+ ( &CPbkxRclSearchResultDlg::TooManyResultsIdleCallbackL ),this ) );
}
CAknSelectionListDialog::RunLD();
}
+// --------------------------------------------------------------------------
+// CPbkxRclSearchResultDlg::TooManyResultsIdleCallbackL
+// --------------------------------------------------------------------------
+//
+TInt CPbkxRclSearchResultDlg::TooManyResultsIdleCallbackL( TAny* aSelf )
+ {
+ CPbkxRclSearchResultDlg* self = static_cast<CPbkxRclSearchResultDlg*>( aSelf );
+ self->DisplayTooManyResultsInfoNoteL();
+ return 0;
+ }
+
// ---------------------------------------------------------------------------
// CPbkxRclSearchResultDlg::CurrentItemIndex
// ---------------------------------------------------------------------------
@@ -289,6 +329,17 @@
{
ConstructMenuBarL( R_RCL_OPTIONS_BACK_OPEN );
}
+
+ if ( MoreThanMaxResults() )
+ {
+ // If there was more than max number of results found
+ // show a "more than 50 results..." info note to user.
+ iIdleNote->Cancel();
+ // For smooth display of the note, request
+ // an idle callback for launching the note later.
+ iIdleNote->Start( TCallBack(
+ ( &CPbkxRclSearchResultDlg::TooManyResultsIdleCallbackL ),this ) );
+ }
}
// ---------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclsearchresultlistbox.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclsearchresultlistbox.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -247,18 +247,12 @@
ptr->iHighlightedTextColor = iHighlightColor;
}
- // Disable AVKON skinning so that our own color definitions apply
- TBool skinEnabled = AknsUtils::AvkonSkinEnabled();
- // Safe to ignore error
- TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( EFalse ) );
CColumnListBoxItemDrawer::DrawItemText(
aItemIndex,
aItemTextRect,
aItemIsCurrent,
aViewIsEmphasized,
aItemIsSelected );
- // Safe to ignore error
- TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( skinEnabled ) );
}
@@ -270,19 +264,18 @@
////////////////////////////////////////////////////////////////////////////
// CPbkxRclSearchResultListView
////////////////////////////////////////////////////////////////////////////
-
// ---------------------------------------------------------------------------
// CPbkxRclSearchResultListView::DrawEmptyList
// ---------------------------------------------------------------------------
//
void CPbkxRclSearchResultListView::DrawEmptyList(const TRect &aClientRect) const
{
- // Disable AVKON skinning so that our own color definitions apply
- TBool skinEnabled = AknsUtils::AvkonSkinEnabled();
- // Safe to ignore error
- TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( EFalse ) );
- CAknColumnListBoxView::DrawEmptyList( aClientRect );
- // Safe to ignore error
- TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( skinEnabled ) );
+// // Disable AVKON skinning so that our own color definitions apply
+// TBool skinEnabled = AknsUtils::AvkonSkinEnabled();
+// // Safe to ignore error
+// TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( EFalse ) );
+// CAknColumnListBoxView::DrawEmptyList( aClientRect );
+// // Safe to ignore error
+// TRAP_IGNORE( AknsUtils::SetAvkonSkinEnabledL( skinEnabled ) );
}
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclserviceuicontextimpl.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclserviceuicontextimpl.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -106,6 +106,9 @@
{
FUNC_LOG;
+ delete iWaitDialog;
+ iWaitDialog = NULL;
+
if( iTimer )
{
iTimer->Cancel();
@@ -147,7 +150,7 @@
Dll::FileName( dllFileName );
TParse parse;
- parse.Set( KResourceFile, &KDC_APP_RESOURCE_DIR, &dllFileName );
+ parse.Set( KResourceFile, &KDC_RESOURCE_FILES_DIR, &dllFileName );
TFileName resourceFile = parse.FullName();
BaflUtils::NearestLanguageFile( coeEnv->FsSession(), resourceFile );
@@ -435,7 +438,7 @@
iActionServiceWrapper->ExecuteActionL(
KFscAtSendBusinessCard );
break;
- case ERclCmdHelp:
+ case EAknCmdHelp:
{
CCoeAppUi* appUi = CCoeEnv::Static()->AppUi();
CArrayFix<TCoeHelpContext>* contexts = appUi->AppHelpContextL();
@@ -679,7 +682,7 @@
{
FUNC_LOG;
- iWaitDialog = new ( ELeave ) CAknWaitDialog( NULL, ETrue );
+ iWaitDialog = new ( ELeave ) CAknWaitDialog( reinterpret_cast<CEikDialog**>(&iWaitDialog), ETrue ); //TEROKOE
iWaitDialog->SetTextL( aText );
iWaitDialog->SetCallback( this );
iWaitDialog->ExecuteLD( aDialogResourceId );
@@ -750,7 +753,9 @@
if (iWaitDialog)
{
- iWaitDialog->ProcessFinishedL();
+ TRAP_IGNORE( iWaitDialog->ProcessFinishedL() );
+ //The below 2 lines just in case... ProcessFinishedL already took care of these
+ delete iWaitDialog;
iWaitDialog = NULL;
}
}
@@ -806,9 +811,8 @@
SetState( EInitial );
}
else
- { // iSearchResultDialog != NULL
-
-
+ { // iSearchResultDialog != NULL
+ iSearchResultDialog->SetMoreThanMaxResults(aShowTooManyResultsNote);
iSearchResultDialog->UpdateDialogL();
}
}
--- a/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclsettingitem.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/engine/src/cpbkxrclsettingitem.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -98,7 +98,7 @@
Dll::FileName( dllFileName );
TParse parse;
- parse.Set( KResourceFile, &KDC_APP_RESOURCE_DIR, &dllFileName );
+ parse.Set( KResourceFile, &KDC_RESOURCE_FILES_DIR, &dllFileName );
TFileName resourceFile = parse.FullName();
BaflUtils::NearestLanguageFile( coeEnv->FsSession(), resourceFile );
--- a/phonebookui/Phonebook2/remotecontactlookup/loc/phonebook2rcl.loc Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/loc/phonebook2rcl.loc Wed Apr 14 15:45:35 2010 +0300
@@ -38,11 +38,6 @@
// r:5.2
#define qtn_rcl_retrieval_wait_note "Retrieving details"
-// d:Wait note text while retrieving details and saving contact.
-// l:popup_note_wait_window
-// r:5.2
-#define qtn_rcl_saving_wait_note "Saving contact"
-
// d:Confirmation note shown to user when contact details is updated
// d:but there is already existing detail.
// d:%U stands for the name of the detail being replaced.
--- a/phonebookui/Phonebook2/remotecontactlookup/rom/pbk2remotecontactlookupresources.iby Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Phonebook2/remotecontactlookup/rom/pbk2remotecontactlookupresources.iby Wed Apr 14 15:45:35 2010 +0300
@@ -19,10 +19,6 @@
#ifndef PBK2RCL_CONTACTS_REMOTE_CONTACT_LOOKUP_RESOURCES_IBY
#define PBK2RCL_CONTACTS_REMOTE_CONTACT_LOOKUP_RESOURCES_IBY
-
-
-S60_APP_RESOURCE(pbk2rclengine)
-
-
+data=DATAZ_\RESOURCE_FILES_DIR\pbk2rclengine.rsc RESOURCE_FILES_DIR\pbk2rclengine.rsc
#endif // PBK2RCL_CONTACTS_REMOTE_CONTACT_LOOKUP_RESOURCES_IBY
\ No newline at end of file
--- a/phonebookui/Speeddial/ControlSrc/SpdiaControl_platsec.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Speeddial/ControlSrc/SpdiaControl_platsec.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -340,6 +340,12 @@
CleanupStack::Pop(); // title
titlePane->DrawNow();
}
+ if ( pAppUi )
+ {
+ CEikStatusPane* StatusPane = ( ( CAknAppUi* ) pAppUi )->StatusPane();
+ StatusPane->MakeVisible( ETrue );
+ StatusPane->DrawNow();
+ }
// Check errors
User::LeaveIfError(error);
--- a/phonebookui/Speeddial/ControlSrc/SpdiaGridDlg.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Speeddial/ControlSrc/SpdiaGridDlg.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -364,12 +364,18 @@
if ( aType == KEikDynamicLayoutVariantSwitch )
{
+ CEikStatusPane* StatusPane =
+ ( ( CAknAppUi* ) CEikonEnv::Static()->EikAppUi() )->StatusPane();
+
if ( Layout_Meta_Data::IsLandscapeOrientation() )
{
+ StatusPane->MakeVisible( ETrue );
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,mainPaneRect );
+ StatusPane->DrawNow();
}
else
{
+ StatusPane->MakeVisible( EFalse );
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane, statusPaneRect );
mainPaneRect.iTl = statusPaneRect.iTl;
--- a/phonebookui/Speeddial/datasrc/SpdCtrl.rss Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Speeddial/datasrc/SpdCtrl.rss Wed Apr 14 15:45:35 2010 +0300
@@ -202,7 +202,7 @@
RESOURCE DIALOG r_spdia_grid_dialog
{
flags = EEikDialogFlagWait | EEikDialogFlagNoDrag |
- EEikDialogFlagFillScreen | EEikDialogFlagNoBorder |
+ EEikDialogFlagFillAppClientRect | EEikDialogFlagNoBorder |
EEikDialogFlagNoTitleBar | EEikDialogFlagCbaButtons;
buttons = R_AVKON_SOFTKEYS_BACK;
items =
--- a/phonebookui/Speeddial/src/SpdiaContainer.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Speeddial/src/SpdiaContainer.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -1052,10 +1052,14 @@
return;
}
- if ( iLongTapDetector )
- {
- iLongTapDetector->PointerEventL( aPointerEvent );
- }
+ if ( ( aPointerEvent.iType == TPointerEvent::EButton1Down ) ||
+ ( aPointerEvent.iType == TPointerEvent::EButton1Up ) )
+ {
+ if ( iLongTapDetector )
+ {
+ iLongTapDetector->PointerEventL( aPointerEvent );
+ }
+ }
// Process only once when the grid control has been pressed
if ( ( aPointerEvent.iType == TPointerEvent::EButton1Down ) ||
( aPointerEvent.iType == TPointerEvent::EDrag ) ||
@@ -1145,10 +1149,16 @@
//
void CSpdiaContainer::HandleLongTapEventL(
const TPoint& /*aPenEventLocation*/,
- const TPoint& /*aPenEventScreenLocation*/ )
+ const TPoint& aPenEventScreenLocation )
{
- //Get the Current Data Index
- if ( AknLayoutUtils::PenEnabled() )
+ // Get the Current Data Index
+ TInt itemIndex( KErrNotFound );
+
+ // Get position when user press screen
+ iGrid->View()->XYPosToItemIndex( aPenEventScreenLocation, itemIndex );
+
+ // Compare two index
+ if ( AknLayoutUtils::PenEnabled() && ( itemIndex == iGrid->CurrentDataIndex() ) )
{
iLongTapUsed = ETrue;
TInt index = iGrid->CurrentDataIndex();
@@ -1192,9 +1202,9 @@
statusPane->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL );
}
- if ( !statusPane->IsVisible() )
+ if ( statusPane->IsVisible() )
{
- statusPane->MakeVisible( ETrue );
+ statusPane->MakeVisible( EFalse );
}
TRect mainPaneRect;
--- a/phonebookui/Speeddial/src/SpdiaView.cpp Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookui/Speeddial/src/SpdiaView.cpp Wed Apr 14 15:45:35 2010 +0300
@@ -59,6 +59,8 @@
#include <Sendnorm.rsg>
#include <MVPbkContactFieldTextData.h>
+_LIT( KSpace, " " );
+
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
@@ -497,6 +499,12 @@
TInt index( iContainer->CurGridPosition() );
number = control.PhoneNumber( index );
+ TBuf<1>space( KSpace );
+ while( number.Length() > 0 && number.Find( space ) != KErrNotFound )
+ {
+ number.Delete( number.Find( space ), 1 );
+ }
+
int type = control.NumberType( index );
if ( ( iContainer->IsVoiceMailBox()) || ( iContainer->IsVdoMailBox() ) )
{
@@ -604,7 +612,7 @@
}
CleanupStack::PopAndDestroy( nameBuffer );
}
-
+
dialData->SetPhoneNumberL( aNumber );
dialData->SetWindowGroup( AIWDialData::KAiwGoToIdle );
CAiwGenericParamList& paramList = iServiceHandler->InParamListL();
@@ -765,7 +773,9 @@
iServiceHandler->InitializeMenuPaneL( *aMenuPane,
aResourceId,
ESpdiaCmdLast,
- paramList );
+ paramList,
+ EFalse,
+ ETrue );
if ( aMenuPane->NumberOfItemsInPane() == KErrNone )
{
User::Leave( KErrNotFound );