Memory leaks fixed. Fix for 44222 44125 44118
authorAmith Kumar Mahale <amith.m@samsung.com>
Mon, 1 Jul 2013 14:07:06 +0000 (19:37 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Mon, 1 Jul 2013 14:07:06 +0000 (19:37 +0530)
Change-Id: Id7bcd48df0ab5b6ef6a52ba71ef21316f7c4c823
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
res/screen-size-normal/IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM.xml
src/PhnCallLogViewByPopup.cpp
src/PhnCalllogManager.cpp
src/PhnCommonUtils.cpp
src/PhnDialPresentationModel.cpp
src/PhnLogsDetailForm.cpp
src/PhnLogsDetailItemProvider.cpp
src/PhnSettingsManager.cpp
src/PhnTabDialer.cpp
src/PhnTabLogs.cpp
src/PhnTabLogsItemProvider.cpp

index 4e19b70..37b8d8c 100644 (file)
@@ -3,29 +3,24 @@
        This XML file was automatically generated by UiBuilder - do not modify by hand.
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
-<Scene Bversion="2.0.0.201305311836" Dversion="20120315">
+<Scene Bversion="2.0.0.201306281023" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM">
         <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
-        <layout mode="Portrait" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
-        <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
+        <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
+        <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
     </Form>
     <Footer>
-        <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false"/>
+        <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_TAB" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
         <itemSet/>
     </Footer>
     <Header>
         <property accessibilityHint="" backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="0" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="0" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE_BUTTON" highlightedButtonColor="" highlightedButtonColorOpacity="0" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="0" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="0" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" titleIconPath="" titleText="" titleTextColor=""/>
         <itemSet/>
     </Header>
-    <Panel id="IDC_PANEL_REJECTMSG" parent="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM">
-        <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="120.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="20.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="680.0" x="20.0" y="40.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="120.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="28.0" marginRight="28.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="1224.0" x="28.0" y="59.0"/>
-    </Panel>
-    <ExpandableEditArea id="IDC_REJECTMSG_EXPANDABLEEDITAREA" parent="IDC_PANEL_REJECTMSG">
-        <property accessibilityHint="" autoResizing="true" autoShrinkModeEnabled="false" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" disabledTitleTextColor="" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" highlightedTitleTextColor="" horizontalMargin="10.0" keypadAction="KEYPAD_ACTION_ENTER" keypadStyle="KEYPAD_STYLE_NORMAL" limitLength="80" linkTextColor="" lowerCaseMode="false" maxLines="2" normalBGBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" normalTitleTextColor="" normalTokenColor="" pressedBGBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTitleTextColor="" selectedTokenColor="" selectedTokenTextColor="" style="EXPANDABLE_EDIT_AREA_STYLE_NORMAL" text="" textPredictionEnabled="true" textSize="45.0" titleStyle="EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE" titleText="" tokenTextColor="" verticalMargin="10.0"/>
-        <layout bottomRelation="IDC_PANEL_REJECTMSG" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="120.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_REJECTMSG" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="5.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_PANEL_REJECTMSG" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_REJECTMSG" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="675.0" x="0.0" y="0.0"/>
-        <layout bottomRelation="IDC_PANEL_REJECTMSG" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="120.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PANEL_REJECTMSG" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_PANEL_REJECTMSG" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_PANEL_REJECTMSG" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1224.0" x="0.0" y="0.0"/>
+    <ExpandableEditArea id="IDC_REJECTMSG_EXPANDABLEEDITAREA" parent="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM">
+        <property accessibilityHint="" autoResizing="false" autoShrinkModeEnabled="false" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" disabledTitleTextColor="" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" highlightedTitleTextColor="" horizontalMargin="10.0" keypadAction="KEYPAD_ACTION_ENTER" keypadStyle="KEYPAD_STYLE_NORMAL" limitLength="80" linkTextColor="" lowerCaseMode="false" maxLines="3" normalBGBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" normalTitleTextColor="" normalTokenColor="" pressedBGBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTitleTextColor="" selectedTokenColor="" selectedTokenTextColor="" style="EXPANDABLE_EDIT_AREA_STYLE_NORMAL" text="" textPredictionEnabled="true" textSize="45.0" titleStyle="EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE" titleText="" tokenTextColor="" verticalMargin="10.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="120.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="20.0" marginTop="40.0" mode="Portrait" rightRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="680.0" x="20.0" y="40.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="120.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="20.0" marginTop="40.0" mode="Landscape" rightRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_SETTINGS_ADD_EDIT_REJECT_MSGS_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="1240.0" x="20.0" y="40.0"/>
     </ExpandableEditArea>
 </Scene>
index 1d0ebf1..e6094af 100644 (file)
@@ -86,6 +86,11 @@ CallLogViewByPopup::CallLogViewByPopup(ICallLogViewByPopupListener& listener)
 
 CallLogViewByPopup::~CallLogViewByPopup()
 {
+       if(__pOptionsList != null)
+       {
+               delete __pOptionsList;
+               __pOptionsList = null;
+       }
 }
 
 result
index 2752b70..9e9ec7a 100644 (file)
@@ -459,6 +459,11 @@ CallLogManager::~CallLogManager(void)
                delete __pNumber;
                __pNumber = null;
        }
