--- a/alarmengines/missedalarmstore/src/missedalarmstore.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/alarmengines/missedalarmstore/src/missedalarmstore.cpp Tue May 04 16:18:23 2010 +0100
@@ -243,8 +243,8 @@
{
DeleteEntryAndReArrangeL( key );
foundIds.Reset();
- }
- return;
+ return;
+ }
}
}
}
--- a/alarmui/src/alarmutils.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/alarmui/src/alarmutils.cpp Tue May 04 16:18:23 2010 +0100
@@ -48,6 +48,7 @@
#include <wakeupalarm.h>
#include <calalarm.h> // KUidAgendaModelAlarmCategory - the alarm category id for calendar alarms
#include <AknUtils.h>
+#include <HWRMPowerStateSDKPSKeys.h>
#ifndef SYMBIAN_CALENDAR_V2
#include <agmalarm.h> // deprecated, use CalAlarm.h when SYMBIAN_CALENDAR_V2 flag is enabled
@@ -960,12 +961,20 @@
void CAlarmUtils::DeviceShutdown()
{
TRACE_ENTRY_POINT;
- iShutdownTimer->Cancel();
- if( StarterConnect() )
- {
- iStarter.Shutdown();
- iStarter.Close();
- }
+
+ // charging state added for the err EMDN-835CW2.
+ TInt chargingState;
+ RProperty::Get( KPSUidHWRMPowerState, KHWRMChargingStatus , chargingState );
+
+ if( IsDeviceInAlarmState() && ( chargingState != EChargingStatusCharging ) )
+ {
+ iShutdownTimer->Cancel();
+ if( StarterConnect() )
+ {
+ iStarter.Shutdown();
+ iStarter.Close();
+ }
+ }
TRACE_EXIT_POINT;
}
--- a/calendarui/application/data/Calendar.rss Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/application/data/Calendar.rss Tue May 04 16:18:23 2010 +0100
@@ -2173,11 +2173,15 @@
{
command = ECalenMissedEventView;
txt = qtn_cale_opt_open;
+ //single click
+ flags = EEikMenuItemAction;
},
MENU_ITEM
{
command = ECalenCmdClear;
txt = qtn_cale_mav_opt_clear;
+ //Single click
+ flags = EEikMenuItemSpecific;
},
MENU_ITEM
{
@@ -2376,7 +2380,6 @@
| EEikDialogFlagFillAppClientRect
| EEikDialogFlagButtonsRight
| EEikDialogFlagCbaButtons
- | EEikDialogFlagWait
| EEikDialogFlagNoTitleBar
| EEikDialogFlagDontEatUpDownEvents
| EEikDialogFlagNotifyEsc;
@@ -2534,7 +2537,7 @@
RESOURCE TBUF r_qtn_calendareditor_note_db_conflict_delete
{
//TODO need to raise loc CR
- buf = "Calendar conflict. This calendar has been deleted by another application.";
+ buf = qtn_cale_note_db_conflict;
}
// ---------------------------------------------------------
@@ -2547,7 +2550,7 @@
RESOURCE TBUF r_qtn_calendareditor_note_db_conflict_update
{
//TODO need to raise loc CR
- buf = "Calendar conflict. This calendar has been updated by another application.";
+ buf = qtn_cale_note_db_modified;
}
RESOURCE MENU_BAR r_calen_multidb_menubar
--- a/calendarui/application/group/Calendar.mmp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/application/group/Calendar.mmp Tue May 04 16:18:23 2010 +0100
@@ -91,7 +91,7 @@
// NetworkServices // For sending vCalendars?
// ProtServ // For connecting Agenda Server?
// DRM // Calendar alarm tones are DRM protected
-CAPABILITY CAP_APPLICATION
+CAPABILITY CAP_APPLICATION NetworkControl
VENDORID VID_DEFAULT
--- a/calendarui/commonutils/bwins/calencommonutilsu.def Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/commonutils/bwins/calencommonutilsu.def Tue May 04 16:18:23 2010 +0100
@@ -135,4 +135,5 @@
?SynchType@CCalenEntryUtil@@QBE?AW4TSynchType@1@XZ @ 134 NONAME ; enum CCalenEntryUtil::TSynchType CCalenEntryUtil::SynchType(void) const
?GetNextAvailableOffsetL@CCalenMultiCalUtil@@SAIXZ @ 135 NONAME ; unsigned int CCalenMultiCalUtil::GetNextAvailableOffsetL(void)
?GetNextAvailableCalFileL@CCalenMultiCalUtil@@SAPAVHBufC16@@XZ @ 136 NONAME ; class HBufC16 * CCalenMultiCalUtil::GetNextAvailableCalFileL(void)
-
+ ?AttachmentOpen@CCalenAttachmentModel@@QAEXAAH@Z @ 137 NONAME ; void CCalenAttachmentModel::AttachmentOpen(int &)
+ ?IsAttachmentOpen@CCalenAttachmentModel@@QAEHXZ @ 138 NONAME ; int CCalenAttachmentModel::IsAttachmentOpen(void)
--- a/calendarui/commonutils/eabi/calencommonutilsu.def Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/commonutils/eabi/calencommonutilsu.def Tue May 04 16:18:23 2010 +0100
@@ -148,4 +148,6 @@
_ZTV21CCalenAttachmentModel @ 147 NONAME
_ZN18CCalenMultiCalUtil23GetNextAvailableOffsetLEv @ 148 NONAME
_ZN18CCalenMultiCalUtil24GetNextAvailableCalFileLEv @ 149 NONAME
+ _ZN21CCalenAttachmentModel14AttachmentOpenERi @ 150 NONAME
+ _ZN21CCalenAttachmentModel16IsAttachmentOpenEv @ 151 NONAME
--- a/calendarui/commonutils/inc/calenattachmentmodel.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/commonutils/inc/calenattachmentmodel.h Tue May 04 16:18:23 2010 +0100
@@ -185,6 +185,22 @@
*/
IMPORT_C void CheckForExistingAttachmentsL(CCalEntry* entry);
+ /**
+ * Set the flag to ETrue if the attachment(Photo, audio and vedio files) is open.
+ *
+ * @param aEmbeddedFileOpened, set to ETrue when attachment(Photo, audio and vedio files) is Open
+ * @return None
+ */
+ IMPORT_C void AttachmentOpen(TBool& aEmbeddedFileOpened);
+
+ /**
+ * return ETrue if the atacchment is opened.
+ *
+ * @param None
+ * @return None
+ */
+ IMPORT_C TBool IsAttachmentOpen();
+
private:
/**
@@ -230,6 +246,7 @@
RApaLsSession iAppList;
TSize iIconSize;
TBool isAttachmentModelCleared; // Flag to tell if attachment model is reset. If yes, then only it will be populated again
+ TBool iEmbeddedFileOpened;
};
#endif // CALENATTACHMENTMODEL_H
--- a/calendarui/commonutils/src/calenattachmentmodel.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/commonutils/src/calenattachmentmodel.cpp Tue May 04 16:18:23 2010 +0100
@@ -95,6 +95,7 @@
{
TRACE_ENTRY_POINT;
isAttachmentModelCleared = ETrue;
+ iEmbeddedFileOpened = EFalse;
TRACE_EXIT_POINT;
}
@@ -612,8 +613,29 @@
}
}
- TRACE_EXIT_POINT;
-
+ TRACE_EXIT_POINT;
}
+// ----------------------------------------------------------------------------
+// CCalenAttachmentModel::AttachmentOpen
+// Set the flag if the attachment(Photo, audio and vedio files) is open.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C void CCalenAttachmentModel::AttachmentOpen(TBool& aEmbeddedFileOpened)
+ {
+ TRACE_ENTRY_POINT
+ iEmbeddedFileOpened = aEmbeddedFileOpened;
+ TRACE_EXIT_POINT
+ }
+// ----------------------------------------------------------------------------
+// CCalenAttachmentModel::IsAttachmentOpen
+// return True if the atacchment is opened.
+// ----------------------------------------------------------------------------
+//
+EXPORT_C TBool CCalenAttachmentModel::IsAttachmentOpen()
+ {
+ TRACE_ENTRY_POINT
+ TRACE_EXIT_POINT
+ return iEmbeddedFileOpened;
+ }
// End of file --Don't remove this.
--- a/calendarui/commonutils/src/calenentryutil.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/commonutils/src/calenentryutil.cpp Tue May 04 16:18:23 2010 +0100
@@ -1015,7 +1015,7 @@
if( aStartTime == CalenDateUtils::BeginningOfDay( aStartTime )
&& aStopTime == CalenDateUtils::BeginningOfDay( aStopTime )
- && aStartTime != aStopTime && differenceInTime.Int() == 1) // fix for AllDayEntry issue
+ && aStartTime != aStopTime && differenceInTime.Int() >= 1) // fix for AllDayEntry issue
{
allDayEvent = ETrue;
}
--- a/calendarui/commonutils/src/calenviewutils.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/commonutils/src/calenviewutils.cpp Tue May 04 16:18:23 2010 +0100
@@ -215,7 +215,7 @@
if( startLocalTime != stopLocalTime &&
startLocalTime == CalenDateUtils::BeginningOfDay( startLocalTime ) &&
stopLocalTime == CalenDateUtils::BeginningOfDay( stopLocalTime ) &&
- startLocalTime != stopLocalTime && differenceInTime.Int() == 1 ) // fix for AllDayEntry issue
+ startLocalTime != stopLocalTime && differenceInTime.Int() >= 1 ) // fix for AllDayEntry issue
{
allDayEvent = ETrue;
}
--- a/calendarui/controller/BWINS/calencontrolleru.def Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/BWINS/calencontrolleru.def Tue May 04 16:18:23 2010 +0100
@@ -17,7 +17,7 @@
?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@W4TCalenNotification@@@Z @ 16 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, enum TCalenNotification)
?CreateOutOfRangeIconsL@CCalenIcons@@QBEPAVCAknIconArray@@XZ @ 17 NONAME ; class CAknIconArray * CCalenIcons::CreateOutOfRangeIconsL(void) const
?CreateMonthViewIconsL@CCalenIcons@@QBEPAVCAknIconArray@@XZ @ 18 NONAME ; class CAknIconArray * CCalenIcons::CreateMonthViewIconsL(void) const
- ?GetIconL@CCalenIcons@@QBEPAVCGulIcon@@W4TCalenIcons@MCalenServices@@@Z @ 19 NONAME ; class CGulIcon * CCalenIcons::GetIconL(enum MCalenServices::TCalenIcons) const
+ ?GetIconL@CCalenIcons@@QBEPAVCGulIcon@@W4TCalenIcons@MCalenServices@@H@Z @ 19 NONAME ; class CGulIcon * CCalenIcons::GetIconL(enum MCalenServices::TCalenIcons, int) const
?CreateItemNotShownIconL@CCalenIcons@@QBEPAVCGulIcon@@XZ @ 20 NONAME ; class CGulIcon * CCalenIcons::CreateItemNotShownIconL(void) const
?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@AAV?$RArray@W4TCalenNotification@@@@@Z @ 21 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, class RArray<enum TCalenNotification> &)
?NewServicesL@CCalenController@@UAEPAVMCalenServices@@XZ @ 22 NONAME ; class MCalenServices * CCalenController::NewServicesL(void)
--- a/calendarui/controller/data/calencommonui.rss Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/data/calencommonui.rss Tue May 04 16:18:23 2010 +0100
@@ -934,7 +934,7 @@
MENU_ITEM
{
command = ECalenViewAttachmentCmdSave;
- txt = qtn_cale_opt_save_attachment;
+ txt = qtn_cale_stylus_popup_save;
//Single click
flags = EEikMenuItemSpecific;
},
@@ -946,7 +946,7 @@
MENU_ITEM
{
command = ECalenViewAttachmentCmdRemove;
- txt = qtn_cale_opt_remove_attachment;
+ txt = qtn_cale_stylus_popup_remove_attachment;
//Single click
flags = EEikMenuItemSpecific;
},
@@ -1113,5 +1113,47 @@
RESOURCE TBUF r_qtn_cale_tb_custom_view
{
buf = qtn_cale_opt_open;
- }
+ }
+
+// ---------------------------------------------------------
+// r_calen_multidb_editor_color_grid_dlg
+// Color selection dialog with customized "none" text.
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_calen_multidb_editor_color_grid_dlg
+ {
+ flags = EEikDialogFlagNotifyEsc |
+ EEikDialogFlagCbaButtons | EEikDialogFlagNoDrag |
+ EEikDialogFlagNoBorder;
+ buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
+ items=
+ {
+ DLG_LINE
+ {
+ type = EAknCtPopupHeadingPane;
+ id = EColourGridPopup;
+ control = AVKON_HEADING
+ {
+ label = qtn_select_colour_prompt;
+ headinglayout = R_AVKON_LIST_HEADING_PANE;
+ };
+ },
+ DLG_LINE
+ {
+ type = EAknCtColourSelectionGridDialog;
+ id = ECtrlGridType;
+ control = AVKON_COLOUR_SELECTION_GRID
+ {
+ nonetext = qtn_chat_set_colour_default;
+ gridcontrol = GRID
+ {
+ style = R_COLOUR_SEL_GRID_STYLE_NONE;
+ flags = EEikDlgItemTakesEnterKey;
+ height = 4;
+ width = 4 ;
+ };
+ };
+ }
+ };
+ }
// End of File
--- a/calendarui/controller/eabi/calencontrolleru.def Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/eabi/calencontrolleru.def Tue May 04 16:18:23 2010 +0100
@@ -20,7 +20,7 @@
_ZNK11CCalenIcons22CreateOutOfRangeIconsLEv @ 19 NONAME
_ZNK11CCalenIcons23CreateItemNotShownIconLEv @ 20 NONAME
_ZNK11CCalenIcons27CreateDayWeekToDoViewIconsLEv @ 21 NONAME
- _ZNK11CCalenIcons8GetIconLEN14MCalenServices11TCalenIconsE @ 22 NONAME
+ _ZNK11CCalenIcons8GetIconLEN14MCalenServices11TCalenIconsEi @ 22 NONAME
_ZTI11CCalenState @ 23 NONAME
_ZTI14CCalenActionUi @ 24 NONAME
_ZTI14CCalenMapState @ 25 NONAME
--- a/calendarui/controller/group/calencontroller.mmp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/group/calencontroller.mmp Tue May 04 16:18:23 2010 +0100
@@ -54,7 +54,6 @@
SOURCE calencmdlineparser.cpp
SOURCE calencmdlinelauncher.cpp
SOURCE calencontroller.cpp
-SOURCE calendbchangenotifier.cpp
SOURCE calendebug.cpp
SOURCE calendeleteui.cpp
SOURCE caleneditui.cpp
--- a/calendarui/controller/inc/calencontroller.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/inc/calencontroller.h Tue May 04 16:18:23 2010 +0100
@@ -254,7 +254,7 @@
* Get calendar icon of specific type
* @return CGulIcon*
*/
- CGulIcon* GetIconL(MCalenServices::TCalenIcons aIndex);
+ CGulIcon* GetIconL(MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 );
/* Get multipledb manager
* @return reference to CCalenMultipleDbManager
--- a/calendarui/controller/inc/calendbchangenotifier.h Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2006 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: Notifies observers of external changes to the calendar database
-*
-*/
-
-
-#ifndef __CALENDBCHANGENOTIFIER_H
-#define __CALENDBCHANGENOTIFIER_H
-
-// INCLUDES
-#include <e32base.h>
-
-#include <calchangecallback.h> //MCalChangeCallBack
-
-// FORWARD DECLARATIONS
-class CCalSession; //Calendar session
-class CCalenGlobalData; //Calendar global data
-
-// CLASS DECLARATION
-
-/**
-* Observer class for database changes. Forwards callback from
-* MCalChangeCallBack2
-*/
-class MCalenDBChangeObserver
- {
- public:
- virtual void HandleDBChangeL() = 0;
- };
-
-/**
-* CCalenDbChangeNotifier buffers notifications from MCalChangeCallBack2 and
-* only notifies its observers after a set period has elapsed. This prevents
-* Calendar views refreshing more often than necessary during a sync operation
-*/
-NONSHARABLE_CLASS(CCalenDbChangeNotifier) : public CActive,
- public MCalChangeCallBack2
- {
- public: // Constructors and destructor
- /**
- * Constructor.
- * @param aGlobalData global data reference
- * @return a pointer to the new CCalenDbChangeNotifier instance
- */
- static CCalenDbChangeNotifier* NewL( CCalenGlobalData& aGlobalData );
-
- /**
- * Destructor.
- */
- ~CCalenDbChangeNotifier();
-
- public:
- /**
- * Allow CCalenViews to register for database change notifications
- * @param aDBObserver Observer to register
- */
- void RegisterObserverL( MCalenDBChangeObserver& aDBObserver );
-
- /**
- * Allow CCalenViews to deregister for database change notifications
- * @param aDBObserver Observer to deregister
- */
- void DeRegisterObserverL( MCalenDBChangeObserver& aDBObserver );
-
- /**
- * Returns the time of the last call to MCalChangeCallBack2::CalChangeNotification
- * This is not necessarily the same time as the last notification issued by
- * this class
- * @return Time of the last database modification as TTime
- */
- TTime LastDBModificationTime() const;
-
- public:
- /**
- * From MCalChangeCallBack2
- * Called when the calendar database is changed through another
- * CCalSession
- * @param aChangeItems array of database items changed
- */
- void CalChangeNotification( RArray<TCalChangeEntry>& aChangeItems );
-
- private:
- /**
- * C++ default constructor.
- * @param aGlobalData global data reference
- */
- CCalenDbChangeNotifier( CCalenGlobalData& aGlobalData );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- * Performs any construction which may leave
- */
- void ConstructL();
-
- /**
- * From CActive
- * Called when outstanding asynchronous request completes
- * This will be called when iNotificationTimer either completes
- * or is cancelled
- */
- void RunL();
-
- /**
- * From CActive
- * Called by the active scheduler if RunL leaves
- * Ensures we are ready to receive the next database event
- * @param aError System wide error code
- */
- TInt RunError( TInt aError );
-
- /**
- * From CActive
- * Implements cancellation of outstanding asynchronous requests
- * Cancels iNotificationTimer if started
- */
- void DoCancel();
-
- private: // Data
- CCalenGlobalData& iGlobalData;
-
- //Database change observer filter
- CCalChangeNotificationFilter* iCalChangeFilter;
-
- //Observer array
- RPointerArray<MCalenDBChangeObserver> iDBObservers;
-
- //Timer to limit the amount of notifications issued by this class
- RTimer iNotificationTimer;
-
- //The time of the last received notification
- TTime iLastDbChangeNotification;
-
- //Flag to restart the timer after cancelling last tiemr request
- TBool iRestartTimer;
- };
-
-#endif // __CALENDBCHANGENOTIFIER_H
-
-// End of File
--- a/calendarui/controller/inc/calenicons.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/inc/calenicons.h Tue May 04 16:18:23 2010 +0100
@@ -94,7 +94,7 @@
* @param aIndex An index to the enum TCalenIcons
* @return a pointer to CGulIcon
*/
- IMPORT_C CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex) const;
+ IMPORT_C CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 ) const;
private:
/**
--- a/calendarui/controller/inc/calenmultidbeditor.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/inc/calenmultidbeditor.h Tue May 04 16:18:23 2010 +0100
@@ -23,11 +23,15 @@
// INCLUDES
#include <AknForm.h>
#include <gdi.h>
+#include <calennotificationhandler.h>
class CalenAppUi;
class CAknNavigationControlContainer;
class CCalenController;
class CCalCalendarInfo;
+class CCalenMultipleDbUi;
+class CCalenColourSelectionGrid;
+
/**
* Class defining Map icon picture, derived from CPicture
@@ -104,8 +108,9 @@
/**
* Two-phased constructor.
*/
- static CCalenMultiDBEditor* NewL( CCalCalendarInfo& aCalendarInfo,
- CCalenController& aController, TBool aEditFlag);
+ static CCalenMultiDBEditor* NewL(CCalenMultipleDbUi& aMultipleDbui,
+ CCalCalendarInfo& aCalendarInfo,
+ CCalenController& aController, TBool aEditFlag);
/**
* From Base class.
@@ -124,8 +129,9 @@
/**
* C++ constructor.
*/
- CCalenMultiDBEditor( CCalCalendarInfo& aCalendarInfo,
- CCalenController& aController, TBool aEditFlag);
+ CCalenMultiDBEditor(CCalenMultipleDbUi& aMultipleDbui,
+ CCalCalendarInfo& aCalendarInfo,
+ CCalenController& aController, TBool aEditFlag);
protected: // Functions from base classes
@@ -159,9 +165,12 @@
*/
void ReadDataFromFormL( TBool aContinueOnError );
-
+ void HandleDialogPageEventL( TInt aEventID );
- void HandleDialogPageEventL( TInt aEventID );
+ /*
+ * from CAknDialog
+ */
+ void FocusChanged(TDrawNow aDrawNow);
private:
@@ -234,6 +243,11 @@
*/
void SetVisiblityFieldL( TBool aStatusVal );
+ /*
+ * Load colors for grid
+ */
+ void LoadColorsL();
+
/**
* setup title pane for the status pane
* @return void
@@ -271,13 +285,18 @@
CCalenController& iController;
TInt iColVal; // Color id
TBool iCalendarStatus;
- TRgb iColors;
CDbColorPicture* iPicture;
TBool iEditFlag;
CAknNavigationControlContainer* iNaviContainer;
//Sync field, EFalse then Sync off else Sync On
TBool iSyncStatus;
TCalendarConflicts iConflict;
+
+ CCalenMultipleDbUi& iMultipleDbUi;
+
+ CArrayFixFlat<TRgb>* iRgbColors;
+ TBool iNoneChoosen;
+ TRgb iChoosenColor;
};
#endif // CALENMULTIDBEDITOR_H
--- a/calendarui/controller/inc/calenmultipledbui.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/inc/calenmultipledbui.h Tue May 04 16:18:23 2010 +0100
@@ -245,10 +245,23 @@
CCalCalendarInfo& aCalendarInfoModified);
/*
- * Async exit for the dialog
+ * Callback for CAsyncCallBack class
+ * @param aThisPtr* this pointer.
+ * @return TInt status.
*/
- static TInt DoAsyncExit(TAny* aPtr);
+ static TInt AsyncCallBackL(TAny* aThisPtr);
+
+ /*
+ * Async method to handle all async commnds
+ * @param aCommand Async command
+ */
+ void HandleAsyncCommandL(const TInt aCommand);
+ /*
+ * Async method to handle all async commnds
+ * @param aCommand Async command
+ */
+ void DoAsyncActionL(const TInt aCommand);
/*
* @brief Creates button for the toolbar.
@@ -275,6 +288,12 @@
* Refocus the items in list when delete action happened.
*/
void ReAdjustListItemFocusL(const TInt aCurrentIndex);
+
+ /**
+ * From CCoeControl Gets help context
+ * @param aContext Help context
+ */
+ void GetHelpContext(TCoeHelpContext& aContext) const;
public: // from MCalenNotificationHandler
/**
@@ -292,7 +311,21 @@
* may be obtained by accessing the list box itself.
*/
void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
+
+public:
+
+ /*
+ * Updates after add/edit had been performed.
+ * Called from editor before exiting the dialog.
+ * @param aItemAdded ETure if add else edit.
+ */
+ void UpdateOnAddOrEditL(TBool aItemAdded);
+
+ /*
+ * Exit the dialog;
+ */
+ void ExitDialogL();
+
private:
CCalenMultipleDbListbox* iListBox;
CAknsBasicBackgroundControlContext* iBgContext; //Owns
@@ -300,16 +333,20 @@
CCalenController& iController;
CDesCArrayFlat* iDesArray; //Owns
TRect iRect;
- TBool iFirstTap;
- TBool iDialogLaunched;
RArray<MCalenServices::TCalenIcons> iIconIndices;
CAknIconArray* iIconList;
RArray<TInt32> iColorUidArray;
- CAsyncCallBack* iAsyncExit;
- TInt iAsyncExitCmd;
CCalenMultiDBEditor* iDbEditor;//Not not owned
TBool iConflictOccured;
TBool iIsDbEditorOpen ;
+
+ CCalCalendarInfo* iCalendarInfoNew;
+ CCalCalendarInfo* iCalendarInfoOriginal;
+ CCalCalendarInfo* iCalendarInfoEdited;
+
+ CAsyncCallBack* iAsyncAction;
+ TInt iAsyncActionCmd;
+ TInt iCurrentIndex;
};
--- a/calendarui/controller/inc/calennotifier.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/inc/calennotifier.h Tue May 04 16:18:23 2010 +0100
@@ -34,7 +34,6 @@
// FORWARD DECLARATIONS
class CCalenGlobalData; // Calendar global data singleton
class CEnvironmentChangeNotifier; // Receive system event notifications
-class CCalenDbChangeNotifier; // Receive database change notifications
class CCalenEComWatcher; // Receives Ecom registry change notifications
class CCalenSetting; // Calendar settings
class CCalenController;
@@ -251,7 +250,6 @@
RArray<TCalenNotification> iBroadcastQueue;
TBool iBroadcastActive;
- CCalenDbChangeNotifier* iDbChangeNotifier;
CCalenSetting* iSetting;
TBool iIsSettingsBroadcastDeferred;
TBool iSettingsNeedsBroadcast;
--- a/calendarui/controller/inc/calenservicesimpl.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/inc/calenservicesimpl.h Tue May 04 16:18:23 2010 +0100
@@ -117,7 +117,7 @@
* Get calendar icon of specific type
* @return CGulIcon*
*/
- CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex );
+ CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 );
/**
* Register for notifications of Calendar events
--- a/calendarui/controller/inc/calentoolbarimpl.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/inc/calentoolbarimpl.h Tue May 04 16:18:23 2010 +0100
@@ -140,6 +140,11 @@
*/
void ResetToolbarExtensionCommandsL();
+ inline TBool IsICalenToolBar()
+ {
+ return iCalenToolbar ? ETrue : EFalse;
+ }
+
private:
/**
--- a/calendarui/controller/inc/calenviewattachmentsdialog.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/inc/calenviewattachmentsdialog.h Tue May 04 16:18:23 2010 +0100
@@ -370,6 +370,7 @@
CCalenController& iController;
CDocumentHandler* iDocHandler;
const TDesC& iNewTitle;
+ TBool iEmbeddedFileOpened;
// Internal status flags
--- a/calendarui/controller/src/calenalarmmanager.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenalarmmanager.cpp Tue May 04 16:18:23 2010 +0100
@@ -46,6 +46,7 @@
#include "calensetting.h"
#include "calencontextfwlistener.h"
#include "CleanupResetAndDestroy.h"
+#include "CalenAttachmentModel.h"
static const TUint32 KMaxMissedAlarms = 10;
@@ -178,6 +179,7 @@
break;
case ECalenMissedAlarmsViewFromIdle:
{
+ RemoveAllViewedEventsL();
iViewManager.StartActiveStepL();
}
break;
@@ -189,9 +191,13 @@
break;
case ECalenEventViewFromAlarm:
{
- LaunchEventViewerL();
- iViewManager.SetRepopulation(EFalse);
- iController.ViewManager().RequestActivationL( KUidCalenEventView, KUidCalenShowAlarmCba );
+ TBool attachmentOpened = iController.Services().GetAttachmentData()->IsAttachmentOpen();
+ if(!attachmentOpened)
+ {
+ LaunchEventViewerL();
+ iViewManager.SetRepopulation(EFalse);
+ iController.ViewManager().RequestActivationL( KUidCalenEventView, KUidCalenShowAlarmCba );
+ }
}
break;
case ECalenEventViewFromAlarmStopOnly:
@@ -572,11 +578,8 @@
TInt missedAlarmEntryUid = context.InstanceId().iEntryLocalUid;
TCalCollectionId colid = context.InstanceId().iColId;
// clear missed alarm from cenrep
- if( EFalse == ClearOneMissedAlarmL( missedAlarmEntryUid, colid ) )
- {
- TRACE_EXIT_POINT;
- return;
- }
+
+ ClearOneMissedAlarmL( missedAlarmEntryUid, colid );
for(TInt index = 0;index < iMissedAlarmList.Count();index++)
{
if( ( missedAlarmEntryUid == iMissedAlarmList[index].iEntryLocalUid ) &&
@@ -677,8 +680,9 @@
TCalenInstanceId id = TCalenInstanceId::CreateL( *entry, inscaltime );
id.iColId = session.CollectionIdL();
context.SetInstanceIdL( id, context.ViewId() );
- CleanupStack::PopAndDestroy( entry );
- iMissedAlarmStore->RemoveL(*aMissedAlarmArray[0]);
+ CleanupStack::PopAndDestroy( entry );
+ iMissedAlarmList.Remove(0); //Clear the alarm list
+ iMissedAlarmStore->RemoveL(*aMissedAlarmArray[0]);
CleanupStack::PopAndDestroy(); // aMissedAlarmArray
iViewManager.StartActiveStepL();
@@ -862,10 +866,12 @@
// get the context
MCalenContext &context = iController.Services().Context();
TInt missedAlarmEntryUid = context.InstanceId().iEntryLocalUid;
+ TCalCollectionId colid = context.InstanceId().iColId;
for(TInt index = 0;index < iMissedAlarmList.Count();index++)
{
- if(missedAlarmEntryUid == iMissedAlarmList[index].iEntryLocalUid )
+ if((missedAlarmEntryUid == iMissedAlarmList[index].iEntryLocalUid ) &&
+ (colid == iMissedAlarmList[index].iColId))
{
// mark the missed alarm event as viewed
iMissedAlarmList[index].iInstanceViewed = 1;
@@ -889,6 +895,7 @@
{
if(iMissedAlarmList[index].iInstanceViewed)
{
+ ClearOneMissedAlarmL( iMissedAlarmList[index].iEntryLocalUid, iMissedAlarmList[index].iColId );
iMissedAlarmList.Remove(index);
}
else
@@ -987,8 +994,7 @@
TRACE_ENTRY_POINT;
// get the context
MCalenContext &context = iController.Services().Context();
- TInt deletedEntryUid = context.InstanceId().iEntryLocalUid;
-
+ TInt deletedEntryUid = context.InstanceId().iEntryLocalUid;
TCalCollectionId colidFromContext = context.InstanceId().iColId;
if( EFalse == ClearOneMissedAlarmL( deletedEntryUid, colidFromContext ) )
--- a/calendarui/controller/src/calenattachmentui.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenattachmentui.cpp Tue May 04 16:18:23 2010 +0100
@@ -745,7 +745,8 @@
// Hide the toolbar before we display settings menu
MCalenToolbar* toolbar = iController.Services().ToolbarOrNull();
- if(toolbar&&toolbar->IsVisible())
+
+ if(toolbar&&toolbar->IsVisible()&& !iController.IsEditorActive())
{
toolbar->SetToolbarVisibilityL(EFalse);
iShowToolbar = ETrue;
--- a/calendarui/controller/src/calenbackgroundstate.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenbackgroundstate.cpp Tue May 04 16:18:23 2010 +0100
@@ -136,7 +136,8 @@
|| iPreviousState == CCalenStateMachine::ECalenEditingState
|| iPreviousState == CCalenStateMachine::ECalenSendingState
|| iPreviousState == CCalenStateMachine::ECalenIdleState
- || iPreviousState == CCalenStateMachine::ECalenViewingState)
+ || iPreviousState == CCalenStateMachine::ECalenViewingState
+ || iPreviousState == CCalenStateMachine::ECalenAttachmentState)
{
SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
ActivateCurrentStateL(aStateMachine);
--- a/calendarui/controller/src/calencmdlinelauncher.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calencmdlinelauncher.cpp Tue May 04 16:18:23 2010 +0100
@@ -27,6 +27,7 @@
#include <caleninstanceid.h> // TCalenInstanceId
#include <calenactionuiutils.h>
#include <aknappui.h>
+#include <AknDlgShut.h>
#include "calenviewmanager.h"
#include "calencmdlinelauncher.h"
#include "calencontroller.h" // CCalenController
@@ -146,7 +147,7 @@
// using the same 'try and save whatever we can' logic that is used on a forced close
// and then open the new editor. We also have to prevent the focus state being updated
// and highlighting the old entry in the day view.
- while( AppUi().IsDisplayingDialog() )
+ if( AppUi().IsDisplayingDialog() )
{
iIsExitOnDlgClose = EFalse;
// Tell the editui that whatever it was doing, it should not alter
@@ -155,31 +156,31 @@
// Send a key event to the currently open dialog (viewer / editor)
// to dismiss it
- TKeyEvent key;
+ /*TKeyEvent key;
key.iRepeats = 0;
key.iCode = EKeyEscape;
key.iModifiers = 0;
- CCoeEnv::Static()->SimulateKeyEventL( key, EEventKey );
-
+ 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() )
+ /*if( iGlobalData->CalenSendL().IsMessagingEditorOpen() )
{
break;
- }
+ }*/
}
// Interpret 8bit data as 16bit unicode data
//lint -e{826} Disable the lint warning of the pointer sizes being different
- const TText* buf = reinterpret_cast<const TText*>(aTail.Ptr());
+ const TText* buf = reinterpret_cast<const TText*> (aTail.Ptr());
TPtrC ptr(buf, aTail.Length() / (TInt) sizeof(TText));
// create cmd line parser
CCalenCmdLineParser* parser = CCalenCmdLineParser::NewL();
- CleanupStack::PushL( parser );
+ CleanupStack::PushL(parser);
// parse parameters
- parser->ParseCommandLineL( ptr );
+ parser->ParseCommandLineL(ptr);
iCmdParameters = parser->CommandLineParameters();
CleanupStack::PopAndDestroy(); // parser
}
@@ -507,6 +508,12 @@
}
}
}
+ else if(iIsExitOnDlgClose && (aNotification == ECalenNotifyDialogClosed) )
+ {
+ //dont do any thing
+ //This scenario hits, when the application launched from device search application,
+ //User issued a "Cancel" command while adding attachment.
+ }
else if(aNotification == ECalenNotifyEntryClosed)
{
// Exit when Escape pressed in Eventview
--- a/calendarui/controller/src/calencontroller.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calencontroller.cpp Tue May 04 16:18:23 2010 +0100
@@ -163,7 +163,7 @@
iNotifier = new( ELeave )CCalenNotifier( *this );
// Get an instance of the global data
- iGlobalData = CCalenGlobalData::NewL( *iNotifier, iNotifier );
+ iGlobalData = CCalenGlobalData::NewL( *iNotifier, iNotifier, iNotifier );
iGlobalData->InitializeGlobalDataL();
RArray<TCalenNotification> notificationArray;
@@ -982,7 +982,7 @@
// Get icon of specific type
// ----------------------------------------------------------------------------
//
-CGulIcon* CCalenController::GetIconL( MCalenServices::TCalenIcons aIndex )
+CGulIcon* CCalenController::GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId )
{
TRACE_ENTRY_POINT;
@@ -993,7 +993,7 @@
}
TRACE_EXIT_POINT;
- return iViewManager->IconsL().GetIconL(aIndex);
+ return iViewManager->IconsL().GetIconL(aIndex,aViewId);
}
// ----------------------------------------------------------------------------
--- a/calendarui/controller/src/calendbchangenotifier.cpp Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,287 +0,0 @@
-/*
-* Copyright (c) 2006 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: Notifies observers of external changes to the calendar database
-*
-*/
-
-
-
-//debug
-#include "calendarui_debug.h"
-
-// INCLUDE FILES
-#include "calendbchangenotifier.h" // CCalenDbChangeNotifier
-#include "calenglobaldata.h" // Calendar global data
-#include <calsession.h> // CalSession
-
-// -----------------------------------------------------------------------------
-// KTimerResolution limits the number of notifications sent to registered
-// MCalenDBChangeObserver instances. Notifications may come from
-// MCalChangeCallBack2 at a very high rate which could impact performance,
-// for example by causing constant view refreshes.
-// CCalenDbChangeNotifier notifies observers when KTimerResolution has elapsed
-// since the last notification was received from MCalChangeCallBack2
-// -----------------------------------------------------------------------------
-const TInt KTimerResolution = 1000000; // 1 Second
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::CCalenDbChangeNotifier
-// C++ default constructor can NOT contain any code, that might leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CCalenDbChangeNotifier::CCalenDbChangeNotifier( CCalenGlobalData& aGlobalData )
- : CActive( EPriorityNormal ),
- iGlobalData( aGlobalData )
- {
- TRACE_ENTRY_POINT;
-
- iRestartTimer = EFalse;
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::NewL
-// Two-phased constructor.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CCalenDbChangeNotifier* CCalenDbChangeNotifier::NewL( CCalenGlobalData& aGlobalData )
- {
- TRACE_ENTRY_POINT;
-
- CCalenDbChangeNotifier* self = new( ELeave ) CCalenDbChangeNotifier( aGlobalData );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- TRACE_EXIT_POINT;
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::ConstructL
-// Symbian 2nd phase constructor can leave.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CCalenDbChangeNotifier::ConstructL()
- {
- TRACE_ENTRY_POINT;
-
- // We want to receive notifications for the full agenda date range
- TCalTime start, end;
- start.SetTimeUtcL( TCalTime::MinTime() );
- end.SetTimeUtcL( TCalTime::MaxTime() );
- CalCommon::TCalTimeRange range( start, end );
-
- // Create a notification filter
- iCalChangeFilter = CCalChangeNotificationFilter::NewL(
- MCalChangeCallBack2::EChangeEntryAll,
- ETrue,
- range );
-
- // Enable database change notifications on current global data session
- iGlobalData.CalSessionL().StartChangeNotification( *this, *iCalChangeFilter );
-
- // Create a timer to limit the number of notifications broadcast
- iNotificationTimer.CreateLocal();
-
- // Active object, add to active scheduler
- CActiveScheduler::Add( this );
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::~CCalenDbChangeNotifier
-// Destructor
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-CCalenDbChangeNotifier::~CCalenDbChangeNotifier()
- {
- TRACE_ENTRY_POINT;
-
- Cancel();
- // Reset the observer array. Array contents are NOT owned by this class
- iDBObservers.Reset();
-
- iNotificationTimer.Close();
-
- // Disable database change notifications on current global data session
- PIM_TRAPD_HANDLE( iGlobalData.CalSessionL().StopChangeNotification() );
-
- // Destroy the notification filter
- delete iCalChangeFilter;
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::LastDBModificationTime
-// Returns the time of the last database change notification. This may not be
-// the time of the last notification sent to MCalenDBChangeObservers.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TTime CCalenDbChangeNotifier::LastDBModificationTime() const
- {
- TRACE_ENTRY_POINT;
-
- TRACE_EXIT_POINT;
- return iLastDbChangeNotification;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::CalChangeNotification
-// Called when a change to the agenda database occurs from a different session
-// to the one we are currently using.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CCalenDbChangeNotifier::CalChangeNotification( RArray<TCalChangeEntry>& /*aChangeItems*/ )
- {
- TRACE_ENTRY_POINT;
-
- // Always update the last notification time, even if we don't notify
- // our observers
- iLastDbChangeNotification.UniversalTime();
- if( !IsActive() )
- {
- iNotificationTimer.After( iStatus, KTimerResolution );
- SetActive();
- }
- else
- {
- iRestartTimer = ETrue;
- iNotificationTimer.Cancel();
- }
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::RegisterObserverL
-// Adds the passed observer to the observer array. All observers in the array
-// will be notified of changes to the agenda database.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
- void CCalenDbChangeNotifier::RegisterObserverL( MCalenDBChangeObserver& aDBObserver )
- {
- TRACE_ENTRY_POINT;
-
- iDBObservers.Append( &aDBObserver );
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::DeRegisterObserverL
-// Removes the passed observer to the observer array. All observers in the array
-// will be notified of changes to the agenda database.
-// -----------------------------------------------------------------------------
-void CCalenDbChangeNotifier::DeRegisterObserverL( MCalenDBChangeObserver& aDBObserver )
- {
- TRACE_ENTRY_POINT;
-
- for( TInt x = 0; x < iDBObservers.Count(); ++x )
- {
- if( iDBObservers[x] == &aDBObserver )
- {
- iDBObservers.Remove( x );
- return;
- }
- }
- User::Leave( KErrNotFound );
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::RunL
-// From CActive::RunL
-// Called when notification timer expires
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CCalenDbChangeNotifier::RunL()
- {
- TRACE_ENTRY_POINT;
-
- switch( iStatus.Int() )
- {
- case KErrCancel:
- {
- // The normal reason for the timer being cancelled is another
- // database change. Restart the timer.
- if( iRestartTimer )
- {
- iRestartTimer = EFalse;
- iNotificationTimer.After( iStatus, KTimerResolution );
- SetActive();
- }
- }
- break;
-
- case KErrNone:
- {
- //Timer completion, notify observers
- for( TInt x = 0; x < iDBObservers.Count(); ++x )
- {
- iDBObservers[x]->HandleDBChangeL();
- }
- }
- break;
-
- default:
- {
- User::Leave( KErrArgument );
- }
- break;
- }
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::RunError
-// From CActive::RunError
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt CCalenDbChangeNotifier::RunError( TInt aError )
- {
- TRACE_ENTRY_POINT;
-
- //RunL leaving means that the view could not be refreshed.
- //Theres not much we can do except be ready for the next database event.
- iRestartTimer = EFalse;
-
- TRACE_EXIT_POINT;
- return aError;
- }
-
-// -----------------------------------------------------------------------------
-// CCalenDbChangeNotifier::DoCancel
-// From CActive::DoCancel
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CCalenDbChangeNotifier::DoCancel()
- {
- TRACE_ENTRY_POINT;
-
- // Stop the notification timer
- iRestartTimer = EFalse;
- iNotificationTimer.Cancel();
-
- TRACE_EXIT_POINT;
- }
-
-// End of File
--- a/calendarui/controller/src/calendeleteui.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calendeleteui.cpp Tue May 04 16:18:23 2010 +0100
@@ -39,6 +39,9 @@
#include <caleninstanceid.h> // TCalenInstanceId
#include <calenactionuiutils.h>
#include <calcalendarinfo.h>
+#include <calentoolbar.h>
+#include <akntoolbar.h>
+#include <CalenAttachmentModel.h>
#include "calendarui_debug.h" // Debug
#include "calendeleteui.h"
@@ -379,6 +382,14 @@
{
MarkedEntriesDeletedL();
}
+ MCalenToolbar* toolbarImpl = iController.Services().ToolbarOrNull();
+ if (toolbarImpl)
+ {
+ CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+ // dim clear and clear all toolbar buttons
+ toolbar.SetItemDimmed(ECalenNewMeeting, EFalse, ETrue);
+ }
}
else
{
@@ -576,13 +587,13 @@
//
void CCalenDeleteUi::HandleDeleteMultipleEventsL( const TTime& aFirstDay,
const TTime& aLastDay,
- TInt aConfNoteId )
+ TInt /*aConfNoteId */)
{
TRACE_ENTRY_POINT;
ASSERT( !iWaitDialog );
ASSERT( !iIsDeleting );
- iConfirmationNoteId = aConfNoteId;
+ //iConfirmationNoteId = aConfNoteId;
iWaitDialog = new( ELeave ) CAknWaitDialog( REINTERPRET_CAST( CEikDialog**,
&iWaitDialog ) );
@@ -680,10 +691,10 @@
if( aFirstPassError == KErrNone )
{
// Show confirmation note
- HBufC* buf = StringLoader::LoadLC( iConfirmationNoteId, iEikEnv );
- CAknConfirmationNote* dialog = new( ELeave ) CAknConfirmationNote();
- dialog->ExecuteLD(*buf);
- CleanupStack::PopAndDestroy( buf );
+// HBufC* buf = StringLoader::LoadLC( iConfirmationNoteId, iEikEnv );
+// CAknConfirmationNote* dialog = new( ELeave ) CAknConfirmationNote();
+// dialog->ExecuteLD(*buf);
+// CleanupStack::PopAndDestroy( buf );
}
else
{
@@ -881,6 +892,12 @@
if( doDelete )
{
+ //Before deleteing the entry reset the attachment model
+ if(iController.Services().GetAttachmentData()->NumberOfItems())
+ {
+ iController.Services().GetAttachmentData()->Reset();
+ }
+
if( !TryDeleteWithMrUtilsL( aInstance, aRepeatType ) )
{
if( !child || aRepeatType == CalCommon::EThisOnly )
--- a/calendarui/controller/src/caleneditui.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/caleneditui.cpp Tue May 04 16:18:23 2010 +0100
@@ -152,7 +152,14 @@
TUid currentView = iController.ViewManager().CurrentView();
if( KUidCalenTodoView == currentView )
{
- // Open NewEntry as "To-Do", if editor is launched from To-Do view.
+ // Open NewEntry as "To-Do", if editor is launched from To-Do view.
+ MCalenContext& context = iController.Services().Context();
+ // Set the date on the context to today.
+ TTime homeTime;
+ homeTime.HomeTime();
+ TCalTime today;
+ today.SetTimeLocalL( homeTime );
+ context.SetFocusDateL( today, TVwsViewId( KUidCalendar, KUidCalenTodoView ) );
EditNewEntryL( CCalEntry::ETodo );
}
else
--- a/calendarui/controller/src/calenicons.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenicons.cpp Tue May 04 16:18:23 2010 +0100
@@ -20,6 +20,7 @@
#include "calenicons.h"
#include "calendar.hrh"
+#include <CalenUid.h>
#include <aknconsts.h>
#include <data_caging_path_literals.hrh>
#include <AknIconArray.h>
@@ -309,7 +310,7 @@
// (other items were commented in a header).
// ---------------------------------------------------------
//
-EXPORT_C CGulIcon* CCalenIcons::GetIconL( MCalenServices::TCalenIcons aIndex ) const
+EXPORT_C CGulIcon* CCalenIcons::GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId ) const
{
TRACE_ENTRY_POINT;
CGulIcon* icon;
@@ -318,6 +319,7 @@
// When Avkon suplies some method to do that, change these
TAknsItemID colorGroup = KAknsIIDQsnIconColors;
TInt colorIndex = EAknsCIQsnIconColorsCG19;
+ TInt colorIndexToDo = EAknsCIQsnIconColorsCG13;
TRgb nonSkinColor = AKN_LAF_COLOR(215);
CFbsBitmap* bitmap = NULL;
CFbsBitmap* mask = NULL;
@@ -370,79 +372,188 @@
break;
case MCalenServices::ECalenAlarmIcon:
{
- AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
- KAknsIIDQgnIndiAlarmAdd,
- colorGroup,
- colorIndex,
- bitmap, mask,
- AknIconUtils::AvkonIconFileName(),
- EMbmAvkonQgn_indi_alarm_add,
- EMbmAvkonQgn_indi_alarm_add_mask,
- nonSkinColor);
- icon = CGulIcon::NewL( bitmap, mask );
- CleanupStack::Pop( 2 ); // bitmap, mask
+ if(aViewId == KCalenTodoViewUidValue ||
+ aViewId == KCalenEventViewUidValue ||
+ aViewId == KCalenMissedAlarmsViewUidValue ||
+ aViewId == KCalenMissedEventViewUidValue )
+ {
+ AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiAlarmAdd,
+ colorGroup,
+ colorIndexToDo,
+ bitmap, mask,
+ AknIconUtils::AvkonIconFileName(),
+ EMbmAvkonQgn_indi_alarm_add,
+ EMbmAvkonQgn_indi_alarm_add_mask,
+ nonSkinColor);
+ icon = CGulIcon::NewL( bitmap, mask );
+ CleanupStack::Pop( 2 ); // bitmap, mask
+ break;
+ }
+ else
+ {
+ AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiAlarmAdd,
+ colorGroup,
+ colorIndex,
+ bitmap, mask,
+ AknIconUtils::AvkonIconFileName(),
+ EMbmAvkonQgn_indi_alarm_add,
+ EMbmAvkonQgn_indi_alarm_add_mask,
+ nonSkinColor);
+ icon = CGulIcon::NewL( bitmap, mask );
+ CleanupStack::Pop( 2 ); // bitmap, mask
+ break;
+ }
}
- break;
+
case MCalenServices::ECalenRepeatIcon:
{
- AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
- KAknsIIDQgnIndiRepeatAdd,
- colorGroup,
- colorIndex,
- bitmap, mask,
- iIconFile,
- EMbmCalendarQgn_indi_repeat_add,
- EMbmCalendarQgn_indi_repeat_add_mask,
- nonSkinColor);
- icon = CGulIcon::NewL(bitmap, mask);
- CleanupStack::Pop( 2 );
+ if(aViewId == KCalenTodoViewUidValue ||
+ aViewId == KCalenEventViewUidValue ||
+ aViewId == KCalenMissedAlarmsViewUidValue ||
+ aViewId == KCalenMissedEventViewUidValue )
+ {
+ AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiRepeatAdd,
+ colorGroup,
+ colorIndexToDo,
+ bitmap, mask,
+ iIconFile,
+ EMbmCalendarQgn_indi_repeat_add,
+ EMbmCalendarQgn_indi_repeat_add_mask,
+ nonSkinColor);
+ icon = CGulIcon::NewL(bitmap, mask);
+ CleanupStack::Pop( 2 );
+ break;
+ }
+ else
+ {
+ AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiRepeatAdd,
+ colorGroup,
+ colorIndex,
+ bitmap, mask,
+ iIconFile,
+ EMbmCalendarQgn_indi_repeat_add,
+ EMbmCalendarQgn_indi_repeat_add_mask,
+ nonSkinColor);
+ icon = CGulIcon::NewL(bitmap, mask);
+ CleanupStack::Pop( 2 );
+ break;
+ }
}
- break;
+
case MCalenServices::ECalenRepeatExceptionIcon:
{
- AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
- KAknsIIDQgnIndiRepeatExceptionAdd,
- colorGroup,
- colorIndex,
- bitmap, mask,
- iIconFile,
- EMbmCalendarQgn_indi_repeat_exception_add,
- EMbmCalendarQgn_indi_repeat_exception_add_mask,
- nonSkinColor);
- icon = CGulIcon::NewL(bitmap, mask);
- CleanupStack::Pop(2); // bitmap, mask;
+ if(aViewId == KCalenTodoViewUidValue ||
+ aViewId == KCalenEventViewUidValue ||
+ aViewId == KCalenMissedAlarmsViewUidValue ||
+ aViewId == KCalenMissedEventViewUidValue )
+ {
+ AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiRepeatExceptionAdd,
+ colorGroup,
+ colorIndexToDo,
+ bitmap, mask,
+ iIconFile,
+ EMbmCalendarQgn_indi_repeat_exception_add,
+ EMbmCalendarQgn_indi_repeat_exception_add_mask,
+ nonSkinColor);
+ icon = CGulIcon::NewL(bitmap, mask);
+ CleanupStack::Pop(2); // bitmap, mask;
+ break;
+ }
+ else
+ {
+ AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiRepeatExceptionAdd,
+ colorGroup,
+ colorIndex,
+ bitmap, mask,
+ iIconFile,
+ EMbmCalendarQgn_indi_repeat_exception_add,
+ EMbmCalendarQgn_indi_repeat_exception_add_mask,
+ nonSkinColor);
+ icon = CGulIcon::NewL(bitmap, mask);
+ CleanupStack::Pop(2); // bitmap, mask;
+ break;
+ }
+
}
- break;
case MCalenServices::ECalenNotePriorityLow:
{
- AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
- KAknsIIDQgnIndiTodoLowAdd,
- colorGroup,
- colorIndex,
- bitmap, mask,
- iIconFile,
- EMbmCalendarQgn_indi_todo_low_add,
- EMbmCalendarQgn_indi_todo_low_add_mask,
- nonSkinColor);
- icon = CGulIcon::NewL(bitmap, mask);
- CleanupStack::Pop(2); // bitmap, mask;
+ if(aViewId == KCalenTodoViewUidValue ||
+ aViewId == KCalenEventViewUidValue ||
+ aViewId == KCalenMissedAlarmsViewUidValue ||
+ aViewId == KCalenMissedEventViewUidValue )
+ {
+ AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiTodoLowAdd,
+ colorGroup,
+ colorIndexToDo,
+ bitmap, mask,
+ iIconFile,
+ EMbmCalendarQgn_indi_todo_low_add,
+ EMbmCalendarQgn_indi_todo_low_add_mask,
+ nonSkinColor);
+ icon = CGulIcon::NewL(bitmap, mask);
+ CleanupStack::Pop(2); // bitmap, mask;
+ break;
+ }
+ else
+ {
+ AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiTodoLowAdd,
+ colorGroup,
+ colorIndex,
+ bitmap, mask,
+ iIconFile,
+ EMbmCalendarQgn_indi_todo_low_add,
+ EMbmCalendarQgn_indi_todo_low_add_mask,
+ nonSkinColor);
+ icon = CGulIcon::NewL(bitmap, mask);
+ CleanupStack::Pop(2); // bitmap, mask;
+ break;
+ }
}
- break;
+
case MCalenServices::ECalenNotePriorityHigh:
{
- AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
- KAknsIIDQgnIndiTodoHighAdd,
- colorGroup,
- colorIndex,
- bitmap, mask,
- iIconFile,
- EMbmCalendarQgn_indi_todo_high_add,
- EMbmCalendarQgn_indi_todo_high_add_mask,
- nonSkinColor );
- icon = CGulIcon::NewL(bitmap, mask);
- CleanupStack::Pop(2); // bitmap, mask;
+ if(aViewId == KCalenTodoViewUidValue ||
+ aViewId == KCalenEventViewUidValue ||
+ aViewId == KCalenMissedAlarmsViewUidValue ||
+ aViewId == KCalenMissedEventViewUidValue )
+ {
+ AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiTodoHighAdd,
+ colorGroup,
+ colorIndexToDo,
+ bitmap, mask,
+ iIconFile,
+ EMbmCalendarQgn_indi_todo_high_add,
+ EMbmCalendarQgn_indi_todo_high_add_mask,
+ nonSkinColor );
+ icon = CGulIcon::NewL(bitmap, mask);
+ CleanupStack::Pop(2); // bitmap, mask;
+ break;
+ }
+ else
+ {
+ AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiTodoHighAdd,
+ colorGroup,
+ colorIndex,
+ bitmap, mask,
+ iIconFile,
+ EMbmCalendarQgn_indi_todo_high_add,
+ EMbmCalendarQgn_indi_todo_high_add_mask,
+ nonSkinColor );
+ icon = CGulIcon::NewL(bitmap, mask);
+ CleanupStack::Pop(2); // bitmap, mask;
+ break;
+ }
}
- break;
case MCalenServices::ECalenTodoIconUndone:
{
icon = CreateBitmapSkinnedIconL( KAknsIIDQgnPropTodoUndone,
--- a/calendarui/controller/src/calenmapstate.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenmapstate.cpp Tue May 04 16:18:23 2010 +0100
@@ -95,24 +95,8 @@
switch( cmd )
{
case ECalenFasterAppExit:
- {
- // Issue map launch cancel notification
- iController.BroadcastNotification(ECalenNotifyCancelMapLaunch);
- SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
- ActivateCurrentStateL(aStateMachine);
- cmdUsed = ETrue;
- break;
- }
- case ECalenMissedEventViewFromIdle:
- {
- // Issue map launch cancel notification
- iController.BroadcastNotification(ECalenNotifyCancelMapLaunch);
- SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
- ActivateCurrentStateL(aStateMachine);
- cmdUsed = ETrue;
- break;
- }
-
+ case ECalenDayView:
+ case ECalenMissedEventViewFromIdle:
case ECalenEventViewFromAlarm:
case ECalenEventViewFromAlarmStopOnly:
{
--- a/calendarui/controller/src/calenmultidbeditor.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenmultidbeditor.cpp Tue May 04 16:18:23 2010 +0100
@@ -29,12 +29,14 @@
#include <hlplch.h>
#include <calcalendarinfo.h>
#include <Calendar.rsg>
+#include <calencommonui.rsg>
#include "calenmultidbeditor.h"
#include "calendarui_debug.h"
#include "calendar.hrh"
#include "calentitlepane.h"
#include "calencontroller.h"
+#include "calenmultipledbui.h"
// Constants.
const TUint16 KIllegalChars[] = {
@@ -55,7 +57,6 @@
0, // Array terminator
};
const TInt KCalenMaxELAFTextEditorLength(256);
-const TInt KCalenColorPalletteStartColor(35);
const TInt KOne( 1 );
const TInt KBuffLength ( 16 );
const TInt KTen( 10 );
@@ -71,16 +72,17 @@
// Two-phased constructor.
// ----------------------------------------------------------------------------
//
-CCalenMultiDBEditor* CCalenMultiDBEditor::NewL( CCalCalendarInfo& aCalendarInfo,
- CCalenController& aController, TBool aEditFlag)
+CCalenMultiDBEditor* CCalenMultiDBEditor::NewL(
+ CCalenMultipleDbUi& aMultipleDbui, CCalCalendarInfo& aCalendarInfo,
+ CCalenController& aController, TBool aEditFlag)
{
TRACE_ENTRY_POINT;
- CCalenMultiDBEditor* self =
- new(ELeave) CCalenMultiDBEditor( aCalendarInfo, aController, aEditFlag);
- CleanupStack::PushL( self );
+ CCalenMultiDBEditor* self = new (ELeave) CCalenMultiDBEditor(
+ aMultipleDbui, aCalendarInfo, aController, aEditFlag);
+ CleanupStack::PushL(self);
self->ConstructL();
- CleanupStack::Pop( self );
+ CleanupStack::Pop(self);
TRACE_EXIT_POINT;
return self;
@@ -93,7 +95,14 @@
//
CCalenMultiDBEditor::~CCalenMultiDBEditor()
{
- TRACE_ENTRY_POINT;
+ TRACE_ENTRY_POINT;
+
+ if(iRgbColors)
+ {
+ iRgbColors->Reset();
+ delete iRgbColors;
+ iRgbColors = NULL;
+ }
if(iCalendarName)
{
@@ -116,10 +125,12 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-CCalenMultiDBEditor::CCalenMultiDBEditor( CCalCalendarInfo& aCalendarInfo,
- CCalenController& aController, TBool aEditFlag)
- :iCalendarInfo( aCalendarInfo ) , iController( aController ),
- iEditFlag( aEditFlag )
+CCalenMultiDBEditor::CCalenMultiDBEditor(CCalenMultipleDbUi& aMultipleDbui,
+ CCalCalendarInfo& aCalendarInfo, CCalenController& aController,
+ TBool aEditFlag) :
+ iCalendarInfo(aCalendarInfo), iController(
+ aController), iEditFlag(aEditFlag),
+ iMultipleDbUi(aMultipleDbui)
{
TRACE_ENTRY_POINT;
@@ -146,10 +157,10 @@
//Initial color value
iColVal = iCalendarInfo.Color().Value();
- iColors = TRgb(iColVal);
+ iChoosenColor = TRgb(iColVal);
iPicture = new( ELeave )CDbColorPicture( TSize( 0, 0 ) );
- iPicture->SetRgbColorsL(iColors);
+ iPicture->SetRgbColorsL(iChoosenColor);
//set sync value
// ESyncStatus
@@ -161,10 +172,51 @@
{
iSyncStatus = pkgSyncStatus();
}
+
+ LoadColorsL();
+
TRACE_EXIT_POINT;
}
// -----------------------------------------------------------------------------
+// CCalenMultiDBEditor::LoadColorsL
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CCalenMultiDBEditor::LoadColorsL()
+ {
+ TRACE_ENTRY_POINT
+
+ if(iRgbColors)
+ {
+ iRgbColors->Reset();
+ delete iRgbColors;
+ iRgbColors = NULL;
+ }
+
+ iRgbColors = new(ELeave) CArrayFixFlat<TRgb>(2);
+
+ iRgbColors->AppendL(KRgbRed);
+ iRgbColors->AppendL(KRgbDarkGray);
+ iRgbColors->AppendL(KRgbDarkRed);
+ iRgbColors->AppendL(KRgbDarkGreen);
+ iRgbColors->AppendL(KRgbDarkYellow);
+ iRgbColors->AppendL(KRgbDarkBlue);
+ iRgbColors->AppendL(KRgbDarkMagenta);
+ iRgbColors->AppendL(KRgbDarkCyan);
+ iRgbColors->AppendL(KRgbBlack);
+ iRgbColors->AppendL(KRgbGreen);
+ iRgbColors->AppendL(KRgbYellow);
+ iRgbColors->AppendL(KRgbBlue);
+ iRgbColors->AppendL(KRgbMagenta);
+ iRgbColors->AppendL(KRgbCyan);
+ iRgbColors->AppendL(KRgbGray);
+ iRgbColors->AppendL(KRgbWhite);
+
+ TRACE_EXIT_POINT
+ }
+
+// -----------------------------------------------------------------------------
// CCalenMultiDBEditor::ProcessCommandL
// Process commands from the user.
// (other items were commented in a header).
@@ -218,8 +270,6 @@
else if ( ECalenMultiDbColor == IdOfFocusControl() )
{
GetColorL();
- iColors = TRgb(iColVal);
- GetLineByLineAndPageIndex(1,0)->DrawNow();
}
}
break;
@@ -227,8 +277,6 @@
case EAknSoftkeyOpen:
{
GetColorL();
- iColors = TRgb(iColVal);
- GetLineByLineAndPageIndex(1,0)->DrawNow();
}
break;
@@ -255,8 +303,6 @@
case ECalenMultiDbColor:
{
GetColorL();
- iColors = TRgb(iColVal);
- GetLineByLineAndPageIndex(1,0)->DrawNow();
}
break;
default:
@@ -314,8 +360,6 @@
case EAknSoftkeyOpen:
{
GetColorL();
- iColors = TRgb(iColVal);
- GetLineByLineAndPageIndex(1,0)->DrawNow();
}
break;
@@ -354,8 +398,6 @@
else if ( ECalenMultiDbColor == IdOfFocusControl() )
{
GetColorL();
- iColors = TRgb(iColVal);
- GetLineByLineAndPageIndex(1,0)->DrawNow();
}
}
break;
@@ -363,14 +405,23 @@
case EAknSoftkeyDone:
{
isExitForm = SaveNoteL(aButtonId);
+ if(isExitForm)
+ {
+ iMultipleDbUi.UpdateOnAddOrEditL(!iEditFlag);
+ }
}
break;
case EAknSoftkeyExit:
case EAknCmdExit:
{
- SaveNoteL(aButtonId);
- isExitForm = ETrue;
- }
+ isExitForm = SaveNoteL(aButtonId);
+ if(isExitForm)
+ {
+ iMultipleDbUi.UpdateOnAddOrEditL(!iEditFlag);
+ }
+ isExitForm = ETrue;
+ iMultipleDbUi.ExitDialogL();
+ }
break;
case EAknSoftkeyQuit:
{
@@ -577,55 +628,33 @@
void CCalenMultiDBEditor::GetColorL()
{
TRACE_ENTRY_POINT;
-
- TBool retVal = EFalse;
-
- // Array for TRgb colour values
- CArrayFixFlat<TRgb>* colors = new( ELeave ) CArrayFixFlat<TRgb>( 8 );
- CleanupStack::PushL( colors );
-
- // array of colors.
- colors->AppendL(KRgbRed);
- colors->AppendL(KRgbDarkGray);
- colors->AppendL(KRgbDarkRed);
- colors->AppendL(KRgbDarkGreen);
- colors->AppendL(KRgbDarkYellow);
- colors->AppendL(KRgbDarkBlue);
- colors->AppendL(KRgbDarkMagenta);
- colors->AppendL(KRgbDarkCyan);
- colors->AppendL(KRgbBlack);
- colors->AppendL(KRgbGreen);
- colors->AppendL(KRgbYellow);
- colors->AppendL(KRgbBlue);
- colors->AppendL(KRgbMagenta);
- colors->AppendL(KRgbCyan);
- colors->AppendL(KRgbGray);
- colors->AppendL(KRgbWhite);
-
- // Get current colour
- TRgb color = KCalenColorPalletteStartColor; //iDbInfo.GetCalendarColor();
- TInt startValue = iColVal;
- TBool noneChosen = ETrue;
+ iNoneChoosen = ETrue;
// Construct colour selection grid
- CAknColourSelectionGrid *dlg = CAknColourSelectionGrid::NewL(colors, EFalse,
- noneChosen,color );
+ CAknDialog *dlg = CAknColourSelectionGrid::NewL(iRgbColors, EFalse,
+ iNoneChoosen,iChoosenColor );
- retVal = dlg->ExecuteLD();
+ dlg->ExecuteLD(R_CALEN_MULTIDB_EDITOR_COLOR_GRID_DLG);
- iColVal = KErrNotFound;
- if ( !noneChosen && retVal )//If something is chosen
- {
- iColVal = color.Value();
- }
- else//Else set the previous color.
+ TRACE_EXIT_POINT;
+ }
+
+// ---------------------------------------------------------------------------
+// CCalenMultiDBEditor::FocusChanged
+// ---------------------------------------------------------------------------
+//
+void CCalenMultiDBEditor::FocusChanged(TDrawNow /*aDrawNow*/)
+ {
+ TRACE_ENTRY_POINT
+
+ if(IsFocused() && !iNoneChoosen)
{
- iColVal = startValue;
+ iColVal = iChoosenColor.Value();
+ iPicture->SetRgbColorsL(iChoosenColor);
+ GetLineByLineAndPageIndex(1, 0)->DrawNow();
}
- iColors = TRgb(iColVal);
- iPicture->SetRgbColorsL(iColors);
- CleanupStack::PopAndDestroy( colors );
- TRACE_EXIT_POINT;
+
+ TRACE_EXIT_POINT
}
// ---------------------------------------------------------------------------
@@ -724,15 +753,15 @@
TInt index = calendarInfoList.Find( *iCalendarName,CCalenMultiDBEditor::CalenInfoIdentifierL );
if(index != KErrNotFound)
{
+ retValue = EFalse;
if( EAknCmdExit != aButtonId )
- {
- retValue = EFalse;
- HBufC* infoText = StringLoader::LoadLC(
- R_QTN_CALE_DB_ALREADY_EXISTS_NOTE , iCalendarName->Des() );
- CAknInformationNote* dialog = new( ELeave ) CAknInformationNote(ETrue);
- dialog->ExecuteLD( *infoText );
- CleanupStack::PopAndDestroy( infoText );
- }
+ {
+ HBufC* infoText = StringLoader::LoadLC(
+ R_QTN_CALE_DB_ALREADY_EXISTS_NOTE , iCalendarName->Des() );
+ CAknInformationNote* dialog = new( ELeave ) CAknInformationNote(ETrue);
+ dialog->ExecuteLD( *infoText );
+ CleanupStack::PopAndDestroy( infoText );
+ }
}
else
{
@@ -745,13 +774,13 @@
{
if( EAknCmdExit != aButtonId )
{
- retValue = EFalse;
- HBufC* infoText(NULL);
- infoText = AreIllegalChars( *iCalendarName ) ? StringLoader::LoadLC( R_CALEN_ILLEGAL_CHARACTERS ) :
- StringLoader::LoadLC( R_CALEN_BAD_FILE_NAME );
- CAknInformationNote* dialog = new( ELeave ) CAknInformationNote(ETrue);
- dialog->ExecuteLD( *infoText );
- CleanupStack::PopAndDestroy( infoText );
+ retValue = EFalse;
+ HBufC* infoText(NULL);
+ infoText = AreIllegalChars( *iCalendarName ) ? StringLoader::LoadLC( R_CALEN_ILLEGAL_CHARACTERS ) :
+ StringLoader::LoadLC( R_CALEN_BAD_FILE_NAME );
+ CAknInformationNote* dialog = new( ELeave ) CAknInformationNote(ETrue);
+ dialog->ExecuteLD( *infoText );
+ CleanupStack::PopAndDestroy( infoText );
}
}
@@ -803,13 +832,13 @@
{
TRACE_ENTRY_POINT;
//Initial Name value
- TPtr summary = iCalendarName->Des();
-
- CEikEdwin* edwin =
- reinterpret_cast<CEikEdwin*>(Control(ECalenMultiDbName));
- GetEdwinText(summary, ECalenMultiDbName);
-
- TRACE_EXIT_POINT;
+ TPtr summary = iCalendarName->Des();
+
+ CEikEdwin* edwin = reinterpret_cast<CEikEdwin*> (Control(
+ ECalenMultiDbName));
+ GetEdwinText(summary, ECalenMultiDbName);
+
+ TRACE_EXIT_POINT;
}
// ---------------------------------------------------------------------------
// CCalenMultiDBEditor::IsNameEditedL
@@ -968,8 +997,6 @@
case ECalenMultiDbColor:
{
GetColorL();
- iColors = TRgb(iColVal);
- GetLineByLineAndPageIndex(1,0)->DrawNow();
}
break;
@@ -1209,6 +1236,10 @@
TRACE_EXIT_POINT;
}
+// -----------------------------------------------------------------------------
+// CDbColorPicture::SetRgbColorsL
+// -----------------------------------------------------------------------------
+//
void CDbColorPicture::SetRgbColorsL(TRgb aColors)
{
TRACE_ENTRY_POINT;
@@ -1234,10 +1265,10 @@
TSize pixelsize;
pixelsize.iWidth = 225;
- pixelsize.iHeight = 25;
+ pixelsize.iHeight = 16;
TPoint aPoint;
TRect area = TRect(aTopLeft, pixelsize);
- area.Move(0,-20);
+ area.Move(0,-11);
// Draw a datbase color rectangle
aGc.SetBrushColor(iColors);
aGc.SetBrushStyle(CGraphicsContext::ESolidBrush);
--- a/calendarui/controller/src/calenmultipledbui.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenmultipledbui.cpp Tue May 04 16:18:23 2010 +0100
@@ -42,6 +42,9 @@
#include <CalenInterimUtils2.h>
#include <calenmulticalutil.h>
#include <calenmulticaluids.hrh>
+#include <featmgr.h>
+#include <hlplch.h>
+#include <csxhelp/cale.hlp.hrh>
// User includes
#include "calendarui_debug.h"
@@ -50,6 +53,7 @@
#include "calenmultidbeditor.h"
#include "CalendarPrivateCRKeys.h"
#include "calencontroller.h"
+#include "CalenUid.h"
// Constants
_LIT( KListSeparatorFormat, "\t" );
@@ -111,11 +115,10 @@
iGc->Reset();
- TAknWindowComponentLayout tempLayout =
- AknLayoutScalable_Apps::list_cale_time_pane_g6( aItemIndex - iListBox->TopItemIndex()) ;
+ TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(0);
- TAknLayoutRect colourstrips;
- colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() );
+ TAknLayoutRect colourstrips;
+ colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() );
iGc->SetPenColor( CGraphicsContext::ENullPen );
iGc->DrawRect( colourstrips.Rect() );
@@ -183,8 +186,7 @@
// ----------------------------------------------------------------------------
//
CCalenMultipleDbUi::CCalenMultipleDbUi(CCalenController& aController) :
- iController(aController),
- iDialogLaunched(EFalse)
+ iController(aController)
{
TRACE_ENTRY_POINT;
TRACE_EXIT_POINT;
@@ -218,9 +220,10 @@
TRACE_ENTRY_POINT;
CAknDialog::ConstructL( R_CALEN_MULTIPLEDB_MENUBAR );
SetTitlePaneL();
- TCallBack callBack(CCalenMultipleDbUi::DoAsyncExit,this);
- iAsyncExit = new(ELeave) CAsyncCallBack(callBack,CActive::EPriorityStandard);
+ TCallBack actionCallBack(CCalenMultipleDbUi::AsyncCallBackL, this);
+ iAsyncAction = new(ELeave) CAsyncCallBack(actionCallBack,CActive::EPriorityStandard);
+
// register for calendar file change notifications
RArray<TCalenNotification> notificationArray;
notificationArray.Append(ECalenNotifyCalendarInfoCreated);
@@ -228,6 +231,8 @@
notificationArray.Append(ECalenNotifyCalendarFileDeleted);
iController.RegisterForNotificationsL(this, notificationArray);
+ notificationArray.Close();
+
iConflictOccured = EFalse;
TRACE_EXIT_POINT;
@@ -251,19 +256,35 @@
}
delete iBgContext;
+ iBgContext = NULL;
iListBox->Reset();
- delete iListBox;
+ delete iListBox;
+ iListBox = NULL;
delete iDesArray;
+ iDesArray = NULL;
iColorUidArray.Close();
iIconIndices.Reset();
iIconIndices.Close();
- iAsyncExit->Cancel();
- delete iAsyncExit;
+ iAsyncAction->Cancel();
+ delete iAsyncAction;
+ iAsyncAction = NULL;
+
+ if(iCalendarInfoNew)
+ {
+ delete iCalendarInfoNew;
+ iCalendarInfoNew = NULL;
+ }
+
+ if(iCalendarInfoOriginal)
+ {
+ delete iCalendarInfoOriginal;
+ iCalendarInfoOriginal = NULL;
+ }
TRACE_EXIT_POINT;
}
@@ -324,6 +345,10 @@
void CCalenMultipleDbUi::UpdateListboxL()
{
TRACE_ENTRY_POINT;
+
+ if(!iListBox)
+ return;
+
iListBox->View()->SetDisableRedraw( ETrue );
iDesArray->Reset();
iColorUidArray.Close();
@@ -443,14 +468,23 @@
// Set title text
CAknTitlePane* tp = static_cast<CAknTitlePane*>(
sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-
- HBufC* titleText = StringLoader::LoadLC( R_QTN_CALE_TITLE_CALENDARS , iCoeEnv );
+ HBufC* titleText;
+ if(iIsDbEditorOpen)
+ {
+ titleText = StringLoader::LoadLC( R_QTN_CALE_TITLE_CALENDAR , iCoeEnv );
+ }
+ else
+ {
+ titleText = StringLoader::LoadLC( R_QTN_CALE_TITLE_CALENDARS , iCoeEnv );
+ }
tp->SetTextL( *titleText ); // r_qtn_cale_title_calendars
CleanupStack::PopAndDestroy( titleText );
TRACE_EXIT_POINT;
}
+
+
// ----------------------------------------------------------------------------
// CCalenMultipleDbUi::DynInitMenuPaneL
@@ -486,7 +520,7 @@
HBufC* calendarFileName =
calendarInfoList[currentIndex]->FileNameL().AllocLC();
if (!(calendarFileName->CompareF(
- _L("c:Calendar1"))))
+ iController.Services().SessionL().DefaultFileNameL())))
{
aMenuPane->DeleteMenuItem(ECalenCmdDelete);
}
@@ -517,36 +551,34 @@
case ECalenCmdEdit:
{
TInt retValue = EditItemL();
-
if(retValue == EAknCmdExit || retValue == EAknSoftkeyExit )
{
- iAsyncExitCmd = retValue;
- iAsyncExit->CallBack();
+ DoAsyncActionL(retValue);
}
}
break;
case ECalenCmdAdd:
{
TInt retValue = AddItemL();
-
if(retValue == EAknCmdExit || retValue == EAknSoftkeyExit )
{
- iAsyncExitCmd = retValue;
- iAsyncExit->CallBack();
+ DoAsyncActionL(retValue);
}
}
break;
case ECalenCmdDelete:
{
- DeleteItemL();
+ DoAsyncActionL(ECalenCmdDelete);
}
break;
case ECalenCmdItemSelect:
+ case ECalenCmdShow:
{
DoSelectionL(ETrue);
}
break;
case ECalenCmdItemDeselect:
+ case ECalenCmdHide:
{
DoSelectionL(EFalse);
}
@@ -554,22 +586,16 @@
case EAknCmdExit:
case EAknSoftkeyExit:
{
- iAsyncExitCmd = EAknSoftkeyExit;
- iAsyncExit->CallBack();
+ DoAsyncActionL(EAknSoftkeyExit);
}
break;
- case ECalenCmdShow:
- {
- DoSelectionL( ETrue );
- }
+ case EAknCmdHelp:
+ if (FeatureManager::FeatureSupported(KFeatureIdHelp))
+ {
+ HlpLauncher::LaunchHelpApplicationL(
+ iCoeEnv->WsSession(),iAvkonAppUi->AppHelpContextL());
+ }
break;
-
- case ECalenCmdHide:
- {
- DoSelectionL( EFalse );
- }
- break;
-
default:
break;
}
@@ -577,6 +603,23 @@
}
// ----------------------------------------------------------------------------
+// CCalenMultipleDbUi::GetHelpContext
+// Gets help context
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CCalenMultipleDbUi::GetHelpContext( TCoeHelpContext& aContext ) const
+ {
+ TRACE_ENTRY_POINT;
+
+ aContext.iMajor = KUidCalendar;
+ // This is specified in HRH file.
+ aContext.iContext = KCALE_HLP_DAY_VIEW; //KCALE_HLP_DAY_VIEW should be replaced with MultipleDbUi related help id
+
+ TRACE_EXIT_POINT;
+ }
+
+// ----------------------------------------------------------------------------
// CCalenMultipleDbUi::DoSelectionL
// Mark the listbox item as hidden/visible based on aMark status
// ----------------------------------------------------------------------------
@@ -606,49 +649,88 @@
TInt CCalenMultipleDbUi::AddItemL()
{
TRACE_ENTRY_POINT
- TInt retValue = KErrNotFound;
+ TInt retValue = 0;
+
+ if(iCalendarInfoNew)
+ {
+ delete iCalendarInfoNew;
+ iCalendarInfoNew = NULL;
+ }
- CCalCalendarInfo* calendarInfo = CCalCalendarInfo::NewL();
- calendarInfo->SetNameL(KNullDesC16);
- calendarInfo->SetColor(255);
- calendarInfo->SetEnabled(ETrue);
- iDbEditor = CCalenMultiDBEditor::NewL( *calendarInfo, iController, EFalse );
+ iCalendarInfoNew = CCalCalendarInfo::NewL();
+ iCalendarInfoNew->SetNameL(KNullDesC16);
+ iCalendarInfoNew->SetColor(255);
+ iCalendarInfoNew->SetEnabled(ETrue);
+ iDbEditor = CCalenMultiDBEditor::NewL(*this,*iCalendarInfoNew, iController, EFalse );
- iDialogLaunched = ETrue;
+ //Async dialog
retValue = iDbEditor->ExecuteLD();
iDbEditor = NULL;
- iDialogLaunched = EFalse;
-
+
if(EAknCmdExit == retValue )
{
iController.BroadcastNotification(ECalenNotifyRealExit);
}
- HBufC* calendarName = calendarInfo->NameL().AllocLC();
- calendarName->Des().Trim();
- if(calendarName->Length() > 0)
+ TRACE_EXIT_POINT
+ return retValue;
+ }
+
+
+// ----------------------------------------------------------------------------
+// CCalenMultipleDbUi::UpdateAddOrEditL
+// ----------------------------------------------------------------------------
+//
+void CCalenMultipleDbUi::UpdateOnAddOrEditL(TBool aItemAdded)
+ {
+ TRACE_ENTRY_POINT
+
+ if(aItemAdded)
{
-
// Set calendar properties for new calendar being created.
- SetCalendarAddPropertiesL(*calendarInfo);
-
- iController.AddCalendarL(calendarInfo);
-
- UpdateListboxL();
-
+ SetCalendarAddPropertiesL(*iCalendarInfoNew);
+
+ iController.AddCalendarL(iCalendarInfoNew);
+ iCalendarInfoNew = NULL;
+
//Highlight the newly created list item
iListBox->ScrollToMakeItemVisible(iListBox->BottomItemIndex());
iListBox->SetCurrentItemIndexAndDraw(iDesArray->Count()-1);
}
- else
+ else
{
- delete calendarInfo;
+ //Before checking for changes , check if any conflict occured i.e calendar updated / deleted.
+ //if there is conflict iConflictOccured = true then skip below condition.
+ if (!iConflictOccured && iCalendarInfoOriginal &&
+ CheckForChangesL(*iCalendarInfoOriginal,
+ *iCalendarInfoEdited))
+ {
+ // update the calendar properties such as modification time, sync status.
+ SetCalendarUpdatePropertiesL(*iCalendarInfoEdited);
+
+ iController.UpdateCalendarL(iCalendarInfoEdited);
+ }
+
+ iConflictOccured = EFalse;
+ delete iCalendarInfoOriginal,iCalendarInfoOriginal = NULL;
}
-
- CleanupStack::PopAndDestroy(calendarName);
+ iIsDbEditorOpen = EFalse ; //iIsDbEditorOpen should be set before calling UpdateListboxL()
+ UpdateListboxL();
TRACE_EXIT_POINT
- return retValue;
+ }
+
+// ----------------------------------------------------------------------------
+// CCalenMultipleDbUi::ExitDialogL
+// Edit item from listbox
+// ----------------------------------------------------------------------------
+//
+void CCalenMultipleDbUi::ExitDialogL()
+ {
+ TRACE_ENTRY_POINT
+ iAsyncActionCmd = EAknSoftkeyExit;
+ iAsyncAction->CallBack();
+ TRACE_EXIT_POINT
}
// ----------------------------------------------------------------------------
@@ -661,60 +743,41 @@
TRACE_ENTRY_POINT
TInt retValue = KErrNotFound;
TInt currentIndex = iListBox->CurrentItemIndex();
- TInt listCount = iListBox->Model()->ItemTextArray()->MdcaCount();
-
+
RPointerArray<CCalCalendarInfo> calendarInfoList;
iController.GetAllCalendarInfoL(calendarInfoList);
CleanupClosePushL(calendarInfoList);
- CCalCalendarInfo* calendarInfoedited = calendarInfoList[currentIndex];
+ iCalendarInfoEdited = calendarInfoList[currentIndex];
+
+ CleanupStack::PopAndDestroy(&calendarInfoList);
//Take a copy of original before editing
- CCalCalendarInfo* calendarInfoOriginal = CCalCalendarInfo::NewL();
- CleanupStack::PushL(calendarInfoOriginal);
- calendarInfoOriginal->SetNameL(calendarInfoedited->NameL());
- calendarInfoOriginal->SetColor(calendarInfoedited->Color());
- calendarInfoOriginal->SetEnabled(calendarInfoedited->Enabled());
+ if(iCalendarInfoOriginal)
+ {
+ delete iCalendarInfoOriginal;
+ iCalendarInfoOriginal = NULL;
+ }
+ iCalendarInfoOriginal = CCalCalendarInfo::NewL();
+
+ iCalendarInfoOriginal->SetNameL(iCalendarInfoEdited->NameL());
+ iCalendarInfoOriginal->SetColor(iCalendarInfoEdited->Color());
+ iCalendarInfoOriginal->SetEnabled(iCalendarInfoEdited->Enabled());
TBuf8<KBuffLength> keyBuff;
TBool syncstatus = EFalse;
keyBuff.Zero();
keyBuff.AppendNum( ESyncStatus );
TPckgC<TBool> pckgSyncStatusValue(syncstatus);
- pckgSyncStatusValue.Set(calendarInfoedited->PropertyValueL( keyBuff ));
- calendarInfoOriginal->SetPropertyL( keyBuff, pckgSyncStatusValue );
+ pckgSyncStatusValue.Set(iCalendarInfoEdited->PropertyValueL( keyBuff ));
+ iCalendarInfoOriginal->SetPropertyL( keyBuff, pckgSyncStatusValue );
- iDbEditor = CCalenMultiDBEditor::NewL(*calendarInfoedited, iController,
+ iDbEditor = CCalenMultiDBEditor::NewL(*this,*iCalendarInfoEdited, iController,
ETrue);
- iDialogLaunched = ETrue;
+ //Async dialog
retValue = iDbEditor->ExecuteLD();
iDbEditor = NULL;
- iDialogLaunched = EFalse;
-
- //Before checking for changes , check if any conflict occured i.e calendar updated / deleted.
- //if there is conflict iConflictOccured = true then skip below condition.
- if (!iConflictOccured && CheckForChangesL(*calendarInfoOriginal,
- *calendarInfoedited))
- {
- // update the calendar properties such as modification time, sync status.
- SetCalendarUpdatePropertiesL(*calendarInfoedited);
-
- iController.UpdateCalendarL(calendarInfoedited);
- }
-
- iConflictOccured = EFalse;
-
- UpdateListboxL();
-
- //If conflict occured i.e calendar deleted check for list count before and after
- //and update focus accordingly
- if (listCount != iListBox->Model()->ItemTextArray()->MdcaCount())
- {
- ReAdjustListItemFocusL(currentIndex);
- }
-
- CleanupStack::PopAndDestroy(calendarInfoOriginal);
- CleanupStack::PopAndDestroy(&calendarInfoList);
+
return retValue;
TRACE_EXIT_POINT
}
@@ -728,7 +791,7 @@
{
TRACE_ENTRY_POINT;
- TInt currentIndex = iListBox->CurrentItemIndex();
+ TInt currentIndex = iCurrentIndex;
RPointerArray<CCalCalendarInfo> calendarInfoList;
iController.GetAllCalendarInfoL(calendarInfoList);
@@ -919,16 +982,18 @@
}
break;
case EAknSoftkeyBack:
+ case EKeyEscape:
{
iController.BroadcastNotification(ECalenNotifyDeleteInstanceView);
okExit = ETrue;
}
break;
- case EKeyEscape:
+ case EKeyNo:
{
- okExit = ETrue;
+ iController.BroadcastNotification(ECalenNotifyDeleteInstanceView);
+ okExit = CAknDialog::OkToExitL(aButtonId);
+ break;
}
- break;
default:
{
okExit = CAknDialog::OkToExitL(aButtonId);
@@ -1114,17 +1179,60 @@
}
// ----------------------------------------------------------------------------
-// CCalenMultipleDbUi::CallBackForAddAndDeleteL
+// CCalenMultipleDbUi::AsyncCallBackL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TInt CCalenMultipleDbUi::AsyncCallBackL(TAny* aThisPtr)
+ {
+ TRACE_ENTRY_POINT
+ CCalenMultipleDbUi* self = static_cast<CCalenMultipleDbUi*>(aThisPtr);
+ self->HandleAsyncCommandL(self->iAsyncActionCmd);
+ TRACE_EXIT_POINT
+ return 0;
+ }
+
+// ----------------------------------------------------------------------------
+// CCalenMultipleDbUi::DoAsyncActionL
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-TInt CCalenMultipleDbUi::DoAsyncExit(TAny* aPtr)
+void CCalenMultipleDbUi::DoAsyncActionL(const TInt aCommand)
+ {
+ TRACE_ENTRY_POINT
+ iCurrentIndex = iListBox->CurrentItemIndex();
+ iAsyncActionCmd = aCommand;
+ iAsyncAction->CallBack();
+ TRACE_EXIT_POINT
+ }
+
+// ----------------------------------------------------------------------------
+// CCalenMultipleDbUi::DoAsyncActionL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CCalenMultipleDbUi::HandleAsyncCommandL(const TInt aCommand)
{
TRACE_ENTRY_POINT
- CCalenMultipleDbUi* self = static_cast<CCalenMultipleDbUi*>(aPtr);
- self->TryExitL(self->iAsyncExitCmd);
+
+ switch(aCommand)
+ {
+ case EAknSoftkeyExit:
+ case EAknCmdExit:
+ {
+ TryExitL(aCommand);
+ }
+ break;
+ case ECalenCmdDelete:
+ {
+ DeleteItemL();
+ }
+ break;
+ default:
+ break;
+ }
+
TRACE_EXIT_POINT
- return 0;
}
// ----------------------------------------------------------------------------
@@ -1353,7 +1461,7 @@
{
iIsDbEditorOpen = ETrue ;
ProcessCommandL( ECalenCmdEdit );
- iIsDbEditorOpen = EFalse ;
+
}
}
}
--- a/calendarui/controller/src/calennotifier.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calennotifier.cpp Tue May 04 16:18:23 2010 +0100
@@ -101,13 +101,6 @@
iEComWatcher = NULL;
}
- // Stop database change notifications.
- if( iDbChangeNotifier )
- {
- delete iDbChangeNotifier;
- iDbChangeNotifier = NULL;
- }
-
// Stop settings change notifications
if( iCenRepChangeNotifier )
{
@@ -170,10 +163,6 @@
iCenRepChangeNotifier = CCenRepNotifyHandler::NewL( *this, *iRepository );
iCenRepChangeNotifier->StartListeningL();
- // Register for changes to our database session
- iDbChangeNotifier = CCalenDbChangeNotifier::NewL( *iGlobalData );
- iDbChangeNotifier->RegisterObserverL( *this );
-
// Register for changes to the ECom registry
iEComWatcher = CCalenEComWatcher::NewL( *this );
@@ -650,7 +639,10 @@
);
// Exit application
- iAvkonAppUi->Exit();
+ if (iAvkonAppUi)
+ {
+ iAvkonAppUi->Exit();
+ }
}
TRACE_EXIT_POINT;
@@ -771,6 +763,7 @@
case MCalFileChangeObserver::ECalendarFileCreated:
case MCalFileChangeObserver::ECalendarInfoCreated:
{
+ BroadcastNotification(ECalenNotifyDeleteInstanceView);
BroadcastNotification(ECalenNotifyCalendarInfoCreated);
}
break;
@@ -815,6 +808,7 @@
default:
break;
}
+ context.ResetCalendarFileName();
}
TRACE_EXIT_POINT;
--- a/calendarui/controller/src/calenpopulationstate.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenpopulationstate.cpp Tue May 04 16:18:23 2010 +0100
@@ -99,14 +99,6 @@
RequestCallbackL( handler, aCommand );
cmdUsed = ETrue;
}
-
- else if( ECalenEventView == cmd )
- {
- SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
- ActivateCurrentStateL(aStateMachine);
- RequestCallbackL( handler, aCommand );
- cmdUsed = ETrue;
- }
TRACE_EXIT_POINT;
return cmdUsed;
--- a/calendarui/controller/src/calenservicesimpl.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenservicesimpl.cpp Tue May 04 16:18:23 2010 +0100
@@ -418,12 +418,12 @@
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-CGulIcon* CCalenServicesImpl::GetIconL( MCalenServices::TCalenIcons aIndex )
+CGulIcon* CCalenServicesImpl::GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId )
{
TRACE_ENTRY_POINT;
TRACE_EXIT_POINT;
- return iController->GetIconL( aIndex );
+ return iController->GetIconL( aIndex, aViewId );
}
// ----------------------------------------------------------------------------
--- a/calendarui/controller/src/calenstate.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenstate.cpp Tue May 04 16:18:23 2010 +0100
@@ -128,9 +128,11 @@
case ECalenNotifyAppBackgrounded:
{
CCalenStateMachine::TCalenStateIndex cachedState = aStateMachine.GetCurrentState();
- if(cachedState != CCalenStateMachine::ECalenMapState) // Never send calendar to background state in MapState as maps will
- // launched in cahin mode not in stand alone mode
- {
+ // Never send calendar to background state in MapState as maps will
+ // launched in cahin mode not in stand alone mode
+ if((cachedState != CCalenStateMachine::ECalenMapState) &&
+ (cachedState != CCalenStateMachine::ECalenPopulationState))
+ {
aStateMachine.SetCurrentState(CCalenStateMachine::ECalenBackgroundState);
aStateMachine.SetCurrentPreviousState(cachedState);
iOutstandingNotifications.InsertL(aNotification);
--- a/calendarui/controller/src/calenviewattachmentsdialog.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenviewattachmentsdialog.cpp Tue May 04 16:18:23 2010 +0100
@@ -105,7 +105,8 @@
CCalenAttachmentModel& aAttachmentModel,CCalenController& aController )
: iAttachmentModel( aAttachmentModel ),
iController(aController),
- iNewTitle( aTitle )
+ iNewTitle( aTitle ),
+ iEmbeddedFileOpened(EFalse)
{
TRACE_ENTRY_POINT;
TRACE_EXIT_POINT;
@@ -392,6 +393,7 @@
{
TRACE_ENTRY_POINT;
+ iEmbeddedFileOpened = EFalse;
if (aReason == EAknCmdExit)
{
//issue this notification, which will be handled by attachmentui.
@@ -798,7 +800,7 @@
{
TRACE_ENTRY_POINT;
//Single click integration
- if ( iListBox )
+ if ( iListBox && !iEmbeddedFileOpened)
{
iListBox->HandlePointerEventL( aPointerEvent );
}
@@ -1098,18 +1100,27 @@
if(datatype == KNotePadTextDataType())
{
+ if(iEmbeddedFileOpened)
+ {
+ return;
+ }
+ iEmbeddedFileOpened = ETrue;
const TDesC& notepadTitle = _L("NotePad");
ret = CNotepadApi::ExecFileViewerL( aFile,
¬epadTitle,
ETrue,
ETrue,
KCharacterSetIdentifierIso88591 );
-
+ iEmbeddedFileOpened = EFalse;
}
else
{
//doc handler will open the other files (other than text file).
TRAP( ret, iDocHandler->OpenFileEmbeddedL( aFile, datatype ) );
+ if(ret == KErrNone)
+ {
+ iEmbeddedFileOpened = ETrue;
+ }
}
switch(ret)
--- a/calendarui/controller/src/calenviewmanager.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/controller/src/calenviewmanager.cpp Tue May 04 16:18:23 2010 +0100
@@ -891,8 +891,10 @@
}
// set the previous view id
- iPreviousViewId.iViewUid = cachePreviousViewId;
-
+ if(cachePreviousViewId != KUidCalenEventView)
+ {
+ iPreviousViewId.iViewUid = cachePreviousViewId;
+ }
TRACE_EXIT_POINT;
}
@@ -1338,7 +1340,14 @@
{
TRACE_ENTRY_POINT;
TRACE_EXIT_POINT;
- return iToolbar;
+ if (iToolbar)
+ {
+ if (iToolbar->IsICalenToolBar())
+ {
+ return iToolbar;
+ }
+ }
+ return NULL;
}
// ----------------------------------------------------------------------------
@@ -1514,7 +1523,14 @@
// the event view
if(iPreviousViewId.iViewUid != KNullUid)
{
- RequestActivationL(iPreviousViewId.iViewUid);
+ if(iPreviousToDayView.iViewUid != KNullUid)
+ {
+ RequestActivationL(iPreviousViewId.iViewUid, KUidCalenShowBackCba);
+ }
+ else
+ {
+ RequestActivationL(iPreviousViewId.iViewUid);
+ }
}
}
else
--- a/calendarui/editors/data/CalenDefaultEditorsData.rss Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/editors/data/CalenDefaultEditorsData.rss Tue May 04 16:18:23 2010 +0100
@@ -202,7 +202,7 @@
},
MENU_ITEM
{
- command = EAknCmdExit;
+ command = EAknSoftkeyExit;
txt = qtn_options_exit;
}
};
@@ -273,7 +273,7 @@
},
MENU_ITEM
{
- command = EAknCmdExit;
+ command = EAknSoftkeyExit;
txt = qtn_options_exit;
}
};
@@ -365,6 +365,25 @@
}
};
}
+ RESOURCE DIALOG r_calen_db_change_query
+ {
+ flags = EGeneralQueryFlags;
+ buttons = R_AVKON_SOFTKEYS_YES_NO;
+ items =
+ {
+ DLG_LINE
+ {
+ type = EAknCtQuery;
+ id = EGeneralQuery;
+ control = AVKON_CONFIRMATION_QUERY
+ {
+ layout = EConfirmationQueryLayout;
+ label = qtn_calen_db_change_del_exeptions;
+ };
+ }
+ };
+ }
+
RESOURCE TBUF r_qtn_cale_inote_desc_del_memo
{
@@ -1015,7 +1034,7 @@
//
RESOURCE TBUF r_qtn_calen_editor_date_of_birth
{
- buf = qtn_cale_label_date;
+ buf = qtn_cale_viewer_date;
}
// ---------------------------------------------------------
@@ -1624,7 +1643,7 @@
},
MENU_ITEM
{
- command = EAknCmdExit;
+ command = EAknSoftkeyExit;
txt = qtn_options_exit;
}
};
--- a/calendarui/editors/inc/calendbfield.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/editors/inc/calendbfield.h Tue May 04 16:18:23 2010 +0100
@@ -116,6 +116,24 @@
*/
static TBool CalendarInfoNameIdentifierL( const HBufC* aName,
const CCalCalendarInfo& aInfoItem );
+
+ /**
+ * @brief show infonote when database changes and entry having
+ * childs.
+ */
+ void ShowChangeDBQueryL();
+ /*
+ * Callback for CAsyncCallBack class
+ * @param aThisPtr* this pointer.
+ * @return TInt status.
+ */
+ static TInt DoAsyncShowChangeDBQueryL(TAny* aThisPtr);
+
+ /**
+ * @brief Update data in editor
+ * @param aColId collection Id of selected database
+ */
+ void SetDataToEditorL(const TCalCollectionId& aColId);
public:
//previous calendar collection id
@@ -153,6 +171,7 @@
//services referance not owned
MCalenServices* iServices;
HBufC* iCalendarFileName;
+ CAsyncCallBack* iAsyncDBquery;
};
--- a/calendarui/editors/inc/calenunifiededitor.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/editors/inc/calenunifiededitor.h Tue May 04 16:18:23 2010 +0100
@@ -297,8 +297,9 @@
/**
* @brief Handles "Exit" command.
+ * @param aCmd Holds the command issued.
*/
- void OnCmdExitL();
+ void OnCmdExitL(TInt aCmd);
/**
* @brief Delete note from Calendar.
--- a/calendarui/editors/src/calenalldayfield.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/editors/src/calenalldayfield.cpp Tue May 04 16:18:23 2010 +0100
@@ -162,11 +162,11 @@
// editor should display EndDate as 23/06/2009.
if( endDate > startDate )
{
- //endDate -= TTimeIntervalDays( 1 );
- //endDate contains the time component also, even for same day endDate would be greater then startDate
- //subtracting 1 from endate will give endDate as one day before startDate.
- //For All day event Start date and End Date are same so assigning startDate to endDate.
- endDate = startDate;
+ endDate -= TTimeIntervalDays( 1 );
+ if( endDate < startDate )
+ {
+ endDate = startDate;
+ }
}
iUnifiedEditor.EditorFields().SetDateField( ECalenEditorStartDate, startDate, ETrue );
--- a/calendarui/editors/src/calendbfield.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/editors/src/calendbfield.cpp Tue May 04 16:18:23 2010 +0100
@@ -18,6 +18,7 @@
// system includes
#include <AknPopupField.h>
#include <AknQueryValueText.h>
+#include <AknQueryDialog.h>
#include <badesca.h>
#include <calentry.h>
#include <centralrepository.h>
@@ -111,6 +112,13 @@
{
TRACE_ENTRY_POINT;
+ if( iAsyncDBquery )
+ {
+ iAsyncDBquery->Cancel();
+ delete iAsyncDBquery;
+ iAsyncDBquery = NULL;
+ }
+
delete iDbNamesArrayText;
delete iDbNamesArray;
delete iDbNamesTextValues;
@@ -203,6 +211,41 @@
}
// -----------------------------------------------------------------------------
+// CCalenDbField::SetDataToEditorL
+// update data in form
+// -----------------------------------------------------------------------------
+//
+void CCalenDbField::SetDataToEditorL(const TCalCollectionId& aColId)
+ {
+ TRACE_ENTRY_POINT;
+ //Get MultipleDbInfo array
+ RPointerArray<CCalCalendarInfo> calendarInfoList;
+ iServices->GetAllCalendarInfoL(calendarInfoList);
+ CleanupClosePushL(calendarInfoList);
+
+ TInt index = KErrNotFound;
+
+ HBufC* calendarFileName= iServices->GetCalFileNameForCollectionId(aColId).AllocLC();
+ index = calendarInfoList.Find(*calendarFileName, CCalenDbField::CalendarInfoNameIdentifierL);
+ CleanupStack::PopAndDestroy(calendarFileName);
+
+ if (KErrNotFound == index)
+ {
+ iDbNamesTextValues->SetCurrentValueIndex(0);
+ }
+ else
+ {
+ iDbNamesTextValues->SetCurrentValueIndex(index);
+ }
+ iUnifiedEditor.EditorDataHandler().SetCalendarFieldEditedL(
+ IsCalendarEdited(), iPreviousColId, iCurrentColId);
+
+ CleanupStack::PopAndDestroy(&calendarInfoList);
+
+ TRACE_EXIT_POINT;
+ }
+
+// -----------------------------------------------------------------------------
// CCalenDbField::HandleControlStateChangeL
// (other items were commented in a header).
// -----------------------------------------------------------------------------
@@ -219,6 +262,10 @@
ReadDataFromFormL( continueOnError );
iUnifiedEditor.EditorDataHandler().SetCalendarFieldEditedL(IsCalendarEdited()
,iPreviousColId,iCurrentColId);
+
+ TCallBack callback(DoAsyncShowChangeDBQueryL,this);
+ iAsyncDBquery = new(ELeave) CAsyncCallBack(callback,CActive::EPriorityStandard);
+ iAsyncDBquery->CallBack();
break;
}
default:
@@ -228,6 +275,23 @@
TRACE_EXIT_POINT;
}
+// ----------------------------------------------------------------------------
+// CallBackForShowinginfonote
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TInt CCalenDbField::DoAsyncShowChangeDBQueryL(TAny* aThisPtr)
+ {
+ TRACE_ENTRY_POINT
+ CCalenDbField* self = static_cast<CCalenDbField*>(aThisPtr);
+ if(self)
+ {
+ self->ShowChangeDBQueryL();
+ }
+ TRACE_EXIT_POINT
+ return 0;
+ }
+
// -----------------------------------------------------------------------------
// CCalenDbField::ReadDataFromFormL
// (other items were commented in a header).
@@ -335,4 +399,34 @@
TRACE_EXIT_POINT;
return (!calendarFileName.CompareF(*aName));
}
+// -----------------------------------------------------------------------------
+// CCalenDbField::ShowChangeDBQueryL
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CCalenDbField::ShowChangeDBQueryL()
+ {
+
+ //Check the child entries for the repeated entry
+ //The entry which is changing the calendar having any childs
+ //show this information note to the user.
+ CCalEntry& originalEntry = iUnifiedEditor.EditorDataHandler().Entry();
+ RPointerArray<CCalEntry> childEntries;
+ CleanupClosePushL(childEntries);
+ iServices->EntryViewL(iPreviousColId)->FetchL(originalEntry.UidL(), childEntries);
+ if(IsCalendarEdited() && (childEntries.Count() > 1))
+ {
+ TCalCollectionId currentId = iCurrentColId;
+ SetDataToEditorL();
+ iUnifiedEditor.UpdateFormL();
+ CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+ if( dlg->ExecuteLD( R_CALEN_DB_CHANGE_QUERY ) )
+ {
+ iCurrentColId = currentId;
+ SetDataToEditorL(iCurrentColId);
+ iUnifiedEditor.UpdateFormL();
+ }
+ }
+ CleanupStack::PopAndDestroy( &childEntries );
+ }
// End of File
--- a/calendarui/editors/src/calenunifiededitor.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/editors/src/calenunifiededitor.cpp Tue May 04 16:18:23 2010 +0100
@@ -569,11 +569,21 @@
// Intentional fall through to EEikBidCancel below
iEntryUiOutParams.iAction = ENoAction;
iEntryUiOutParams.iSpare = 0;
+ MCalenContext& context = iServices->Context();
+ HBufC* fileNamePtr = context.GetCalAlarmEntryFileNameL();
+ TCalLocalUid localUid = context.CalAlarmLocalUidL();
+ if (fileNamePtr != NULL && !fileNamePtr->CompareF(iGlobalData->GetCalFileNameForCollectionId(context.InstanceId().iColId))
+ && localUid == context.InstanceId().iEntryLocalUid)
+ {
+ context.ResetCalAlarmEntryFileName();
+ break;
+ }
// Fall through...
}
case ECalenEditSeries:
case ECalenEditOccurrence:
case EAknCmdExit:
+ case EAknSoftkeyExit:
case EEikBidCancel:
{
// EEikBidCancel is called when Red End key is pressed or
@@ -592,6 +602,9 @@
{
PIM_TRAPD_HANDLE( TryToSaveNoteOnForcedExitL() );
}
+ if(EAknSoftkeyExit == aButtonId)
+ iServices->IssueCommandL(aButtonId);
+
break;
}
case EAknSoftkeyDone:
@@ -658,8 +671,8 @@
TKeyResponse CCalenUnifiedEditor::OfferKeyEventL( const TKeyEvent& aKeyEvent,
TEventCode aType )
{
- TRACE_ENTRY_POINT;
- TBool isMapIconHandled = EFalse;
+
+ TRACE_ENTRY_POINT;
TKeyResponse keyResponse( EKeyWasNotConsumed );
TInt ctrlid=IdOfFocusControl();
@@ -696,102 +709,18 @@
keyResponse = EKeyWasConsumed;
break;
case EKeyEnter: // For Enter key
+ case EKeyDelete: // For Delete key
{
keyResponse = CAknForm::OfferKeyEventL(aKeyEvent,aType); // Let framework handle the key event
- // when enter key is pressed on subject line or on location line, call AddPictureL to recalculate the map icon position properly
- // as location field could habe moved up or down
- if(ctrlid == ECalenEditorPlace || ctrlid == ECalenEditorSubject)
- {
- CCalGeoValue* geoValue = iEditorDataHandler->Entry().GeoValueL();
- if(geoValue)
- {
- isMapIconHandled = ETrue;
- AddPictureL();
- delete geoValue;
- }
- }
- }
- break;
- case EKeyDelete:
- {
- if(ctrlid == ECalenEditorPlace)
- {
- CCalGeoValue* geoValue = iEditorDataHandler->Entry().GeoValueL();
- if(geoValue)
- {
- CEikRichTextEditor* locationControl = static_cast<CEikRichTextEditor*>(Control(ECalenEditorPlace));
- CRichText* text = locationControl->RichText();
- TPtrC ptr = text->Read(0,text->DocumentLength());
- TInt pos = ptr.Locate(TChar(CEditableText::EPictureCharacter));
- if(locationControl->CursorPos() == pos)
- {
- isMapIconHandled = ETrue;
- keyResponse = EKeyWasConsumed;
- delete geoValue;
- break;
- }
- delete geoValue;
- }
- }
- keyResponse = CAknForm::OfferKeyEventL(aKeyEvent,aType); // Let framework handle the key event
}
break;
case EKeyBackspace: // For back space character
{
- if(ctrlid == ECalenEditorPlace)
- {
- CCalGeoValue* geoValue = iEditorDataHandler->Entry().GeoValueL();
- if(geoValue)
- {
- CEikRichTextEditor* locationControl = static_cast<CEikRichTextEditor*>(Control(ECalenEditorPlace));
- CRichText* text = locationControl->RichText();
- TPtrC ptr = text->Read(0,text->DocumentLength());
- TInt pos = ptr.Locate(TChar(CEditableText::EPictureCharacter));
- TInt curpos = locationControl->CursorPos();
-
- // When only one visible character is there and picture byte is there at second position, then
- // empty the location field and redraw the map icon
- if(text->DocumentLength() <= 2)
- {
- TBuf<1> newLocation;
- SetEdwinTextL(ECalenEditorPlace, &newLocation);
- keyResponse = EKeyWasConsumed;
- delete geoValue;
- isMapIconHandled = ETrue;
- AddPictureL();
- break;
- }
- // when cursor position is at the end, then since, picture byte is at the end
- // delete last but one character (for user, it looks as if last visible character is being deleted)
- // and redraw the icon
- else if( curpos == pos + 1)
- {
- text->DeleteL(text->DocumentLength() - 2,1);
-
- AddPictureL();
- locationControl->SetCursorPosL(curpos - 1, EFalse);
- isMapIconHandled = ETrue;
- keyResponse = EKeyWasConsumed;
- delete geoValue;
- break;
- }
- delete geoValue;
- }
- }
- // This is to handle backspaces in subject field when there nore that one lines,
- // location field will move up, hence, need to redraw the map icon
- else if(ctrlid == ECalenEditorSubject)
+ if(ctrlid == ECalenEditorPlace || ECalenEditorSubject)
{
keyResponse = CAknForm::OfferKeyEventL(aKeyEvent,aType);
- CCalGeoValue* geoValue = iEditorDataHandler->Entry().GeoValueL();
- if(geoValue)
- {
- AddPictureL();
- isMapIconHandled = ETrue;
- delete geoValue;
- }
- break;
}
+ break;
}
case EKeyLeftArrow:
case EKeyRightArrow:
@@ -810,19 +739,6 @@
default:
{
keyResponse = CAknForm::OfferKeyEventL(aKeyEvent,aType);
- if(!isMapIconHandled)
- {
- if((ctrlid == ECalenEditorPlace) || (ctrlid == ECalenEditorSubject))
- {
- CCalGeoValue* geoValue = iEditorDataHandler->Entry().GeoValueL();
- if(geoValue)
- {
- isMapIconHandled = ETrue;
- AddPictureL();
- delete geoValue;
- }
- }
- }
}
break;
}
@@ -1065,12 +981,7 @@
TRACE_ENTRY_POINT;
SetEditableL(ETrue);
- CCalGeoValue* geoValue = iEditorDataHandler->Entry().GeoValueL();
- if(geoValue)
- {
- AddPictureL();
- delete geoValue;
- }
+
TCallBack callback( LocaleCallback, this );
iLocaleChangeNotifier =
CEnvironmentChangeNotifier::NewL( EActivePriorityLogonA, callback );
@@ -1144,7 +1055,8 @@
OnCmdDeleteNoteL();
break;
case EAknCmdExit:
- OnCmdExitL();
+ case EAknSoftkeyExit:
+ OnCmdExitL(aCommandId);
break;
case EAknCmdHelp:
OnCmdHelpL();
@@ -1332,14 +1244,6 @@
CCoeControl::HandleResourceChange( aType );
- CCalGeoValue* geoValue = NULL;
- TRAP_IGNORE(geoValue = iEditorDataHandler->Entry().GeoValueL());
- if(geoValue)
- {
- TRAP_IGNORE(AddPictureL());
- delete geoValue;
- }
-
TRACE_EXIT_POINT;
}
@@ -1521,12 +1425,12 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CCalenUnifiedEditor::OnCmdExitL()
+void CCalenUnifiedEditor::OnCmdExitL(TInt aCmd)
{
- TRACE_ENTRY_POINT;
-
- TryExitL( EAknCmdExit );
-
+ TRACE_ENTRY_POINT;
+
+ TryExitL( aCmd );
+
TRACE_EXIT_POINT;
}
@@ -1538,7 +1442,13 @@
//
void CCalenUnifiedEditor::TryToDeleteNoteL( TBool /* aIsViaDeleteMenu */ )
{
- TRACE_ENTRY_POINT;
+ TRACE_ENTRY_POINT;
+
+ TInt attachmentCount = iServices->GetAttachmentData()->NumberOfItems();
+ if(Edited().AttachmentCount() || attachmentCount)
+ {
+ iServices->GetAttachmentData()->Reset();
+ }
if (IsCreatingNewEntry())
{
iEntryUpdater->TryDeleteInstanceWithUiL( EditorDataHandler().Entry() ,
@@ -2020,7 +1930,7 @@
endDate == CalenDateUtils::BeginningOfDay( endDate ) )
{
TTimeIntervalDays differenceInTime = endDate.DaysFrom(startDate); // fix for AllDayEntry issue
- if( CCalEntry::EAppt == Edited().EntryType() && startDate != endDate && differenceInTime.Int() == 1 )
+ if( CCalEntry::EAppt == Edited().EntryType() && startDate != endDate && differenceInTime.Int() >= 1 )
{
Edited().SetEntryType( CCalEntry::EEvent );
}
@@ -2709,7 +2619,6 @@
{
isReplaceLocation = EFalse;
StoreLocationDetailsToEntryL(landmark);
- AddPictureL(0);
}
}
@@ -2733,7 +2642,6 @@
if(userResponse)
{
StoreLocationDetailsToEntryL(landmark);
- AddPictureL();
}
TRACE_EXIT_POINT;
@@ -2797,7 +2705,6 @@
break;
}
StoreLocationDetailsToEntryL(landmark);
- AddPictureL(0);
TRACE_EXIT_POINT;
}
@@ -2848,7 +2755,6 @@
ShowAddressUpdatedNoticeL();
}
- PreLayoutDynInitL();
TRACE_EXIT_POINT;
}
@@ -3174,14 +3080,7 @@
void CCalenUnifiedEditor::LineChangedL( TInt /* aControlId */ )
{
TRACE_ENTRY_POINT;
-
- CCalGeoValue* geoValue = iEditorDataHandler->Entry().GeoValueL();
- if(geoValue)
- {
- AddPictureL();
- delete geoValue;
- }
-
+
SetMskFromResourceL();
TRACE_EXIT_POINT;
}
@@ -3342,51 +3241,6 @@
TRACE_EXIT_POINT;
}
-// -----------------------------------------------------------------------------
-// CCalenUnifiedEditor::AddPictureL
-// Adds Map icon onto the editors
-// -----------------------------------------------------------------------------
-//
-void CCalenUnifiedEditor::AddPictureL(TInt isNotFirstTime)
- {
- TRACE_ENTRY_POINT;
- return;
-
- // Instantiate CMapIconPicture object 300x300 twips in size
- CEikRichTextEditor* locationControl = static_cast<CEikRichTextEditor*>(Control(ECalenEditorPlace));
-
- CRichText* text = locationControl->RichText();
- if(isNotFirstTime)
- {
- TPtrC ptr = text->Read(0,text->DocumentLength());
- TInt pos = ptr.Locate(TChar(CEditableText::EPictureCharacter));
- if(pos != -1) // If picture found, delete it so that it cna be drawn at new place
- {
- TRAP_IGNORE(text->DeleteL(pos,1));
- }
- }
-
- // Get the rect of the caption of ECalenEditorPlace control
- CEikLabel* label = this->ControlCaption(ECalenEditorPlace);
- TRect rect = label->Rect();
-
- CMapsIconPicture* picture = new( ELeave )CMapsIconPicture(/* TSize( 300, 300 )*/ *iServices, rect );
- CleanupStack::PushL(picture);
- //Prepare the picture header, which will be inserted into the rich text
- TPictureHeader header;
- header.iPicture = TSwizzle<CPicture>(picture);
-
- // Position where we insert picture is not valid as it always draws icon depending the rect we provide
-
- text->InsertL(text->DocumentLength(), header);
-
- locationControl->HandleTextChangedL();
- CleanupStack::Pop(); // picture
-
- Control(ECalenEditorPlace)->DrawNow();
-
- TRACE_EXIT_POINT;
- }
// -----------------------------------------------------------------------------
// CCalenUnifiedEditor::AttachmentNamesL
--- a/calendarui/editors/src/calenunifiededitorcontrol.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/editors/src/calenunifiededitorcontrol.cpp Tue May 04 16:18:23 2010 +0100
@@ -237,7 +237,10 @@
iRepeatField->SetDataToEditorL();
}
- iDbField->SetDataToEditorL();
+ if(!iDbField->IsCalendarEdited())
+ {
+ iDbField->SetDataToEditorL();
+ }
if( CCalEntry::ETodo != iUnifiedEditor.GetEntryType() )
{
@@ -1096,6 +1099,13 @@
result = CalenDateUtils::BeginningOfDay( result );
}
+ if( iAllDayField->IsAllDayEvent() )
+ {
+ TTime endDate = iUnifiedEditor.Edited().EndDateTime();
+ endDate = CalenDateUtils::BeginningOfDay( endDate );
+ iUnifiedEditor.Edited().SetEndDateTimeL(endDate);
+ }
+
resDT = result.DateTime();
TRACE_EXIT_POINT;
return result;
@@ -1139,6 +1149,8 @@
// In Editor it should be displayed as "StartDate: 15-08-2010 & EndDate:15-08-2010"
// But, while saving EndDate is saved as 12:00am, 16-08-2010.
TTime startDate = iUnifiedEditor.Edited().StartDateTime();
+ startDate = CalenDateUtils::BeginningOfDay( startDate );
+ iUnifiedEditor.Edited().SetStartDateTimeL(startDate);
if( result >= startDate )
{
result += TTimeIntervalDays( KOneDay );
@@ -1417,20 +1429,11 @@
// For allday (1 day) event Eg. "Start:- 12:00am, 15-08-2010 & End:-12:00am, 16-08-2010"
// In Editor it should be displayed as "StartDate: 15-08-2010 & EndDate:15-08-2010"
// No time filed is displayed.
- if ( end > start )
+ end -= TTimeIntervalDays( KOneDay );
+ if ( end < start )
{
- //end -= TTimeIntervalDays( KOneDay );
- //end contains the time component also, even for same day end would be greater then start
- //subtracting 1 from end will give end as one day before start.
- //For All day event Start date and End Date are same so assigning start to end.
end = start;
}
- else if( end == start )
- {
- // For allday event minimum duration is 1day.
- TTime endDate = start + TTimeIntervalDays( KOneDay );
- iUnifiedEditor.Edited().SetEndDateTimeL( endDate );
- }
}
SetDateField( ECalenEditorEndDate, end, ETrue );
--- a/calendarui/globaldata/BWINS/calenglobaldatau.def Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/BWINS/calenglobaldatau.def Tue May 04 16:18:23 2010 +0100
@@ -23,7 +23,7 @@
?ResetKeyEventQueue@CCalenGlobalData@@QAEXXZ @ 22 NONAME ; void CCalenGlobalData::ResetKeyEventQueue(void)
?GetQueuedKeyEvent@CCalenGlobalData@@QAEHAAUTKeyEvent@@AAW4TEventCode@@@Z @ 23 NONAME ; int CCalenGlobalData::GetQueuedKeyEvent(struct TKeyEvent &, enum TEventCode &)
?CalenSendL@CCalenGlobalData@@QAEAAVCCalenSend@@XZ @ 24 NONAME ; class CCalenSend & CCalenGlobalData::CalenSendL(void)
- ?NewL@CCalenGlobalData@@SAPAV1@AAVMCalProgressCallBack@@PAVMCalenContextChangeObserver@@@Z @ 25 NONAME ; class CCalenGlobalData * CCalenGlobalData::NewL(class MCalProgressCallBack &, class MCalenContextChangeObserver *)
+ ?NewL@CCalenGlobalData@@SAPAV1@AAVMCalProgressCallBack@@PAVMCalenContextChangeObserver@@PAVMCalenDBChangeObserver@@@Z @ 25 NONAME ; class CCalenGlobalData * CCalenGlobalData::NewL(class MCalProgressCallBack &, class MCalenContextChangeObserver *, class MCalenDBChangeObserver *)
?EntryViewExists@CCalenGlobalData@@QAEHXZ @ 26 NONAME ; int CCalenGlobalData::EntryViewExists(void)
?AttemptToRetrieveDefaultMailboxL@CCalenGlobalData@@QAEHAAUTMailboxInfo@CMRMailboxUtils@@@Z @ 27 NONAME ; int CCalenGlobalData::AttemptToRetrieveDefaultMailboxL(struct CMRMailboxUtils::TMailboxInfo &)
?GetAllCalendarInfoL@CCalenGlobalData@@QAEXAAV?$RPointerArray@VCCalCalendarInfo@@@@@Z @ 28 NONAME ; void CCalenGlobalData::GetAllCalendarInfoL(class RPointerArray<class CCalCalendarInfo> &)
--- a/calendarui/globaldata/eabi/calenglobaldatau.def Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/eabi/calenglobaldatau.def Tue May 04 16:18:23 2010 +0100
@@ -31,7 +31,7 @@
_ZN16CCalenGlobalData21InitializeGlobalDataLEv @ 30 NONAME
_ZN16CCalenGlobalData29GetCalFileNameForCollectionIdEh @ 31 NONAME
_ZN16CCalenGlobalData32AttemptToRetrieveDefaultMailboxLERN15CMRMailboxUtils12TMailboxInfoE @ 32 NONAME
- _ZN16CCalenGlobalData4NewLER20MCalProgressCallBackP27MCalenContextChangeObserver @ 33 NONAME
+ _ZN16CCalenGlobalData4NewLER20MCalProgressCallBackP27MCalenContextChangeObserverP22MCalenDBChangeObserver @ 33 NONAME
_ZN16CCalenGlobalData7ContextEv @ 34 NONAME
_ZN16CCalenGlobalData7ReleaseEv @ 35 NONAME
_ZN16CCalenGlobalData8InstanceEv @ 36 NONAME
--- a/calendarui/globaldata/group/CalenGlobalData.mmp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/group/CalenGlobalData.mmp Tue May 04 16:18:23 2010 +0100
@@ -37,7 +37,8 @@
SOURCE calenvcalexport.cpp
SOURCE calencontextimpl.cpp
-SOURCE calenfilemapping.cpp
+SOURCE calenfilemapping.cpp
+SOURCE calendbchangenotifier.cpp
USERINCLUDE ../inc
USERINCLUDE ../../inc
--- a/calendarui/globaldata/group/bld.inf Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/group/bld.inf Tue May 04 16:18:23 2010 +0100
@@ -27,6 +27,7 @@
//organizer/calendarui/inc
../inc/calensend.h |../../inc/calensend.h
../inc/calencontextchangeobserver.h |../../inc/calencontextchangeobserver.h
+../inc/calendbchangenotifier.h |../../inc/calendbchangenotifier.h
//organizer/inc
../inc/calenglobaldata.h |../../../inc/calenglobaldata.h
--- a/calendarui/globaldata/inc/calencontextimpl.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/inc/calencontextimpl.h Tue May 04 16:18:23 2010 +0100
@@ -214,6 +214,32 @@
* @brief Resets calendar file name in context
*/
void ResetCalendarFileName();
+ /**
+ * @brief Set calendar file name of Alarm entry in context
+ */
+ void SetCalAlarmEntryFileNameL(const TDesC& aName);
+
+ /**
+ * @brief Get calendar filename
+ *
+ * @return HBufC pointer to calendar filename of Alarm entry
+ */
+ HBufC* GetCalAlarmEntryFileNameL() const;
+
+ /**
+ * @brief Resets Alarm Entry calendar file name in context
+ */
+ void ResetCalAlarmEntryFileName();
+
+ /**
+ * @brief set Alarm Entry LocalUid in context
+ */
+ void SetCalAlarmEntryLocalUid(TCalLocalUid aLocalId);
+
+ /**
+ * @brief Get Alarm Entry LocalUid from context
+ */
+ TCalLocalUid CalAlarmLocalUidL() const;
private: // Data
MCalenContextChangeObserver* iObserver;
@@ -227,6 +253,8 @@
// Multiple context ids
RArray<TCalenInstanceId> iMutlipleContextIds;
HBufC* iCalenFileName;
+ HBufC* iCalAlarmEntryFileName;
+ TCalLocalUid iCalAlarmLocalUid;
};
#endif // CALENCONTEXTIMPL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/globaldata/inc/calendbchangenotifier.h Tue May 04 16:18:23 2010 +0100
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2006 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: Notifies observers of external changes to the calendar database
+*
+*/
+
+
+#ifndef __CALENDBCHANGENOTIFIER_H
+#define __CALENDBCHANGENOTIFIER_H
+
+// INCLUDES
+#include <e32base.h>
+
+#include <calchangecallback.h> //MCalChangeCallBack
+
+// FORWARD DECLARATIONS
+class CCalSession; //Calendar session
+class CCalenGlobalData; //Calendar global data
+
+// CLASS DECLARATION
+
+/**
+* Observer class for database changes. Forwards callback from
+* MCalChangeCallBack2
+*/
+class MCalenDBChangeObserver
+ {
+ public:
+ virtual void HandleDBChangeL() = 0;
+ };
+
+/**
+* CCalenDbChangeNotifier buffers notifications from MCalChangeCallBack2 and
+* only notifies its observers after a set period has elapsed. This prevents
+* Calendar views refreshing more often than necessary during a sync operation
+*/
+NONSHARABLE_CLASS(CCalenDbChangeNotifier) : public CActive,
+ public MCalChangeCallBack2
+ {
+ public: // Constructors and destructor
+ /**
+ * Constructor.
+ * @param aGlobalData global data reference
+ * @return a pointer to the new CCalenDbChangeNotifier instance
+ */
+ static CCalenDbChangeNotifier* NewL( CCalSession& aSession );
+
+ /**
+ * Destructor.
+ */
+ ~CCalenDbChangeNotifier();
+
+ public:
+ /**
+ * Allow CCalenViews to register for database change notifications
+ * @param aDBObserver Observer to register
+ */
+ void RegisterObserverL( MCalenDBChangeObserver& aDBObserver );
+
+ /**
+ * Allow CCalenViews to deregister for database change notifications
+ * @param aDBObserver Observer to deregister
+ */
+ void DeRegisterObserverL( MCalenDBChangeObserver& aDBObserver );
+
+ /**
+ * Returns the time of the last call to MCalChangeCallBack2::CalChangeNotification
+ * This is not necessarily the same time as the last notification issued by
+ * this class
+ * @return Time of the last database modification as TTime
+ */
+ TTime LastDBModificationTime() const;
+
+ public:
+ /**
+ * From MCalChangeCallBack2
+ * Called when the calendar database is changed through another
+ * CCalSession
+ * @param aChangeItems array of database items changed
+ */
+ void CalChangeNotification( RArray<TCalChangeEntry>& aChangeItems );
+
+ private:
+ /**
+ * C++ default constructor.
+ * @param aGlobalData global data reference
+ */
+ CCalenDbChangeNotifier( CCalSession& aSession );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ * Performs any construction which may leave
+ */
+ void ConstructL();
+
+ /**
+ * From CActive
+ * Called when outstanding asynchronous request completes
+ * This will be called when iNotificationTimer either completes
+ * or is cancelled
+ */
+ void RunL();
+
+ /**
+ * From CActive
+ * Called by the active scheduler if RunL leaves
+ * Ensures we are ready to receive the next database event
+ * @param aError System wide error code
+ */
+ TInt RunError( TInt aError );
+
+ /**
+ * From CActive
+ * Implements cancellation of outstanding asynchronous requests
+ * Cancels iNotificationTimer if started
+ */
+ void DoCancel();
+
+ private: // Data
+
+ //Database change observer filter
+ CCalChangeNotificationFilter* iCalChangeFilter;
+
+ //Observer array
+ RPointerArray<MCalenDBChangeObserver> iDBObservers;
+
+ //Timer to limit the amount of notifications issued by this class
+ RTimer iNotificationTimer;
+
+ //The time of the last received notification
+ TTime iLastDbChangeNotification;
+
+ //Flag to restart the timer after cancelling last tiemr request
+ TBool iRestartTimer;
+
+ CCalSession& iSession;
+ };
+
+#endif // __CALENDBCHANGENOTIFIER_H
+
+// End of File
--- a/calendarui/globaldata/inc/calenfilemapping.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/inc/calenfilemapping.h Tue May 04 16:18:23 2010 +0100
@@ -22,6 +22,7 @@
#include <calsession.h>
class CCalEntryView;
+class CCalenDbChangeNotifier;
/**
@@ -107,6 +108,18 @@
*/
CCalSession *GetSessionPtr();
+ /*
+ * Set the dbchangenotifier observer
+ * @param CCalSession pointer to a session
+ */
+ void SetDBChangeNotifier(CCalenDbChangeNotifier* aDBChangeNotifier );
+
+ /*
+ * Get the dbchangenotifier observer.
+ * @return CCalSession pointer to session.
+ */
+ CCalenDbChangeNotifier *GetDBChangeNotifier();
+
private:
/**
@@ -125,7 +138,8 @@
TInt iStatus;
CCalSession* iSessionPtr;
TCalCollectionId iColId;
- CCalEntryView* iEntryView;
+ CCalEntryView* iEntryView;
+ CCalenDbChangeNotifier* iDBChangeNotifier;
};
--- a/calendarui/globaldata/inc/calenglobaldata.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/inc/calenglobaldata.h Tue May 04 16:18:23 2010 +0100
@@ -30,6 +30,8 @@
#include <calentryview.h> // Calendar Entry view
#include <e32hashtab.h> //RHashSet
+#include "calendbchangenotifier.h" // MCalenDBChangeObserver
+
#include <calenmulticaluids.hrh>
@@ -76,7 +78,8 @@
*/
IMPORT_C static CCalenGlobalData*
NewL( MCalProgressCallBack& aCalCallBack,
- MCalenContextChangeObserver* aNotifier=NULL );
+ MCalenContextChangeObserver* aNotifier=NULL,
+ MCalenDBChangeObserver* aDBNotifier=NULL);
/**
* Constructor. Returns a new instance of CCalenGlobalData if
@@ -315,7 +318,8 @@
* By default Symbian 2nd phase constructor is private.
* Doesn't take ownership of aNotifier.
*/
- void ConstructL( MCalenContextChangeObserver* aNotifier );
+ void ConstructL( MCalenContextChangeObserver* aNotifier,
+ MCalenDBChangeObserver* aDBNotifier);
/**
* Private Destructor. Users of this class should call Release() instead
@@ -485,6 +489,7 @@
TBool iCalendarForcedExit;
CCalSession* iCalendarsSession;
RPointerArray<CCalCalendarInfo> iCalendarInfoList;
+ MCalenDBChangeObserver* iDBChangeNotifier;
};
#endif // CALENGLOBALDATA_H
--- a/calendarui/globaldata/src/calencontextimpl.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/src/calencontextimpl.cpp Tue May 04 16:18:23 2010 +0100
@@ -85,6 +85,11 @@
CCalenContextImpl::~CCalenContextImpl()
{
TRACE_ENTRY_POINT;
+ if(iCalAlarmEntryFileName)
+ {
+ delete iCalAlarmEntryFileName;
+ iCalAlarmEntryFileName = NULL;
+ }
TRACE_EXIT_POINT;
}
@@ -506,4 +511,69 @@
TRACE_EXIT_POINT;
}
+// -----------------------------------------------------------------------------
+// CCalenContextImpl::SetCalAlarmEntryFileNameL
+// Set calendar file name of Alarm entry
+// -----------------------------------------------------------------------------
+void CCalenContextImpl::SetCalAlarmEntryFileNameL(const TDesC& aName)
+ {
+ TRACE_ENTRY_POINT
+ if (iCalAlarmEntryFileName)
+ {
+ delete iCalAlarmEntryFileName;
+ iCalAlarmEntryFileName = NULL;
+ }
+ iCalAlarmEntryFileName = aName.AllocL();
+ TRACE_EXIT_POINT
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenContextImpl::GetCalAlarmEntryFileNameL
+// Get calendar file name of Alarm entry
+// -----------------------------------------------------------------------------
+HBufC* CCalenContextImpl::GetCalAlarmEntryFileNameL() const
+ {
+ TRACE_ENTRY_POINT
+ TRACE_EXIT_POINT
+
+ return iCalAlarmEntryFileName;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenContextImpl::ResetCalAlarmEntryFileName
+// Resets Alarm Entry file name in context
+// -----------------------------------------------------------------------------
+void CCalenContextImpl::ResetCalAlarmEntryFileName()
+ {
+ TRACE_ENTRY_POINT
+ if(iCalAlarmEntryFileName)
+ {
+ delete iCalAlarmEntryFileName;
+ iCalAlarmEntryFileName = NULL;
+ }
+
+ TRACE_EXIT_POINT
+ }
+// -----------------------------------------------------------------------------
+// CCalenContextImpl::ResetCalAlarmEntryFileName
+// set Alarm Entry LocalUid in context
+// -----------------------------------------------------------------------------
+void CCalenContextImpl::SetCalAlarmEntryLocalUid(TCalLocalUid aLocalId)
+ {
+ TRACE_ENTRY_POINT
+ iCalAlarmLocalUid = aLocalId;
+ TRACE_EXIT_POINT
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCalenContextImpl::ResetCalAlarmEntryFileName
+// Get Alarm Entry LocalUid from context
+// -----------------------------------------------------------------------------
+TCalLocalUid CCalenContextImpl::CalAlarmLocalUidL() const
+ {
+ TRACE_ENTRY_POINT
+ TRACE_EXIT_POINT
+ return iCalAlarmLocalUid;
+ }
// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/globaldata/src/calendbchangenotifier.cpp Tue May 04 16:18:23 2010 +0100
@@ -0,0 +1,287 @@
+/*
+* Copyright (c) 2006 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: Notifies observers of external changes to the calendar database
+*
+*/
+
+
+
+//debug
+#include "calendarui_debug.h"
+
+// INCLUDE FILES
+#include "calendbchangenotifier.h" // CCalenDbChangeNotifier
+#include "calenglobaldata.h" // Calendar global data
+#include <calsession.h> // CalSession
+
+// -----------------------------------------------------------------------------
+// KTimerResolution limits the number of notifications sent to registered
+// MCalenDBChangeObserver instances. Notifications may come from
+// MCalChangeCallBack2 at a very high rate which could impact performance,
+// for example by causing constant view refreshes.
+// CCalenDbChangeNotifier notifies observers when KTimerResolution has elapsed
+// since the last notification was received from MCalChangeCallBack2
+// -----------------------------------------------------------------------------
+const TInt KTimerResolution = 1000000; // 1 Second
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::CCalenDbChangeNotifier
+// C++ default constructor can NOT contain any code, that might leave.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+CCalenDbChangeNotifier::CCalenDbChangeNotifier( CCalSession& aSession )
+ : CActive( EPriorityNormal ),
+ iSession( aSession )
+ {
+ TRACE_ENTRY_POINT;
+
+ iRestartTimer = EFalse;
+
+ TRACE_EXIT_POINT;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::NewL
+// Two-phased constructor.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+CCalenDbChangeNotifier* CCalenDbChangeNotifier::NewL( CCalSession& aSession )
+ {
+ TRACE_ENTRY_POINT;
+
+ CCalenDbChangeNotifier* self = new( ELeave ) CCalenDbChangeNotifier( aSession );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ TRACE_EXIT_POINT;
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::ConstructL
+// Symbian 2nd phase constructor can leave.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+void CCalenDbChangeNotifier::ConstructL()
+ {
+ TRACE_ENTRY_POINT;
+
+ // We want to receive notifications for the full agenda date range
+ TCalTime start, end;
+ start.SetTimeUtcL( TCalTime::MinTime() );
+ end.SetTimeUtcL( TCalTime::MaxTime() );
+ CalCommon::TCalTimeRange range( start, end );
+
+ // Create a notification filter
+ iCalChangeFilter = CCalChangeNotificationFilter::NewL(
+ MCalChangeCallBack2::EChangeEntryAll,
+ ETrue,
+ range );
+
+ // Enable database change notifications on current global data session
+ iSession.StartChangeNotification( *this, *iCalChangeFilter );
+
+ // Create a timer to limit the number of notifications broadcast
+ iNotificationTimer.CreateLocal();
+
+ // Active object, add to active scheduler
+ CActiveScheduler::Add( this );
+
+ TRACE_EXIT_POINT;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::~CCalenDbChangeNotifier
+// Destructor
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+CCalenDbChangeNotifier::~CCalenDbChangeNotifier()
+ {
+ TRACE_ENTRY_POINT;
+
+ Cancel();
+ // Reset the observer array. Array contents are NOT owned by this class
+ iDBObservers.Reset();
+
+ iNotificationTimer.Close();
+
+ // Disable database change notifications on current global data session
+ PIM_TRAPD_HANDLE( iSession.StopChangeNotification() );
+
+ // Destroy the notification filter
+ delete iCalChangeFilter;
+
+ TRACE_EXIT_POINT;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::LastDBModificationTime
+// Returns the time of the last database change notification. This may not be
+// the time of the last notification sent to MCalenDBChangeObservers.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+TTime CCalenDbChangeNotifier::LastDBModificationTime() const
+ {
+ TRACE_ENTRY_POINT;
+
+ TRACE_EXIT_POINT;
+ return iLastDbChangeNotification;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::CalChangeNotification
+// Called when a change to the agenda database occurs from a different session
+// to the one we are currently using.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+void CCalenDbChangeNotifier::CalChangeNotification( RArray<TCalChangeEntry>& /*aChangeItems*/ )
+ {
+ TRACE_ENTRY_POINT;
+
+ // Always update the last notification time, even if we don't notify
+ // our observers
+ iLastDbChangeNotification.UniversalTime();
+ if( !IsActive() )
+ {
+ iNotificationTimer.After( iStatus, KTimerResolution );
+ SetActive();
+ }
+ else
+ {
+ iRestartTimer = ETrue;
+ iNotificationTimer.Cancel();
+ }
+
+ TRACE_EXIT_POINT;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::RegisterObserverL
+// Adds the passed observer to the observer array. All observers in the array
+// will be notified of changes to the agenda database.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+ void CCalenDbChangeNotifier::RegisterObserverL( MCalenDBChangeObserver& aDBObserver )
+ {
+ TRACE_ENTRY_POINT;
+
+ iDBObservers.Append( &aDBObserver );
+
+ TRACE_EXIT_POINT;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::DeRegisterObserverL
+// Removes the passed observer to the observer array. All observers in the array
+// will be notified of changes to the agenda database.
+// -----------------------------------------------------------------------------
+void CCalenDbChangeNotifier::DeRegisterObserverL( MCalenDBChangeObserver& aDBObserver )
+ {
+ TRACE_ENTRY_POINT;
+
+ for( TInt x = 0; x < iDBObservers.Count(); ++x )
+ {
+ if( iDBObservers[x] == &aDBObserver )
+ {
+ iDBObservers.Remove( x );
+ return;
+ }
+ }
+ User::Leave( KErrNotFound );
+
+ TRACE_EXIT_POINT;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::RunL
+// From CActive::RunL
+// Called when notification timer expires
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+void CCalenDbChangeNotifier::RunL()
+ {
+ TRACE_ENTRY_POINT;
+
+ switch( iStatus.Int() )
+ {
+ case KErrCancel:
+ {
+ // The normal reason for the timer being cancelled is another
+ // database change. Restart the timer.
+ if( iRestartTimer )
+ {
+ iRestartTimer = EFalse;
+ iNotificationTimer.After( iStatus, KTimerResolution );
+ SetActive();
+ }
+ }
+ break;
+
+ case KErrNone:
+ {
+ //Timer completion, notify observers
+ for( TInt x = 0; x < iDBObservers.Count(); ++x )
+ {
+ iDBObservers[x]->HandleDBChangeL();
+ }
+ }
+ break;
+
+ default:
+ {
+ User::Leave( KErrArgument );
+ }
+ break;
+ }
+
+ TRACE_EXIT_POINT;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::RunError
+// From CActive::RunError
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+TInt CCalenDbChangeNotifier::RunError( TInt aError )
+ {
+ TRACE_ENTRY_POINT;
+
+ //RunL leaving means that the view could not be refreshed.
+ //Theres not much we can do except be ready for the next database event.
+ iRestartTimer = EFalse;
+
+ TRACE_EXIT_POINT;
+ return aError;
+ }
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::DoCancel
+// From CActive::DoCancel
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+void CCalenDbChangeNotifier::DoCancel()
+ {
+ TRACE_ENTRY_POINT;
+
+ // Stop the notification timer
+ iRestartTimer = EFalse;
+ iNotificationTimer.Cancel();
+
+ TRACE_EXIT_POINT;
+ }
+
+// End of File
--- a/calendarui/globaldata/src/calenfilemapping.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/src/calenfilemapping.cpp Tue May 04 16:18:23 2010 +0100
@@ -16,6 +16,7 @@
*/
#include "calendarui_debug.h"
#include "calenfilemapping.h"
+#include "calendbchangenotifier.h" // MCalenDBChangeObserver
#include <calsession.h>
#include <calentryview.h> // Calendar Entry view
@@ -68,6 +69,12 @@
{
TRACE_ENTRY_POINT
+ if( iDBChangeNotifier )
+ {
+ delete iDBChangeNotifier;
+ iDBChangeNotifier = NULL;
+ }
+
if(iEntryView)
{
delete iEntryView;
@@ -195,4 +202,27 @@
return iSessionPtr;
}
+/*
+ * Set the dbchangenotifier observer
+ * @param CCalSession pointer to a session
+ */
+void CCalenFileMapping::SetDBChangeNotifier(CCalenDbChangeNotifier* aDBChangeNotifier )
+ {
+ TRACE_ENTRY_POINT;
+
+ iDBChangeNotifier = aDBChangeNotifier;
+ TRACE_EXIT_POINT;
+ }
+
+/*
+ * Get the dbchangenotifier observer.
+ * @return CCalSession pointer to session.
+ */
+CCalenDbChangeNotifier *CCalenFileMapping::GetDBChangeNotifier()
+ {
+ TRACE_ENTRY_POINT;
+ TRACE_EXIT_POINT;
+ return iDBChangeNotifier;
+ }
+
//End
--- a/calendarui/globaldata/src/calenglobaldata.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/globaldata/src/calenglobaldata.cpp Tue May 04 16:18:23 2010 +0100
@@ -48,13 +48,19 @@
#include <CalendarInternalCRKeys.h>
#include <calenmulticalutil.h>
+#include <BAUTILS.H>
+#include <calensvrmissedalarmmanagerresource.rsg>
// Default Calendar database path
_LIT( KCalendarDatabaseFilePath, "c:calendar" );
_LIT( KPhoneCalendar,"Personal" );
_LIT( KExtCalendar,"Ext calendar" );
const TInt KBuffLength = 24;
-_LIT(KPhoneCalendarName,"PhoneCalendar");
+
+_LIT(KPersonal,"Personal");
+_LIT(KFamily,"Family");
+_LIT(KFriends,"Friends");
+_LIT( KMissedAlarmResourceFile, "z:\\resource\\CalenSvrMissedAlarmManagerResource.rsc"); // changes done
// ============================ MEMBER FUNCTIONS ===============================
@@ -87,7 +93,8 @@
// ----------------------------------------------------------------------------
//
EXPORT_C CCalenGlobalData* CCalenGlobalData::NewL( MCalProgressCallBack& aCalCallBack,
- MCalenContextChangeObserver* aNotifier )
+ MCalenContextChangeObserver* aNotifier,
+ MCalenDBChangeObserver* aDBNotifier)
{
TRACE_ENTRY_POINT;
@@ -106,7 +113,7 @@
// calls CCalenGlobalData::InstanceL in ConstructL and then ConstructL
// leaves, we will double delete the global data.
++self->iRefCount;
- self->ConstructL( aNotifier );
+ self->ConstructL( aNotifier, aDBNotifier );
CleanupStack::Pop( self );
}
else
@@ -206,7 +213,8 @@
// Symbian 2nd phase constructor can leave.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
-void CCalenGlobalData::ConstructL( MCalenContextChangeObserver* aNotifier )
+void CCalenGlobalData::ConstructL( MCalenContextChangeObserver* aNotifier,
+ MCalenDBChangeObserver* aDBNotifier)
{
TRACE_ENTRY_POINT;
@@ -214,6 +222,8 @@
iNewInstanceViewCreation = NULL;
+ iDBChangeNotifier = aDBNotifier;
+
TRACE_EXIT_POINT;
}
@@ -829,7 +839,8 @@
filemap->SetCalendarFileNameL(calendarFileName);
iNewEntryView = NULL;
- iNewEntryViewCreation = NULL;
+ iNewEntryViewCreation = NULL;
+ CCalenDbChangeNotifier* dbChangeNotifier = NULL;
if(iCalSession)
{
iNewCalSession = NULL;
@@ -841,6 +852,9 @@
filemap->SetCollectionId(tempSession.CollectionIdL());
CreateEntryViewL(tempSession);
filemap->SetEntryView( iNewEntryView );
+ dbChangeNotifier = CCalenDbChangeNotifier::NewL( tempSession );
+ dbChangeNotifier->RegisterObserverL(*iDBChangeNotifier);
+ filemap->SetDBChangeNotifier(dbChangeNotifier);
}
else
{
@@ -851,6 +865,9 @@
filemap->SetEntryView( iNewEntryView );
iGlobalDataOwnsEntryView = EFalse;
iGlobalDataOwnsCalSession = EFalse;
+ dbChangeNotifier = CCalenDbChangeNotifier::NewL( tempSession );
+ dbChangeNotifier->RegisterObserverL(*iDBChangeNotifier);
+ filemap->SetDBChangeNotifier(dbChangeNotifier);
}
iFileMappingArray.Append(filemap);
CleanupStack::Pop(filemap);
@@ -1278,6 +1295,9 @@
CreateEntryViewL(tempSession);
}
fileMapping->SetEntryView( iNewEntryView );
+ CCalenDbChangeNotifier* dbChangeNotifier = CCalenDbChangeNotifier::NewL( tempSession );
+ dbChangeNotifier->RegisterObserverL(*iDBChangeNotifier);
+ fileMapping->SetDBChangeNotifier(dbChangeNotifier);
CleanupStack::PopAndDestroy(aCalendarInfo);
iCalendarInfoList.Append(tempSession.CalendarInfoL());
}
@@ -1369,8 +1389,17 @@
// Mark the CalFile as Hidden
caleninfo->SetEnabled( EFalse );
+
+ TBuf8<KBuffLength> keyBuff;
+
+ // Set the modification time as home time.
+ keyBuff.Zero();
+ TTime modificationTime;
+ modificationTime.HomeTime();
+ TPckgC<TTime> pkgModificationTime(modificationTime);
+ caleninfo->SetPropertyL(keyBuff, pkgModificationTime);
+
// Set the SyncStatus to False
- TBuf8<KBuffLength> keyBuff;
keyBuff.Zero();
keyBuff.AppendNum( ESyncStatus );
TBool syncstatus( EFalse );
@@ -1470,20 +1499,52 @@
RPointerArray<CCalCalendarInfo>& aCalendarInfoList )
{
TRACE_ENTRY_POINT;
+ RFs fsSession;
+ CleanupClosePushL( fsSession );
+ RResourceFile resourceFile;
+ CleanupClosePushL( resourceFile );
+ User::LeaveIfError( fsSession.Connect() );
+ TFileName resourceFileName( KMissedAlarmResourceFile );
+ BaflUtils::NearestLanguageFile( fsSession, resourceFileName );
+ resourceFile.OpenL(fsSession, resourceFileName );
+ resourceFile.ConfirmSignatureL( 0 );
for(TInt index=0;index < iCalendarInfoList.Count();index++)
{
- TPtrC fileNamePtr = iCalendarInfoList[index]->FileNameL();
+
TPtrC calendarNamePtr = iCalendarInfoList[index]->NameL();
+ if(calendarNamePtr.Compare(KPersonal) == 0)
+ {
+ HBufC8* personalBuffer = resourceFile.AllocReadLC( R_CALE_DB_PERSONAL );
+ const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(),
+ ( personalBuffer->Length()+1 )>>1 );
+ HBufC *personalCalendar = ptrPBuffer.AllocL();
+ iCalendarInfoList[index]->SetNameL(*personalCalendar);
+ CleanupStack::PopAndDestroy( personalBuffer );
+ }
+ else if(calendarNamePtr.Compare(KFamily) == 0)
+ {
+ HBufC8* familyBuffer=resourceFile.AllocReadLC( R_CALE_DB_FAMILY );
+ const TPtrC16 ptrFBuffer(( TText16*) familyBuffer->Ptr(),
+ ( familyBuffer->Length()+1 )>>1 );
+ HBufC *familyCalendar = ptrFBuffer.AllocL();
+ iCalendarInfoList[index]->SetNameL(*familyCalendar);
+ CleanupStack::PopAndDestroy( familyBuffer );
+ }
+ else if(calendarNamePtr.Compare(KFriends) == 0)
+ {
+ HBufC8* friendsBuffer = resourceFile.AllocReadLC( R_CALE_DB_FRIENDS );
+ const TPtrC16 ptrFrBuffer(( TText16*) friendsBuffer->Ptr(),
+ ( friendsBuffer->Length()+1 )>>1 );
+ HBufC *friendsCalendar = ptrFrBuffer.AllocL();
+ iCalendarInfoList[index]->SetNameL(*friendsCalendar);
+ CleanupStack::PopAndDestroy( friendsBuffer );
+ }
+
+ aCalendarInfoList.AppendL(iCalendarInfoList[index]);
- //We dont want default calendar PhoneCalendar tobe shown in calendarui.
- if(fileNamePtr.CompareF(KCalendarDatabaseFilePath)
- && calendarNamePtr.CompareF(KPhoneCalendarName))
- {
- aCalendarInfoList.AppendL(iCalendarInfoList[index]);
- }
}
-
+ CleanupStack::PopAndDestroy(2);
TRACE_EXIT_POINT;
}
@@ -1651,6 +1712,9 @@
fileMapper->SetEntryView( iNewEntryView );
iCalendarInfoList.AppendL(newSession->CalendarInfoL());
+ CCalenDbChangeNotifier* dbChangeNotifier = CCalenDbChangeNotifier::NewL( *newSession );
+ dbChangeNotifier->RegisterObserverL(*iDBChangeNotifier);
+ fileMapper->SetDBChangeNotifier(dbChangeNotifier);
}
else
{
@@ -1669,6 +1733,9 @@
}
fileMapper->SetEntryView(iNewEntryView);
+ CCalenDbChangeNotifier* dbChangeNotifier = CCalenDbChangeNotifier::NewL( *iCalSession );
+ fileMapper->SetDBChangeNotifier(dbChangeNotifier);
+ dbChangeNotifier->RegisterObserverL(*iDBChangeNotifier);
iGlobalDataOwnsEntryView = EFalse;
iGlobalDataOwnsCalSession = EFalse;
iCalendarInfoList.AppendL(iCalSession->CalendarInfoL());
--- a/calendarui/group/bld.inf Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/group/bld.inf Tue May 04 16:18:23 2010 +0100
@@ -20,8 +20,6 @@
#include <platform_paths.hrh>
-// Help exports
-#include "../help/group/bld.inf"
PRJ_EXPORTS
../loc/calendar.loc APP_LAYER_LOC_EXPORT_PATH(calendar.loc)
@@ -80,6 +78,9 @@
PRJ_MMPFILES
+// Help files
+#include "../help/group/bld.inf"
+
// commonutils
#include "../commonutils/group/bld.inf"
Binary file calendarui/help/data/xhtml.zip has changed
--- a/calendarui/loc/calendar.loc Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/loc/calendar.loc Tue May 04 16:18:23 2010 +0100
@@ -2628,5 +2628,16 @@
//l:popup_note_wait_window
//
#define qtn_todo_wait_updating_status_notes "Updating status"
+
+//d:Confirmation text when a repeated entry which has exceptions, moving the data base.
+//l:popup_note_window
+//
+#define qtn_calen_db_change_del_exeptions "Exceptions will be deleted, Want to continue?"
+
+//d:Confirmation note shown, when tasks are updated
+//l:popup_note_window
+//w:
+//r:9.2
+#define qtn_todo_all_task_updated "All to-do notes updated"
// End of File
--- a/calendarui/multicaluidialog/src/caldblistboxitemdrawer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/multicaluidialog/src/caldblistboxitemdrawer.cpp Tue May 04 16:18:23 2010 +0100
@@ -103,9 +103,8 @@
iGc->Reset();
- // Ggetting the layout for clolourstrips for list dialog
- TAknWindowComponentLayout tempLayout =
- AknLayoutScalable_Apps::list_cale_time_pane_g6( aItemIndex - iListBox->TopItemIndex() ) ;
+ // Ggetting the layout for clolourstrips for list dialog
+ TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(0);
TAknLayoutRect colourstrips;
colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() );
--- a/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp Tue May 04 16:18:23 2010 +0100
@@ -26,8 +26,6 @@
#include "multicaluidialogmodel.h"
#include "calendarui_debug.h"
-_LIT( KCalendarDatabaseFilePath, "c:calendar" );
-
// ----------------------------------------------------------------------------
// CMultiCalUiDialogModel::CMultiCalUiDialogModel
// Constructor
@@ -150,7 +148,7 @@
{
iCalendarStatus.Append(0);
- /* if (!index) //First create the default session
+ if (!index) //First create the default session
{
const TPtrC name = iCalendarInfoList[index]->FileNameL();
defaultSession->OpenL(name);
@@ -160,7 +158,7 @@
iCalEntryViewArray.Append(entryView);
CleanupStack::Pop(entryView);
}
- else*/
+ else
{
CCalSession* session = CCalSession::NewL(*defaultSession);
CleanupStack::PushL(session);
@@ -307,15 +305,7 @@
CCalCalendarInfo* calendarInfo = calIter->FirstL();
while (calendarInfo)
{
- TPtrC fileNamePtr = calendarInfo->FileNameL();
- if(fileNamePtr.CompareF(KCalendarDatabaseFilePath))
- {
- aCalendarInfoList.AppendL(calendarInfo);
- }
- else
- {
- delete calendarInfo;
- }
+ aCalendarInfoList.AppendL(calendarInfo);
calendarInfo = calIter->NextL();
}
CleanupStack::PopAndDestroy(calIter);
--- a/calendarui/organizerplugin/aiagendapluginengine/inc/AIAgendaPluginEngineImpl.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/organizerplugin/aiagendapluginengine/inc/AIAgendaPluginEngineImpl.h Tue May 04 16:18:23 2010 +0100
@@ -22,7 +22,6 @@
// INCLUDES
#include "CalEngineCallback.h"
#include "CalenEngine.h"
-#include "CalSvrClient.h"
#include "PropertyObserver.h"
#include <calfilechangenotification.h>
@@ -37,7 +36,6 @@
// CLASS DECLARATION
NONSHARABLE_CLASS( CAIAgendaPluginEngineImpl ) : public CBase,
public MCalenEngineListener,
- public MCalSvrAgendaUpdateListener,
public MPropertyChangeHandler,
public MCalFileChangeObserver
@@ -115,13 +113,6 @@
**/
void HandleError(TInt aError);
- public: // From MCalSvrAgendaUpdateListener
- /**
- * ?member_description.
- * @since Series 60 2.6
- **/
- void CalendarServerInitialized(void);
-
public: // From MPropertyChangeHandler
/**
* ?member_description.
@@ -267,9 +258,6 @@
// ?one_line_short_description_of_data
RPointerArray<CCalInstance> iInstanceArray;
- // Calendar server session
- RCalSvrSession iSession;
-
// ?one_line_short_description_of_data
MPluginDataChangeObserver& iDataChangeObserver;
--- a/calendarui/organizerplugin/aiagendapluginengine/src/AIAgendaPluginEngineImpl.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/organizerplugin/aiagendapluginengine/src/AIAgendaPluginEngineImpl.cpp Tue May 04 16:18:23 2010 +0100
@@ -51,8 +51,6 @@
{
TRACE_ENTRY_POINT;
- iSession.ConnectL();
-
if( iObserverType == ECalendarObserver || iObserverType == ECalendarAndTodoObserver )
{
TCallBack environmentChangeCallBack( EnvironmentChangeCallBack, this );
@@ -150,14 +148,12 @@
{
iEnvironmentChangeNotifier->Cancel();
delete iEnvironmentChangeNotifier;
- }
-
- delete iCalendarEngine; // Close() called in destructor
+ }
iInstanceArray.ResetAndDestroy();
iInstanceArray.Close();
- iSession.Close();
+ delete iCalendarEngine; // Close() called in destructor
TRACE_EXIT_POINT;
}
@@ -182,9 +178,9 @@
{
case EDBOffline:
{
- iDBState = EDBInitializing;
- iSession.Initialize( *this );
- }
+ iDBState = EDBInitialized;
+ StateMachine();
+ }
break;
case EDBInitialized:
@@ -556,7 +552,6 @@
delete iCalendarEngine;
iCalendarEngine = NULL;
- iSession.Uninitialize();
TRACE_EXIT_POINT;
}
@@ -880,22 +875,6 @@
}
// ---------------------------------------------------------
-// CAIAgendaPluginEngineImpl::CalendarServerInitialized
-// ?implementation_description
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CAIAgendaPluginEngineImpl::CalendarServerInitialized(void)
-{
- TRACE_ENTRY_POINT;
-
- iDBState = EDBInitialized; // EDBInitializing -> EDBInitialized
- StateMachine();
-
- TRACE_EXIT_POINT;
-}
-
-// ---------------------------------------------------------
// CAIAgendaPluginEngineImpl::EnvironmentChangeCallBack
// ?implementation_description
// (other items were commented in a header).
--- a/calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp Tue May 04 16:18:23 2010 +0100
@@ -95,11 +95,13 @@
TRACE_ENTRY_POINT;
TRequestStatus* pStat = &iStatus;
- User::RequestComplete( pStat, KErrNone );
-
if( IsAdded() )
{
- SetActive();
+ if (!IsActive())
+ {
+ SetActive();
+ }
+ User::RequestComplete( pStat, KErrNone );
}
TRACE_EXIT_POINT;
@@ -165,6 +167,11 @@
{
TRACE_ENTRY_POINT;
+ if (iStatus.Int())
+ {
+ return;
+ }
+
switch( iState )
{
case ECreateSession:
@@ -365,6 +372,11 @@
{
TRACE_ENTRY_POINT;
+ if (iStatus.Int())
+ {
+ return;
+ }
+
switch( iState )
{
case EFetch:
@@ -552,6 +564,11 @@
{
TRACE_ENTRY_POINT;
+ if (iStatus.Int())
+ {
+ return;
+ }
+
switch( iState )
{
case EFetch:
@@ -729,6 +746,11 @@
{
TRACE_ENTRY_POINT;
+ if (iStatus.Int())
+ {
+ return;
+ }
+
switch( iState )
{
case EFetchInstances:
@@ -888,6 +910,11 @@
{
TRACE_ENTRY_POINT;
+ if (iStatus.Int())
+ {
+ return;
+ }
+
switch( iState )
{
case EFetch:
--- a/calendarui/organizerplugin/aiagendapluginengine/src/CalenEngine.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/organizerplugin/aiagendapluginengine/src/CalenEngine.cpp Tue May 04 16:18:23 2010 +0100
@@ -188,7 +188,7 @@
for(CCalCalendarInfo* calendarInfo = calIter->FirstL() ;
calendarInfo != NULL ; calendarInfo = calIter->NextL() )
{
- if(calendarInfo->Enabled() && calendarInfo->FileNameL().CompareF(_L("c:Calendar")))
+ if(calendarInfo->Enabled())
{
TCalInfo calInfo;
calInfo.iFileName = calendarInfo->FileNameL();
--- a/calendarui/server/CalenSvr/src/CalenServer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/server/CalenSvr/src/CalenServer.cpp Tue May 04 16:18:23 2010 +0100
@@ -51,7 +51,10 @@
const TInt KComma( ',' );
-_LIT(KPhoneCalendarName,"PhoneCalendar");
+
+_LIT(KPersonal,"Personal");
+_LIT(KFamily,"Family");
+_LIT(KFriends,"Friends");
// ================= MEMBER FUNCTIONS =======================
//
@@ -338,7 +341,6 @@
{
TBuf<KMaxFileName> calendarFileName;
calendarFileName.Append(KCalendarDatabaseFilePath);
- calendarInfo->SetEnabled(EFalse);
TRAPD(error,session->CreateCalFileL(calendarFileName,*calendarInfo));
User::LeaveIfError(error);
}
@@ -370,49 +372,26 @@
{
TRACE_ENTRY_POINT;
- RFs fsSession;
- CleanupClosePushL( fsSession );
- RResourceFile resourceFile;
- CleanupClosePushL( resourceFile );
- User::LeaveIfError( fsSession.Connect() );
- TFileName resourceFileName( KMissedAlarmResourceFile );
+
- BaflUtils::NearestLanguageFile( fsSession, resourceFileName );
-
- resourceFile.OpenL(fsSession, resourceFileName );
- resourceFile.ConfirmSignatureL( 0 );
- //Phone calendar
- HBufC* phoneCalendarBuffer = KPhoneCalendarName().AllocLC();
- aCalendarNames.AppendL(phoneCalendarBuffer->Des());
- CleanupStack::PopAndDestroy( phoneCalendarBuffer );
+
// personal
- HBufC8* personalBuffer = resourceFile.AllocReadLC( R_CALE_DB_PERSONAL );
- const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(),
- ( personalBuffer->Length()+1 )>>1 );
- HBufC *personalCalendar = ptrPBuffer.AllocL();
- aCalendarNames.AppendL( personalCalendar->Des() );
+ HBufC* personalBuffer = KPersonal().AllocLC();
+ aCalendarNames.AppendL( personalBuffer->Des() );
CleanupStack::PopAndDestroy( personalBuffer );
// famliy
- HBufC8* familyBuffer=resourceFile.AllocReadLC( R_CALE_DB_FAMILY );
- const TPtrC16 ptrFBuffer(( TText16*) familyBuffer->Ptr(),
- ( familyBuffer->Length()+1 )>>1 );
- HBufC *familyCalendar = ptrFBuffer.AllocL();
- aCalendarNames.AppendL( familyCalendar->Des() );
+ HBufC* familyBuffer = KFamily().AllocLC();
+ aCalendarNames.AppendL( familyBuffer->Des() );
CleanupStack::PopAndDestroy( familyBuffer );
//friends
- HBufC8* friendsBuffer = resourceFile.AllocReadLC( R_CALE_DB_FRIENDS );
- const TPtrC16 ptrFrBuffer(( TText16*) friendsBuffer->Ptr(),
- ( friendsBuffer->Length()+1 )>>1 );
- HBufC *friendsCalendar = ptrFrBuffer.AllocL();
- aCalendarNames.AppendL( friendsCalendar->Des() );
- CleanupStack::PopAndDestroy( friendsBuffer );
+ HBufC* friendBuffer = KFriends().AllocLC();
+ aCalendarNames.AppendL( friendBuffer->Des() );
+ CleanupStack::PopAndDestroy( friendBuffer );
- CleanupStack::PopAndDestroy(&resourceFile);
- CleanupStack::PopAndDestroy(&fsSession);
TRACE_EXIT_POINT;
}
@@ -472,8 +451,7 @@
TPtrC marker = aRepositoryBuffer;
TInt calendarColorOffset;
- //For phone calendar
- aCalendarColors.Append(KRgbRed.Value());
+
while ((calendarColorOffset = marker.Locate(TChar(KComma)))
!= KErrNotFound)
@@ -545,7 +523,7 @@
keyBuff.Zero();
keyBuff.AppendNum(ESyncStatus);
- TBool status = EFalse;
+ TBool status = ETrue;
TPckgC<TBool> pkgSyncStatus(status);
aCalendarInfo.SetPropertyL(keyBuff, pkgSyncStatus);
--- a/calendarui/server/CalenSvr/src/calensvrmissedalarmmanager.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/server/CalenSvr/src/calensvrmissedalarmmanager.cpp Tue May 04 16:18:23 2010 +0100
@@ -237,16 +237,18 @@
}
else
{
- if(iNumOfMissedAlarms > TInt(newCount))
+ /*if(iNumOfMissedAlarms > TInt(newCount))
{
iShowSoftNotification = EFalse;
}
else
{
iShowSoftNotification = ETrue;
- }
+ }*/
+ // changes done for missing popup in idle screen when alarm expires in editor mode
iNumOfMissedAlarms = TInt(newCount);
+ iShowSoftNotification = ETrue;
}
TRACE_EXIT_POINT;
--- a/calendarui/server/CalenSvrClient/src/CalSvrClient.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/server/CalenSvrClient/src/CalSvrClient.cpp Tue May 04 16:18:23 2010 +0100
@@ -182,8 +182,8 @@
{
TRACE_ENTRY_POINT;
- __ASSERT_ALWAYS(!iInitializer->IsActive(), User::Invariant());
- if(!iInitializer->IsActive())
+ //__ASSERT_ALWAYS(!iInitializer->IsActive(), User::Invariant());
+ if(!(iInitializer->IsActive()) && (KRequestPending != iInitializer->iStatus.Int()))
{
iInitializer->Initialize(&aListener);
}
--- a/calendarui/settings/GsPlugin/inc/calendummyservices.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/settings/GsPlugin/inc/calendummyservices.h Tue May 04 16:18:23 2010 +0100
@@ -104,7 +104,7 @@
* Get calendar icon of specific type
* @return CGulIcon*
*/
- CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex );
+ CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 );
/**
* Register for notifications of Calendar events
--- a/calendarui/settings/GsPlugin/src/calendummyservices.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/settings/GsPlugin/src/calendummyservices.cpp Tue May 04 16:18:23 2010 +0100
@@ -331,7 +331,7 @@
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-CGulIcon* CCalenDummyServices::GetIconL( MCalenServices::TCalenIcons /*aIndex*/ )
+CGulIcon* CCalenDummyServices::GetIconL( MCalenServices::TCalenIcons /*aIndex*/, const TInt /*aViewId*/ )
{
TRACE_ENTRY_POINT;
TRACE_EXIT_POINT;
--- a/calendarui/settings/settingsui/src/CalenFileListSettingItem.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/settings/settingsui/src/CalenFileListSettingItem.cpp Tue May 04 16:18:23 2010 +0100
@@ -293,7 +293,7 @@
// Make sure that iOffToneFile is passed, in case iToneFile happens to be KNullDesC
ASSERT(!IsEmpty(iToneFile));
- TBool ok = !list->ShowMediaFileListL(&iToneFile, &nullItem,
+ TBool ok = list->ShowMediaFileListL(&iToneFile, &nullItem,
NULL, NULL );
--- a/calendarui/views/group/calenviews.mmp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/group/calenviews.mmp Tue May 04 16:18:23 2010 +0100
@@ -160,7 +160,7 @@
LIBRARY aknnotify.lib
-CAPABILITY CAP_GENERAL_DLL
+CAPABILITY CAP_GENERAL_DLL NetworkControl
VENDORID VID_DEFAULT
--- a/calendarui/views/inc/calencontainer.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/inc/calencontainer.h Tue May 04 16:18:23 2010 +0100
@@ -166,7 +166,7 @@
/**
* Creates icon array according to icon index array passed in
*/
- CAknIconArray* CreateIconsL( const RArray<MCalenServices::TCalenIcons>& aIndexArray );
+ CAknIconArray* CreateIconsL( const RArray<MCalenServices::TCalenIcons>& aIndexArray, const TInt aViewId = 0 );
/**
* Creates icon index array
--- a/calendarui/views/inc/caleneventviewcontainer.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/inc/caleneventviewcontainer.h Tue May 04 16:18:23 2010 +0100
@@ -601,6 +601,7 @@
TInt iTimeFieldLines; // Number of lines occupied by time field on the viewer
TBool iAutomaticHlValue;
TBool iAutomaticHlInitialized;
+ TBool iEmbeddedFileOpened;
CItemFinder* iAutoFinder; // text finder
CFindItemMenu* iFindMenu;
TCursorSelection iSelectedText; // Cursor selection for the text editor
--- a/calendarui/views/inc/calenmissedalarmscontainer.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/inc/calenmissedalarmscontainer.h Tue May 04 16:18:23 2010 +0100
@@ -23,6 +23,7 @@
#include<coecntrl.h>
#include<missedalarm.h>
#include<missedalarmstore.h>
+#include <eiklbo.h>
#include <caleninstanceid.h> // TCalenInstanceId
#include "calencontainer.h"
@@ -38,6 +39,7 @@
* Class declaration for Missed alarms container
*/
NONSHARABLE_CLASS(CCalenMissedAlarmsContainer) : public CCalenContainer
+ , public MEikListBoxObserver
{
public:
@@ -141,6 +143,13 @@
void CreateIconIndicesL( RArray<MCalenServices::TCalenIcons>& aIndexArray );
/**
+ * Handles list box events.
+ * @param aListBox The originating list box.
+ * @param aEventType A code for the event.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
+
+ /**
* This method is called after pointer event in Navi
* decoration object.
* @param aDirection right or left
--- a/calendarui/views/inc/calenmissedalarmsview.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/inc/calenmissedalarmsview.h Tue May 04 16:18:23 2010 +0100
@@ -166,35 +166,6 @@
*/
void UpdateCbaL();
-private:
- /**
- * Create missed alarms view toolbar buttons
- * @ aIcon Icon of the toolbar button
- * @ aText Text to be displayed on toolbar item
- * @ aTooltipID Tool tip Id of the toolbar button
- * @ aToolbar refrence to the calendar toolbar
- */
- CAknButton* CreateButtonL( CGulIcon* aIcon,
- const TDesC& aText,
- TInt aTooltipID,
- CAknToolbar& aToolbar );
-
- /**
- * Remove missed alarms view's toolbar buttons
- */
- void RemoveToolbarButtonsL();
-
- /**
- * Adds missed alarms view's toolbar buttons
- */
- void AddToolbarButtonsL();
-
- /**
- * Dim clear and clear all toolbar buttons when there are no
- * missed alarm entries to clear
- */
- void DimClearAndClearAllButtons();
-
private: //data members
TInt iMissedAlarmsCount;
--- a/calendarui/views/inc/calenmonthcontainer.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/inc/calenmonthcontainer.h Tue May 04 16:18:23 2010 +0100
@@ -369,7 +369,8 @@
// View specific data, references to views data
TTime& iDate;
TTime iOldFirstDayOfGrid;
- TBool iChangeMonth;
+ TBool iChangeMonth;
+ TBool iChangeDay;
};
#endif //CALENMONTHCONT_H
--- a/calendarui/views/inc/calenweekcontainer.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/inc/calenweekcontainer.h Tue May 04 16:18:23 2010 +0100
@@ -438,7 +438,8 @@
TBool iTopRowDefault;
TBool iRow;
- TBool iValidDay;
+ TBool iValidDay;
+ TBool iHourChange;
};
#endif //CALENWEEKCONT_H
--- a/calendarui/views/inc/calenweeklistbox.h Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/inc/calenweeklistbox.h Tue May 04 16:18:23 2010 +0100
@@ -92,7 +92,7 @@
*/
TBool IsValidPointer(TPoint aPos);
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
-private:
+
/**
* Calculates new column from pointer event
*/
--- a/calendarui/views/src/calencontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calencontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -517,7 +517,7 @@
// (other items were commented in a header).
// ----------------------------------------------------------------------------
//
-CAknIconArray* CCalenContainer::CreateIconsL( const RArray<MCalenServices::TCalenIcons>& aIndexArray )
+CAknIconArray* CCalenContainer::CreateIconsL( const RArray<MCalenServices::TCalenIcons>& aIndexArray, const TInt aViewId )
{
TRACE_ENTRY_POINT;
const TInt iconCount( aIndexArray.Count() );
@@ -527,8 +527,8 @@
for( TInt i=0; i<iconCount; ++i )
{
- icons->AppendL( iServices.GetIconL( static_cast<MCalenServices::TCalenIcons>(aIndexArray[i] ) ));
- }
+ icons->AppendL( iServices.GetIconL( static_cast<MCalenServices::TCalenIcons>(aIndexArray[i] ), aViewId ));
+ }
CleanupStack::Pop( icons );
TRACE_EXIT_POINT;
return icons;
--- a/calendarui/views/src/calendaylistboxitemdrawer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calendaylistboxitemdrawer.cpp Tue May 04 16:18:23 2010 +0100
@@ -136,15 +136,35 @@
}
- TAknWindowComponentLayout tempLayout =
- AknLayoutScalable_Apps::list_cale_time_pane_g6(
- aItemIndex - static_cast<CCalenDayListBox*> (iListBox)->TopItemIndex());
+
+ TInt variantIndex = static_cast<CCalenDayListBox*>(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());
- finalRect.SetHeight(aItemTextRect.Height());
- iGc->DrawRect( 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 )
+ {
+ finalRect.SetRect(aItemTextRect.iTl.iX, aItemTextRect.iTl.iY,colourstrips.Rect().iBr.iX,listBoxRect.iBr.iY);
+ }
+
+ // for top part.
+ else if(aItemTextRect.iTl.iY < listBoxRect.iTl.iY)
+ {
+ finalRect.SetRect(aItemTextRect.iTl.iX, listBoxRect.iTl.iY,colourstrips.Rect().iBr.iX,aItemTextRect.iBr.iY);
+ }
+
+ else
+ {
+ finalRect.SetHeight(aItemTextRect.Height());
+ }
+
+ //iGc->DrawRect( colourstrips.Rect() );
iGc->SetBrushStyle( CGraphicsContext::ESolidBrush );
iGc->SetBrushColor( TRgb(iColor) );
iGc->DrawRect( finalRect );
--- a/calendarui/views/src/caleneventviewcontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/caleneventviewcontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -118,7 +118,8 @@
: CCalenContainer( aView, aServices ),
iEntry(NULL),
iAutomaticHlValue(ETrue),
- iAutomaticHlInitialized(EFalse)
+ iAutomaticHlInitialized(EFalse),
+ iEmbeddedFileOpened(EFalse)
{
TRACE_ENTRY_POINT;
iNumOfLinesBeforeLocField = 0;
@@ -561,7 +562,7 @@
iTextEditor->SetFocus(ETrue);
// TODO: Uncomment this when enabling attachment support
- if(iEventViewData)
+ if(iEventViewData && !iEmbeddedFileOpened)
{
if(iEventViewData->AttachmentCount())
@@ -638,15 +639,18 @@
( aType == KUidValueCoeZoomChangeEvent ) ||
( aType == KUidValueCoeFontChangeEvent ) )
{
- CEikAppUi* appUi = static_cast<CEikAppUi*>( ControlEnv()->AppUi() );
- SetRect( appUi->ClientRect() );
+// CEikAppUi* appUi = static_cast<CEikAppUi*>( ControlEnv()->AppUi() );
+// SetRect( appUi->ClientRect() );
+ TRect mainPane;
+ AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane );
+ SetRect( mainPane );
}
if( KAknsMessageSkinChange == aType ||
KEikDynamicLayoutVariantSwitch == aType )
{
SizeChanged();
-
+ SetupFontL();
if(iTextEditor->ScrollBarFrame())
{
// make the scrollbars invisible
@@ -2786,6 +2790,8 @@
{
TRACE_ENTRY_POINT;
+ iEmbeddedFileOpened = EFalse;
+ iServices.GetAttachmentData()->AttachmentOpen(iEmbeddedFileOpened);
if (aReason == EAknCmdExit)
{
//issue this notification, which will be handled by attachmentui.
@@ -2953,19 +2959,31 @@
if(datatype == KNotePadTextDataType())
{
+ if(iEmbeddedFileOpened)
+ {
+ return;
+ }
+ iEmbeddedFileOpened = ETrue;
const TDesC& notepadTitle = _L("NotePad");
ret = CNotepadApi::ExecFileViewerL( aFile,
¬epadTitle,
ETrue,
ETrue,
KCharacterSetIdentifierIso88591 );
+ iEmbeddedFileOpened = EFalse;
}
else
{
//doc handler will open the other files (other than text file).
TRAP( ret, iDocHandler->OpenFileEmbeddedL( aFile, datatype ) );
+
+ if(ret == KErrNone)
+ {
+ iEmbeddedFileOpened = ETrue;
+ }
}
+ iServices.GetAttachmentData()->AttachmentOpen(iEmbeddedFileOpened);
switch(ret)
{
--- a/calendarui/views/src/calenicondrawer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calenicondrawer.cpp Tue May 04 16:18:23 2010 +0100
@@ -24,6 +24,7 @@
#include "calenicondrawer.h"
#include <calenservices.h>
+#include <CalenUid.h>
// System includes
#include <fbs.h>
@@ -347,7 +348,7 @@
for( TInt i=0; i<iconCount; ++i )
{
- icons->AppendL( iServices.GetIconL( static_cast<MCalenServices::TCalenIcons>(aIndexArray[i] ) ));
+ icons->AppendL( iServices.GetIconL( static_cast<MCalenServices::TCalenIcons>(aIndexArray[i] ), KCalenMissedEventViewUidValue ));
}
CleanupStack::Pop( icons );
--- a/calendarui/views/src/calenmissedalarmscontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calenmissedalarmscontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -139,12 +139,12 @@
iListBox->CreateScrollBarFrameL(ETrue);
iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,
CEikScrollBarFrame::EAuto);
-
+ iListBox->SetListBoxObserver( this ); // single click changes MK
// set the model array
iListBox->Model()->SetItemTextArray(iListBoxItemArray);
// set icon array
- CAknIconArray* iconArray = CreateIconsL( iIconIndices );
+ CAknIconArray* iconArray = CreateIconsL( iIconIndices, KCalenMissedAlarmsViewUidValue );
CleanupStack::PushL(iconArray);
iListBox->ItemDrawer()->FormattedCellData()->SetIconArray(iconArray);
CleanupStack::Pop();
@@ -401,7 +401,17 @@
if ( aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch )
{
- SizeChanged();
+// SizeChanged();
+ TRect main_pane;
+ AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, main_pane );
+ SetRect( main_pane );
+ if(iListBox)
+ {
+ TRect mainPane;
+ AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane );
+ TRect bgContextRect( TPoint(0, 0), mainPane.Size() );
+ iListBox->SetRect( bgContextRect );
+ }
// refresh
TRAPD(error,iView->BeginRepopulationL());
@@ -461,38 +471,31 @@
{
case TPointerEvent::EButton1Down:
{
- TInt oldCursor = iListBox->View()->CurrentItemIndex();
- iListBox->HandlePointerEventL(aPointerEvent);
- TInt newCursor = iListBox->View()->CurrentItemIndex();
-
- if (oldCursor != newCursor)
+ TBool isItem (iListBox->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex));
+
+ if(isItem && MissedAlarmsCount() > 0)
{
- // set the context
- iHighlightedRowNumber = newCursor;
- SetContextFromMissedAlarmEntryL(newCursor);
- iFirstTap = EFalse;
+ iHighlightedRowNumber = iListBox->View()->CurrentItemIndex();
+ SetContextFromMissedAlarmEntryL(iListBox->View()->CurrentItemIndex());
}
- else
- {
- iFirstTap = ETrue;
- }
+
break;
}
case TPointerEvent::EDrag:
{
- iListBox->HandlePointerEventL(aPointerEvent);
+ /*iListBox->HandlePointerEventL(aPointerEvent);
if (iFirstTap && index != iListBox->CurrentItemIndex())
{
iFirstTap = EFalse;
- }
+ }*/
break;
}
case TPointerEvent::EButton1Up:
{
- if (iFirstTap)
+ // if (iFirstTap)
{
- iView->HandleCommandL(ECalenMissedEventView);
+ // iView->HandleCommandL(ECalenMissedEventView);
}
break;
}
@@ -500,6 +503,11 @@
break;
}
+ if ( aPointerEvent.iType != TPointerEvent::EButtonRepeat )
+ {
+ iListBox->HandlePointerEventL( aPointerEvent );
+ }
+
TRACE_EXIT_POINT;
}
@@ -952,4 +960,43 @@
return KErrNotFound;
}
+
+void CCalenMissedAlarmsContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/,
+ TListBoxEvent aEventType)
+ {
+ TRACE_ENTRY_POINT;
+ switch( aEventType )
+ {
+ // Single click integration
+ case EEventItemSingleClicked:
+ {
+ iHighlightedRowNumber = iListBox->View()->CurrentItemIndex();
+
+ SetContextFromMissedAlarmEntryL(iListBox->View()->CurrentItemIndex());
+ //Handle listbox item selection event
+ // iListBox->HandlePointerEventL(aPointerEvent);
+ if(iView->MenuBar()->IsDisplayed() == EFalse)
+ {
+ iView->HandleCommandL( ECalenMissedEventView );
+ }
+ break;
+ }
+
+ // Single click integration
+ case EEventEnterKeyPressed:
+ {
+ iHighlightedRowNumber = iListBox->View()->CurrentItemIndex();
+
+ SetContextFromMissedAlarmEntryL(iListBox->View()->CurrentItemIndex());
+ iView->HandleCommandL( ECalenMissedEventView );
+ break;
+ }
+ default:
+ break;
+ };
+ TRACE_EXIT_POINT;
+ }
+
+
+
// End of File
--- a/calendarui/views/src/calenmissedalarmsview.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calenmissedalarmsview.cpp Tue May 04 16:18:23 2010 +0100
@@ -120,22 +120,22 @@
break;
case EPopulationDone:
{
- // update missed alarm list
- Container()->UpdateMissedAlarmsArrayL();
+ if(Container())
+ {
+ // update missed alarm list
+ Container()->UpdateMissedAlarmsArrayL();
- // populate with missed alarms
- Container()->PopulateWithMissedAlarmsL();
+ // populate with missed alarms
+ Container()->PopulateWithMissedAlarmsL();
- // complete population
- Container()->CompletePopulationL();
- RedrawStatusPaneL();
- UpdateCbaL();
+ // complete population
+ Container()->CompletePopulationL();
+
+ RedrawStatusPaneL();
+ UpdateCbaL();
+ }
- // dim clear and clear all buttons
- if(Container()->MissedAlarmsCount()==0)
- {
- DimClearAndClearAllButtons();
- }
+
nextStep = CCalenView::EDone;
}
@@ -234,8 +234,18 @@
break;
}
case ECalenCmdClearAll:
+ {
+ iHighlightedRowNumber = 0;
+ iServices.IssueCommandL(aCommand);
+ }
+ break;
case ECalenCmdGotoCalendar:
{
+ MCalenToolbar* toolbar = iServices.ToolbarOrNull();
+ if(toolbar)
+ {
+ toolbar->SetToolbarVisibilityL(ETrue);
+ }
iHighlightedRowNumber = 0;
iServices.IssueCommandL(aCommand);
}
@@ -243,10 +253,25 @@
case EAknSoftkeyBack:
case EAknSoftkeyClose:
{
+ MCalenToolbar* toolbar = iServices.ToolbarOrNull();
+ if(toolbar)
+ {
+ toolbar->SetToolbarVisibilityL(ETrue);
+ }
iHighlightedRowNumber = 0;
iServices.IssueNotificationL(ECalenNotifyMissedAlarmViewClosed);
}
break;
+ case EAknSoftkeyExit:
+ {
+ MCalenToolbar* toolbar = iServices.ToolbarOrNull();
+ if(toolbar)
+ {
+ toolbar->SetToolbarVisibilityL(ETrue);
+ }
+ CCalenNativeView::HandleCommandL(aCommand);
+ }
+ break;
default:
CCalenNativeView::HandleCommandL(aCommand);
break;
@@ -290,8 +315,12 @@
UpdateCbaL();
- // Draw Missed Alarm toolbar by adding clear, clearall and gotocalendar buttons
- AddToolbarButtonsL();
+ // Hide the toolbar.
+ MCalenToolbar* toolbar = iServices.ToolbarOrNull();
+ if(toolbar)
+ {
+ toolbar->SetToolbarVisibilityL(EFalse);
+ }
TRACE_EXIT_POINT;
}
@@ -305,10 +334,6 @@
{
TRACE_ENTRY_POINT;
- // Remove the toolbar buttons from Missed Alarm View and
- // enable native view toolbar buttons
- TRAP_IGNORE(RemoveToolbarButtonsL());
-
TRACE_EXIT_POINT;
}
@@ -485,159 +510,4 @@
return static_cast<CCalenMissedAlarmsContainer*>( iContainer );
}
-// ----------------------------------------------------------------------------
-// CCalenMissedAlarmsView::AddToolbarButtonsL
-// Adds missed alarms view's toolbar buttons
-// ----------------------------------------------------------------------------
-//
-void CCalenMissedAlarmsView::AddToolbarButtonsL()
- {
- TRACE_ENTRY_POINT;
-
- // Get the existing toolbar from MCalenservices
- MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull();
-
- if(toolbarImpl) // If toolbar exists
- {
- CAknToolbar& toolbar = toolbarImpl->Toolbar();
-
- // Create the new buttons for Missed alarm view toolbar
- // If layout is mirrored the button order is reversed.
- // For Non mirrored layouts each button is appended to the toolbar
- // For mirrored layouts each button is inserted at index 0.
- TBool mirrored( AknLayoutUtils::LayoutMirrored() );
-
- CAknButton* button = NULL;
- CGulIcon* icon = NULL;
-
- // First button: Clear
- icon = iServices.GetIconL( MCalenServices::ECalenClearMissedAlarms );
- // put icon onto cleanup stack before its
- // ownership is transferred to CAknButton
- button = CreateButtonL( icon, _L(""), R_CALE_MAV_TB_CLEAR, toolbar );
- if( mirrored )
- {
- // Insert the button at index 0
- toolbar.AddItemL( button, EAknCtButton, ECalenCmdClear, 0, 0 );
- }
- else
- {
- // Append the button
- toolbar.AddItemL( button, EAknCtButton, ECalenCmdClear, 0, 0 );
- }
-
- // Second button: Clear All
- icon = iServices.GetIconL( MCalenServices::ECalenClearAllMissedAlarms );
- // put icon onto cleanup stack before its
- // ownership is transferred to CAknButton
- button = CreateButtonL( icon, _L(""), R_CALE_MAV_TB_CLEARALL, toolbar );
- if( mirrored )
- {
- // Insert the button at index 0
- toolbar.AddItemL( button, EAknCtButton, ECalenCmdClearAll, 0, 0 );
- }
- else
- {
- // Append the button
- toolbar.AddItemL( button, EAknCtButton, ECalenCmdClearAll, 0, 1 );
- }
-
- // Third button: Go To Calendar
- icon = iServices.GetIconL( MCalenServices::ECalenDayViewIcon );
- // put icon onto cleanup stack before its
- // ownership is transferred to CAknButton
- button = CreateButtonL( icon, _L(""), R_CALE_MAV_TB_GOTO_CALE, toolbar );
- if( mirrored )
- {
- // Insert the button at index 0
- toolbar.AddItemL( button, EAknCtButton, ECalenCmdGotoCalendar, 0, 0 );
- }
- else
- {
- // Append the button
- toolbar.AddItemL( button, EAknCtButton, ECalenCmdGotoCalendar, 0, 2 );
- }
- }
- TRACE_EXIT_POINT;
- }
-
-// ----------------------------------------------------------------------------
-// CCalenMissedAlarmsView::RemoveToolbarButtonsL
-// Removes the missed alarm view's toolbar buttons
-// ----------------------------------------------------------------------------
-//
-void CCalenMissedAlarmsView::RemoveToolbarButtonsL()
- {
- TRACE_ENTRY_POINT;
-
- MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull();
- if(toolbarImpl) // If toolbar exists
- {
- CAknToolbar& toolbar = toolbarImpl->Toolbar();
- if(&toolbar)
- {
- // Remove the Missed alarm view's toolbar buttons
- toolbar.RemoveItem(ECalenCmdClear); // Clear button
- toolbar.RemoveItem(ECalenCmdClearAll); // Clear All button
- toolbar.RemoveItem(ECalenCmdGotoCalendar); // Go To calendar button
- }
- }
-
- TRACE_EXIT_POINT;
- }
-
-// ----------------------------------------------------------------------------
-// CCalenMissedAlarmsView::CreateButtonL
-// Create missed alarms view toolbar buttons
-// ----------------------------------------------------------------------------
-CAknButton* CCalenMissedAlarmsView::CreateButtonL( CGulIcon* aIcon,
- const TDesC& aText,
- TInt aTooltipID,
- CAknToolbar& aToolbar )
- {
- TRACE_ENTRY_POINT;
-
- TInt flags = 0;
- CAknButton* button = NULL;
-
- CleanupStack::PushL( aIcon );
- HBufC* tooltipText = StringLoader::LoadLC( aTooltipID );
- CleanupStack::Pop( tooltipText );
- // put icon onto cleanup stack before its ownership is transferred to CAknButton
- CleanupStack::Pop( aIcon );
- CleanupStack::PushL( tooltipText );
- button = CAknButton::NewL( aIcon, NULL, NULL, NULL, aText,
- tooltipText->Des(), flags, 0 );
- CleanupStack::PopAndDestroy( tooltipText );
-
- button->SetIconScaleMode( EAspectRatioNotPreserved );
- button->SetFocusing( EFalse );
- button->SetBackground( &aToolbar );
-
- TRACE_EXIT_POINT;
- return button;
- }
-
-// ----------------------------------------------------------------------------
-// CCalenMissedAlarmsView::DimClearAndClearAllButtons
-// Dim clear and clear all toolbar buttons when there are no
-// missed alarm entries to clear
-// ----------------------------------------------------------------------------
-void CCalenMissedAlarmsView::DimClearAndClearAllButtons()
- {
- TRACE_ENTRY_POINT;
-
- MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull();
- if(toolbarImpl)
- {
- CAknToolbar& toolbar = toolbarImpl->Toolbar();
-
- // dim clear and clear all toolbar buttons
- toolbar.SetItemDimmed(ECalenCmdClear,ETrue,ETrue);
- toolbar.SetItemDimmed(ECalenCmdClearAll,ETrue,ETrue);
- }
-
- TRACE_EXIT_POINT;
- }
-
// end of file
--- a/calendarui/views/src/calenmissedeventcontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calenmissedeventcontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -532,14 +532,18 @@
( aType == KUidValueCoeZoomChangeEvent ) ||
( aType == KUidValueCoeFontChangeEvent ))
{
- CEikAppUi* appUi = static_cast<CEikAppUi*>( ControlEnv()->AppUi() );
- SetRect( appUi->ClientRect() );
+// CEikAppUi* appUi = static_cast<CEikAppUi*>( ControlEnv()->AppUi() );
+// SetRect( appUi->ClientRect() );
+ TRect mainPane;
+ AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane );
+ SetRect( mainPane );
}
if(aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch)
{
SizeChanged();
+ SetupFontL();
// refresh
TRAPD(err,iView->BeginRepopulationL());
if(err!=KErrNone)
@@ -754,7 +758,9 @@
AddRepeatFieldL();
}
- iTitleTextId = R_CALEN_EVENT_VIEW_DAY_TITLE;
+
+ iTitleTextId = R_CALEN_EVENT_VIEW_ALLDAY_TITLE;
+
}
break;
--- a/calendarui/views/src/calenmissedeventview.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calenmissedeventview.cpp Tue May 04 16:18:23 2010 +0100
@@ -234,10 +234,13 @@
}
UpdateCbaL();
-
- // Draw even viewer toolbar by adding Edit, Delete and Send buttons
- AddToolbarButtonsL();
-
+ //no tool bar in missed event view
+ MCalenToolbar* toolbar = iServices.ToolbarOrNull();
+ if(toolbar)
+ {
+ toolbar->SetToolbarVisibilityL(EFalse);
+ }
+
TRACE_EXIT_POINT;
}
@@ -252,9 +255,7 @@
iPreviousViewId.iViewUid = KNullUid;
- // Remove the toolbar buttons for event viewer before exiting from event view
- TRAP_IGNORE(RemoveToolbarButtonsL());
-
+
TRACE_EXIT_POINT;
}
@@ -315,9 +316,24 @@
case EAknSoftkeyClose:
case EAknSoftkeyBack:
{
+ MCalenToolbar* toolbar = iServices.ToolbarOrNull();
+ if(toolbar)
+ {
+ toolbar->SetToolbarVisibilityL(ETrue);
+ }
iServices.IssueNotificationL(ECalenNotifyMissedEventViewClosed);
break;
}
+ case EAknSoftkeyExit:
+ {
+ MCalenToolbar* toolbar = iServices.ToolbarOrNull();
+ if(toolbar)
+ {
+ toolbar->SetToolbarVisibilityL(ETrue);
+ }
+ CCalenNativeView::HandleCommandL(aCommand);
+ }
+ break;
default:
if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand))
{
@@ -372,7 +388,7 @@
{
if(cnt->IsEventHasMapLocationL() || cnt->IsEventHasNoLocationTextL())
{
- aMenuPane->DeleteMenuItem( ECalenGetLocationAndSave );
+ aMenuPane->DeleteMenuItem( ECalenGetLocationAndReplace );
}
if(!cnt->IsEventHasMapLocationL())
{
@@ -384,6 +400,10 @@
aMenuPane->DeleteMenuItem( ECalenGetLocationAndReplace );
aMenuPane->DeleteMenuItem( ECalenShowLocation );
}
+ //as no toolbar in missedeventview no need to handle thees commands
+ aMenuPane->DeleteMenuItem( ECalenCmdPromptThenEdit );
+ aMenuPane->DeleteMenuItem( ECalenDeleteCurrentEntry );
+ aMenuPane->DeleteMenuItem( ECalenSend );
break;
}
default:
@@ -435,6 +455,10 @@
{
cba->SetCommandL( KSK2CBAPosition, R_CALEN_CLOSE_CBA_BUTTON );
}
+ else
+ {
+ cba->SetCommandL( KSK2CBAPosition, R_CALEN_BACK_CBA_BUTTON);
+ }
cba->DrawNow();
--- a/calendarui/views/src/calenmonthcontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calenmonthcontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -1051,6 +1051,7 @@
TRACE_ENTRY_POINT;
iChangeMonth = EFalse;
+ iChangeDay = EFalse;
iDayFormat = KMonthCellFormat;
iMonthDataArray = new(ELeave) CMonthDataArray(KCalenDaysInWeek * KNumberOfRows);
@@ -1673,6 +1674,10 @@
}
TInt pointerIndex(-1);
TBool isItem (iGrid->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex));
+ if( isItem )
+ {
+ pointerIndex = static_cast<CAknGridView*>(iGrid->View())->ActualDataIndex( pointerIndex );
+ }
CAknGridM* gridModel = static_cast<CAknGridM*>(iGrid->Model());
if(gridModel->NumberOfData() <= 0)
@@ -1705,7 +1710,7 @@
TPointerEvent pointerEvent( aPointerEvent );
pointerEvent.iModifiers =
( aPointerEvent.iModifiers & ( ~EAllModifiers ) );
- TInt index( iGrid->CurrentItemIndex() );
+ TInt index( iGrid->CurrentDataIndex() );
TTime isValidDay;
if( TPointerEvent::EButton1Up == aPointerEvent.iType )
{
@@ -1735,15 +1740,15 @@
iDate + TTimeIntervalDays( pointerIndex - index ) );
TDateTime newActiveDayTime = newActiveDay.DateTime();
- // set the context
- TCalTime time;
- time.SetTimeLocalL( newActiveDay );
- iServices.Context().SetFocusDateL( time,
- TVwsViewId( KUidCalendar, KUidCalenMonthView ) );
TMonth activeMonth( iDate.DateTime().Month() );
TMonth newMonth( newActiveDay.DateTime().Month() );
if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
{
+ // set the context
+ TCalTime time;
+ time.SetTimeLocalL( newActiveDay );
+ iServices.Context().SetFocusDateL( time,
+ TVwsViewId( KUidCalendar, KUidCalenMonthView ) );
iGrid->HandlePointerEventL( pointerEvent );
if (iPreview)
{
@@ -1757,6 +1762,7 @@
iChangeMonth = ETrue;
iGrid->View()->SetDisableRedraw(ETrue);
iView->BeginRepopulationL();
+ iDate = newActiveDay;
}
HandleDayChangeL( newActiveDay );
}
@@ -1764,19 +1770,22 @@
else if ( activeMonth == newMonth
&& newActiveDay != iDate && !iChangeMonth )
{
- iGrid->HandlePointerEventL( pointerEvent );
+ iChangeDay = ETrue;
// use grid index to make sure that correct grid
// element is focused when dragged
TInt gridIndex = GridIndex();
newActiveDay =
( iFirstDayOfGrid + TTimeIntervalDays( gridIndex ) );
- HandleDayChangeL( newActiveDay );
- iChangeMonth = EFalse;
}
}
else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
{
- iGrid->HandlePointerEventL( pointerEvent );
+ if( !iChangeDay && !iChangeMonth )
+ {
+ iGrid->HandlePointerEventL( pointerEvent );
+ }
+ iChangeDay = EFalse;
+ iChangeMonth = EFalse;
}
}
}
--- a/calendarui/views/src/calentodocontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calentodocontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -21,6 +21,8 @@
#include <aknlists.h>
#include <AknsUtils.h>
#include <avkon.mbg>
+#include <aknbutton.h>
+#include <akntoolbar.h>
#include <calalarm.h>
#include <calentry.h>
#include <calinstance.h>
@@ -149,11 +151,9 @@
aViewIsDimmed);
+
-
- TAknWindowComponentLayout tempLayout =
- AknLayoutScalable_Apps::list_cale_time_pane_g6( aItemIndex - static_cast<CCalenTodoListBox*>(iListBox)->TopItemIndex()) ;
-
+ TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(0);
TAknLayoutRect colourstrips;
colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() );
@@ -385,7 +385,7 @@
model->SetItemTextArray(iDesArray);
model->SetOwnershipType(ELbmDoesNotOwnItemArray);
- CAknIconArray* iconList = CreateIconsL( iIconIndices );
+ CAknIconArray* iconList = CreateIconsL( iIconIndices, KCalenTodoViewUidValue );
// Transfer iconlist ownership to the listbox
iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList );
@@ -892,7 +892,10 @@
if ( aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch )
{
SizeChanged();
+ CAknIconArray* iconList = CreateIconsL( iIconIndices, KCalenTodoViewUidValue );
+ // Transfer iconlist ownership to the listbox
+ iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList );
// refresh
TRAPD(error,iView->BeginRepopulationL());
if(error!=KErrNone)
@@ -944,6 +947,29 @@
// set marked todo items info
static_cast<CCalenTodoView*>( iView )->SetMarkedToDoItems(newArray);
+ MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull();
+ if( MarkedCount() )
+ {
+ if(toolbarImpl)
+ {
+ CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+ // dim clear and clear all toolbar buttons
+ toolbar.SetItemDimmed(ECalenNewMeeting,ETrue,ETrue);
+ }
+
+ }
+ else
+ {
+ if(toolbarImpl)
+ {
+ CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+ // dim clear and clear all toolbar buttons
+ toolbar.SetItemDimmed(ECalenNewMeeting,EFalse,ETrue);
+ }
+ }
+
CleanupStack::Pop( newArray );
TRACE_EXIT_POINT;
@@ -982,6 +1008,29 @@
// when all the todo items are unmarked,clear all marked todo items info from View
static_cast<CCalenTodoView*>( iView )->ClearMarkedToDoItems();
}
+
+ MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull();
+ if( MarkedCount() )
+ {
+ if(toolbarImpl)
+ {
+ CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+ // dim clear and clear all toolbar buttons
+ toolbar.SetItemDimmed(ECalenNewMeeting,ETrue,ETrue);
+ }
+
+ }
+ else
+ {
+ if(toolbarImpl)
+ {
+ CAknToolbar& toolbar = toolbarImpl->Toolbar();
+
+ // dim clear and clear all toolbar buttons
+ toolbar.SetItemDimmed(ECalenNewMeeting,EFalse,ETrue);
+ }
+ }
TRACE_EXIT_POINT;
}
--- a/calendarui/views/src/calentodoview.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calentodoview.cpp Tue May 04 16:18:23 2010 +0100
@@ -424,6 +424,8 @@
iServices.IssueCommandL( aCommand );
}
break;
+ case ECalenShowCalendars:
+ ClearMarkedToDoItems();
default:
SaveCurrentItemIndexL();
CCalenNativeView::HandleCommandL( aCommand );
@@ -681,7 +683,7 @@
// setup edit/mark menu
case R_CALENDAR_DONE_UNDONE:
{
- if( Container()->MarkedCount() == 1)
+ if( Container()->MarkedCount() )
{
TBool crossout( EFalse );
crossout = CheckMarkedItemCompletedL();
--- a/calendarui/views/src/calenweekcontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/calendarui/views/src/calenweekcontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -2226,26 +2226,21 @@
// for themable support - clear Pressed Down State when dragging
oldRow = iListBox->View()->CurrentItemIndex();
oldColumn = iColumn;
- iListBox->HandlePointerEventL(aPointerEvent);
- newRow = iListBox->View()->CurrentItemIndex();
- newColumn = iColumn;
+ newColumn = iListBox->PointerEventColumn(aPointerEvent.iPosition);
+ newRow = pointerIndex;
if (newRow != oldRow || newColumn != oldColumn)
{
- CalcDayFromColumn();
- SetActiveContextFromHighlightL();
- if (newColumn != oldColumn)
- {
- WeekView().SetStatusPaneFromActiveContextL();
- }
+ iHourChange = ETrue;
}
break;
}
case TPointerEvent::EButton1Up:
if(isItem &&
- iView->MenuBar()->IsDisplayed() == EFalse)
+ iView->MenuBar()->IsDisplayed() == EFalse && !iHourChange)
{
iServices.IssueCommandL( ECalenForwardsToDayView );
}
+ iHourChange = EFalse;
break;
default:
break;
--- a/clock2/clockengines/clockserver/server/src/clockserverimpl.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/clock2/clockengines/clockserver/server/src/clockserverimpl.cpp Tue May 04 16:18:23 2010 +0100
@@ -506,6 +506,13 @@
}
}
+ // Initialise the attributes to null.
+ TTime invalidTime( 0 );
+ iTimeAttributes->iDstOffset = TTimeIntervalMinutes( 0 );
+ iTimeAttributes->iTimeZoneOffset = TTimeIntervalMinutes( 0 );
+ iTimeAttributes->iUtcDateTime = invalidTime.DateTime();
+
+
// Get all the information related to the plugin.
// The UTC time.
TRAP_IGNORE( aPluginImpl.GetTimeInformationL( EUTCTime, iTimeAttributes ) );
@@ -697,9 +704,47 @@
// Lets see if we can narrow down to a single timezone with the MCC recieved.
RArray< CTzId > tzIdArray;
- // Try and fetch the timezone ID using the MCC recieved.
- TRAP_IGNORE( iTzResolver->TzIdFromMccL( iMcc, tzIdArray, KInvalidTimeZoneId ) );
-
+ // This parte of code introduced due to error ID EASH-82DPPC(3G Tests for NITZ and GPRS Interaction)
+ // Fix is bascially to narrowing down to single timezone id if NITZ packet is received prior to MCC.
+ // In first IF state we are trying to narrowdown to single timezone ID, if not possible try to use MCC to get timezone
+ // In second IF , we are using MCC to narrow down to single timezone ID directly as dont have NITZ info.
+ if( iTimeAttributes )
+ {
+ TTime invalidTime(0);
+ if( iTimeAttributes->iDstOffset != TTimeIntervalMinutes( 0 ) &&
+ iTimeAttributes->iTimeZoneOffset != TTimeIntervalMinutes( 0 ) &&
+ iTimeAttributes->iUtcDateTime.Year() != invalidTime.DateTime().Year() )
+ {
+ // Try to resolve the timezone id with the data that we have recieved.
+ TInt timezoneId;
+ TRAP_IGNORE( TInt errorVal = iTzResolver->GetTimeZoneL( *iTimeAttributes, iMcc, timezoneId ) );
+
+ __PRINT("TIMEZONE ID %d", timezoneId );
+
+ // Append the timezone id to array.
+
+ CTzId* matchingDSTZoneId = CTzId::NewL( timezoneId );
+ CleanupStack::PushL( matchingDSTZoneId );
+
+ tzIdArray.AppendL( *matchingDSTZoneId );
+
+ CleanupStack::PopAndDestroy( matchingDSTZoneId );
+
+ matchingDSTZoneId = NULL;
+ }
+ else
+ {
+ __PRINTS("NOT ABLE TO NARROW DOWN TO TIMEZONE ID WITH RECEIVED NITZ HENCE TRY WITH MCC");
+ // Not able to narrow down to single timezone id with received NITZ packet hence try with MCC.
+ TRAP_IGNORE( iTzResolver->TzIdFromMccL( iMcc, tzIdArray, KInvalidTimeZoneId ) );
+ }
+ }
+ else
+ {
+ __PRINTS("NO NITZ INFO HENCE TRY WITH MCC");
+ // No NITZ info hecne try with MCC to get the time zone Id.
+ TRAP_IGNORE( iTzResolver->TzIdFromMccL( iMcc, tzIdArray, KInvalidTimeZoneId ) );
+ }
// Code to check if its the first boot.
// Get the first boot status from cenrep. If it is the first boot, clockserver will not update the time.
TBool staleBoot( EFalse );
@@ -755,6 +800,20 @@
}
CleanupStack::PopAndDestroy( currentCTzId );
CleanupStack::PopAndDestroy( &tz );
+
+ // Setting the attributes to null again as we dont trust on
+ // previous NITZ data recevied by device.If device receive
+ // NITZ data again attributes would get filled with actual value.
+ // Has been kept outside because this statement is valid for
+ // first boot also.
+ if( iTimeAttributes && staleBoot )
+ {
+ iTimeAttributes->iDstOffset = TTimeIntervalMinutes( 0 );
+ iTimeAttributes->iTimeZoneOffset = TTimeIntervalMinutes( 0 );
+ TTime invalidTime( 0 );
+ iTimeAttributes->iUtcDateTime = invalidTime.DateTime();
+ }
+
}
}
--- a/clock2/clockengines/clocktimezoneresolver/src/clockmcctzmapper.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/clock2/clockengines/clocktimezoneresolver/src/clockmcctzmapper.cpp Tue May 04 16:18:23 2010 +0100
@@ -143,8 +143,6 @@
//
TInt CClockMCCTzIdMapper::UTCOffSetWithoutDSTChangesL( RTz& aTz, const CTzId& aTzId ) const
{
- __PRINTS( "CClockMCCTzIdMapper::UTCOffSetWithoutDSTChangesL - Entry" );
-
TInt timeOffset( KErrNotFound );
TTime universalTime;
@@ -158,8 +156,6 @@
delete currentRules;
}
- __PRINTS( "CClockMCCTzIdMapper::UTCOffSetWithoutDSTChangesL - Exit" );
-
return timeOffset;
}
--- a/clock2/clockui/adtupdater/inc/adtupdatercontainer.h Mon Mar 22 17:23:21 2010 +0100
+++ b/clock2/clockui/adtupdater/inc/adtupdatercontainer.h Tue May 04 16:18:23 2010 +0100
@@ -287,7 +287,13 @@
* @param aTimeZoneId Carry the timezoneid of which DST status is required
* @return TBool
*/
- TBool IsDstOnL( TInt aTimeZoneId );
+ TBool IsDstOnL( TInt aTimeZoneId );
+
+ /**
+ * @brief Checks whether predictiveapplcation enable key is on/off.
+ * @return TBool
+ */
+ TBool PredictiveTimeEnabled();
private: //Data members
--- a/clock2/clockui/adtupdater/src/adtupdatercontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/clock2/clockui/adtupdater/src/adtupdatercontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -294,7 +294,7 @@
{
__PRINTS( "CAdtUpdaterContainer::InformAboutNwUpdate - Entry" );
- if( IsFirstBoot() && IsSimPresent() && IsNitzPluginActive() )
+ if( IsFirstBoot() && IsSimPresent() && IsNitzPluginActive() && PredictiveTimeEnabled())
{
__PRINTS( "First boot, sim is present and auto time update is ON" );
@@ -315,7 +315,7 @@
// Start the timer
iPeriodic->Start( KTimeout, KInterval, timerCallBack );
}
- else if( IsFirstBoot() )
+ else if( IsFirstBoot()&& PredictiveTimeEnabled() )
{
__PRINTS( "First boot, normal boot sequence" );
@@ -327,7 +327,7 @@
// Exit the application.
iAdtUpdaterAppUi->Exit();
}
- else if( !RTCStatus() && !HiddenReset() )
+ else if( !RTCStatus() && !HiddenReset() && PredictiveTimeEnabled())
{
__PRINTS( "RTC invalid or Hidden Reset" );
@@ -648,8 +648,11 @@
if( currentMcc )
{
CTzLocalizedCity* localizedCity( GetLocalizedCityL( currentMcc ) );
+ if( localizedCity ) // added
+ {
TInt cityGroupId = localizedCity->GroupId();
citySelected = ShowCityListL( cityGroupId );
+ }
delete localizedCity;
}
@@ -1535,4 +1538,25 @@
return TBool( showQueries );
}
+
+// ---------------------------------------------------------------------------
+// CAdtUpdaterContainer::PredictiveTimeEnabled()
+// Rest of the details are commented in headers.
+// ---------------------------------------------------------------------------
+TBool CAdtUpdaterContainer::PredictiveTimeEnabled()
+ {
+ TInt value( EPredictiveTimeEnabled );
+ CRepository* repository(NULL);
+
+ TRAPD( err, repository = CRepository::NewL( KCRUidStartupConf ) );
+
+ if ( err == KErrNone )
+ {
+ err = repository->Get( KPredictiveTimeAndCountrySelection, value );
+ }
+ delete repository;
+
+ return value;
+ }
+
// End of file
--- a/clock2/clockui/uilayer/clockworldview/src/clockworldcontainer.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/clock2/clockui/uilayer/clockworldview/src/clockworldcontainer.cpp Tue May 04 16:18:23 2010 +0100
@@ -250,7 +250,7 @@
{
__PRINTS( "CClockWorldContainer::HandleListBoxEventL - Entry" );
- if( aListBox == iListBox &&
+/* if( aListBox == iListBox &&
//Single click integration
aEventType == EEventItemSingleClicked )
@@ -266,7 +266,7 @@
{
iView->HandleCommandL( EClockWorldMyRegion );
}
- }
+ }*/
__PRINTS( "CClockWorldContainer::HandleListBoxEventL - Entry" );
--- a/clock2/clockui/uilayer/clockworldview/src/clockworldview.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/clock2/clockui/uilayer/clockworldview/src/clockworldview.cpp Tue May 04 16:18:23 2010 +0100
@@ -150,11 +150,20 @@
//Single click integration
// If current item is other than home location set it as new home
// location
- if ( iContainer->ListBox()->CurrentItemIndex() > KZerothIndex )
+ RClkSrvInterface clkSrvInterface;
+ User::LeaveIfError( clkSrvInterface.Connect() );
+
+ TBool timeUpdateOn( EFalse );
+
+ // Get the state of the plugin.
+ clkSrvInterface.IsAutoTimeUpdateOn( timeUpdateOn );
+ if ( iContainer->ListBox()->CurrentItemIndex() > KZerothIndex || timeUpdateOn)
{
SetHomeLocationL();
}
+ // Cleanup.
+ clkSrvInterface.Close();
}
break;
@@ -294,7 +303,7 @@
__PRINTS( "CClockWorldView::DynInitMenuBarL - Entry" );
//single click integration
- if( aMenuBar && ( IsSelectionListOpen() || IsGalleryOpen() ) )
+ if( aMenuBar && ( /*IsSelectionListOpen() || */IsGalleryOpen() ) )
{
// If the selection list open, we should not display the menupane.
aMenuBar->StopDisplayingMenuBar();
--- a/clock2/clockui/uilayer/data/clock.rss Mon Mar 22 17:23:21 2010 +0100
+++ b/clock2/clockui/uilayer/data/clock.rss Tue May 04 16:18:23 2010 +0100
@@ -476,7 +476,8 @@
{
command = EClockWorldMyRegion;
txt = qtn_clk_opt_region_my_region;
- flags = EEikMenuItemAction;
+// flags = EEikMenuItemAction;
+ flags = EEikMenuItemSpecific;
},
MENU_ITEM
{
--- a/clock2/clockui/uilayer/src/clockappui.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/clock2/clockui/uilayer/src/clockappui.cpp Tue May 04 16:18:23 2010 +0100
@@ -27,6 +27,8 @@
#include <clockapp_tab.mbg>
#include <AknsConstants.h>
#include <featmgr.h>
+#include <e32property.h>
+#include <startupdomainpskeys.h>
// User includes
#include "clock.h"
@@ -223,14 +225,26 @@
case EClockAlarmExit:
case EAknSoftkeyExit:
{
- if( ExitHidesInBackground() )
+ TInt deviceState;
+ RProperty::Get( KPSUidStartup, KPSGlobalSystemState , deviceState );
+
+ if( deviceState == ESwStateCharging || deviceState == ESwStateAlarm )
{
- HandleCommandL( EAknCmdHideInBackground );
+
+ Exit();
+
}
else
- {
- Exit();
- }
+ {
+ if( ExitHidesInBackground() )
+ {
+ HandleCommandL( EAknCmdHideInBackground );
+ }
+ else
+ {
+ Exit();
+ }
+ }
}
break;
@@ -336,7 +350,8 @@
{
__PRINTS( "CClockAppUi::HandleForegroundEventL - Entry" );
- if( aForeground )
+ // commented as a part of the error ESLM-83LG82.
+ /*if( aForeground )
{
__PRINTS( "CClockAppUi::HandleForegroundEventL - aForeground ETrue" );
@@ -352,7 +367,7 @@
iIADUpdateFlag = EFalse;
__PRINTS( "CClockAppUi::HandleForegroundEventL - iIADUpdateFlag EFalse" );
}
- }
+ }*/
// Inform the world clock view about the change
CClockWorldView* clockWorldView = static_cast< CClockWorldView* > ( View( KClockAppWorldViewId ) );
Binary file clock2/clockui/utilities/data/tzdb.dbz has changed
--- a/notepad/notepad1/LibData/NpdLib.rss Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/LibData/NpdLib.rss Tue May 04 16:18:23 2010 +0100
@@ -35,6 +35,7 @@
#include <data_caging_paths_strings.hrh>
#include <AiwCommon.rh>
#include <AknFep.rsg>
+#include <avkon.hrh>
// CONSTANTS
#define NOTEPAD_DATABASE "c:Notepad.dat"
@@ -84,6 +85,18 @@
}
// -----------------------------------------------------------------------------
+//
+// r_notepad_the_first_listbox_item
+// the first notepad item, New note.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_notepad_the_first_listbox_item
+ {
+ buf = qtn_nmake_om_add_new;
+ }
+
+// -----------------------------------------------------------------------------
//
// r_notepad_model
// Model of Notepad application.
@@ -96,6 +109,7 @@
listing_style = ENotepadListingStyleNP;
date_format = R_QTN_DATE_SHORT_WITH_ZERO;
time_format = R_QTN_TIME_USUAL_WITH_ZERO;
+ first_note = r_notepad_the_first_listbox_item;
}
// -----------------------------------------------------------------------------
@@ -347,6 +361,40 @@
// -----------------------------------------------------------------------------
//
+// r_menupane_markable_list_edit_list_implementation
+// mark parent menu
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_menupane_markable_list_edit_list_implementation
+ {
+ items =
+ {
+ MENU_ITEM { cascade=r_menupane_markable_list_implementation; command=EAknCmdEditListMenu; txt=qtn_options_list; }
+ };
+
+ }
+
+// -----------------------------------------------------------------------------
+//
+// r_menupane_markable_list_implementation
+// mark child menu
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_menupane_markable_list_implementation
+ {
+ items =
+ {
+ MENU_ITEM{ command=EAknCmdMark; txt=qtn_options_list_mark_one; flags=EEikMenuItemSpecific; },
+ MENU_ITEM{ command=EAknCmdUnmark; txt=qtn_options_list_unmark_one; flags=EEikMenuItemSpecific; },
+ MENU_ITEM{ command=EAknMarkAll; txt=qtn_options_list_mark_all;},
+ MENU_ITEM{ command=EAknUnmarkAll; txt=qtn_options_list_unmark_all;}
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
// r_notepad_list_menubar
// Menu bar of Notepad list mode.
//
@@ -363,7 +411,7 @@
},
MENU_TITLE
{
- menu_pane=R_AVKON_MENUPANE_MARKABLE_LIST_EDIT_LIST_IMPLEMENTATION;
+ menu_pane = r_menupane_markable_list_edit_list_implementation;
txt = "";
},
MENU_TITLE
--- a/notepad/notepad1/LibSrc/NpdCoreModel.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/LibSrc/NpdCoreModel.cpp Tue May 04 16:18:23 2010 +0100
@@ -750,7 +750,15 @@
TInt insertIndex=0;
TInt offset = KErrNotFound;
TInt cmpOffsetListItem = KErrNotFound;
- for(insertIndex= 0;insertIndex<aItemArray.MdcaCount();insertIndex++)
+ if ( IsTemplates() )
+ {
+ insertIndex = 0;
+ }
+ else
+ {
+ insertIndex = 1;
+ }
+ for(;insertIndex<aItemArray.MdcaCount();insertIndex++)
{
actualBuf.Copy(aItemArray.MdcaPoint(insertIndex));
actualTimeBuf.Copy(actualBuf.Left( actualBuf.Match(KCmpColumnListSeparator) ));
--- a/notepad/notepad1/LibSrc/NpdEditorDialog.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/LibSrc/NpdEditorDialog.cpp Tue May 04 16:18:23 2010 +0100
@@ -215,7 +215,7 @@
if ( aNeedListRefresh )
{
iListDialog->HandleEditorExitL( statOfSave, returnKey,
- statOfSave == CNotepadModel::ENotepadModelRowNop ||
+ statOfSave != CNotepadModel::ENotepadModelRowNop ||
iFlags & ENotepadCatchSaveOnExitCallback );
}
return statOfSave;
@@ -388,7 +388,7 @@
}
else
{
- if ( IsSequenceAtLast() )
+ if ( IsSequenceAtLast() || iSequence->Count() == 1 )
{
aMenuPane->DeleteMenuItem(ENotepadCmdNextMemo);
}
@@ -531,10 +531,6 @@
{
case EAknSoftkeyExit:
case EAknCmdExit:
- if ( iListDialog )
- {
- iListDialog->MakeVisible( EFalse );
- }
TryExitL(EAknSoftkeyExit);
iAvkonAppUi->ProcessCommandL(EAknCmdExit);
break;
@@ -877,7 +873,15 @@
if ( wasModeAdding &&
rowResult == CNotepadModel::ENotepadModelRowAdded )
{
- iSequence->InsertL(0, iKey); // *never leave* because reserved
+ if ( IsNotepad() )
+ {
+ iSequence->InsertL(1, iKey); // *never leave* because reserved
+ }
+ else
+ {
+ iSequence->InsertL(0, iKey); // *never leave* because reserved
+ }
+
}
else if ( savedCurrentSequence != KNotepadInvalidSequenceIndex &&
( rowResult == CNotepadModel::ENotepadModelRowAdded ||
@@ -924,7 +928,7 @@
//
void CNotepadEditorDialog::OnCmdNextMemoL()
{
- TInt nextIndex(0);
+ TInt nextIndex(1);
const TBool wasModeAdding( IsModeAdding() );
if ( !wasModeAdding )
{
@@ -1089,11 +1093,11 @@
//
TInt index( 0 );
TKeyArrayFix cmpKeyArray(0, ECmpTInt);
- for (i = keyArray.Count() - 1; i >= 0; --i)
+ for (i = keyArray.Count() - 1; i >= 1; --i)
{
if (iSequence->Find(keyArray[i], cmpKeyArray, index) != 0)
{
- iSequence->InsertL(0, keyArray[i]);
+ iSequence->InsertL(1, keyArray[i]);
}
}
if (iKey != KNotepadPseudoKeyIdForNewNote
@@ -1112,7 +1116,7 @@
{
__ASSERT_DEBUG( iSequence,
Panic(ENotepadLibraryPanicNullSequenceInEditor) );
- return ( IsModeAdding() ? iSequence->Count() == 0 :
+ return ( IsModeAdding() ? iSequence->Count() == 1 :
CurrentSequence() == iSequence->Count() - 1 );
}
@@ -1124,7 +1128,7 @@
{
__ASSERT_DEBUG( iSequence,
Panic(ENotepadLibraryPanicNullSequenceInEditor) );
- return ( IsModeAdding() || CurrentSequence() == 0);
+ return ( IsModeAdding() || CurrentSequence() == 1);
}
// -----------------------------------------------------------------------------
@@ -1152,10 +1156,14 @@
TInt nextKey(iKey);
if ( iKey == KNotepadPseudoKeyIdForNewNote ) // IsModeAdding
{
- if ( iSequence->Count() > 0 )
+ if ( iSequence->Count() > 1 )
{
+ nextKey = (*iSequence)[1];
+ }
+ else if ( iSequence->Count() == 1 )
+ {
nextKey = (*iSequence)[0];
- }
+ }
}
else
{
--- a/notepad/notepad1/LibSrc/NpdListDialog.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/LibSrc/NpdListDialog.cpp Tue May 04 16:18:23 2010 +0100
@@ -176,22 +176,19 @@
{
iFlags &= ~ENotepadItemAdded;
}
- if ( aEagerSync )
+ if ( aEagerSync && iClockValueChange )
{
- if(iClockValueChange)
- {
- iModel->SetItemArrayFlags();
- iClockValueChange = EFalse;
- }
- iModel->SyncL(EFalse);
- RestoreCurrentAndSelectionsL();
- DrawNow();
+ iModel->SetItemArrayFlags();
+ iClockValueChange = EFalse;
}
if (aStatOfSave == CNotepadModel::ENotepadModelRowDeleted)
{
iListBox->HandleItemRemovalL();
DrawNow();
}
+ iModel->SyncL(EFalse);
+ RestoreCurrentAndSelectionsL();
+ DrawNow();
// MSK
MiddleSoftKeyL();
}
@@ -427,14 +424,11 @@
SaveCurrentAndSelectionsL();
TUid serviceUid = SendByKeysL(*iSendUi, aCommandId, *iModel, iSavedSelectedKeys);
iModel->SyncL(EFalse); // sync might be delayed while SendAsL.
- RestoreCurrentAndSelectionsL();
- //RestoreCurrent();
TUid EmailUid = {0x10001028};
if ( serviceUid == EmailUid )
{
iSendingEmail = ETrue;
}
-
}
else
{
@@ -444,7 +438,6 @@
SendAsL( *iSendUi, aCommandId, EFalse, text );
CleanupStack::PopAndDestroy(); // text
iModel->SyncL(EFalse); // sync might be delayed while SendAsL.
- RestoreCurrentAndSelectionsL();
}
}
@@ -879,10 +872,10 @@
}
iModel->SyncL(EFalse);
CNotepadDialogBase::DynInitMenuPaneL( aResourceId, aMenuPane );
- const TInt memoCount( iModel->MdcaCount() );
- const TInt markCount( iListBox->SelectionIndexes()->Count() );
- TInt index;
- switch ( aResourceId )
+ const TInt memoCount( iModel->MdcaCount() - 1 );
+ const TInt markCount(iListBox->SelectionIndexes()->Count());
+ TInt index;
+ switch (aResourceId )
{
case R_SENDUI_MENU:
index = 2;
@@ -969,13 +962,27 @@
// this must after InsertSendMenuItemAfterL
aMenuPane->DeleteMenuItem(ENotepadCmdOpen);
}
- }
+ if ( iListBox->CurrentItemIndex() == 0 && IsNotepad() && memoCount > 0)
+ {
+ aMenuPane->SetItemDimmed( ENotepadCmdDelete, ETrue );
+ aMenuPane->SetItemDimmed( ENotepadCmdSend, ETrue );
+ }
+ }
break;
default:
- AknSelectionService::HandleMarkableListDynInitMenuPane(
- aResourceId, aMenuPane, iListBox);
- break;
- }
+ {
+ if ( IsTemplates() )
+ {
+ AknSelectionService::HandleMarkableListDynInitMenuPane(
+ aResourceId, aMenuPane, iListBox );
+ }
+ else
+ {
+ HandleMarkListDynInitMenuPane( aResourceId, aMenuPane, iListBox );
+ }
+ break;
+ }
+ }
}
// -----------------------------------------------------------------------------
@@ -1029,6 +1036,28 @@
case ENotepadCmdSend:
OnCmdSendL(aCommandId);
break;
+ case EAknMarkAll:
+ {
+ if ( IsNotepad() )
+ {
+ iListBox->ClearSelection();
+ TInt num = iListBox->Model()->NumberOfItems();
+ if ( num < 2 )
+ return;
+ TInt ii = 0;
+ CArrayFixFlat<TInt>* array = new (ELeave) CArrayFixFlat<TInt> (
+ 20 );
+ CleanupStack::PushL(array);
+ array->SetReserveL(num);
+ for ( ii = 1; ii < num; ii++ )
+ {
+ array->AppendL( ii );
+ }
+ iListBox->SetSelectionIndexesL( array );
+ CleanupStack::PopAndDestroy(); //array
+ break;
+ }
+ }
default:
{
const TInt aiwServiceCmd( iServiceHandler ? iServiceHandler->ServiceCmdByMenuCmd( aCommandId ) : 0 );
@@ -1303,15 +1332,22 @@
OnCmdOpenL(aListBox->CurrentItemIndex());
break;
case EEventItemSingleClicked:
- if ( aListBox->Model()->NumberOfItems() != 0
- && aListBox->SelectionIndexes()->Count() == 0 )
- {
- HandleListBoxPointerEventL( CNotepadListDialog::EOpenListBoxItem );
- }
- else
- {
- HandleListBoxPointerEventL( CNotepadListDialog::EOpenListBoxContextMenu );
- }
+ if ( IsNotepad() )
+ {
+ if ( aListBox->Model()->NumberOfItems() != 0
+ && aListBox->SelectionIndexes()->Count() == 0 )
+ {
+
+ HandleListBoxPointerEventL(
+ CNotepadListDialog::EOpenListBoxItem);
+ }
+ else
+ {
+ HandleListBoxPointerEventL(
+ CNotepadListDialog::EOpenListBoxContextMenu );
+ }
+ }
+
if( IsTemplates() && AknLayoutUtils::PenEnabled() )
{
if( !aListBox->SelectionIndexes()->Count() )
@@ -1530,7 +1566,7 @@
iInts = new(ELeave) CArrayFixFlat<TInt>(2);
iInts->AppendL(0);
iInts->AppendL(aCount);
- IncrementL(0); // SetTextL
+ IncrementL( 1 ); // SetTextL
}
break;
default:
@@ -1576,7 +1612,11 @@
{
if(aEvent == EOpenListBoxContextMenu && !MenuShowing())
{
- if(iEditorFlag==EFalse)
+ if (iListBox->CurrentItemIndex() == 0)
+ {
+ OnCmdAddL();
+ }
+ else if (iEditorFlag == EFalse)
{
iFlags |= ENotepadMenuByOkKey;
iMskFlag=ETrue;
@@ -1585,7 +1625,11 @@
}
else if(aEvent == EOpenListBoxItem)
{
- if ( !iEditorDialog&& !IsTemplates() )
+ if ( iListBox->CurrentItemIndex() == 0 )
+ {
+ OnCmdAddL();
+ }
+ else if (!iEditorDialog && !IsTemplates())
{
OnCmdOpenL( iListBox->CurrentItemIndex() );
}
@@ -1603,7 +1647,7 @@
if( !IsTemplates() ) // Notepad ListView
{
- if( (iModel->MdcaCount() == 0))
+ if( (iModel->MdcaCount() == 1))
{
ButtonGroupContainer().SetCommandSetL( R_NOTEPAD_SOFTKEYS_OPTIONS_EXIT_NEW );
}
@@ -1676,6 +1720,35 @@
return KErrNone;
}
+// -----------------------------------------------------------------------------
+// CNotepadListDialog::HandleMarkListDynInitMenuPane
+// -----------------------------------------------------------------------------
+//
+void CNotepadListDialog::HandleMarkListDynInitMenuPane( TInt aResourceId, CEikMenuPane *aMenu, CEikListBox *aListBox )
+ {
+ if ( aResourceId == R_MENUPANE_MARKABLE_LIST_IMPLEMENTATION )
+ {
+ TInt currentItemIndex = aListBox->View()->CurrentItemIndex();
+ TBool markHidden = aListBox->View()->ItemIsSelected( currentItemIndex ) || currentItemIndex == 0;
+ TBool unmarkHidden =
+ !aListBox->View()->ItemIsSelected(currentItemIndex) || currentItemIndex == 0;
+ TBool markAllHidden = aListBox->Model()->NumberOfItems() == 0
+ || aListBox->SelectionIndexes()->Count()
+ == aListBox->Model()->NumberOfItems() - 1;
+ TBool unmarkAllHidden = aListBox->Model()->NumberOfItems() == 0
+ || aListBox->SelectionIndexes()->Count() == 0;
+ aMenu->SetItemDimmed(EAknCmdMark, markHidden);
+ aMenu->SetItemDimmed(EAknCmdUnmark, unmarkHidden);
+ aMenu->SetItemDimmed(EAknMarkAll, markAllHidden);
+ aMenu->SetItemDimmed(EAknUnmarkAll, unmarkAllHidden);
+ }
+ if ( aResourceId == R_MENUPANE_MARKABLE_LIST_EDIT_LIST_IMPLEMENTATION )
+ {
+ TBool editListHidden = aListBox->Model()->NumberOfItems() == 0;
+
+ aMenu->SetItemDimmed(EAknCmdEditListMenu, editListHidden);
+ }
+ }
// End of File
--- a/notepad/notepad1/LibSrc/NpdModel.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/LibSrc/NpdModel.cpp Tue May 04 16:18:23 2010 +0100
@@ -79,6 +79,10 @@
delete iItemArray;
delete iTimeFormat;
delete iDateFormat;
+ if ( iFixedFirstNote )
+ {
+ delete iFixedFirstNote;
+ }
}
// -----------------------------------------------------------------------------
@@ -348,6 +352,7 @@
= rr.ReadInt16(); // WORD listing_style;
TInt dateResId(rr.ReadInt32()); // LLINK date_format
TInt timeResId(rr.ReadInt32()); // LLINK time_format
+ TInt firstNoteResId(rr.ReadInt32()); // LLINK first_note;
CleanupStack::PopAndDestroy(); // rr
if (dateResId)
{
@@ -357,6 +362,10 @@
{
iTimeFormat = iEnv->AllocReadResourceL(timeResId);
}
+ if ( firstNoteResId )
+ {
+ iFixedFirstNote = iEnv->AllocReadResourceL( firstNoteResId );
+ }
iItemArray = new(ELeave) CDesCArrayFlat(KNotepadItemArrayGranularity);
iDatabaseChangeNotifier =
CNotepadModel::CDatabaseChangeNotifier::NewL(iDatabase, *this);
@@ -385,6 +394,7 @@
{
User::LeaveIfError(iSavedDeleteKeys.Append(aKeys[i]));
}
+ iProgressCount = 0;
ExecuteDeleteStepL();
iRetval = iFileSession.ReleaseReserveAccess( KDefaultDrive );
iFileSession.Close();
@@ -397,7 +407,7 @@
//
void CNotepadModel::ExecuteDeleteStepL()
{
- iProgressCount = 0;
+
iStepCount = iSavedDeleteKeys.Count();
if ( iStepCount > KNotepadMaxDeleteCountInStep )
{
@@ -411,12 +421,6 @@
if ( IsTemplates() )
{
iSavedDeleteKeys.Remove(0);
- for (TInt i(0); i < iStepCount - 1; i++)
- {
- sql.Append(KNotepadSqlDeleteByKeysAppend);
- sql.AppendNum(iSavedDeleteKeys[0]);
- iSavedDeleteKeys.Remove(0);
- }
}
else // If Notepad, Remove is postponed until remove link phase
{
@@ -512,6 +516,15 @@
else // do next step
{
increment = iStepCount - iProgressCount;
+
+ iProgressCount += increment;
+ if ( iModelObserver )
+ {
+ iModelObserver->HandleNotepadModelEventL(
+ MNotepadModelObserver::EProgressDeletion,
+ 1 );
+ }
+
ExecuteDeleteStepL();
}
}
@@ -530,15 +543,7 @@
{
increment = iDbUpdate.RowCount() - iProgressCount;
}
- if ( increment > 0 )
- {
- iProgressCount += increment;
- if ( iModelObserver )
- {
- iModelObserver->HandleNotepadModelEventL(
- MNotepadModelObserver::EProgressDeletion, increment);
- }
- }
+
if ( deleteFinished || ( stat == 0 &&
SysUtil::FFSSpaceBelowCriticalLevelL(&(iEnv->FsSession())) ) )
{
@@ -618,6 +623,20 @@
}
iItemArray->Reset();
iKeyArray.Reset();
+ //insert the New note as the firt note
+ if ( iFixedFirstNote != NULL )
+ {
+ TBuf<256> buf;
+ _LIT( KBlankSpace, " " );
+ buf.Append( KBlankSpace );
+ buf.Append( KColumnListSeparator );
+ buf.Append( *iFixedFirstNote );
+ iItemArray->AppendL( buf );
+ //default key for New note, -2 is never used for normal keys.
+ iKeyArray.Append( -2 );
+ }
+
+
TRAPD( err, DoBuildItemArrayL() );
if ( err != KErrNone)
{
@@ -716,13 +735,14 @@
TPtrC thisText =
aBuf.Mid(textOffset).Left(KNotepadMaxCharactersForSort);
- if ( iItemArray->Count() == 0 ||
+ if ( (iItemArray->Count() == 0 && iFixedFirstNote == NULL) || (iItemArray->Count() == 1 && iFixedFirstNote != NULL) ||
dateTime.Day() != prevDateTime.Day() ||
dateTime.Month() != prevDateTime.Month() ||
dateTime.Year() != prevDateTime.Year() )
{
// first entry or date of the item has changed
firstIndexOfTheDay = iItemArray->Count();
+
textArrayOfTheDay.Reset();
if ( isToday )
{
--- a/notepad/notepad1/LibSrc/NpdViewerDialog.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/LibSrc/NpdViewerDialog.cpp Tue May 04 16:18:23 2010 +0100
@@ -583,33 +583,23 @@
// -----------------------------------------------------------------------------
//
void CNotepadViewerDialog::HandleDialogPointerEventL( const TPointerEvent& aPointerEvent )
-{
-
- if(!AknLayoutUtils::PenEnabled())
- {
- return;
- }
+ {
+ if(!AknLayoutUtils::PenEnabled())
+ {
+ return;
+ }
- if(aPointerEvent.iType == TPointerEvent::EButton1Up )
- {
-
- TInt curPos = iEditor->CursorPos();
- TRect rect = iEditor->Rect();
- if ( !iAutoFinder->ItemWasTappedL( aPointerEvent.iPosition - rect.iTl ) )
- {
- return;
- }
-
- TInt curPos1 = iEditor->CursorPos();
- if (curPos == curPos1)
- {
- iFlags |= ENotepadMenuByOkKey;
- DisplayMenuL();
- }
-
-
+ if( aPointerEvent.iType == TPointerEvent::EButton1Up )
+ {
+ TRect rect = iEditor->Rect();
+ if ( !iAutoFinder->ItemWasTappedL( aPointerEvent.iPosition - rect.iTl ) )
+ {
+ return;
+ }
+
+ DisplayMenuL();
+ }
}
-}
// -----------------------------------------------------------------------------
// CNotepadViewerDialog::HandleNumberCallL
--- a/notepad/notepad1/inc/NpdLib.rh Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/inc/NpdLib.rh Tue May 04 16:18:23 2010 +0100
@@ -61,6 +61,7 @@
//WORD list_width_in_chars = NOTEPAD_LIST_WIDTH_IN_CHARS;
LLINK date_format = 0;
LLINK time_format = 0;
+ LLINK first_note = 0;
}
// -----------------------------------------------------------------------------
--- a/notepad/notepad1/inc/NpdListDialog.h Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/inc/NpdListDialog.h Tue May 04 16:18:23 2010 +0100
@@ -284,6 +284,14 @@
* @param aEvent view event type.
*/
void DoHandleViewEventL(const TVwsViewEvent& aEvent);
+
+ /**
+ * handle the mark/unmark/markall/unmarkall command
+ * @param aResourceId the resouce id
+ * @param aMenu the pane to be processed.
+ * @param aListBox the refered list box for the pane.
+ */
+ void HandleMarkListDynInitMenuPane( TInt aResourceId, CEikMenuPane *aMenu, CEikListBox *aListBox );
private: // Functions from base classes
@@ -396,7 +404,7 @@
*
* @param aType event type.
*/
- void HandleResourceChange(TInt aType);
+ void HandleResourceChange(TInt aType);
private: // Reserved
--- a/notepad/notepad1/inc/NpdModel_platsec.h Mon Mar 22 17:23:21 2010 +0100
+++ b/notepad/notepad1/inc/NpdModel_platsec.h Tue May 04 16:18:23 2010 +0100
@@ -348,6 +348,8 @@
TInt iListingStyle;
HBufC* iDateFormat;
HBufC* iTimeFormat;
+ //used for Notepad's first note. Template does not use.
+ HBufC* iFixedFirstNote;
TInt iStepCount;
RFs iFileSession;
TInt iRetval;
--- a/organizer_plat/calendar_custamization_api/inc/calencontext.h Mon Mar 22 17:23:21 2010 +0100
+++ b/organizer_plat/calendar_custamization_api/inc/calencontext.h Tue May 04 16:18:23 2010 +0100
@@ -22,6 +22,7 @@
// INCLUDES
#include <e32base.h>
#include <e32cmn.h>
+#include <calcommon.h>
// FORWARD DECLARATIONS
class TVwsViewId;
@@ -214,6 +215,32 @@
* @brief Resets calendar file name in context
*/
virtual void ResetCalendarFileName() = 0;
+ /**
+ * @brief Set calendar file name of Alarm entry in context
+ */
+ virtual void SetCalAlarmEntryFileNameL(const TDesC& aName) = 0;
+
+ /**
+ * @brief Get calendar filename
+ *
+ * @return HBufC pointer to calendar filename of Alarm entry
+ */
+ virtual HBufC* GetCalAlarmEntryFileNameL() const = 0;
+
+ /**
+ * @brief Resets Alarm Entry calendar file name in context
+ */
+ virtual void ResetCalAlarmEntryFileName() = 0;
+
+ /**
+ * @brief set Alarm Entry LocalUid in context
+ */
+ virtual void SetCalAlarmEntryLocalUid(TCalLocalUid aLocalId) = 0;
+
+ /**
+ * @brief Get Alarm Entry LocalUid from context
+ */
+ virtual TCalLocalUid CalAlarmLocalUidL() const = 0;
};
#endif // CALENCONTEXT_H
--- a/organizer_plat/calendar_custamization_api/inc/calenservices.h Mon Mar 22 17:23:21 2010 +0100
+++ b/organizer_plat/calendar_custamization_api/inc/calenservices.h Tue May 04 16:18:23 2010 +0100
@@ -154,7 +154,7 @@
* @param aIndex One of the TCalenIcons
* @return CGulIcon* The icon corresponding to aIndex
*/
- virtual CGulIcon* GetIconL( TCalenIcons aIndex ) = 0;
+ virtual CGulIcon* GetIconL( TCalenIcons aIndex, const TInt aViewId = 0 ) = 0;
/**
* @brief Register for notifications of Calendar events
--- a/organizer_pub/notepad_library_api/tsrc/group/ABLD.BAT Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-rem
-rem Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:
-rem
-rem
-
-@ECHO OFF
-
-REM Bldmake-generated batch file - ABLD.BAT
-REM ** DO NOT EDIT **
-
-perl -S ABLD.PL "\s60\app\organizer\organizer_sdk\notepad_library_api\tsrc\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9
-if errorlevel==1 goto CheckPerl
-goto End
-
-:CheckPerl
-perl -v >NUL
-if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed?
-goto End
-
-:End
--- a/organizer_pub/notepad_library_api/tsrc/group/TestNpdApi.pkg Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-;
-; 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: package file
-;
-; Languages
-; =========
-&EN
-
-; Name, UID for installation, Maj.Ver., Min.Ver., Variant, FLAG TO SPECIFY UNICODE, System component
-; ==================================================================================================
-#{"notepad library api Test"},(0x101FB3E7),1,0,1,TYPE=SA
-
-
-; Localised Vendor name
-%{"Nokia-EN"}
-
-; Unique Vendor name
-:"Nokia"
-
-"\epoc32\release\armv5\urel\TestNpdApi.dll" -"$:\sys\bin\TestNpdApi.dll"
-"..\data\c\TestNpdApi.txt" -"c:\testing\data\TestNpdApi.txt"
-"..\init\testframework.ini" -"c:\TestFramework\testframework.ini"
-"..\conf\TestNpdApi.cfg" -"c:\TestFramework\TestNpdApi.cfg"
-"..\conf\ui_TestNpdApi.cfg" -"c:\TestFramework\ui_TestNpdApi.cfg"
-
-
-; eof
-
Binary file organizer_pub/notepad_library_api/tsrc/group/TestNpdApi.sis has changed
Binary file organizer_pub/notepad_library_api/tsrc/group/TestNpdApi.sisx has changed
--- a/organizer_pub/notepad_library_api/tsrc/group/rd-key.pem Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIICXAIBAAKBgQDLRF+r1FGGkCwTrb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW4
-6Y+LWaA8HMlDdoHRB0FgASisYcFagwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh
-7W7Dt9F5FZij8F7/9Pi6+FhhxZFIf1DD+yry9D7+Sp+BgdNALe4XOpf25QIBAwKB
-gQCHgupyjYuvCsgNHn7PNtnvVxInrB5MQNoPli+O+uNJWUK/Q+57Rl+yO8AoEzDX
-pFaLWiuVVhsdloDnAgabT/FXzYncs6uOHyEUV+dSXb78vtLPJqAX+Fg2i3hOXreB
-yskcZ13/OsKVOu5wgrJkx2baZufkqMwOSytf5y9nwjEIKwJBAP+inobagVNrN62j
-KQva3cC+UN/6XnKdTc0CA6bHyLOaJoH1xiMwG/VS2PGjHI0tiSMNtLn/QPpHJ003
-iabGhdUCQQDLjp/9UjFT6K6CF66Chqf30pZXhx+GTSQZmv/gvZiMly7X9fX9BGX3
-2MbJohBC4yI21XKTbisWywkF73Hwh+TRAkEAqmxprzxWN5zPyRdwspHpKymLP/w+
-9xOJM1atGdqFzRFvAU6EF3Vn+OHl9my9s3OwwgkjJqorUYTE3iUGby8D4wJBAIe0
-aqjhdjfwdFa6dFcEb/qMZDpaFQQzbWZnVUB+ZbMPdI/5TqitmU/l2dvBYCyXbCSO
-TGJJcg8yBgP09qBamIsCQFL7j1tM0XPVQJQ89WpKCld7O9ORxRGVj1eG0tWijrH8
-mGbYh8SGCVoWV3vrKSS8GBrFVgQnqUaHuEdtM7tpCAQ=
------END RSA PRIVATE KEY-----
--- a/organizer_pub/notepad_library_api/tsrc/group/rd.cer Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
------BEGIN CERTIFICATE-----
-MIICzDCCAjWgAwIBAgIBADANBgkqhkiG9w0BAQUFADArMRAwDgYDVQQKEwdSRCBD
-ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZTAeFw0wNDExMTUxMjQyMDZaFw0z
-NzA5MjMxMjQyMDZaMCsxEDAOBgNVBAoTB1JEIENlcnQxFzAVBgNVBAMTDlJEIENl
-cnRpZmljYXRlMIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDLRF+r1FGGkCwT
-rb420kbnAps7gi1yYUcXYUdWeFTuBeQe5eW46Y+LWaA8HMlDdoHRB0FgASisYcFa
-gwno9+oFf4AJka4H1gWEs5XTGwAA1s0d8XGh7W7Dt9F5FZij8F7/9Pi6+FhhxZFI
-f1DD+yry9D7+Sp+BgdNALe4XOpf25QIBA6OCAQAwgf0wDAYDVR0TBAUwAwEB/zAL
-BgNVHQ8EBAMCAoQwHQYDVR0OBBYEFFi/kuGzxhVpjGxe9ZwlxC3fH9jFMFMGA1Ud
-IwRMMEqAFFi/kuGzxhVpjGxe9ZwlxC3fH9jFoS+kLTArMRAwDgYDVQQKEwdSRCBD
-ZXJ0MRcwFQYDVQQDEw5SRCBDZXJ0aWZpY2F0ZYIBADBsBgNVHSAEZTBjMGEGBFUd
-IAAwWTATBggrBgEFBQcCARYHaHR0cDovLzBCBggrBgEFBQcCAjA2GjRGb3IgUiZE
-IHVzYWdlIG9ubHkuIFRoaXMgY2VydGlmaWNhdGUgaXMgbm90IHRydXN0ZWQuMA0G
-CSqGSIb3DQEBBQUAA4GBAHGB4RQMAgBdeT2hxfOr6f2nA/dZm+M5yX5daUtZnET9
-Ed0A9sazLawfN2G1KFQT9kxEParAyoAkpbMAsRrnRz/9cM3OHgFm/NiKRnf50DpT
-7oCx0I/65mVD2kt+xXE62/Ii5KPnTufIkPi2uLvURCia1tTS8JmJ8dtxDGyQt8BR
------END CERTIFICATE-----
--- a/pimappservices/appenginesdocs/app-engines_documentation.history.xml Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<relnotes name="DEVELOPERLIBRARY">
- <purpose>
- </purpose>
-</relnotes>
--- a/pimappservices/appenginesdocs/app-engines_documentation.mrp Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-component app-engines_documentation
-
-source \sf\app\organizer\pimappservices\appenginesdocs\
-
-notes_source \component_defs\release.src
-
-
-ipr E
-
--- a/pimappservices/calendar/client/src/calclient.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/pimappservices/calendar/client/src/calclient.cpp Tue May 04 16:18:23 2010 +0100
@@ -35,8 +35,6 @@
#include "calcalendarinfoimpl.h"
#include "agmfilechangenotification.h"
-const TUint KDefaultMessageSlots = 3;
-
_LIT(KAgendaMutex, "AgnMutex");
//
@@ -205,7 +203,7 @@
TInt RAgendaServ::DoConnect()
{
- return CreateSession(KAgendaServerName,Version(), KDefaultMessageSlots);
+ return CreateSession(KAgendaServerName,Version());
}
--- a/pimappservices/calendar/server/src/agsasyncdelete.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/pimappservices/calendar/server/src/agsasyncdelete.cpp Tue May 04 16:18:23 2010 +0100
@@ -288,7 +288,11 @@
for (TInt i = 0; i < KCount && todelete; ++i)
{
const CAgnSimpleEntry* KChildEntry = iModel.GetSimpleEntryFromIndexes(KChildIds[i].ChildId());
- todelete = FallInTimeRangeL(*KChildEntry);
+ if(KChildEntry != NULL)
+ {
+ todelete = FallInTimeRangeL(*KChildEntry);
+ }
+
}
}
--- a/pimappservices/calendar/server/src/agsattachmentindex.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/pimappservices/calendar/server/src/agsattachmentindex.cpp Tue May 04 16:18:23 2010 +0100
@@ -281,7 +281,8 @@
{
// check every attachment
const CAgnAttachmentIndexItem* KAttachmentItem = iIndex[i];
- for (TInt j = 0; j < KAttachmentItem->Entries().Count(); ++j)
+ const TInt entryCount = KAttachmentItem->Entries().Count();
+ for (TInt j = 0; j < entryCount; ++j)
{
// check every entry associated with each attachment
if (KEntryLocalUid == (KAttachmentItem->Entries())[j])
--- a/pimappservices/calendar/server/src/agsentrymanager.cpp Mon Mar 22 17:23:21 2010 +0100
+++ b/pimappservices/calendar/server/src/agsentrymanager.cpp Tue May 04 16:18:23 2010 +0100
@@ -574,7 +574,7 @@
}
CleanupStack::PopAndDestroy();
iLastRestored = type;
- return (count);
+ return (buffer->Count());
}
CAgnEntry* CAgnEntryManager::SearchBuffers(const TAgnEntryId& aEntryId, TInt& aPos)
--- a/pimappsupport/vcardandvcal/documentation/TestVersit.rtf Mon Mar 22 17:23:21 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
-{\f85\froman\fcharset238\fprq2 Times New Roman CE;}{\f86\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f88\froman\fcharset161\fprq2 Times New Roman Greek;}{\f89\froman\fcharset162\fprq2 Times New Roman Tur;}
-{\f90\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f91\fswiss\fcharset238\fprq2 Arial CE;}{\f92\fswiss\fcharset204\fprq2 Arial Cyr;}{\f94\fswiss\fcharset161\fprq2 Arial Greek;}{\f95\fswiss\fcharset162\fprq2 Arial Tur;}
-{\f96\fswiss\fcharset186\fprq2 Arial Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;
-\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\widctlpar\adjustright \fs20\lang2057 \snext0 Normal;}{
-\s1\sb240\sa60\keepn\widctlpar\adjustright \b\f1\fs28\lang2057\kerning28 \sbasedon0 \snext0 heading 1;}{\s2\sb240\sa60\keepn\widctlpar\adjustright \b\i\f1\lang2057 \sbasedon0 \snext0 heading 2;}{\s3\sb240\sa60\keepn\widctlpar\adjustright \f1\lang2057
-\sbasedon0 \snext0 heading 3;}{\s4\keepn\widctlpar\outlinelevel3\adjustright \b\f1\fs20\lang2057 \sbasedon0 \snext0 heading 4;}{\s5\keepn\widctlpar\outlinelevel4\adjustright \b\f1\lang2057 \sbasedon0 \snext0 heading 5;}{\*\cs10 \additive
-Default Paragraph Font;}}{\*\listtable{\list\listtemplateid38323078\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01-;}{\levelnumbers;}\f0\fbias0 \fi-360\li1800\jclisttab\tx1800 }{\listname
-;}\listid817500656}{\list\listtemplateid38323078\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01-;}{\levelnumbers;}\f0\fbias0 \fi-360\li1800\jclisttab\tx1800 }{\listname ;}\listid1308366115}
-{\list\listtemplateid38323078\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat0\levelspace0\levelindent0{\leveltext\'01-;}{\levelnumbers;}\f0\fbias0 \fi-360\li1800\jclisttab\tx1800 }{\listname ;}\listid1721782559}}{\*\listoverridetable
-{\listoverride\listid1308366115\listoverridecount0\ls1}{\listoverride\listid817500656\listoverridecount0\ls2}{\listoverride\listid1721782559\listoverridecount0\ls3}}{\info{\title BITGDI test code}{\author Lane Roberts}{\operator Symbian}
-{\creatim\yr2001\mo9\dy28\hr15\min24}{\revtim\yr2001\mo12\dy5\hr17\min7}{\version6}{\edmins80}{\nofpages1}{\nofwords171}{\nofchars977}{\*\company Dell Computer Corporation}{\nofcharsws0}{\vern113}}\paperw11909\paperh16834\margl1440\margr1440
-\widowctrl\ftnbj\aenddoc\hyphcaps0\formshade\viewkind1\viewscale100 \fet0\sectd \psz9\linex0\headery706\footery706\colsx709\endnhere\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2
-\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6
-\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
-{\pntxtb (}{\pntxta )}}\pard\plain \s1\sb240\sa60\keepn\widctlpar\outlinelevel0\adjustright \b\f1\fs28\lang2057\kerning28 {VERSIT test code
-\par }\pard\plain \widctlpar\adjustright \fs20\lang2057 {\f1
-\par }{\b\f1\fs24 Test executable file locations
-\par
-\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx3050\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx6208\pard \widctlpar\intbl\adjustright {\b\f1 WINS location\cell
-Hardware location\cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt
-\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx3050\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx6208\pard
-\widctlpar\intbl\adjustright {\f1 \\epoc32\\release\\wins\\udeb\\
-\par or
-\par \\epoc32\\release\\wins\\urel\\\cell z:\\system\cell }\pard \widctlpar\intbl\adjustright {\f1 \row }\pard \widctlpar\adjustright {\f1
-\par }\pard\plain \s5\keepn\widctlpar\outlinelevel4\adjustright \b\f1\lang2057 {Automatic test executables - should be run before every release
-\par }\pard\plain \widctlpar\adjustright \fs20\lang2057 {\f1 Success: Test program exits cleanly
-\par Failure: Test program stops with an error message._
-\par }{\b\f1
-\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx2552\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx8155\pard\plain \s4\keepn\widctlpar\intbl\outlinelevel3\adjustright
-\b\f1\fs20\lang2057 {Filename\cell Purpose\cell }\pard\plain \widctlpar\intbl\adjustright \fs20\lang2057 {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh
-\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx2552\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \cltxlrtb \cellx8155\pard \widctlpar\intbl\adjustright {\f1 TBUGFIX.EXE\tab \cell General test. It should be updated each time when a defect has been fixed.}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard
-\widctlpar\intbl\adjustright {\f1 TPERFORMANCE.EXE\tab \tab \cell Do the bench marking in terms of performance and heap usage.}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard \widctlpar\intbl\adjustright {\f1 TCHARSETVCARD.EXE\tab
-\tab \cell Internalise dozens of vCard from files in \\c\\ TestvCards and externalise them by setting different charset and encoding}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard \widctlpar\intbl\adjustright {\f1 TOOM.EXE\tab \tab
-\cell Out of memory test}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
-\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx2552\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx8155\pard
-\widctlpar\intbl\adjustright {\f1 TVGEN.EXE\tab \tab \cell Build a vCard\\vCal randomly and internalise\\externalise it}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard \widctlpar\adjustright {\b\f1
-\par }{\b\f1\fs24 Manual test executables - should be run if relevant changes have been made}{\f1
-\par }{\b\f1
-\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx1487\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx7817\pard \widctlpar\intbl\adjustright {\b\f1 Filename\cell Purpose\cell
-}\pard \widctlpar\intbl\adjustright {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10
-\clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx2552\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx8155\pard \widctlpar\intbl\adjustright {\f1
-TVERSIT.EXE\tab \tab \cell Need interaction from the user to test various cases such build, internalise, externalise a vCard or vCal}{\b\f1 \cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\pard \widctlpar\adjustright {\b\f1\fs24
-\par Test support files}{\f1
-\par }{\b\f1
-\par }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx851\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx4536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb
-\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx7088\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \clshdng10000\cltxlrtb \cellx9639\pard \widctlpar\intbl\adjustright {\b\f1
-Filename\cell Emulator location\cell Hardware location\cell Used by\cell }\pard \widctlpar\intbl\adjustright {\b\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh
-\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx851\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \cltxlrtb \cellx4536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7088\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
-\brdrs\brdrw10 \cltxlrtb \cellx9639\pard \widctlpar\intbl\adjustright {\f1 All files \cell \\epoc32\\wins\\c\\testfiles\cell c:\\ testfiles\cell TBUGFIX.EXE\cell }\pard \widctlpar\intbl\adjustright {\f1 \row }\pard \widctlpar\intbl\adjustright {\f1
-All files \cell \\epoc32\\wins\\c\\ tPerformance\\inputfile\cell c:\\ tPerformance\\inputfile\cell TPERFORMANCE.EXE\cell }\pard \widctlpar\intbl\adjustright {\f1 \row }\trowd \trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb
-\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10 \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx851\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
-\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx4536\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx7088\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl
-\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb \cellx9639\pard \widctlpar\intbl\adjustright {\f1 All files\cell \\epoc32\\wins\\c\\ testvcards\cell c:\\ testvcards\cell TCHARSETVCARD.EXE\cell }\pard \widctlpar\intbl\adjustright {
-\f1 \row }\pard \widctlpar\adjustright {\b\f1\fs24
-\par Test rom building
-\par }{\f1
-\par \\versit\\tsrc\\tVersit.iby is listed in bld.inf as a test export with destination \\epoc32\\rom\\include\\. This automatically includes all test programs and files in a rom when used as follows from \\epoc32\\rom\\: \ldblquote tools\\
-buildrom assabet engbuild tVersit.iby\rdblquote . All testing input files specified in the table above}{\f1 }{\f1 are in}{\f1 cluded in tVersit.iby but need to be copied cross to}{\f1 a related directory in c: drive before testing.
-\par }}