Fixed Nabi issues N_SE-49218, N_SE-49706
[apps/osp/Internet.git] / src / IntHistoryListForm.cpp
index a1e65aa..58cf0ae 100644 (file)
@@ -44,10 +44,10 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 using namespace Tizen::System;
 
-static const wchar_t* IDB_TAB_ICON_BOOKMARKS = L"I01_tab_icon_bookmarks.png";
-static const wchar_t* IDB_TAB_ICON_HISTORY = L"I01_tab_icon_history.png";
-static const wchar_t* IDB_ICON_BOOKMARK_ON_TEMP = L"I01_icon_bookmark_on_temp.png";
-static const wchar_t* IDB_ICON_BOOKMARK_OFF_TEMP = L"I01_icon_bookmark_off_temp.png";
+static const wchar_t* IDB_TAB_ICON_BOOKMARKS =  L"I01_search_list_icon_favorite.png";
+static const wchar_t* IDB_TAB_ICON_HISTORY =L"I01_search_list_icon_history.png";
+static const wchar_t* IDB_ICON_BOOKMARK_ON_TEMP = L"00_icon_favorite_on_74x74.png";
+static const wchar_t* IDB_ICON_BOOKMARK_OFF_TEMP = L"00_icon_favorite_off_74x74.png";
 
 
 const int HistoryListForm::IDA_TABBAR_ITEM_1 = 101;
@@ -524,34 +524,40 @@ HistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        if(__pGroupData == null)
        {
                delete pItem;
+               delete pImage;
                return null;
        }
 
        if (pItem == null)
        {
+               delete pImage;
                return null;
        }
        pGroupItemClass = dynamic_cast< GroupItemClass* >(__pGroupData->GetAt(groupIndex));
        if (pGroupItemClass == null)
        {
                delete pItem;
+               delete pImage;
                return null;
        }
        if (pGroupItemClass->GetHistoryData() == null)
        {
                delete pItem;
+               delete pImage;
                return null;
        }
        pHistory = dynamic_cast< History* >(pGroupItemClass->GetHistoryData()->GetAt(itemIndex));
        if (pHistory == null)
        {
                delete pItem;
+               delete pImage;
                return null;
        }
        r = pItem->Construct(Dimension(itemWidth, 128 - 44 + __fontSize), LIST_ANNEX_STYLE_NORMAL);
        if (IsFailed(r))
        {
                delete pItem;
+               delete pImage;
                return null;
        }
 
@@ -587,6 +593,7 @@ HistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                if (IsFailed(r))
                {
                        delete pItem;
+                       delete pImage;
                        AppLogException("CreateItem failed with %s", GetErrorMessage(r));
                        return null;
                }
@@ -614,7 +621,7 @@ HistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        {
                pBookmarkBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ICON_BOOKMARK_OFF_TEMP);
        }
-       bookmarkBtnWidth = 64;
+       bookmarkBtnWidth = 74;
 
 
        r = pItem->AddElement(Rectangle(104, 10, GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 60 - 44 + __fontSize), IDA_FORMAT_TITLE, pHistory->GetHistoryTitle(), __fontSize,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
@@ -636,6 +643,7 @@ HistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 
        CATCH:
        delete pItem;
+       delete pImage;
        return null;
 }
 
@@ -1233,8 +1241,6 @@ HistoryListForm::OnOrientationChanged(const Control& source, OrientationStatus o
                {
                        return;
                }
-               __pGroupedListView->UpdateList();
-
                if (__pSearchListView != null)
                {
                        r = __pSearchListView->SetBounds(Rectangle(0,  0, GetClientAreaBounds().width, __pGroupedListView->GetHeight()));