Fixed Nabi Issues N_SE-56908,56903,56917,56940
[apps/osp/Internet.git] / src / IntEditHistoryListForm.cpp
index 6efb794..6e24801 100644 (file)
@@ -27,7 +27,6 @@
 #include "IntEditHistoryListForm.h"
 #include "IntFaviconManager.h"
 #include "IntHistoryPresentationModel.h"
-#include "IntNotificationPanel.h"
 #include "IntSceneRegister.h"
 #include "IntTypes.h"
 
@@ -64,6 +63,7 @@ EditHistoryListForm::EditHistoryListForm(void)
 ,__isNoHistoryPresent(true)
 ,__fontSize(44)
 ,__pConfirmationPopup(null)
+,__pNotification(null)
 {
 }
 
@@ -95,7 +95,7 @@ EditHistoryListForm::OnInitializing(void)
        SetFormBackEventListener(this);
 
        AppLogDebug("EditHistoryListForm::OnInitializing");
-       SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
+//     SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
 
        __fontSize = CommonUtil::GetFontSize();
 
@@ -365,10 +365,10 @@ EditHistoryListForm::OnActionPerformed(const Tizen::Ui::Control& source, int act
                        __pListView->UpdateList();
                }
 
-               NotificationPanel* pNotification = new (std::nothrow) NotificationPanel(*this);
+               __pNotification = new (std::nothrow) NotificationPanel(*this);
                String notification = CommonUtil::GetString(L"IDS_BR_POP_DELETED");
-               pNotification->SetText(notification);
-               pNotification->ShowNotification();
+               __pNotification->SetText(notification);
+               __pNotification->ShowNotification();
                if(__pConfirmationPopup)
                {
                        delete __pConfirmationPopup;
@@ -443,6 +443,7 @@ EditHistoryListForm::CreateGroupItem(int groupIndex, int itemWidth)
        if ( pGroupItemClass->__pData == null || pGroupItemClass->__pData->GetCount() == 0)
        {
                r = pItem->Construct(Dimension(itemWidth, 0));
+               __pListView->SetItemEnabled(groupIndex, -1, false);
        }
        else
        {
@@ -515,7 +516,7 @@ EditHistoryListForm::CreateGroupItem(int groupIndex, int itemWidth)
        if (pGroupItemClass->__titleText != L"Older")
        {
                text.Append(pGroupItemClass->__startTime.GetDay());
-               text.Append(L". ");
+               text.Append(L" ");
                strMonth = pGroupItemClass->__startTime.GetMonth();
                month = GetMonth(strMonth);
                text.Append(month);
@@ -529,7 +530,7 @@ EditHistoryListForm::CreateGroupItem(int groupIndex, int itemWidth)
        {
                text.Append(L" - ");
                text.Append(pGroupItemClass->__endTime.GetDay());
-               text.Append(L". ");
+               text.Append(L" ");
                strMonth = pGroupItemClass->__endTime.GetMonth();
                month = GetMonth(strMonth);
                text.Append(month);
@@ -547,7 +548,7 @@ EditHistoryListForm::CreateGroupItem(int groupIndex, int itemWidth)
 ListItemBase*
 EditHistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
 {
-       AppLogDebug("EditHistoryListForm::CreateItem");
+       AppLogDebug("EditHistoryListForm::CreateItem groupIndex %d, itemIndex %d",groupIndex,itemIndex);
        result r = E_FAILURE;
        const int bookmarkBtnWidth = 64;
        String bitmapId;
@@ -600,7 +601,7 @@ EditHistoryListForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
                return null;
        }
 
-       pItem->AddElement(Rectangle(92, 68  + (__fontSize - 44), GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 52), IDA_FORMAT_URL, pHistory->GetHistoryUrl(),32,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true);
+       pItem->AddElement(Rectangle(92, 68  + (__fontSize - 44), GetClientAreaBounds().width - 108 - 32 - bookmarkBtnWidth - 32, 52), IDA_FORMAT_URL, pHistory->GetHistoryUrl(),32,CUSTOM_COLOR_GREY,CUSTOM_COLOR_LISTVIEW_TEXT,CUSTOM_COLOR_LISTVIEW_TEXT,true);
 
        return pItem;
 }
@@ -900,7 +901,7 @@ EditHistoryListForm::GetMonth(int month)
                monthValue.Append(CommonUtil::GetString(L"IDS_COM_BODY_MAR"));;
                break;
        case 4:
-               monthValue.Append(CommonUtil::GetString(L"IDS_COM_BODY_APR"));;
+               monthValue.Append(CommonUtil::GetString(L"IDS_COM_BODY_APRIL"));;
                break;
        case 5:
                monthValue.Append(CommonUtil::GetString(L"IDS_COM_BODY_MAY"));;
@@ -1240,6 +1241,9 @@ void EditHistoryListForm::OnOrientationChanged(const Tizen::Ui::Control& source,
        {
                __pListView->UpdateList();
        }
+
+       if(__pNotification)
+               __pNotification->SetShowState(false);
 }
 
 void
@@ -1252,3 +1256,19 @@ EditHistoryListForm::OnTimerExpired(Timer&  timer)
                pSceneManager->GoBackward(BackwardSceneTransition());
        }
 }
+
+void
+EditHistoryListForm::OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList *pArgs)
+{
+       AppLog("receiving userevent for appcontrol %d",requestId);
+       if (requestId == APPCONTROL_LAUNCH_MAX_LIMIT_REACHED)
+       {
+               AppLog("receiving userevent for appcontrol %d ",requestId);
+               if(__pConfirmationPopup)
+               {
+                       __pConfirmationPopup->SetShowState(false);
+                       delete __pConfirmationPopup;
+                       __pConfirmationPopup = null;
+               }
+       }
+}