{
return E_FAILURE;
}
+ __pSearchBar->AddFocusEventListener(*this);
__pSearchListView = new(std::nothrow) GroupedListView();
if (__pSearchListView == null)
{
break;
case IDA_TABBAR_ITEM_1:
{
- result r = GetHeader()->SetItemSelected(1);
- AppLog("SetItemSelected result %s",GetErrorMessage(r));
- GetHeader()->Invalidate(true);
+ // result r = GetHeader()->SetItemSelected(1);
+ // AppLog("SetItemSelected result %s",GetErrorMessage(r));
+ // GetHeader()->Invalidate(true);
if (pSceneManager != null)
{
}
else
{
-
if(pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT))!= E_SUCCESS)
{
AppLogDebug("BookmarkListForm::OnActionPerformed GoBackward failed");
return;
}
-
}
}
-// r = pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT));
- if (IsFailed(r))
- {
- return;
- }
+
}
break;
default:
}
void
+HistoryListForm::OnFocusGained(const Tizen::Ui::Control& source)
+{
+ __pSearchListView->SetEnabled(false);
+}
+
+void
+HistoryListForm::OnFocusLost(const Tizen::Ui::Control& source)
+{
+ __pSearchListView->SetEnabled(true);
+ __searchHistory = false;
+}
+void
HistoryListForm::OnFormBackRequested(Form& source)
{
SceneManager* pSceneManager = SceneManager::GetInstance();
if (pGroupItemClass->GetTitleText() == CommonUtil::GetString(L"IDS_BR_BODY_LAST_WEEK") || pGroupItemClass->GetTitleText() == weeksAgo2
- || pGroupItemClass->GetTitleText() == weeksAgo3 || pGroupItemClass->GetTitleText() == weeksAgo4 || pGroupItemClass->GetTitleText() == CommonUtil::GetString(L"IDS_BR_EARLIER_THIS_MONTH") || pGroupItemClass->GetTitleText() == CommonUtil::GetString(L"IDS_EMAIL_BODY_LAST_MONTH") || pGroupItemClass->GetTitleText() == CommonUtil::GetString(L"IDS_BR_BODY_OLDER"))
+ || pGroupItemClass->GetTitleText() == weeksAgo3 || pGroupItemClass->GetTitleText() == weeksAgo4 || pGroupItemClass->GetTitleText() == CommonUtil::GetString(L"IDS_BR_EARLIER_THIS_MONTH") || pGroupItemClass->GetTitleText() == CommonUtil::GetString(L"IDS_BR_BODY_LAST_MONTH") || pGroupItemClass->GetTitleText() == CommonUtil::GetString(L"IDS_BR_BODY_OLDER"))
{
text.Append(L" - ");
text.Append(pGroupItemClass->GetEndTime().GetDay());
}
}
bool urlFoundInBookmark = false;
-
- if(__pBookmarkList != null)
- {
- for (int i = 0; i < __pBookmarkList->GetCount();i++)
- {
- BookmarkData* pBookMark = dynamic_cast< BookmarkData* >(__pBookmarkList->GetAt(i));
- if(pBookMark != null && pHistory->GetHistoryUrl().CompareTo(pBookMark->GetUrl()) == 0)
- {
- urlFoundInBookmark = true;
- break;
- }
- }
- }
+//
+// if(__pBookmarkList != null)
+// {
+// for (int i = 0; i < __pBookmarkList->GetCount();i++)
+// {
+// BookmarkData* pBookMark = dynamic_cast< BookmarkData* >(__pBookmarkList->GetAt(i));
+// if(pBookMark != null && pHistory->GetHistoryUrl().CompareTo(pBookMark->GetUrl()) == 0)
+// {
+// urlFoundInBookmark = true;
+// break;
+// }
+// }
+// }
+ BookmarkPresentationModel::GetInstance()->DoesBookmarkExist(pHistory->GetHistoryUrl(),urlFoundInBookmark);
if (urlFoundInBookmark == true)
{
pBookmarkBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ICON_BOOKMARK_ON_TEMP);
int count = 0;
DateTime startTime;
DateTime endTime;
- HistoryPresentationModel::GetCurrentDateTime(endTime);;
+ HistoryPresentationModel::GetCurrentDateTime(endTime);
startTime.SetValue(0,0,0);
else
{
int count = 0;
+ if (__searchText.GetLength() > 0)
+ {
+ __searchText.Replace(L"%", L"/%");
+ __searchText.Replace(L"_", L"/_");
+ }
// String searchText = __pSearchBar->GetText();
result r = HistoryPresentationModel::GetInstance()->GetSearchHistoryCount(count, __searchText);
if(count)
}
int count = 0;
- HistoryPresentationModel::GetInstance()->GetHistoryCount(count);
+ DateTime startTime;
+ DateTime endTime;
+ HistoryPresentationModel::GetCurrentDateTime(endTime);;
+
+ startTime.SetValue(0,0,0);
+ HistoryPresentationModel::GetInstance()->GetHistoryCountWithTimeRange(startTime,endTime,count);
if (count == 0)
{
__pSearchBar->SetShowState(false);
// __pGroupedListView->UpdateList();
// }
- result r = GetHeader()->SetItemSelected(2);
+ result r = GetHeader()->SetItemSelected(1);
if (IsFailed(r))
{
- AppLog("HistoryListForm::OnSceneActivatedN header failed %ls", GetErrorMessage(r));
+ AppLog("HistoryListForm::OnSceneActivatedN header failed %s", GetErrorMessage(r));
return;
}
bool bookmarkFound = false;
BookmarkData* pBookMark = null;
- if(__pBookmarkList != null)
- {
- for (int i = 0; i < __pBookmarkList->GetCount(); i++)
- {
- pBookMark = dynamic_cast< BookmarkData* >(__pBookmarkList->GetAt(i));
- if (pBookMark != null && toggledUrl.CompareTo(pBookMark->GetUrl()) == 0)
- {
- bookmarkFound = true;
- break;
- }
- }
- }
+// if(__pBookmarkList != null)
+// {
+// for (int i = 0; i < __pBookmarkList->GetCount(); i++)
+// {
+// pBookMark = dynamic_cast< BookmarkData* >(__pBookmarkList->GetAt(i));
+// if (pBookMark != null && toggledUrl.CompareTo(pBookMark->GetUrl()) == 0)
+// {
+// bookmarkFound = true;
+// break;
+// }
+// }
+// }
+ BookmarkPresentationModel::GetInstance()->DoesBookmarkExist(toggledUrl,bookmarkFound);
if(bookmarkFound == false)
{
// Add the history in bookmark database
bookmark.SetBookmarkTitle(bookmarkTitle);
bookmark.SetUrl(pHistory->GetHistoryUrl());
bookmark.SetFaviconId(pHistory->GetFaviconId());
- bookmark.SetFavIconBuffer(*pHistory->GetFavIconBuffer());
+ if(pHistory->GetFavIconBuffer())
+ {
+ ByteBuffer *pBuffer = new ByteBuffer();
+
+ pBuffer->Construct(*pHistory->GetFavIconBuffer());
+ bookmark.SetFavIconBuffer(*pBuffer);
+ }
//r = BookmarkPresentationModel::GetInstance()->SaveBookmark(pBookmark);
r = BookmarkPresentationModel::GetInstance()->SaveTempBookmark(bookmark);
}
{
return;
}
- titleText = CommonUtil::GetString(L"IDS_BR_BODY_SEARCHED_ITEMS");
+ titleText = CommonUtil::GetString(L"IDS_BR_BODY_SEARCH");
pGroupItemClass->SetTitleText(titleText);
r = __pGroupData->Add(*pGroupItemClass);
if (IsFailed(r))
{
return;
}
- titleText = CommonUtil::GetString(L"IDS_EMAIL_BODY_LAST_MONTH");
+ titleText = CommonUtil::GetString(L"IDS_BR_BODY_LAST_MONTH");
pGroupItemClass->SetTitleText(titleText);
dateTime.SetValue(currentTime.GetYear(),currentTime.GetMonth(), 1);
dateTime.AddDays(-1);