diff -r b2f9a76933e1 -r fc313e1df071 voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp --- a/voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp Wed Mar 31 21:32:56 2010 +0300 +++ b/voiceui/pbkinfoviewimpl/src/pbkinfoviewsindhandler.cpp Wed Apr 14 15:58:44 2010 +0300 @@ -33,7 +33,25 @@ #include "rubydebug.h" - +// ---------------------------------------------------------------------------- +// RemapCommand +// Remap command to the correct order. +// @param aCommandId +// ---------------------------------------------------------------------------- +static TInt RemapCommand( TInt aCommandId ) + { + switch (aCommandId) + { + case EEmailCommand: + return EMessageCommand; + case EVoipCommand: + return EEmailCommand; + case EMessageCommand: + return EVoipCommand; + default: + return aCommandId; + } + } // ================= MEMBER FUNCTIONS ======================= inline CPbkInfoViewSindHandler::CPbkInfoViewSindHandler() @@ -485,6 +503,16 @@ } // ---------------------------------------------------------------------------- +// CPbkInfoViewSindHandler::FieldIdL +// Returns an field id for the contact field. +// @return TInt the field id +// ---------------------------------------------------------------------------- +TInt CPbkInfoViewSindHandler::FieldIdL( ) + { + return iPbkHandler->FieldIdL(); + } + +// ---------------------------------------------------------------------------- // CPbkInfoViewSindHandler::CreateVoiceTagListL // Fetches voice tag list from vas db. // @param aContactId Contact id for the contact whose voice tags are @@ -812,26 +840,29 @@ return 1; } - // compare the two neighbors - TInt ret = field1->Compare( *field2 ); - - // Sorting for normal call, sms, and multimedia msg fields - if ( ret == 0) - { - TInt actionId1 = tag1.RRD()->IntArray()->At( KVasExtensionRrdLocation ); - TInt actionId2 = tag2.RRD()->IntArray()->At( KVasExtensionRrdLocation ); - - if ( actionId1 != actionId2 ) - { - if ( actionId1 < actionId2 ) - { - return -1; - } - return 1; - } - } - - return ret; +// // compare the two neighbors +// TInt ret = field1->Compare( *field2 ); +// +// // Sorting for normal call, sms, and multimedia msg fields +// if ( ret == 0) +// { +// TInt actionId1 = tag1.RRD()->IntArray()->At( KVasExtensionRrdLocation ); +// TInt actionId2 = tag2.RRD()->IntArray()->At( KVasExtensionRrdLocation ); +// +// if ( actionId1 != actionId2 ) +// { +// if ( actionId1 < actionId2 ) +// { +// return -1; +// } +// return 1; +// } +// } +// +// return ret; + TInt cmdId1 = tag1.RRD()->IntArray()->At( KVasExtensionCommandRrdLocation ); + TInt cmdId2 = tag2.RRD()->IntArray()->At( KVasExtensionCommandRrdLocation ); + return ( RemapCommand( cmdId1 ) - RemapCommand( cmdId2 )); } // -----------------------------------------------------------------------------