+       if(__pCalllogDBIds != null)
+       {
+               __pCalllogDBIds->RemoveAll();
+               delete __pCalllogDBIds;
+       }
        if(__pCalllogChangeListerners != null)
        {
                delete __pCalllogChangeListerners;
@@ -525,6 +530,7 @@ CallLogManager::CopyDataToCallLogDetails(CallLogDetails* calllogInfo , contacts_
        if(ret == 0 && address != null)
        {
                calllogInfo->SetPhoneNumber(address);
+               free(address);
        }
 
        int duration=0;
@@ -612,6 +618,7 @@ CallLogManager::GetAllCallogDataFromDatabseCB()
                }
                contacts_record_destroy(getrec,true);
        }
+       contacts_list_destroy(list,false);
        return true;\r
 }\r
 \r
@@ -805,6 +812,7 @@ CallLogManager::UpdateCallLogList()
        {
                __pCalllogDBIds->RemoveAll();
                delete __pCalllogDBIds;
+               __pCalllogDBIds = null;
        }
 
        __pCalllogGroupList = new (std::nothrow) ArrayList();\r
@@ -1245,6 +1253,7 @@ void CallLogManager::GetCalllogContactName(String number,String& name)
                }
                contacts_record_destroy(getrec,true);
        }
+       delete pByteBuffer;
 }
 
 void CallLogManager::ContactsDbchangedcb(const char* view_uri, void* user_data)
index aad8ada..94274cb 100644 (file)
@@ -295,7 +295,11 @@ DialUtil::DrawBitmapToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base
 {
        AppResource* pAppResource = AppResource::GetInstance();
        Bitmap* pBitmap = pAppResource->GetBitmapN(bgImg);
-       pCanvas.DrawBitmap(pCanvas.GetBounds(),*pBitmap);
+       if(pBitmap != null)
+       {
+               pCanvas.DrawBitmap(pCanvas.GetBounds(),*pBitmap);
+               delete pBitmap;
+       }
 }
 
 void
