# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1276065623 -10800 # Node ID 9c5b1510919f537852e27fe9b9680c4935bdde6c # Parent d68a4b5d58857c439b6d0995a7b5ee6f650bcd9d Revision: 201021 Kit: 2010123 diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/application/data/Calendar.rss --- a/calendarui/application/data/Calendar.rss Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/application/data/Calendar.rss Wed Jun 09 09:40:23 2010 +0300 @@ -1679,7 +1679,7 @@ { command = ECalenDeleteCurrentEntry; txt = qtn_cale_om_delete; - }, + }, MENU_ITEM { command = ECalenCompleteTodo; @@ -1697,6 +1697,12 @@ }, MENU_ITEM { + command = EFindItemMenuPlaceHolder; + txt = qtn_options_find; + cascade = r_calen_view_find_sub_menupane; + }, + MENU_ITEM + { command = ECalenShowLocation; txt = qtn_cale_om_show_on_map; }, @@ -1710,12 +1716,7 @@ { command = ECalenGetLocationAndReplace; txt = qtn_cale_om_find_on_map; - }, - MENU_ITEM - { - command = EFindItemMenuPlaceHolder; - txt = "Automatic HL"; - }, + }, MENU_ITEM { command = EAknCmdHelp; @@ -1727,7 +1728,32 @@ txt = qtn_options_exit; } }; - } + } + +// --------------------------------------------------------- +// Find UI for calendar viewers +// --------------------------------------------------------- +RESOURCE MENU_PANE r_calen_view_find_sub_menupane + { + items = + { + MENU_ITEM + { + command = ECalenCmdFindPhoneNum; + txt = qtn_options_find_phone_number; + }, + MENU_ITEM + { + command = ECalenCmdFindEmail; + txt = qtn_options_find_email_address; + }, + MENU_ITEM + { + command = ECalenCmdFindURL; + txt = qtn_options_find_url_address; + } + }; + } // --------------------------------------------------------- @@ -3083,4 +3109,6 @@ buf = qtn_cale_max_attachment_size; } + + // End of File diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp --- a/calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -69,7 +69,7 @@ { TRACE_ENTRY_POINT; - if( iNaviLabel != NULL ) + if( ( iNaviLabel != NULL ) && ( iNaviContainer->Top() == iNaviLabel ) ) { iNaviContainer->Pop( iNaviLabel ); delete iNaviLabel; diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/conf/calendarUI.confml Binary file calendarui/conf/calendarUI.confml has changed diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/group/calencontroller.mmp --- a/calendarui/controller/group/calencontroller.mmp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/group/calencontroller.mmp Wed Jun 09 09:40:23 2010 +0300 @@ -96,6 +96,7 @@ SOURCE calenattalistitemarray.cpp SOURCE calenattachmentitemdrawer.cpp SOURCE calenattachmentui.cpp +SOURCE calendialogshutter.cpp LIBRARY calencustomisationmanager.lib diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/inc/calencmdlinelauncher.h --- a/calendarui/controller/inc/calencmdlinelauncher.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/inc/calencmdlinelauncher.h Wed Jun 09 09:40:23 2010 +0300 @@ -31,6 +31,7 @@ class CCalenController; class CCalenGlobalData; class CAknViewAppUi; +class CCalenDialogShutter; // CLASS DEFINITIONS @@ -145,6 +146,7 @@ TBool iDelayCallBack; CAknViewAppUi& iAppUi; + CCalenDialogShutter* iShutter; }; #endif // CALENCMDLINELAUNCHER_H diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/inc/calendialogshutter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calendarui/controller/inc/calendialogshutter.h Wed Jun 09 09:40:23 2010 +0300 @@ -0,0 +1,118 @@ +/* +* Copyright (c) 2002-2008 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: For dialog shutter. +* +*/ + + +#ifndef CALENDIALOGSHUTTER_H +#define CALENDIALOGSHUTTER_H + +#include // For CActive, link against: euser.lib +#include // For RTimer, link against: euser.lib + +// FORWARD DECLARATIONS +class CEikonEnv; + +// CLASS DEFINITIONS +/** + * The CCalenDialogShutter closes all open dialogs when calendar is opened from widget + */ +NONSHARABLE_CLASS( CCalenDialogShutter ): public CActive + { +public: + + /** + * 1st phase constructor + * @param aEikEnv CEikonEnv pointer + */ + static CCalenDialogShutter* NewL( CEikonEnv* aEikEnv ); + + /** + * 2nd phase constructor + * @param aEikEnv CEikonEnv pointer + */ + static CCalenDialogShutter* NewLC( CEikonEnv* aEikEnv ); + + /** + * Destructor + */ + ~CCalenDialogShutter(); + +public: + // New functions + /** + * Function for making the initial request + */ + void ShutDialogsL( /*CActiveSchedulerWait* aWait*/ ); + +private: + /** + * C++ constructor + * @param aEikEnv CEikonEnv pointer + */ + CCalenDialogShutter( CEikonEnv* aEikEnv ); + + /** + * Second-phase constructor + */ + void ConstructL(); + +private: + // From CActive + /** + * Handle completion + */ + void RunL(); + + /** + * Cancel method to handle the user selection + */ + void DoCancel(); + + /** + * Override to handle leaves from RunL(). Default implementation causes the active scheduler to panic. + */ + TInt RunError(TInt aError); + +private: + + /** + * Function to queue the async requests + */ + void Queue(); + + /** + * Function to get the startlevel of the opened dialogs + */ + TInt StartLevel(); + + +private: + // Ref: environment + CEikonEnv* iEikon; + + TInt iStartLevel; + + TInt iCount; + + }; + +class CKludgeScheduler : public CBaActiveScheduler + { +public: + inline TInt PublicLevel() const { return Level(); } + }; + +#endif // CALENDIALOGSHUTTER_H diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/inc/calenviewmanager.h --- a/calendarui/controller/inc/calenviewmanager.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/inc/calenviewmanager.h Wed Jun 09 09:40:23 2010 +0300 @@ -385,6 +385,7 @@ TBool iViewsActivated; TVwsViewId iPreviousViewId; TVwsViewId iPreviousToDayView; + TVwsViewId iPreviousToWeekView; TBool iAvoidRepopulation; TBool iStartupComplete; }; diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/src/calencmdlinelauncher.cpp --- a/calendarui/controller/src/calencmdlinelauncher.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/src/calencmdlinelauncher.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -34,6 +34,7 @@ #include "calencmdlineparser.h" // CCalCmdLineParser #include "CalenUid.h" #include "calensend.h" +#include "calendialogshutter.h" // ================= MEMBER FUNCTIONS ======================= @@ -92,6 +93,12 @@ } delete iCalendarLaunchCallBack; + + if ( iShutter ) + { + delete iShutter; + iShutter = NULL; + } TRACE_EXIT_POINT; } @@ -119,7 +126,7 @@ iController.RegisterForNotificationsL( this, exitFlags ); exitFlags.Reset(); - + iShutter = CCalenDialogShutter::NewL( CEikonEnv::Static() ); TRACE_EXIT_POINT; } @@ -153,22 +160,10 @@ // Tell the editui that whatever it was doing, it should not alter // the focus state iController.IssueCommandL( ECalenNotifyFocusChange ); - - // Send a key event to the currently open dialog (viewer / editor) - // to dismiss it - /*TKeyEvent key; - key.iRepeats = 0; - key.iCode = EKeyEscape; - key.iModifiers = 0; - CCoeEnv::Static()->SimulateKeyEventL( key, EEventKey );*/ - AknDialogShutter::ShutDialogsL( *CEikonEnv::Static() ); - // Break is added to close the messaging editor as the messagng editor is not - // consuming the escape key event. - /*if( iGlobalData->CalenSendL().IsMessagingEditorOpen() ) - { - break; - }*/ - + + iShutter->Cancel(); + //close all open dialogs in asynchronous way + iShutter->ShutDialogsL(); } // Interpret 8bit data as 16bit unicode data diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/src/calencontroller.cpp --- a/calendarui/controller/src/calencontroller.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/src/calencontroller.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -212,6 +212,7 @@ notificationArray.Append(ECalenNotifySystemTimeChanged); notificationArray.Append(ECalenNotifyAppForegrounded); notificationArray.Append(ECalenNotifyDayViewClosed); + notificationArray.Append(ECalenNotifyWeekViewClosed); notificationArray.Append(ECalenNotifyAppBackgrounded); notificationArray.Append(ECalenNotifyViewPopulationComplete); notificationArray.Append(ECalenNotifyCalendarFieldChanged); diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/src/calendialogshutter.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calendarui/controller/src/calendialogshutter.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -0,0 +1,184 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: For dialog shutter. +* +*/ + + +#include +#include + +#include "calendialogshutter.h" + +const TInt KMaxNumEscKeysToSend = 50; + +// ================= MEMBER FUNCTIONS ======================= + +// --------------------------------------------------------- +// CCalenDialogShutter::CCalenDialogShutter +// C++ default constructor +// (other items were commented in a header). +// --------------------------------------------------------- +// +CCalenDialogShutter::CCalenDialogShutter( CEikonEnv* aEikEnv ) + : CActive(EPriorityStandard) // Standard priority + , iEikon( aEikEnv ) + , iStartLevel( StartLevel() ) + { + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::NewLC +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +CCalenDialogShutter* CCalenDialogShutter::NewLC( CEikonEnv* aEikEnv ) + { + CCalenDialogShutter* self = new (ELeave) CCalenDialogShutter( aEikEnv ); + CleanupStack::PushL(self); + self->ConstructL(); + return self; + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::NewL +// 1st phase of construction +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +CCalenDialogShutter* CCalenDialogShutter::NewL( CEikonEnv* aEikEnv ) + { + CCalenDialogShutter* self = CCalenDialogShutter::NewLC( aEikEnv ); + CleanupStack::Pop(); // self; + return self; + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::ConstructL +// Second phase of construction +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +void CCalenDialogShutter::ConstructL() + { + CActiveScheduler::Add(this); // Add to scheduler + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::~CCalenDialogShutter +// Destructor +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +CCalenDialogShutter::~CCalenDialogShutter() + { + Cancel(); // Cancel any request, if outstanding + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::DoCancel +// Cancel method to handle the user selection +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +void CCalenDialogShutter::DoCancel() + { + iCount = 0; + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::Queue +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +void CCalenDialogShutter::Queue() + { + if (!IsActive()) + { + SetActive(); + TRequestStatus* status = &iStatus; + User::RequestComplete( status, KErrNone ); + } + } + +// --------------------------------------------------------------------------- +// CCalenDialogShutter::RunL +// Handles the asyn requests completion +// (other items were commented in a header). +// --------------------------------------------------------------------------- +// +void CCalenDialogShutter::RunL() + { + if ( iCount++ >= KMaxNumEscKeysToSend ) + { + return; + } + + CEikAppUi* appUi=iEikon->EikAppUi(); + TInt startLevel=StartLevel(); + if ( startLevel > iStartLevel ) + { + return; + } + + iStartLevel = startLevel; + + if (appUi->IsDisplayingMenuOrDialog()) + { + TKeyEvent key; + key.iCode=EKeyEscape; + key.iModifiers=0; + key.iRepeats = 0; + key.iScanCode = EStdKeyNull; + iEikon->SimulateKeyEventL(key, EEventKey); + } + else + { + return; + } + Queue(); + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::RunError +// Function to handle any errors in async request +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +TInt CCalenDialogShutter::RunError(TInt aError) + { + return aError; + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::StartLevel +// Function to get the startlevel of the opened dialogs +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +TInt CCalenDialogShutter::StartLevel() + { + return ((CKludgeScheduler*)CActiveScheduler::Current())->PublicLevel(); + } + +// ---------------------------------------------------------------------------- +// CCalenDialogShutter::ShutDialogsL +// Function for making the initial request +// (other items were commented in a header). +// ---------------------------------------------------------------------------- +// +void CCalenDialogShutter::ShutDialogsL( /*CActiveSchedulerWait* aWait*/ ) + { + Queue(); + } diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/src/calenidlestate.cpp --- a/calendarui/controller/src/calenidlestate.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/src/calenidlestate.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -100,6 +100,7 @@ case ECalenDayView: case ECalenTodoView: case ECalenForwardsToDayView: + case ECalenForwardsToWeekView: case ECalenNextView: case ECalenPrevView: case ECalenSwitchView: diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/src/calenmultidbeditor.cpp --- a/calendarui/controller/src/calenmultidbeditor.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/src/calenmultidbeditor.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -712,8 +712,7 @@ // If in editing mode, just save the name used before. if( iEditFlag ) { - iCalendarName = iCalendarInfo.NameL().AllocLC(); - CleanupStack::Pop( iCalendarName ); + iCalendarName->Des().Copy(iCalendarInfo.NameL()); SetEdwinTextL( ECalenMultiDbName, iCalendarName ); } else diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/src/calentoolbarimpl.cpp --- a/calendarui/controller/src/calentoolbarimpl.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/src/calentoolbarimpl.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -390,7 +390,7 @@ ResetToolbarExtensionCommandsL(); // add toolbar items for native views - for(TInt index = viewPositionArray.Count()-1;index >= KPositionZero ;index--) + for(TInt index = KPositionZero ;index < viewPositionArray.Count() ;index++) { viewPosition = viewInfoArray.Find( viewPositionArray[index], CCalenViewInfo::ViewInfoIdentifier ); @@ -449,12 +449,13 @@ TInt currViewInfoPos = aViewInfoArray.Find( aCurrentViewUid , CCalenViewInfo::ViewInfoIdentifier ); - TInt index = currViewInfoPos + 1; - while( index!= currViewInfoPos ) + TInt index = aViewInfoArray.Find( KUidCalenMonthView , CCalenViewInfo::ViewInfoIdentifier ); + + while( index!= aViewInfoArray.Count() ) { - if( index == aViewInfoArray.Count()) // If last item, + if( index == currViewInfoPos) // If last item, { - index = 0; + index ++; continue; } if(( aViewInfoArray[index]->CyclePosition() != CCalenView::ENoCyclePosition ) ) diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/controller/src/calenviewmanager.cpp --- a/calendarui/controller/src/calenviewmanager.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/controller/src/calenviewmanager.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -578,6 +578,14 @@ RequestActivationL( KUidCalenDayView, KUidCalenShowBackCba ); } break; + case ECalenForwardsToWeekView: + { + // set the view iPreviousToWeekView to handle the week view's cba + // From month view -> week view + iPreviousToWeekView = iCurrentViewId; + RequestActivationL( KUidCalenWeekView, KUidCalenShowBackCba ); + } + break; case ECalenNextView: { CycleNextViewL(); @@ -1102,6 +1110,10 @@ ReloadAllPluginsL(); } + else + { + iAvoidRepopulation = EFalse; + } } break; case ECalenNotifyDayViewClosed: @@ -1114,6 +1126,16 @@ } } break; + case ECalenNotifyWeekViewClosed: + { + if(iPreviousToWeekView.iViewUid!= KNullUid) + { + // activate the previous view from where day view is launched + // From month/week view -> day view + RequestActivationL(iPreviousToWeekView.iViewUid); + } + } + break; case ECalenNotifyAppBackgrounded: { // set the flag iAvoidRepopulation to prevent repopulation diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/customisationmanager/inc/calencustomisationmanager.h --- a/calendarui/customisationmanager/inc/calencustomisationmanager.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/customisationmanager/inc/calencustomisationmanager.h Wed Jun 09 09:40:23 2010 +0300 @@ -200,7 +200,7 @@ private: // New functions void LoadPluginL( TUid aPluginUid ); - void DoImmediatePluginLoadingL(); + void DoImmediatePluginLoadingL(TBool aLoadViewbasedPulgins = EFalse); void OfferMenuPaneToPluginsL( TInt aResourceId, CEikMenuPane* aMenuPane ); diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/customisationmanager/src/calencustomisationmanager.cpp --- a/calendarui/customisationmanager/src/calencustomisationmanager.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/customisationmanager/src/calencustomisationmanager.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -500,20 +500,24 @@ TInt position = iPlugins.Find( aPlugins[index], CPluginInfo::Identifier ); if ( position != KErrNotFound ) { - if((iInfoBarProviderUid != iPlugins[position]->Uid()) - && (iPreviewPaneProviderUid != iPlugins[ position]->Uid())) - { - CPluginInfo* removedPlugin = iPlugins[ position ]; - iPlugins.Remove( position ); - delete removedPlugin; - } - else - { - iPlugins[position]->Disable(ETrue); - iDefferedUnloadPluginList.AppendL(iPlugins[position]->Uid()); - iInfoBarProviderUid = KNullUid; - iPreviewPaneProviderUid = KNullUid; - } + TUid pluginUid = iPlugins[ position]->Uid(); + if(!(iRomBasedPlugins.Find(pluginUid) != KErrNotFound)) + { + if((iInfoBarProviderUid != iPlugins[position]->Uid()) + && (iPreviewPaneProviderUid != iPlugins[ position]->Uid())) + { + CPluginInfo* removedPlugin = iPlugins[ position ]; + iPlugins.Remove( position ); + delete removedPlugin; + } + else + { + iPlugins[position]->Disable(ETrue); + iDefferedUnloadPluginList.AppendL(iPlugins[position]->Uid()); + iInfoBarProviderUid = KNullUid; + iPreviewPaneProviderUid = KNullUid; + } + } } } TRACE_EXIT_POINT; @@ -735,7 +739,7 @@ // (other items were commented in a header). // ---------------------------------------------------------------------------- // -void CCalenCustomisationManager::DoImmediatePluginLoadingL() +void CCalenCustomisationManager::DoImmediatePluginLoadingL(TBool aLoadViewbasedPulgins) { TRACE_ENTRY_POINT; @@ -755,7 +759,22 @@ for ( TInt index( 0 ); index < pluginCount; ++index ) { TUid pluginUid = iPluginInfo[index]->ImplementationUid(); - if ( iActivePlugins.Find( pluginUid ) != KErrNotFound ) + TBool loadPlugins(EFalse); + + if(aLoadViewbasedPulgins) + { + if ( (iActivePlugins.Find( pluginUid ) != KErrNotFound) && + !(iRomBasedPlugins.Find( pluginUid ) != KErrNotFound) ) + { + loadPlugins = ETrue; + } + } + else if((iActivePlugins.Find( pluginUid ) != KErrNotFound)) + { + loadPlugins = ETrue; + } + + if (loadPlugins) { TRAPD( error, LoadPluginL( pluginUid ) ); if ( error ) @@ -1473,8 +1492,8 @@ EXPORT_C void CCalenCustomisationManager::DoPluginLoadingL() { TRACE_ENTRY_POINT; - // Reset and destroy the contents of the owned arrays - iPlugins.ResetAndDestroy(); + // Reset and destroy the contents of the owned arrays + //iPlugins.ResetAndDestroy(); iPluginInfo.ResetAndDestroy(); @@ -1485,7 +1504,7 @@ // create active plugin list CreateActivePluginListL(); - DoImmediatePluginLoadingL(); + DoImmediatePluginLoadingL(ETrue); iSetting->LoadL(); iSetting->UpdatePluginListL(*this); diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/editors/src/calenrepeatfield.cpp --- a/calendarui/editors/src/calenrepeatfield.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/editors/src/calenrepeatfield.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -34,6 +34,9 @@ // debug #include "calendarui_debug.h" +//Feb 29th will be read as 28 as indexing of days starts from 0,1,2.... +const TInt KLastDayInFebLeapYear = 28; + // CONSTRUCTION AND DESTRUCTION METHODS // ----------------------------------------------------------------------------- @@ -263,8 +266,22 @@ } else { - TDateTime repUntilDateTime( ECalenMaxYear, TMonth(ECalenMaxMonth), ECalenMaxDay, 0, 0, 0, 0 ); - TTime aTime( repUntilDateTime ); + //Fix for repeated event date change: + TDateTime startDate = start.DateTime(); + + //Checking for leap year feb.29th, next year it should be 28. + TInt untilDay; + if(startDate.Month() == EFebruary && startDate.Day() == KLastDayInFebLeapYear) + { + untilDay = KLastDayInFebLeapYear - 1; + } + else + { + untilDay = startDate.Day(); + } + + TDateTime repOneYear(startDate.Year()+1,startDate.Month(), untilDay, 0, 0, 0, 0); + TTime aTime( repOneYear ); until = aTime; } diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/editors/src/calenunifiededitor.cpp --- a/calendarui/editors/src/calenunifiededitor.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/editors/src/calenunifiededitor.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -1215,7 +1215,9 @@ TInt CCalenUnifiedEditor::AsyncProcessCommandL( TAny* aThisPtr ) { TInt focusControl( static_cast(aThisPtr)->IdOfFocusControl() ); - CEikEdwin* edwin = static_cast( static_cast(aThisPtr)->Control( focusControl ) ); + if(focusControl == ECalenEditorDescription) + { + CEikEdwin* edwin = static_cast( static_cast(aThisPtr)->Control( focusControl ) ); if ( edwin && edwin->Text()->DocumentLength() == 0 ) { static_cast(aThisPtr)->ProcessCommandL(ECalenCmdAddDescription); @@ -1224,7 +1226,7 @@ { static_cast(aThisPtr)->ProcessCommandL(ECalenCmdShowDescription); } - + } return 0; } @@ -1912,7 +1914,17 @@ const TBool continueOnError = EFalse; iUnifiedEditorControl->ReadDataFromEditorL( continueOnError ); - TEntryExistenceStatus status = EntryStillExistsL(); + TEntryExistenceStatus status; + + if(!IsCreatingNewEntry()) + { + status = EntryStillExistsL(); + } + else + { + status = EEntryOk; + } + TTimeIntervalDays aDay(0); if( iCurrentDurationDayGetAttachmentData()->NumberOfItems(); if( attachCount ) { - RPointerArray attachmentInfoList; + RPointerArray attachmentInfoList; + CleanupClosePushL( attachmentInfoList ); iServices->GetAttachmentData()->GetAttachmentListL(attachmentInfoList); for( TInt index =0; indexDes().Copy(fileNameParser.NameAndExt()); aAttachmentNames.Append(attachmentName); } + CleanupStack::PopAndDestroy( &attachmentInfoList ); } else { diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/editors/src/calenunifiededitorcontrol.cpp --- a/calendarui/editors/src/calenunifiededitorcontrol.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/editors/src/calenunifiededitorcontrol.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -811,21 +811,24 @@ { TRACE_ENTRY_POINT; - // update Entry type of Edited entry - iUnifiedEditor.Edited().SetEntryType( aNewEventType ); - - // Delete, previous entry type fields from editor - DeletePreviousEntryTypeFieldsL(); - - // Add new fiedls to editor - AddNewEntryTypeFieldsL( aNewEventType ); - iUnifiedEditor.SetEntryType( aNewEventType ); - - // after changing the event type, update the fields with default values - InitDefaultEditorsL(); - SetDataToEditorL(); - - iUnifiedEditor.UpdateFormL(); + if(iUnifiedEditor.GetEntryType() != aNewEventType) + { + // update Entry type of Edited entry + iUnifiedEditor.Edited().SetEntryType( aNewEventType ); + + // Delete, previous entry type fields from editor + DeletePreviousEntryTypeFieldsL(); + + // Add new fiedls to editor + AddNewEntryTypeFieldsL( aNewEventType ); + iUnifiedEditor.SetEntryType( aNewEventType ); + + // after changing the event type, update the fields with default values + InitDefaultEditorsL(); + SetDataToEditorL(); + + iUnifiedEditor.UpdateFormL(); + } TRACE_EXIT_POINT; } diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/globaldata/src/calenglobaldata.cpp --- a/calendarui/globaldata/src/calenglobaldata.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/globaldata/src/calenglobaldata.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -1520,8 +1520,9 @@ const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(), ( personalBuffer->Length()+1 )>>1 ); HBufC *personalCalendar = ptrPBuffer.AllocL(); + CleanupStack::PushL(personalCalendar); iCalendarInfoList[index]->SetNameL(*personalCalendar); - CleanupStack::PopAndDestroy( personalBuffer ); + CleanupStack::PopAndDestroy( 2,personalBuffer ); } diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/regionalplugins/lunarVietnamese/src/calenlunarvietnameseplugin.cpp --- a/calendarui/regionalplugins/lunarVietnamese/src/calenlunarvietnameseplugin.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/regionalplugins/lunarVietnamese/src/calenlunarvietnameseplugin.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -701,7 +701,8 @@ { TRACE_ENTRY_POINT; - if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) + if( AknLayoutUtils::PenEnabled() && + aPointerEvent.iType == TPointerEvent::EButton1Down ) { iPlugin.ShowDetailsL(); } diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/regionalplugins/lunarchinese/src/CalenLunarChinesePlugin.cpp --- a/calendarui/regionalplugins/lunarchinese/src/CalenLunarChinesePlugin.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/regionalplugins/lunarchinese/src/CalenLunarChinesePlugin.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -699,7 +699,8 @@ { TRACE_ENTRY_POINT; - if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) + if( AknLayoutUtils::PenEnabled() && + aPointerEvent.iType == TPointerEvent::EButton1Down ) { iPlugin.ShowDetailsL(); } diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/settings/settingsui/src/CalenFileListSettingItem.cpp --- a/calendarui/settings/settingsui/src/CalenFileListSettingItem.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/settings/settingsui/src/CalenFileListSettingItem.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -267,7 +267,7 @@ // default tone list->SetNullItemL(*iToneDefaultText, iDefaultToneFile, CMediaFileList::EMediaFileTypeAudio, - CMediaFileList::ENullItemIconOff); + CMediaFileList::ENullItemIconDefaultTone); list->SetAttrL(CMediaFileList::EAttrExcludeFolder, CMediaFileList::EMediaFileTypeVideo); list->SetAttrL(CMediaFileList::EAttrAutomatedType, CDRMHelper::EAutomatedTypeCalendarAlarm); diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/group/calenviews.mmp --- a/calendarui/views/group/calenviews.mmp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/group/calenviews.mmp Wed Jun 09 09:40:23 2010 +0300 @@ -154,6 +154,7 @@ LIBRARY missedalarmstore.lib LIBRARY apmime.lib LIBRARY multicaluidialog.lib +LIBRARY touchfeedback.lib //MTouchFeedBack // File logging LIBRARY flogger.lib diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/inc/calencontainer.h --- a/calendarui/views/inc/calencontainer.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/inc/calencontainer.h Wed Jun 09 09:40:23 2010 +0300 @@ -50,6 +50,7 @@ class MAknNaviDecoratorObserver; class MCCalenNaviLabelObserver; +class MTouchFeedback; class CCalenPreview; @@ -246,6 +247,12 @@ * returns previewpane pointer */ virtual const MCalenPreview* PreviewPane(){return NULL; }; + + /** + * Generates tactile feedback on user touch action + */ + virtual void GenerateTactileFeedback(); + private: // New functions /** * Return number of icons needed to be displayed @@ -337,6 +344,9 @@ MCalenServices& iServices; RArray iIconIndices; CCalenContainerLayoutManager* iLayoutManager; + +private: + MTouchFeedback* iFeedBack; }; #endif // CALENCONTAINER_H diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/inc/calendaycontainer.h --- a/calendarui/views/inc/calendaycontainer.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/inc/calendaycontainer.h Wed Jun 09 09:40:23 2010 +0300 @@ -54,6 +54,7 @@ TCalenInstanceId iId; TBool iTimedNote; TInt iTopLine; + TInt iBottomLine; // Fetched instance is temporarily stored to iTmpInstance // This is destroyed after construction phase is over. diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/inc/calendaylistboxitemdrawer.h --- a/calendarui/views/inc/calendaylistboxitemdrawer.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/inc/calendaylistboxitemdrawer.h Wed Jun 09 09:40:23 2010 +0300 @@ -64,6 +64,9 @@ private: // data CEikListBox* iListBox; mutable TUint32 iColor; + mutable TInt iColorStripHeight; //color strip height + mutable TRect iColorStripRect; // color strip rect + }; #endif // CALENDAYLISTBOXITEMDRAWER_H diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/inc/caleneventviewcontainer.h --- a/calendarui/views/inc/caleneventviewcontainer.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/inc/caleneventviewcontainer.h Wed Jun 09 09:40:23 2010 +0300 @@ -236,6 +236,21 @@ * Returns ETrue if event has location text else EFalse */ TBool IsEventHasNoLocationTextL(); + + /** + * Find a phone number in the form + */ + void OnCmdFindPhoneNumL(); + + /** + * Find an email address in the form + */ + void OnCmdFindEmailL(); + + /** + * Find a URL in the form + */ + void OnCmdFindUrlL(); private: @@ -458,20 +473,6 @@ void SetLabelContentL( CEikLabel& aLabel ); - /** - * Reads the shared data value used to initialize automatic highlighting - * @return TBool, ETrue if automatic highlighting is to be used - */ - void ReadAutoHlCenRepValueAndSetNotifyL(); - - /** - * From MCenRepNotifyHandlerCallback - * Handles the incoming notifications of key changes - * @since Series60 3.0 - * @param aId, Key that has changed - * @param aNewValue, New value of the key - */ - void HandleNotifyInt( TUint32 aId, TInt aNewValue ); /** * From MCenRepNotifyHandlerCallback @@ -482,17 +483,6 @@ */ void HandleNotifyError( TUint32 aId,TInt aError,CCenRepNotifyHandler* aHandler ); - /** - * Set the state of automatic highlighting - * @param aSwitchON, ETrue if automatic highlighting is to used, otherwise EFalse - */ - void SetAutomaticHighlightL( const TBool aSwitchON ); - - /** - * This method is used when phone number is - * found and pressing phone key would make call - */ - void HandleNumberCallL(); /** * Add calendar info field to the viewer @@ -599,11 +589,8 @@ // Notifier to listen changes of offline state CCenRepNotifyHandler* iNotifier; TInt iNumOfLinesBeforeLocField; // Number of lines before locaiton field in the rich text editor - TInt iTimeFieldLines; // Number of lines occupied by time field on the viewer - TBool iAutomaticHlValue; - TBool iAutomaticHlInitialized; + TInt iTimeFieldLines; // Number of lines occupied by time field on the viewer TBool iEmbeddedFileOpened; - CItemFinder* iAutoFinder; // text finder CFindItemMenu* iFindMenu; TCursorSelection iSelectedText; // Cursor selection for the text editor TBool iLocaleChanged; diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/inc/calenmissedeventcontainer.h --- a/calendarui/views/inc/calenmissedeventcontainer.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/inc/calenmissedeventcontainer.h Wed Jun 09 09:40:23 2010 +0300 @@ -190,10 +190,6 @@ */ void OnCmdRestoreTaskL(); /** - * Get item finder - */ - CItemFinder* GetItemFinder(); - /** * Get find item menu */ CFindItemMenu* GetFindItemMenu(); @@ -207,7 +203,22 @@ * Returns ETrue if event has location text else EFalse */ TBool IsEventHasNoLocationTextL(); - + + /** + * Find a phone number in the form + */ + void OnCmdFindPhoneNumL(); + + /** + * Find an email address in the form + */ + void OnCmdFindEmailL(); + + /** + * Find a URL in the form + */ + void OnCmdFindUrlL(); + private: @@ -406,20 +417,7 @@ RPointerArray& AllInstancesL(); private: //Auto highlight methods - /** - * Reads the shared data value used to initialize automatic highlighting - * @return TBool, ETrue if automatic highlighting is to be used - */ - void ReadAutoHlCenRepValueAndSetNotifyL(); - - /** - * From MCenRepNotifyHandlerCallback - * Handles the incoming notifications of key changes - * @since Series60 3.0 - * @param aId, Key that has changed - * @param aNewValue, New value of the key - */ - void HandleNotifyInt( TUint32 aId, TInt aNewValue ); + /** * From MCenRepNotifyHandlerCallback @@ -430,17 +428,6 @@ */ void HandleNotifyError( TUint32 aId,TInt aError,CCenRepNotifyHandler* aHandler ); - /** - * Set the state of automatic highlighting - * @param aSwitchON, ETrue if automatic highlighting is to used, otherwise EFalse - */ - void SetAutomaticHighlightL( const TBool aSwitchON ); - - /** - * This method is used when phone number is - * found and pressing phone key would make call - */ - void HandleNumberCallL(); public: @@ -490,9 +477,6 @@ CRepository* iCenRepSession; // Central Repository session // Notifier to listen changes of offline state CCenRepNotifyHandler* iNotifier; - TBool iAutomaticHlValue; - TBool iAutomaticHlInitialized; - CItemFinder* iAutoFinder; // text finder CFindItemMenu* iFindMenu; }; diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/inc/calentodocontainer.h --- a/calendarui/views/inc/calentodocontainer.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/inc/calentodocontainer.h Wed Jun 09 09:40:23 2010 +0300 @@ -358,7 +358,7 @@ }; TStepPopulate iStepState; - HBufC* iEmptyListText; + //HBufC* iEmptyListText; // view specific data, references to view data TInt& iHighlightedRowNumber; // The row number highlighted. TInt& iFirstEntryOnScreenIndex; // The offset of the topmost item on screen to the first entry. diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/inc/calenweekview.h --- a/calendarui/views/inc/calenweekview.h Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/inc/calenweekview.h Wed Jun 09 09:40:23 2010 +0300 @@ -48,6 +48,8 @@ * @param aTime Set a time to StatusPane */ void SetStatusPaneFromActiveContextL(); + + void UpdateCbaL(); public: // From CCalenView virtual TNextPopulationStep ActiveStepL(); @@ -148,6 +150,7 @@ TTime iTime; TInt iSelectedRowNumber; // The row number of the highlighted cell. TTimeIntervalMinutes iFirstRowTime; // The time of the first row on the screen. + TBool iShowBackButtonOnCba; }; #endif //CALENWEEKVIEW_H diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calencontainer.cpp --- a/calendarui/views/src/calencontainer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calencontainer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -30,6 +30,7 @@ #include #include #include +#include // user includes #include "calendarui_debug.h" @@ -876,4 +877,25 @@ TRACE_EXIT_POINT; } + +// ---------------------------------------------------------------------------- +// CCalenContainer::GenerateTactileFeedback() +// Generates tactile feedback on user touch action +// ---------------------------------------------------------------------------- +void CCalenContainer::GenerateTactileFeedback() + { + TRACE_ENTRY_POINT; + + if(!iFeedBack) + { + iFeedBack = MTouchFeedback::Instance(); + } + + if ( iFeedBack && iFeedBack->TouchFeedbackSupported() ) + { + iFeedBack->InstantFeedback( ETouchFeedbackBasic ); + } + + TRACE_EXIT_POINT; + } // End of File diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calendaycontainer.cpp --- a/calendarui/views/src/calendaycontainer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calendaycontainer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -332,7 +332,7 @@ for ( TInt i(0); i < iLayoutTable->Count(); ++i ) { SItemInfo& item = (*iLayoutTable)[i]; - if ( item.iTopLine == aListIndex ) + if ( aListIndex >= item.iTopLine && aListIndex <= item.iBottomLine ) { TRACE_EXIT_POINT; return i; @@ -1440,6 +1440,7 @@ if(aPointerEvent.iType == TPointerEvent::EButton1Down) { + this->GenerateTactileFeedback(); //Tactile feedback. control = iLayoutManager->ControlOrNull(); if(control) { diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calendaylistboxitemdrawer.cpp --- a/calendarui/views/src/calendaylistboxitemdrawer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calendaylistboxitemdrawer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -124,50 +124,46 @@ FormattedCellData()->Draw(Properties(aItemIndex), *iGc, &target, aItemTextRect, aItemIsCurrent&&highlightShown, - colors); - - - - if(CHECK_IF_FIRSTLINE(aItemIndex)) - { - CCalenDayContainer::SItemInfo& itemInfo = - static_cast(iListBox)->iDayContainer->FindItem(aItemIndex); - iColor = itemInfo.iColor; - } - - - + colors); + TInt variantIndex = static_cast(iListBox)->iDayContainer->LayoutVariantIndex(CCalenDayContainer::EListScrollCaleDayPane); // get the listbox rect. TRect listBoxRect = iListBox->View()->ViewRect(); TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(variantIndex); TAknLayoutRect colourstrips; - colourstrips.LayoutRect( aItemTextRect, tempLayout.LayoutLine() ); - TRect finalRect(colourstrips.Rect()); - - // check the height of the colored strip , if it is greater than listboxrect or not - // for bottom part. - if( aItemTextRect.iBr.iY > listBoxRect.iBr.iY ) + colourstrips.LayoutRect( aItemTextRect, tempLayout.LayoutLine() ); + if(CHECK_IF_FIRSTLINE(aItemIndex)) + { + iColorStripHeight = 0; + iColorStripRect.SetRect(colourstrips.Rect().iTl,colourstrips.Rect().iBr); + } + // get itemInfo for each line to set the color + CCalenDayContainer::SItemInfo& itemInfo = + static_cast(iListBox)->iDayContainer->FindItem(aItemIndex); + iColor = itemInfo.iColor; + + if (aItemTextRect.iBr.iY > listBoxRect.iBr.iY) { - finalRect.SetRect(aItemTextRect.iTl.iX, aItemTextRect.iTl.iY,colourstrips.Rect().iBr.iX,listBoxRect.iBr.iY); + iColorStripRect.SetRect(iColorStripRect.iTl.iX, iColorStripRect.iTl.iY, + iColorStripRect.iBr.iX, listBoxRect.iBr.iY); } - - // for top part. - else if(aItemTextRect.iTl.iY < listBoxRect.iTl.iY) + else if (aItemTextRect.iTl.iY < listBoxRect.iTl.iY) { - finalRect.SetRect(aItemTextRect.iTl.iX, listBoxRect.iTl.iY,colourstrips.Rect().iBr.iX,aItemTextRect.iBr.iY); - } - + iColorStripRect.SetRect(colourstrips.Rect().iTl.iX, listBoxRect.iTl.iY, + colourstrips.Rect().iBr.iX, colourstrips.Rect().iBr.iY); + iColorStripHeight += iColorStripRect.Height(); + iColorStripRect.SetHeight(iColorStripHeight); + } else { - finalRect.SetHeight(aItemTextRect.Height()); - } - - //iGc->DrawRect( colourstrips.Rect() ); + iColorStripHeight += aItemTextRect.Height(); + iColorStripRect.SetHeight(iColorStripHeight); + } + iGc->SetBrushStyle( CGraphicsContext::ESolidBrush ); iGc->SetBrushColor( TRgb(iColor) ); - iGc->DrawRect( finalRect ); + iGc->DrawRect( iColorStripRect ); iGc->Reset(); diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calendaylistboxmodel.cpp --- a/calendarui/views/src/calendaylistboxmodel.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calendaylistboxmodel.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -484,6 +484,11 @@ HBufC* result = NULL; if ( doesFit ) { + if ( aLineArray.Count() == 1 ) + { + aLineArray.AppendL( TPtrC(KNullDesC) ); + } + // If we could fit, we return visualText and caller has // to memory manage it. TPtrs in aLineArray points to this text // buffer. @@ -515,6 +520,11 @@ { aLineArray.AppendL( TPtrC(KNullDesC) ); } + + if ( aLineArray.Count() == 1 ) + { + aLineArray.AppendL( TPtrC(KNullDesC) ); + } // We return original text, because // AknBidiTextUtils::ConvertToVisualAndWrapToArrayL @@ -661,8 +671,14 @@ { isEndDisplayed = EFalse; } - for (TInt i(1); i < textLines->Count() || !isEndDisplayed; i++) + TInt textLinesCount = textLines->Count(); + for (TInt i(1); i <= textLinesCount || !isEndDisplayed; i++) { + if(i == textLinesCount) + { + itemInfo.iBottomLine = iItemTextArray->Count(); + break; + } if (itemInfo.iTopLine == KIndexError) { itemInfo.iTopLine = iItemTextArray->Count(); diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/caleneventview.cpp --- a/calendarui/views/src/caleneventview.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/caleneventview.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -424,6 +424,21 @@ // nothing to do } break; + case ECalenCmdFindPhoneNum: + { + cnt->OnCmdFindPhoneNumL(); + } + break; + case ECalenCmdFindEmail: + { + cnt->OnCmdFindEmailL(); + } + break; + case ECalenCmdFindURL: + { + cnt->OnCmdFindUrlL(); + } + break; default: if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand)) { @@ -484,7 +499,6 @@ case R_CALEN_EVENT_VIEW_LONGTAP_MENUPANE: { CCalenEntryUtil* eventViewData = cnt->GetEventViewData(); - if(eventViewData) { if(eventViewData->EntryType() == CCalEntry::ETodo) @@ -511,7 +525,7 @@ aMenuPane->DeleteMenuItem(ECalenViewAttachmentList); } } - cnt->GetFindItemMenu()->AddItemFindMenuL(cnt->GetItemFinder(),aMenuPane,EFindItemMenuPlaceHolder,KNullDesC); + if(CCalenLocationUtil::IsMapProviderAvailableL()) { diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/caleneventviewcontainer.cpp --- a/calendarui/views/src/caleneventviewcontainer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/caleneventviewcontainer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -117,9 +117,7 @@ MCalenServices& aServices ) : CCalenContainer( aView, aServices ), iEntry(NULL), - iAutomaticHlValue(ETrue), - iAutomaticHlInitialized(EFalse), - iEmbeddedFileOpened(EFalse) + iEmbeddedFileOpened(EFalse) { TRACE_ENTRY_POINT; iNumOfLinesBeforeLocField = 0; @@ -151,7 +149,6 @@ delete iTimeFormat; delete iDateFormat; delete iDocHandler; - delete iAutoFinder; delete iFindMenu; if( iNotifier ) @@ -189,9 +186,10 @@ ETrue ); iDocHandler = CDocumentHandler::NewL( iEikonEnv->Process() ); - iAutoFinder = CItemFinder::NewL(); + iFindMenu = CFindItemMenu::NewL( EFindItemMenuPlaceHolder ); iFindMenu->AttachItemFinderMenuL(0); + iParaFormat = CParaFormat::NewL(); @@ -206,16 +204,9 @@ iLabel->SetContainerWindowL(*this); iLabel->SetTextL(_L("")); iLabel->SetRect(Rect()); - - ReadAutoHlCenRepValueAndSetNotifyL(); - - CCalenEventView* eventView = static_cast( iView ); - if( !( eventView->IsAlarmActiveInViewer() ) ) - { - SetAutomaticHighlightL(iAutomaticHlValue); - } - + iDocHandler->SetExitObserver( this ); + iTextEditor->EnableKineticScrollingL(ETrue); TRACE_EXIT_POINT; } @@ -254,12 +245,7 @@ void CCalenEventViewContainer::CompletePopulationL() { TRACE_ENTRY_POINT; - if(iTextEditor && iTextEditor->Text()->DocumentLength() > 0 && iAutoFinder && - iSelectedText.iCursorPos == 0 && iSelectedText.iAnchorPos == 0) - { - iAutoFinder->SetEditor((CEikRichTextEditor**)&iTextEditor); - } - + iTextEditor->SetFocus(ETrue); ActivateL(); AddToStackAndMakeVisibleL(); @@ -406,7 +392,6 @@ { case EKeyUpArrow: { - iAutoFinder->NextItemOrScrollL( CItemFinder::ENextUp ); // Scroll the text view up by one line iTextEditor->MakeVisible(EFalse); TInt scrollLines = KScrollViewerUp; @@ -421,7 +406,6 @@ case EKeyDownArrow: { - iAutoFinder->NextItemOrScrollL( CItemFinder::ENextDown ); // Scroll the text view down by one line iTextEditor->MakeVisible(EFalse); TInt scrollLines = KScrollViewerDown; @@ -447,11 +431,6 @@ keyResponse = EKeyWasConsumed; } break; - case EKeyPhoneSend: - { - HandleNumberCallL(); - break; - } case EKeyBackspace: /* fall through... */ case EKeyDelete: { @@ -515,25 +494,6 @@ } -// ---------------------------------------------------------------------------- -// CCalenEventViewContainer::HandleNumberCallL -// ---------------------------------------------------------------------------- -// -void CCalenEventViewContainer::HandleNumberCallL() - { - TRACE_ENTRY_POINT; - - const CItemFinder::CFindItemExt& findItem = iAutoFinder->CurrentItemExt(); - - if(findItem.iItemType != CItemFinder::EPhoneNumber) - { - return; - } - - iFindMenu->HandleCallL( findItem.iItemDescriptor->Des() ); - - TRACE_EXIT_POINT; - } // ---------------------------------------------------------------------------- // CCalenEventViewContainer::HandlePointerEventL @@ -549,10 +509,8 @@ { return; } - - CCalenEventView* eventView = static_cast( iView ); - if( !( eventView->IsAlarmActiveInViewer() ) ) - { + CCalenContainer::HandlePointerEventL( aPointerEvent ); + if(iTextEditor->Rect().Contains(aPointerEvent.iPosition)) { switch(aPointerEvent.iType) @@ -560,24 +518,26 @@ case TPointerEvent::EButton1Down: { iTextEditor->SetFocus(ETrue); - - // TODO: Uncomment this when enabling attachment support - if(iEventViewData && !iEmbeddedFileOpened) + CCalenEventView* eventView = static_cast( iView ); + if(!( eventView->IsAlarmActiveInViewer() ) ) { - - if(iEventViewData->AttachmentCount()) - { - CTextView *textView = iTextEditor->TextView(); - - TTmPosInfo2 *posInfo = new(ELeave) TTmPosInfo2; - textView->FindXyPosL(aPointerEvent.iPosition,*posInfo); - - // Check if it is tapped on any attachment name, if yes then open that attachment - CheckAndOpenTappedAttachment(posInfo); - delete posInfo; - } + // TODO: Uncomment this when enabling attachment support + if(iEventViewData && !iEmbeddedFileOpened) + { + if(iEventViewData->AttachmentCount()) + { + CTextView *textView = iTextEditor->TextView(); + + TTmPosInfo2 *posInfo = new(ELeave) TTmPosInfo2; + textView->FindXyPosL(aPointerEvent.iPosition,*posInfo); + + // Check if it is tapped on any attachment name, if yes then open that attachment + CheckAndOpenTappedAttachment(posInfo); + delete posInfo; + } + } } - break; + break; } case TPointerEvent::EDrag: { @@ -589,10 +549,7 @@ iTextEditor->SetFocus(ETrue); TInt curPos = iTextEditor->CursorPos(); TRect rect = iTextEditor->Rect(); - if ( !iAutoFinder->ItemWasTappedL( aPointerEvent.iPosition - rect.iTl ) ) - { - // return; - } + break; } default: @@ -600,9 +557,7 @@ break; } } - iTextEditor->HandlePointerEventL(aPointerEvent); - } - } + } TRACE_EXIT_POINT; } @@ -2337,58 +2292,12 @@ return iEventViewData; } -// ----------------------------------------------------------------------------- -// CCalenEventViewContainer::ReadAutoHlCenRepValueAndSetNotifyL -// -// ----------------------------------------------------------------------------- -// -void CCalenEventViewContainer::ReadAutoHlCenRepValueAndSetNotifyL() - { - TRACE_ENTRY_POINT; - - if ( iAutomaticHlInitialized ) - return; - - // Create the session - iCenRepSession = CRepository::NewL( KCRUidCommonUi ); - - if( iCenRepSession ) - { - // Get the value of AutomaticHighlight key - iCenRepSession->Get( KCuiAutomaticHighlight, iAutomaticHlValue ); - // Create the notifer - iNotifier = - CCenRepNotifyHandler::NewL( - *this, *iCenRepSession, CCenRepNotifyHandler::EIntKey, - KCuiAutomaticHighlight ); - // Start listening - iNotifier->StartListeningL(); - } - - iAutomaticHlInitialized = ETrue; // Done once per viewer - - TRACE_EXIT_POINT; - } // ----------------------------------------------------------------------------- -// CCalenEventViewContainer::HandleNotifyInt -// Handles the incoming notifications of key changes +// CCalenEventViewContainer::HandleNotifyError +// From MCenRepNotifyHandlerCallback // ----------------------------------------------------------------------------- -// -void CCalenEventViewContainer::HandleNotifyInt( TUint32 /*aId*/, TInt aNewValue ) - { - TRACE_ENTRY_POINT; - - // Notifies changes on KCuiAutomaticHighlight - TRAPD(error,SetAutomaticHighlightL( aNewValue )); - if ( error != KErrNone ) - { - User::Panic(_L("CCalenEventViewContainer"),error); - } - TRACE_EXIT_POINT; - } - - +// void CCalenEventViewContainer::HandleNotifyError( TUint32 /*aId*/,TInt /*aError*/, CCenRepNotifyHandler* /*aHandler*/ ) { @@ -2407,47 +2316,9 @@ TRACE_EXIT_POINT; } -// ----------------------------------------------------------------------------- -// CCalenEventViewContainer::SetAutomaticHighlightL -// ----------------------------------------------------------------------------- -// -void CCalenEventViewContainer::SetAutomaticHighlightL( const TBool aSwitchON ) - { - TRACE_ENTRY_POINT; - - if ( iAutoFinder ) - { - // content highlight - if ( aSwitchON ) - { // switch ON - iAutoFinder->SetFindModeL( - CItemFinder::EPhoneNumber | - CItemFinder::EUrlAddress | - CItemFinder::EEmailAddress ); - - } - else - { // switch OFF - iAutoFinder->SetFindModeL( - CItemFinder::ENoneSelected ); - - } - } - - TRACE_EXIT_POINT; - } - -// ----------------------------------------------------------------------------- -// CCalenEventViewContainer::GetItemFinder -// ----------------------------------------------------------------------------- -// -CItemFinder* CCalenEventViewContainer::GetItemFinder() - { - TRACE_ENTRY_POINT; - TRACE_EXIT_POINT; - - return iAutoFinder; - } + + + // ----------------------------------------------------------------------------- // CCalenEventViewContainer::GetFindItemMenu // ----------------------------------------------------------------------------- @@ -3002,6 +2873,60 @@ TRACE_EXIT_POINT } +// ----------------------------------------------------------------------------- +// OnCmdFindPhoneNumL +// Find phone numbers in the form. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CCalenEventViewContainer::OnCmdFindPhoneNumL() + { + TRACE_ENTRY_POINT; + BuildSearchBufferL(); + MCalenToolbar* toolbar = iServices.ToolbarOrNull(); + CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchPhoneNumberBin); + toolbar->SetToolbarVisibilityL(EFalse); + finder->ExecuteLD(); + toolbar->SetToolbarVisibilityL(ETrue); + + TRACE_EXIT_POINT; + } + +// ----------------------------------------------------------------------------- +// OnCmdFindUrlL +// Find urls in the form. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CCalenEventViewContainer::OnCmdFindUrlL() + { + TRACE_ENTRY_POINT; + BuildSearchBufferL(); + MCalenToolbar* toolbar = iServices.ToolbarOrNull(); + CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchURLBin); + toolbar->SetToolbarVisibilityL(EFalse); + finder->ExecuteLD(); + toolbar->SetToolbarVisibilityL(ETrue); + TRACE_EXIT_POINT; + } + +// ----------------------------------------------------------------------------- +// OnCmdFindEmailL +// Find email addresses in the form. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CCalenEventViewContainer::OnCmdFindEmailL() + { + TRACE_ENTRY_POINT; + BuildSearchBufferL(); + MCalenToolbar* toolbar = iServices.ToolbarOrNull(); + CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchMailAddressBin); + toolbar->SetToolbarVisibilityL(EFalse); + finder->ExecuteLD(); + toolbar->SetToolbarVisibilityL(ETrue); + TRACE_EXIT_POINT; + } // end of file diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calenmissedeventcontainer.cpp --- a/calendarui/views/src/calenmissedeventcontainer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calenmissedeventcontainer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include // EAknCmdHelp #include #include @@ -99,9 +99,8 @@ CCalenMissedEventContainer::CCalenMissedEventContainer(CCalenNativeView* aView, MCalenServices& aServices ) : CCalenContainer( aView, aServices ), - iEntry(NULL), - iAutomaticHlValue(ETrue), - iAutomaticHlInitialized(EFalse) + iEntry(NULL) + { TRACE_ENTRY_POINT; TRACE_EXIT_POINT; @@ -131,7 +130,7 @@ delete iTimeFormat; delete iDateFormat; - delete iAutoFinder; + delete iFindMenu; if( iNotifier ) @@ -162,7 +161,7 @@ Rect(), ETrue ); - iAutoFinder = CItemFinder::NewL(); + iFindMenu = CFindItemMenu::NewL( EFindItemMenuPlaceHolder ); iFindMenu->AttachItemFinderMenuL(0); @@ -171,14 +170,13 @@ iTextEditor = new (ELeave) CEikRichTextEditor; iTextEditor->ConstructL(this, 0, 0, CEikEdwin::EReadOnly | CEikEdwin::EAvkonDisableCursor | - CEikEdwin::ENoAutoSelection|CEikEdwin::EAvkonEditor); + CEikEdwin::ENoAutoSelection|CEikEdwin::EAvkonEditor); iTextEditor->SetMopParent(this); iTextEditor->SetRect( Rect() ); - ReadAutoHlCenRepValueAndSetNotifyL(); - SetAutomaticHighlightL(iAutomaticHlValue); - TRACE_EXIT_POINT; + iTextEditor->EnableKineticScrollingL(ETrue); + TRACE_EXIT_POINT; } // ---------------------------------------------------------------------------- @@ -216,11 +214,6 @@ void CCalenMissedEventContainer::CompletePopulationL() { TRACE_ENTRY_POINT; - - if(iTextEditor && iTextEditor->Text()->DocumentLength() > 0 && iAutoFinder) - { - iAutoFinder->SetEditor((CEikRichTextEditor**)&iTextEditor); - } iTextEditor->SetFocus(ETrue); ActivateL(); @@ -345,14 +338,14 @@ { case EKeyUpArrow: { - iAutoFinder->NextItemOrScrollL( CItemFinder::ENextUp ); + // Scroll the text view up by one line iTextEditor->MakeVisible(EFalse); TInt scrollLines = KScrollViewerUp; iTextEditor->TextView()->ScrollDisplayLinesL(scrollLines); iTextEditor->UpdateScrollBarsL(); iTextEditor->MakeVisible(ETrue); - //Set focus immediately for highlight of auto find text + //Set focus immediately for highlight of auto find text iTextEditor->SetFocus(ETrue); keyResponse = EKeyWasConsumed; } @@ -360,7 +353,7 @@ case EKeyDownArrow: { - iAutoFinder->NextItemOrScrollL( CItemFinder::ENextDown ); + // Scroll the text view down by one line iTextEditor->MakeVisible(EFalse); TInt scrollLines = KScrollViewerDown; @@ -388,7 +381,6 @@ break; case EKeyPhoneSend: { - HandleNumberCallL(); if(CCalenLocationUtil::IsMapProviderAvailableL()) { iServices.IssueCommandL(ECalenGetLocationAndSave); @@ -429,25 +421,6 @@ } -// ---------------------------------------------------------------------------- -// CCalenMissedEventContainer::HandleNumberCallL -// ---------------------------------------------------------------------------- -// -void CCalenMissedEventContainer::HandleNumberCallL() - { - TRACE_ENTRY_POINT; - - const CItemFinder::CFindItemExt& findItem = iAutoFinder->CurrentItemExt(); - - if(findItem.iItemType != CItemFinder::EPhoneNumber) - { - return; - } - - iFindMenu->HandleCallL( findItem.iItemDescriptor->Des() ); - - TRACE_EXIT_POINT; - } // ---------------------------------------------------------------------------- // CCalenMissedEventContainer::HandlePointerEventL @@ -463,7 +436,7 @@ { return; } - + CCalenContainer::HandlePointerEventL( aPointerEvent ); if(iTextEditor->Rect().Contains(aPointerEvent.iPosition)) { switch(aPointerEvent.iType) @@ -483,10 +456,6 @@ iTextEditor->SetFocus(ETrue); TInt curPos = iTextEditor->CursorPos(); TRect rect = iTextEditor->Rect(); - if ( !iAutoFinder->ItemWasTappedL( aPointerEvent.iPosition - rect.iTl ) ) - { - // return; - } break; } default: @@ -494,7 +463,6 @@ break; } } - iTextEditor->HandlePointerEventL(aPointerEvent); } TRACE_EXIT_POINT; @@ -2104,58 +2072,12 @@ return iEventViewData; } -// ----------------------------------------------------------------------------- -// CCalenMissedEventContainer::ReadAutoHlCenRepValueAndSetNotifyL -// -// ----------------------------------------------------------------------------- -// -void CCalenMissedEventContainer::ReadAutoHlCenRepValueAndSetNotifyL() - { - TRACE_ENTRY_POINT; - - if ( iAutomaticHlInitialized ) - return; - - // Create the session - iCenRepSession = CRepository::NewL( KCRUidCommonUi ); - - if( iCenRepSession ) - { - // Get the value of AutomaticHighlight key - iCenRepSession->Get( KCuiAutomaticHighlight, iAutomaticHlValue ); - // Create the notifer - iNotifier = - CCenRepNotifyHandler::NewL( - *this, *iCenRepSession, CCenRepNotifyHandler::EIntKey, - KCuiAutomaticHighlight ); - // Start listening - iNotifier->StartListeningL(); - } - - iAutomaticHlInitialized = ETrue; // Done once per viewer - - TRACE_EXIT_POINT; - } // ----------------------------------------------------------------------------- -// CCalenMissedEventContainer::HandleNotifyInt -// Handles the incoming notifications of key changes +// CCalenMissedEventContainer::HandleNotifyError +// From MCenRepNotifyHandlerCallback // ----------------------------------------------------------------------------- -// -void CCalenMissedEventContainer::HandleNotifyInt( TUint32 /*aId*/, TInt aNewValue ) - { - TRACE_ENTRY_POINT; - - // Notifies changes on KCuiAutomaticHighlight - TRAPD(error,SetAutomaticHighlightL( aNewValue )); - if ( error != KErrNone ) - { - User::Panic(_L("CCalenMissedEventContainer"),error); - } - TRACE_EXIT_POINT; - } - - +// void CCalenMissedEventContainer::HandleNotifyError( TUint32 /*aId*/,TInt /*aError*/, CCenRepNotifyHandler* /*aHandler*/ ) { @@ -2174,47 +2096,7 @@ TRACE_EXIT_POINT; } -// ----------------------------------------------------------------------------- -// CCalenMissedEventContainer::SetAutomaticHighlightL -// ----------------------------------------------------------------------------- -// -void CCalenMissedEventContainer::SetAutomaticHighlightL( const TBool aSwitchON ) - { - TRACE_ENTRY_POINT; - - if ( iAutoFinder ) - { - // content highlight - if ( aSwitchON ) - { // switch ON - iAutoFinder->SetFindModeL( - CItemFinder::EPhoneNumber | - CItemFinder::EUrlAddress | - CItemFinder::EEmailAddress ); - - } - else - { // switch OFF - iAutoFinder->SetFindModeL( - CItemFinder::ENoneSelected ); - - } - } - - TRACE_EXIT_POINT; - } - -// ----------------------------------------------------------------------------- -// CCalenMissedEventContainer::GetItemFinder -// ----------------------------------------------------------------------------- -// -CItemFinder* CCalenMissedEventContainer::GetItemFinder() - { - TRACE_ENTRY_POINT; - TRACE_EXIT_POINT; - - return iAutoFinder; - } + // ----------------------------------------------------------------------------- // CCalenMissedEventContainer::GetFindItemMenu // ----------------------------------------------------------------------------- @@ -2277,6 +2159,56 @@ return EFalse; } } +// ----------------------------------------------------------------------------- +// OnCmdFindPhoneNumL +// Find phone numbers in the form. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CCalenMissedEventContainer::OnCmdFindPhoneNumL() + { + TRACE_ENTRY_POINT; + + BuildSearchBufferL(); + CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchPhoneNumberBin); + finder->ExecuteLD(); + + TRACE_EXIT_POINT; + } + +// ----------------------------------------------------------------------------- +// OnCmdFindUrlL +// Find urls in the form. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CCalenMissedEventContainer::OnCmdFindUrlL() + { + TRACE_ENTRY_POINT; + + BuildSearchBufferL(); + CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchURLBin); + finder->ExecuteLD(); + + TRACE_EXIT_POINT; + } + +// ----------------------------------------------------------------------------- +// OnCmdFindEmailL +// Find email addresses in the form. +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +void CCalenMissedEventContainer::OnCmdFindEmailL() + { + TRACE_ENTRY_POINT; + + BuildSearchBufferL(); + CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchMailAddressBin); + finder->ExecuteLD(); + + TRACE_EXIT_POINT; + } // end of file diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calenmissedeventview.cpp --- a/calendarui/views/src/calenmissedeventview.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calenmissedeventview.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -333,6 +333,20 @@ CCalenNativeView::HandleCommandL(aCommand); } break; + case ECalenCmdFindPhoneNum: + { + cnt->OnCmdFindPhoneNumL(); + } + break; + case ECalenCmdFindEmail: + { + cnt->OnCmdFindEmailL(); + } + break; + case ECalenCmdFindURL: + { + cnt->OnCmdFindUrlL(); + } default: if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand)) { @@ -381,7 +395,7 @@ } } - cnt->GetFindItemMenu()->AddItemFindMenuL(cnt->GetItemFinder(),aMenuPane,EFindItemMenuPlaceHolder,KNullDesC); + if(CCalenLocationUtil::IsMapProviderAvailableL()) { diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calenmonthcontainer.cpp --- a/calendarui/views/src/calenmonthcontainer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calenmonthcontainer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -1625,7 +1625,8 @@ TVwsViewId( KUidCalendar, KUidCalenMonthView ) ); SetActiveDayL( newActiveDay ); - iServices.IssueCommandL( ECalenWeekView ); + //iServices.IssueCommandL( ECalenWeekView ); + iServices.IssueCommandL( ECalenForwardsToWeekView ); } } @@ -1662,6 +1663,7 @@ CCoeControl* control( NULL ); if(aPointerEvent.iType == TPointerEvent::EButton1Down) { + this->GenerateTactileFeedback(); //Tactile feedback. control = iLayoutManager->ControlOrNull(); if(control) { diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calentodocontainer.cpp --- a/calendarui/views/src/calentodocontainer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calentodocontainer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -278,7 +278,7 @@ delete iController; delete iDesArray; delete iListBox; - delete iEmptyListText; + //delete iEmptyListText; iColorUidArray.Close(); TRACE_EXIT_POINT; @@ -390,10 +390,16 @@ // Transfer iconlist ownership to the listbox iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList ); - // Save empty text and set null for list box. + /*// Save empty text and set null for list box. // It is made not to display "No data". iEmptyListText = iListBox->View()->EmptyListText()->AllocL(); - iListBox->View()->SetListEmptyTextL( KNullDesC ); + //iListBox->View()->SetListEmptyTextL( KNullDesC );*/ + + // Set text for empty listbox + HBufC* emptyText = StringLoader::LoadLC(R_CALEN_QTN_CALE_NO_EVENTS, + iEikonEnv); + iListBox->View()->SetListEmptyTextL( *emptyText ); //Whenever listbox is empty, it will set with this empty text. + CleanupStack::PopAndDestroy(emptyText); TRACE_EXIT_POINT; } @@ -476,11 +482,13 @@ TRACE_ENTRY_POINT; TInt focusIx = KErrNotFound; - + TInt topIx = KErrNotFound; + + topIx = iListBox->TopItemIndex(); // If top item is specified, set it - if ( iFirstEntryOnScreenIndex != KErrNotFound ) + if ( topIx != KErrNotFound ) { - iListBox->SetTopItemIndex( iFirstEntryOnScreenIndex ); + iListBox->SetTopItemIndex( topIx ); } if ( iHighlightedRowNumber != KErrNotFound ) @@ -591,7 +599,7 @@ CleanupStack::PopAndDestroy( listDes ); CleanupStack::PopAndDestroy( &calendarInfoList ); iListBox->HandleItemAdditionL(); - iListBox->View()->SetListEmptyTextL( *iEmptyListText ); + //iListBox->View()->SetListEmptyTextL( *iEmptyListText ); TRACE_EXIT_POINT; } @@ -1186,7 +1194,12 @@ { TInt pointerIndex(-1); TBool isItem (iListBox->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex)); - + + if(aPointerEvent.iType == TPointerEvent::EButton1Down) + { + this->GenerateTactileFeedback(); //Tactile feedback. + } + if(isItem == EFalse && IsEmptyView()) { iListBox->HandlePointerEventL(aPointerEvent); diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calenweekcontainer.cpp --- a/calendarui/views/src/calenweekcontainer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calenweekcontainer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -904,6 +904,8 @@ iListBox->View()->SetDisableRedraw(EFalse); DrawDeferred(); +//Changing RSK to back / exit + WeekView().UpdateCbaL(); TRACE_EXIT_POINT; } @@ -2188,6 +2190,7 @@ { case TPointerEvent::EButton1Down: { + this->GenerateTactileFeedback(); //Tactile feedback. if(isItem) { oldRow = iListBox->View()->CurrentItemIndex(); diff -r d68a4b5d5885 -r 9c5b1510919f calendarui/views/src/calenweekview.cpp --- a/calendarui/views/src/calenweekview.cpp Tue May 25 12:41:10 2010 +0300 +++ b/calendarui/views/src/calenweekview.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -44,6 +44,9 @@ #include "calendar.hrh" +// Button position of the MSK CBA button +const TInt KSK2CBAPosition = 2; + // LOCAL CONSTANTS AND MACROS #define iWeekContainer static_cast( iContainer ) @@ -163,12 +166,20 @@ // (other items were commented in a header). // ---------------------------------------------------------------------------- // -void CCalenWeekView::DoActivateImplL( const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, +void CCalenWeekView::DoActivateImplL( const TVwsViewId& aPrevViewId, + TUid aCustomMessageId, const TDesC8& /*aCustomMessage*/ ) { TRACE_ENTRY_POINT; - + if( aPrevViewId.iAppUid == KUidCalendar ) // switch from internal view + { + iShowBackButtonOnCba = + ( aCustomMessageId == KUidCalenShowBackCba ? ETrue : EFalse ); + } + else + { + iShowBackButtonOnCba = EFalse; + } iWeekContainer->SetCursorToActiveDayL(); //SetStatusPaneFromActiveContextL(); @@ -367,7 +378,14 @@ iServices.IssueCommandL( aCommand ); } break; - + case EAknSoftkeyBack: + { + + SetCbaL( R_CALEN_MONTH_AND_WEEK_VIEW_CBA ); + + iServices.IssueNotificationL(ECalenNotifyWeekViewClosed); + } + break; default: CCalenNativeView::HandleCommandL( aCommand ); break; @@ -375,6 +393,29 @@ TRACE_EXIT_POINT; } +// --------------------------------------------------------- +// CCalenWeekView::UpdateCbaL +// Set context menubar and also CBA button back / exit. +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CCalenWeekView::UpdateCbaL() + { + TRACE_ENTRY_POINT; + + if( iShowBackButtonOnCba ) + { + CEikButtonGroupContainer* cba = Cba(); + cba->SetCommandL( KSK2CBAPosition, R_CALEN_BACK_CBA_BUTTON); + cba->DrawNow(); + } + else + { + SetCbaL(R_CALEN_MONTH_AND_WEEK_VIEW_CBA); + } + + TRACE_EXIT_POINT; + } // ---------------------------------------------------------------------------- // CCalenWeekView::Id diff -r d68a4b5d5885 -r 9c5b1510919f clock2/clockui/uilayer/clockmainview/src/clockmaincontainer.cpp --- a/clock2/clockui/uilayer/clockmainview/src/clockmaincontainer.cpp Tue May 25 12:41:10 2010 +0300 +++ b/clock2/clockui/uilayer/clockmainview/src/clockmaincontainer.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -77,6 +77,7 @@ _LIT( KMinusGMT, " \x202A" ); _LIT( KPDF, " \x202C" ); _LIT( KZero, "0" ); +_LIT( KSpace, " " ); // --------------------------------------------------------- // CClockMainContainer::NewL @@ -390,6 +391,15 @@ return; } + // to highlight the item in alarm list after long tapping + //( when new alarm button is focused) + if( iListBox && iListBox->Rect().Contains( aPointerEvent.iPosition ) && + aPointerEvent.iType == TPointerEvent::EButton1Down && + !iListBox->IsFocused() && iListBox->IsVisible() ) + { + iListBox->View()->ItemDrawer()->ClearFlags( CListItemDrawer::EDisableHighlight ); + } + // to get the vibes let's handle skinnable clock as a special case // no need to to delegate pointer events to it if( iSkinnableClock && iSkinnableClock->Rect().Contains( aPointerEvent.iPosition ) ) @@ -406,6 +416,10 @@ iPreviousClockTypeSwitch.HomeTime(); } } + else + { + CCoeControl::HandlePointerEventL( aPointerEvent ); + } } else { @@ -472,8 +486,6 @@ iAlarmArray->InitIdList(); TInt count = iListBox->Model()->ItemTextArray()->MdcaCount(); - //SetCorrectRectForNewAlarmButton(); - // if only one item if( ( KZeroAlarms == aIndex ) && ( aIndex == count ) ) { @@ -1306,15 +1318,9 @@ // construct the "New Alarm" button iNewAlarmButton = CAknButton::NewL( NULL, NULL, NULL, NULL, - iAlarmArray->NewAlarmText()->Des(),iAlarmArray->NewAlarmText()->Des(), 0, 0 ); + iAlarmArray->NewAlarmText()->Des(), KNullDesC, 0, 0 ); iNewAlarmButton->SetParent( this ); iNewAlarmButton->SetContainerWindowL( *this ); - //TAknLayoutRect newAlarmButtonRect; - // Get the skinnable clock rect. - //newAlarmButtonRect.LayoutRect( listRect.Rect(), - // AknLayoutScalable_Apps::main_clock2_btn_pane( layoutOrientation ).LayoutLine() ); - - //iNewAlarmButton->SetRect( newAlarmButtonRect.Rect() ); SetCorrectRectForNewAlarmButton(); iNewAlarmButton->SetObserver( this ); iNewAlarmButton->ActivateL(); @@ -1395,55 +1401,87 @@ TRect mainClockPane( parentRect.Rect() ); - // Get the layout for the day string. - layoutText.LayoutText( mainClockPane, AknLayoutScalable_Apps::main_clock2_pane_t1( displayOrientation ).LayoutLine() ); - - TPtr dayStringPtr = iDayNameString->Des(); - // Day long format. - layoutText.DrawText( aWindowGc, *iDayNameString, ETrue, cachedColor ); - - // Get the layout for the datestring. - layoutText.LayoutText( mainClockPane, AknLayoutScalable_Apps::main_clock2_pane_t2( displayOrientation ).LayoutLine() ); - - TPtr dateStringPtr = iDateString->Des(); - // For mirrored languages. - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( dateStringPtr ); - // Date long format - layoutText.DrawText( aWindowGc, *iDateString, ETrue, cachedColor ); - - // Get the layout for the timezone string. - layoutText.LayoutText( mainClockPane, AknLayoutScalable_Apps::main_clock2_pane_t3( Layout_Meta_Data::IsLandscapeOrientation() ).LayoutLine() ); - - TPtr timeZonePtr = iTimeZoneString->Des(); - // This is for mirrored languages. - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( timeZonePtr ); - // The timezone string. - layoutText.DrawText( aWindowGc, *iTimeZoneString, ETrue, cachedColor ); + if( Layout_Meta_Data::IsLandscapeOrientation() ) + { + // main_clock2_pane_cp01_t1 Day + date + HBufC* dayAndDateString = HBufC::NewLC( iDayNameString->Length() + iDateString->Length() + 1 ); + TPtr dayAndDateStringPtr = dayAndDateString->Des(); + dayAndDateStringPtr.Append( *iDayNameString ); + dayAndDateStringPtr.Append( KSpace ); + TPtr dateStringPtr = iDateString->Des(); + AknTextUtils::DisplayTextLanguageSpecificNumberConversion( dateStringPtr ); + dayAndDateStringPtr.Append( *iDateString ); + + layoutText.LayoutText( mainClockPane, AknLayoutScalable_Apps::main_clock2_pane_cp01_t1( displayOrientation ).LayoutLine() ); + layoutText.DrawText( aWindowGc, *dayAndDateString , ETrue, cachedColor ); + + CleanupStack::PopAndDestroy( dayAndDateString ); + dayAndDateString = NULL; + + // main_clock2_pane_cp01_t3 zone + country + HBufC* timeZoneAndCountryString = HBufC::NewLC( iTimeZoneString->Length() + iLocationString->Length() + 1 ); + TPtr timeZoneAndCountryStringPtr = timeZoneAndCountryString->Des(); + TPtr timeZoneStringPtr = iTimeZoneString->Des(); + AknTextUtils::DisplayTextLanguageSpecificNumberConversion( timeZoneStringPtr ); + timeZoneAndCountryStringPtr.Append( *iTimeZoneString ); + timeZoneAndCountryStringPtr.Append( KSpace ); + timeZoneAndCountryStringPtr.Append( *iLocationString ); + + layoutText.LayoutText( mainClockPane, AknLayoutScalable_Apps::main_clock2_pane_cp01_t3( displayOrientation ).LayoutLine() ); + layoutText.DrawText( aWindowGc, *timeZoneAndCountryString, ETrue, cachedColor ); + /* + TAknTextComponentLayout labelLayout; + labelLayout = AknLayoutScalable_Apps::main_clock2_pane_cp01_t3( Layout_Meta_Data::IsLandscapeOrientation() ); + AknLayoutUtils::LayoutLabel( iLocationLabel, parentRect.Rect(), labelLayout.LayoutLine() ); + + // Set the label for the text and start marqueeing. + iLocationLabel->SetLabelTextL( *timeZoneAndCountryString ); + TGulAlignment alignment; + alignment.SetHAlignment( EHCenter ); + iLocationLabel->SetAlignment( alignment ); + iLocationLabel->StartMarquee(); + iLocationLabel->RedrawRect( iLocationLabel->Rect() ); + */ + CleanupStack::PopAndDestroy( timeZoneAndCountryString ); + timeZoneAndCountryString = NULL; + } + else + { + // Get the layout for the day string. + layoutText.LayoutText( mainClockPane, AknLayoutScalable_Apps::main_clock2_pane_t1( displayOrientation ).LayoutLine() ); - // Get the layout for the country string. - TAknTextComponentLayout labelLayout; - labelLayout = AknLayoutScalable_Apps::main_clock2_pane_t4( Layout_Meta_Data::IsLandscapeOrientation() ); - AknLayoutUtils::LayoutLabel( iLocationLabel, parentRect.Rect(), labelLayout.LayoutLine() ); + TPtr dayStringPtr = iDayNameString->Des(); + // Day long format. + layoutText.DrawText( aWindowGc, *iDayNameString, ETrue, cachedColor ); + + // Get the layout for the datestring. + layoutText.LayoutText( mainClockPane, AknLayoutScalable_Apps::main_clock2_pane_t2( displayOrientation ).LayoutLine() ); + + TPtr dateStringPtr = iDateString->Des(); + // For mirrored languages. + AknTextUtils::DisplayTextLanguageSpecificNumberConversion( dateStringPtr ); + // Date long format + layoutText.DrawText( aWindowGc, *iDateString, ETrue, cachedColor ); + + // Get the layout for the timezone string. + layoutText.LayoutText( mainClockPane, AknLayoutScalable_Apps::main_clock2_pane_t3( Layout_Meta_Data::IsLandscapeOrientation() ).LayoutLine() ); - // Set the label for the text and start marqueeing. - iLocationLabel->SetLabelTextL( *iLocationString ); - iLocationLabel->StartMarquee(); - iLocationLabel->RedrawRect( iLocationLabel->Rect() ); - - // We display empty text only if there are no alarms set. - // if( !iAlarmArray->MdcaCount() ) - // { - // Set the listbox layout. - // TAknLayoutRect listRect; - // Get the main clock rect. - // listRect.LayoutRect( mainClockPane, AknLayoutScalable_Apps::listscroll_gen_pane_cp06( Layout_Meta_Data::IsLandscapeOrientation() ).LayoutLine() ); - - // Get the rect for the empty text. - // layoutText.LayoutText( listRect.Rect(), AknLayoutScalable_Apps::listscroll_gen_pane_cp06_t1( Layout_Meta_Data::IsLandscapeOrientation() ).LayoutLine() ); - // Draw the text. - // layoutText.DrawText( aWindowGc, *iNoAlarmsText, ETrue, cachedColor ); - //} - + TPtr timeZonePtr = iTimeZoneString->Des(); + // This is for mirrored languages. + AknTextUtils::DisplayTextLanguageSpecificNumberConversion( timeZonePtr ); + // The timezone string. + layoutText.DrawText( aWindowGc, *iTimeZoneString, ETrue, cachedColor ); + + // Get the layout for the country string. + TAknTextComponentLayout labelLayout; + labelLayout = AknLayoutScalable_Apps::main_clock2_pane_t4( Layout_Meta_Data::IsLandscapeOrientation() ); + AknLayoutUtils::LayoutLabel( iLocationLabel, parentRect.Rect(), labelLayout.LayoutLine() ); + + // Set the label for the text and start marqueeing. + iLocationLabel->SetLabelTextL( *iLocationString ); + iLocationLabel->StartMarquee(); + iLocationLabel->RedrawRect( iLocationLabel->Rect() ); + } __PRINTS( "CClockMainContainer::DrawMainViewText - Exit" ); } @@ -1597,7 +1635,8 @@ void CClockMainContainer::HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType ) { - if ( aControl == iNewAlarmButton && aEventType == MCoeControlObserver::EEventStateChanged ) + if ( aControl == iNewAlarmButton && aEventType == MCoeControlObserver::EEventStateChanged + && iView && !iView->IsAlarmEditorOpen() ) { iView->HandleCommandL( EClockNewAlarm ); } diff -r d68a4b5d5885 -r 9c5b1510919f notepad/notepad1/LibSrc/NpdEditorDialog.cpp --- a/notepad/notepad1/LibSrc/NpdEditorDialog.cpp Tue May 25 12:41:10 2010 +0300 +++ b/notepad/notepad1/LibSrc/NpdEditorDialog.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -1205,6 +1205,7 @@ TInt CNotepadEditorDialog::DoSearchL(CFindItemEngine::TFindItemSearchCase aCase) { CFindItemDialog* dialog = CFindItemDialog::NewL( iEditor->Text()->Read( 0 ), aCase ); + dialog->EnableSingleClick( ETrue ); TInt ret = dialog->ExecuteLD(); return ret; } diff -r d68a4b5d5885 -r 9c5b1510919f notepad/notepad1/LibSrc/NpdExternalTextEditorDialog.cpp --- a/notepad/notepad1/LibSrc/NpdExternalTextEditorDialog.cpp Tue May 25 12:41:10 2010 +0300 +++ b/notepad/notepad1/LibSrc/NpdExternalTextEditorDialog.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -310,9 +310,13 @@ { TInt ret = DoSearchL( iFindItemMenu->SearchCase(aCommandId) ); if ( ret == EAknSoftkeyExit ) - { - aCommandId = ret; - } + { + aCommandId = ret; + } + else + { + return; + } } switch (aCommandId) @@ -411,6 +415,7 @@ TInt CNotepadExternalTextDialog::DoSearchL(CFindItemEngine::TFindItemSearchCase aCase) { CFindItemDialog* dialog = CFindItemDialog::NewL( iEditor->Text()->Read(0), aCase ); + dialog->EnableSingleClick( ETrue ); TInt ret = dialog->ExecuteLD(); TBuf<128> test = _L("FI returned: "); test.AppendNum(ret); diff -r d68a4b5d5885 -r 9c5b1510919f notepad/notepad1/LibSrc/NpdListDialog.cpp --- a/notepad/notepad1/LibSrc/NpdListDialog.cpp Tue May 25 12:41:10 2010 +0300 +++ b/notepad/notepad1/LibSrc/NpdListDialog.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -950,7 +950,7 @@ TInt ignore; TInt itemMarked = iListBox->SelectionIndexes()->Find( currIndex, itemKey, ignore ); if ( memoCount > 0 && - ( markCount == 0 || IsNotepad() ) ) + ( markCount == 0 || IsNotepad() || IsTemplates()) ) { // this must preceed DeleteMenuItem(ENotepadCmdOpen) InsertSendMenuItemAfterL( *iSendUi, *aMenuPane, @@ -965,12 +965,22 @@ // this must after InsertSendMenuItemAfterL aMenuPane->DeleteMenuItem(ENotepadCmdOpen); } - if ( markCount >= 1 ) + if ( markCount >= 1 && IsNoteListDialog() ) { aMenuPane->SetItemSpecific( ENotepadCmdSend, EFalse ); aMenuPane->SetItemSpecific( ENotepadCmdDelete, EFalse ); } - if ( iListBox->CurrentItemIndex() == 0 && IsNotepad() && memoCount > 0) + + if ( IsTemplateListDialog() ) + { + aMenuPane->SetItemSpecific( ENotepadCmdSend, ETrue ); + if ( markCount >= 1 ) + { + aMenuPane->SetItemDimmed( ENotepadCmdSend, ETrue ); + } + } + + if ( iListBox->CurrentItemIndex() == 0 && IsNotepad() && memoCount > 0 && markCount == 0 ) { aMenuPane->SetItemDimmed( ENotepadCmdDelete, ETrue ); aMenuPane->SetItemDimmed( ENotepadCmdSend, ETrue ); diff -r d68a4b5d5885 -r 9c5b1510919f notepad/notepad1/inc/NpdDialogBase.h --- a/notepad/notepad1/inc/NpdDialogBase.h Tue May 25 12:41:10 2010 +0300 +++ b/notepad/notepad1/inc/NpdDialogBase.h Wed Jun 09 09:40:23 2010 +0300 @@ -193,6 +193,13 @@ * @return ETrue if this is for for Notepad application ListDialog, otherwize EFalse. */ inline TBool IsNoteListDialog() const; + + /** + * Check whether this dialog is for Template List. + * + * @return ETrue if this is for for Template List, otherwize EFalse. + */ + inline TBool IsTemplateListDialog() const; /** * Set iTitle text to title pane. diff -r d68a4b5d5885 -r 9c5b1510919f notepad/notepad1/inc/NpdDialogBase.inl --- a/notepad/notepad1/inc/NpdDialogBase.inl Tue May 25 12:41:10 2010 +0300 +++ b/notepad/notepad1/inc/NpdDialogBase.inl Wed Jun 09 09:40:23 2010 +0300 @@ -76,4 +76,12 @@ return iResId == R_NOTEPAD_LIST_DIALOG_ORG; } +// ----------------------------------------------------------------------------- +// CNotepadDialogBase::IsTemplateListDialog +// ----------------------------------------------------------------------------- +// +inline TBool CNotepadDialogBase::IsTemplateListDialog() const + { + return iResId == R_NOTEPAD_TEMPLATE_LIST_DIALOG_ORG; + } // End of file diff -r d68a4b5d5885 -r 9c5b1510919f organizer_plat/calendar_custamization_api/inc/calencommands.hrh --- a/organizer_plat/calendar_custamization_api/inc/calencommands.hrh Tue May 25 12:41:10 2010 +0300 +++ b/organizer_plat/calendar_custamization_api/inc/calencommands.hrh Wed Jun 09 09:40:23 2010 +0300 @@ -48,6 +48,7 @@ ECalenDayView, ECalenTodoView, ECalenForwardsToDayView, + ECalenForwardsToWeekView, ECalenNextView, ECalenPrevView, ECalenSwitchView, @@ -61,6 +62,9 @@ ECalenGotoDate, ECalenEventView, ECalenCmdPromptThenEdit, + ECalenCmdFindPhoneNum, + ECalenCmdFindEmail, + ECalenCmdFindURL, ECalenFasterAppExit, ECalenNewMeeting = ECalenEditCommandBase, ECalenNewTodo, diff -r d68a4b5d5885 -r 9c5b1510919f organizer_plat/calendar_custamization_api/inc/calennotificationhandler.h --- a/organizer_plat/calendar_custamization_api/inc/calennotificationhandler.h Tue May 25 12:41:10 2010 +0300 +++ b/organizer_plat/calendar_custamization_api/inc/calennotificationhandler.h Wed Jun 09 09:40:23 2010 +0300 @@ -61,6 +61,7 @@ ECalenNotifyEntrySent, ECalenNotifyCancelDelete, ECalenNotifyDayViewClosed, + ECalenNotifyWeekViewClosed, ECalenNotifyMapClosed, ECalenNotifyCancelMapLaunch, ECalenNotifyMissedAlarmViewClosed, diff -r d68a4b5d5885 -r 9c5b1510919f pimappservices/calendar/server/src/agsfilemanager.cpp --- a/pimappservices/calendar/server/src/agsfilemanager.cpp Tue May 25 12:41:10 2010 +0300 +++ b/pimappservices/calendar/server/src/agsfilemanager.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -1263,7 +1263,7 @@ TStreamId calendarInfoStreamId = iDictionary->At(KUidAgnCalendarInfo); - if (calendarInfoStreamId != KNullStreamId) + if (calendarInfoStreamId != KNullStreamId && iStore) { // Calendar info has been set on this file RStoreReadStream readStream; diff -r d68a4b5d5885 -r 9c5b1510919f pimappservices/calendar/server/src/agssess.cpp --- a/pimappservices/calendar/server/src/agssess.cpp Tue May 25 12:41:10 2010 +0300 +++ b/pimappservices/calendar/server/src/agssess.cpp Wed Jun 09 09:40:23 2010 +0300 @@ -4046,7 +4046,7 @@ { // Clear all the notifications in the buffer iFileBufferedNotification->Reset(); - iFileBufferedNotificationStream.Open(*iBufferedNotification); + iFileBufferedNotificationStream.Open(*iFileBufferedNotification); // Add a single 'Undefined Change' notification to the notification buffer CAgnFileChangeInfo* fileChang = CAgnFileChangeInfo::NewL(NULL, MCalFileChangeObserver::ECalendarInfoUpdated);