@@ -465,7 +469,6 @@ DialUtil::DrawKeypadTextToCanvas(const String& buttonText, int textFontStyle, Ca
        {
        case POSITION_BOTTOM_CENTER:
        {
-               int width = pEnrichedText->GetWidth();
                textPos.SetPosition(((pCanvas.GetBounds().width - pEnrichedText->GetWidth()) / 2),
                                                                                                                    20 + pCanvas.GetBounds().height / 2
                                                                                                                        + ((pCanvas.GetBounds().height / 2
index 3e6b473..e18c29d 100644 (file)
@@ -52,6 +52,7 @@ DialPresentationModel::DialPresentationModel(DialTabDialer& parentPanel) : __par
 DialPresentationModel::~DialPresentationModel()
 {
        AppLogDebug("ENTER");
+       AppControl::StopAppControlResponseListener(this);
        ClearSearchResults();
        AppLogDebug("EXIT");
 }
@@ -187,9 +188,7 @@ DialPresentationModel::HandleContactsRetrievalCompleted(IList* pContactsList)
                        __pSearchString = null;
                }
                //Show "Add to contact"
-               ArrayList* pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
-               pArgs->Construct();
-               __parentDialerPanel.SendUserEvent(REQUEST_SHOW_ADD_TO_CONTACTS,pArgs);
+               __parentDialerPanel.SendUserEvent(REQUEST_SHOW_ADD_TO_CONTACTS,null);
                //empty list
                delete pContactsList;
                pContactsList = null;
index 96de6fb..58e62c5 100644 (file)
@@ -847,6 +847,8 @@ DlLogsDetailForm::ManageUserDetail()
                        ContactNameTextfont->Construct(FONT_STYLE_BOLD, fontSize);
                        FloatDimension textDimension;
                        ContactNameTextfont->GetTextExtent(contactNameStr, contactNameStr.GetLength(), textDimension);
+                       delete ContactNameTextfont;
+                       delete pTextElement;
                        float width = 0.0;
                        String countString = L"(" + Integer::ToString(__calllogCount) + L")";
                        float countStringWidth = 0.0;
@@ -910,6 +912,8 @@ DlLogsDetailForm::GetTextWidthHeight(String str, float fontSize, float *width, f
        ContactNameTextfont->GetTextExtent(str, str.GetLength(), textDimension);
        *width = textDimension.width;
        *height = textDimension.height;
+       delete ContactNameTextfont;
+       delete pTextElement;
 }
 
 void
@@ -1231,18 +1235,27 @@ DlLogsDetailForm::HideDeletePopup(void)
        __isDeleteInProgress = false;
        __deleteGroupIndex = 0;
        __deleteItemIndex = 0;
+       //__isEditMode = false;
        if (__pDeletePopup != null)
        {
                __pDeletePopup->SetShowState(false);
                __pDeletePopup->Invalidate(true);
        }
-       if (__calllogListByNum->GetItemsN(0, __calllogListByNum->GetCount())->GetCount() != __selectedItemCount)
+       if (__calllogListByNum->GetCount() != __selectedItemCount)
        {
                const wchar_t* pContact = __number.GetPointer();
                int len = __number.GetLength() + 1;
                char* pNumber = new (std::nothrow) char[len];
                wcstombs(pNumber, pContact, len);
+               if(__calllogListByNum != null)
+               {
+                       AppLog(" list already present, UPDATE");
+                       __calllogListByNum->RemoveAll();
+                       delete __calllogListByNum;
+                       __calllogListByNum = null;
+               }
                __calllogListByNum = __pLogPresentor->GetCallogListByNumberFromDatabaseN(pNumber);
+               delete[] pNumber;
                UpdateForm();
                SetFormMode(false);
                __pList->UpdateList();
index d3340a6..14313fb 100644 (file)
@@ -123,6 +123,12 @@ LogsDetailItemProvider::~LogsDetailItemProvider()
                __pCalllogDetailListByNumber->RemoveAll();
                delete __pCalllogDetailListByNumber;
        }
+       if(__pCallLogDetailGroups != null)
+       {
+               __pCallLogDetailGroups->RemoveAll();
+               delete __pCallLogDetailGroups;
+               __pCallLogDetailGroups = null;
+       }
 }
 
 void
@@ -770,6 +776,6 @@ LogsDetailItemProvider::GetTimeText(DateTime calllogDate,String& dateText)
        }
        else
        {
-               dateText.Format(MAX_TWENTYFOUR_FORMAT_LENGTH,L"%02d:02%d", calllogDate.GetHour(), calllogDate.GetMinute());
+               dateText.Format(MAX_TWENTYFOUR_FORMAT_LENGTH,L"%02d:%02d", calllogDate.GetHour(), calllogDate.GetMinute());
        }
 }
index bdb04d6..f65a811 100644 (file)
@@ -1974,6 +1974,7 @@ SettingsManager::GetMsgFilterListIndex(const String& phoneNumber)
 
        msg_release_list_struct(__pFilterList);
        delete __pFilterList;
+       __pFilterList = null;
        __pNumberFilterIndex->RemoveAll();
        CloseMsgHandleSession();
 
index 2ab0e05..7bd1c6f 100644 (file)
@@ -263,7 +263,6 @@ DialTabDialer::ShowFormattedText(EditField* pEditField, String contactNumber)
        if(textLength == 0)
        {
                pEditField->Clear();
-               pEditField->SetFocus();
                pEditField->Invalidate(true);
                AppLogDebug("EXIT");
                return;
@@ -379,7 +378,6 @@ DialTabDialer::ShowFormattedText(EditField* pEditField, int actionId)
        if(textLength == 0)
        {
                pEditField->Clear();
-               pEditField->SetFocus();
                pEditField->Invalidate(true);
                AppLogDebug("EXIT");
                return;
@@ -1906,7 +1904,6 @@ DialTabDialer::OnForeground(void)
        {
                ShowFormattedText(pEditField,editText);
                //pEditField->SetCursorPosition(editText.GetLength());
-               pEditField->SetFocus();
                pEditField->Invalidate(true);
                //show search results
                if (pEditField->GetTextLength() == 0)
index 04da798..19c90c5 100644 (file)
@@ -51,6 +51,9 @@ const int H_SELECTALL_CHK_BOX = 112;
 const wchar_t* IDL_PANEL_LOGS = L"IDL_PANEL_LOGS";
 const wchar_t* IDC_LABEL_SELECTED_POPUP = L"IDC_LABEL_SELECTED_POPUP";
 const unsigned int COLOR_LABEL_SELECTED = Color32<215, 225, 232, 255>::Value;
+static const unsigned int COLOR_ITEM_DELETE_TEXT = Color32<255, 255, 255>::Value;
+static const unsigned int COLOR_ITEM_DELETE_BACKGROUND = Color32<208, 82, 82>::Value;
+static const unsigned int COLOR_ITEM_DELETE_PRESSED_BACKGROUND = Color32<194, 71, 71>::Value;
 
 static const int W_DELETE_POPUP = 720;
 static const int H_DELETE_POPUP = 308;
@@ -194,6 +197,7 @@ DialTabLogs::OnInitializing(void)
                if(pNoContentBitmap != null)
                {
                        __plogsListView->SetBitmapOfEmptyList(pNoContentBitmap);
+
                }
                __plogsListView->SetTextOfEmptyList(AppUtility::GetResourceString(IDS_NO_LOGS));
                __plogsListView->SetTextColorOfEmptyList(Color(128,128,128));
@@ -431,22 +435,29 @@ DialTabLogs::OnGroupedListViewContextItemStateChanged(GroupedListView& listView,
                        }
 
                        __pGroupContextDeletePopup = new (std::nothrow) Popup();
-                       __pGroupContextDeletePopup->Construct(true, Dimension(640,250));
+                       __pGroupContextDeletePopup->Construct(false, Dimension(688,230));
                        __pGroupContextDeletePopup->SetPropagatedKeyEventListener(this);
-                       __pGroupContextDeletePopup->SetTitleText(AppUtility::GetResourceString(IDS_DELETE_CONFORMATION_STRING));
+                       Label *pDeleteTitle = new Label();
+                       pDeleteTitle->Construct(Rectangle(16,32,656,80), AppUtility::GetResourceString(IDS_DELETE_CONFORMATION_STRING));
+                       pDeleteTitle->SetTextConfig(38, LABEL_TEXT_STYLE_BOLD);
+                       pDeleteTitle->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+                       pDeleteTitle->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+                       __pGroupContextDeletePopup->AddControl(pDeleteTitle);
 
                        //Yes button
-                       Rectangle yesRect(10, 80, 300, 80);
+                       Rectangle yesRect(16, 132, 318, 74);
                        Button* pYesButton = new Button();
                        pYesButton->Construct(yesRect, AppUtility::GetResourceString(IDS_DELETE_YES));
                        pYesButton->SetActionId(IDA_POPUP_DELETE_YES);
                        pYesButton->AddActionEventListener(*this);
+                       pYesButton->SetColor(BUTTON_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+                       pYesButton->SetColor(BUTTON_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
                        __pGroupContextDeletePopup->AddControl(pYesButton);
 
                        //No button
-                       yesRect.x = yesRect.x + yesRect.width + 10;
+                       Rectangle noRect(354, 132, 318, 74);
                        Button* pNoButton = new Button();
-                       pNoButton->Construct(yesRect, AppUtility::GetResourceString(IDS_DELETE_NO));
+                       pNoButton->Construct(noRect, AppUtility::GetResourceString(IDS_DELETE_NO));
                        pNoButton->SetActionId(IDA_POPUP_DELETE_NO);
                        pNoButton->AddActionEventListener(*this);
                        __pGroupContextDeletePopup->AddControl(pNoButton);
@@ -976,7 +987,7 @@ DialTabLogs::RemoveLogsList(void)
                                        r = E_SUCCESS;
                                        __deleteGroupIndex = groupIndex;
                                        __deleteItemIndex = ++itemIndex;
-                                       __pCallLogId->Remove(*(new Integer(pCalllogInfo->GetCalllogDbId())));
+                                       __pCallLogId->Remove(Integer(pCalllogInfo->GetCalllogDbId()));
                                        return r;
                                }
                        }
@@ -1096,7 +1107,7 @@ DialTabLogs::StoreItemselection(int groupIndex, int itemIndex, int elementId, Li
        else if (state == LIST_ITEM_STATUS_UNCHECKED)
        {
                __pDataProvider->GetItemAtGroupIndex(groupIndex, itemIndex, &pCalllogInfo);
-               __pCallLogId->Remove(*(new Integer(pCalllogInfo->GetCalllogDbId())));
+               __pCallLogId->Remove(Integer(pCalllogInfo->GetCalllogDbId()));
        }
 }
 void
@@ -1130,7 +1141,7 @@ DialTabLogs:: ManageItemSelection(void)
                                }\r
                                else\r
                                {\r
-                                       if(__pCallLogId->Contains(*(new Integer(pCalllogInfo->GetCalllogDbId()))))\r
+                                       if(__pCallLogId->Contains(Integer(pCalllogInfo->GetCalllogDbId())))\r
                                        {\r
                                                __plogsListView->SetItemChecked(groupIndex,itemIndex,true);\r
                                                ++__selectedItemCount;\r
index 65355f8..ca7320d 100644 (file)
@@ -58,6 +58,10 @@ const wchar_t* IDS_VOICE_CALL_CONTEXT_ITEM = L"IDS_VOICE_CALL_BTN_NAME";
 const wchar_t* IDS_LEFT_BRACE = L" (";
 const wchar_t* IDS_RIGHT_BRACE = L")";
 
+static const unsigned int COLOR_ITEM_DELETE_TEXT = Color32<255, 255, 255>::Value;
+static const unsigned int COLOR_ITEM_DELETE_BACKGROUND = Color32<208, 82, 82>::Value;
+static const unsigned int COLOR_ITEM_DELETE_PRESSED_BACKGROUND = Color32<194, 71, 71>::Value;
+
 CustomDataProvider::CustomDataProvider(void)
 {
        __isEditStyle = false;
@@ -73,6 +77,11 @@ CustomDataProvider::CustomDataProvider(void)
        __pItemContext->AddElement(IDA_LIST_ELEMENT_VIDEO_CALL, videoCallStr, false);
        String delStr = AppUtility::GetResourceString(IDS_DELETE_BTN_STRING);
        __pItemContext->AddElement(IDA_LIST_ELEMENT_DELETE, delStr);
+       __pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_BACKGROUND));
+       __pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_PRESSED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+       __pItemContext->SetElementBackgroundColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_HIGHLIGHTED, Color(COLOR_ITEM_DELETE_PRESSED_BACKGROUND));
+       __pItemContext->SetElementTextColor(IDA_LIST_ELEMENT_DELETE, LIST_CONTEXT_ITEM_ELEMENT_STATUS_NORMAL, Color(COLOR_ITEM_DELETE_TEXT));
+
 
        __pItemContextForMMLogs = new ListContextItem();
        __pItemContextForMMLogs->Construct();
@@ -266,7 +275,7 @@ CustomDataProvider::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                }
                else
                {
-                       dateText.Format(MAX_TWENTYFOUR_FORMAT_LENGTH,L"%02d:02%d", calllogDate.GetHour(), calllogDate.GetMinute());
+                       dateText.Format(MAX_TWENTYFOUR_FORMAT_LENGTH,L"%02d:%02d", calllogDate.GetHour(), calllogDate.GetMinute());
                }
 
        }
@@ -370,7 +379,7 @@ CustomDataProvider::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                pItem->AddElement(Rectangle((itemWidth - X_TEXT_TIME_ITEM_RIGHT_MARGIN) - 90, (Y_TEXT_LINE1_ITEM + __fontSize), W_TEXT_TIME_ITEM, H_TEXT_TIME_ITEM), ID_TIME_STRING, *pText);\r
        }
 
-       pBitmap = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
+       pBitmap = null;
 
 
        Bitmap* pLogTypeBitmap = null;
@@ -417,7 +426,8 @@ CustomDataProvider::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        if (pText != null)\r
        {\r
                delete pText;\r
-       }\r
+       }
+\r
        return pItem;
 }
 
@@ -430,6 +440,8 @@ CustomDataProvider::GetTextWidth(String contactName)
        ContactNameTextfont->Construct(FONT_STYLE_PLAIN, __fontSize);
        FloatDimension textDimension;
        ContactNameTextfont->GetTextExtent(contactName, contactName.GetLength(), textDimension);
+       delete pTextElement;
+       delete ContactNameTextfont;
        return textDimension.width;
 }
 
@@ -443,7 +455,6 @@ CustomDataProvider::GetCallogIconBitmap(CallLogType logType,Bitmap*& iconType, B
                {
                        iconType = pAppResource->GetBitmapN(IDB_LOG_CALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
                        iconArrow = pAppResource->GetBitmapN(IDB_LOG_RECEIVEDCALL_ICON ,BITMAP_PIXEL_FORMAT_ARGB8888);
-
                }
                break;
                case CALL_LOG_TYPE_VOICE_OUTGOING: