X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FIntBookmarkListForm.cpp;h=9fec39033e7cbe0b2073cd95f647d938694d0757;hb=2c25c8139b8ec1be10115b58f419da334ffb94eb;hp=8cfea2c53f1a5d8b01adad53a5e4e624d3659bf2;hpb=9c0005098a8eeb90574cb0c2324b548d2ce739b6;p=apps%2Fosp%2FInternet.git diff --git a/src/IntBookmarkListForm.cpp b/src/IntBookmarkListForm.cpp index 8cfea2c..9fec390 100644 --- a/src/IntBookmarkListForm.cpp +++ b/src/IntBookmarkListForm.cpp @@ -43,8 +43,8 @@ using namespace Tizen::Ui::Scenes; using namespace Tizen::Media; const wchar_t* DEFAULT_VALUE_PARENTID = L"0"; -static const wchar_t* IDB_TAB_ICON_BOOKMARK = 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_TAB_ICON_BOOKMARK = 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_NO_CONTENT_BOOKMARK = L"I01_Nocontents_Bookmarks.png"; static const wchar_t* IDB_ICON_FOLDER_OPEN = L"I01_icon_folder_open.png"; @@ -206,7 +206,7 @@ BookmarkListForm::OnInitializing(void) if (__pPopUp != null) { __pPopUp->Initialize(); - AddControl(__pPopUp); +// AddControl(__pPopUp); } __pSearchListView = new(std::nothrow) ListView(); @@ -294,8 +294,8 @@ BookmarkListForm::OnActionPerformed(const Tizen::Ui::Control& source, int action case IDA_FOOTER_ITEM1: { __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL); - GetHeader()->SetItemSelected(0); - GetHeader()->Invalidate(true); +// GetHeader()->SetItemSelected(0); +// GetHeader()->Invalidate(true); SceneManager* pSceneManager = SceneManager::GetInstance(); pBookMark = dynamic_cast< BookmarkData* >(__pData->GetAt(__selectedindex)); @@ -644,7 +644,7 @@ BookmarkListForm::CreateItem(int index, int itemWidth) // if(__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT) // pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true); // else - pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url - 44 + __fontSize, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,CUSTOM_COLOR_GREY,true); + pItem->AddElement(Rectangle(x_Margin_Url, y_Margin_Url - 44 + __fontSize, width_Url, height_Url), IDA_FORMAT_URL, pBookMark->GetUrl(),textSize,CUSTOM_COLOR_GREY,CUSTOM_COLOR_LISTVIEW_TEXT,CUSTOM_COLOR_LISTVIEW_TEXT,true); if (pBitmap != null) { @@ -866,7 +866,13 @@ BookmarkListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListVie case IDA_CONTEXT_ITEM_SHARE: { AppLogDebug("OnListViewContextItemStateChanged Share"); - + if (__pPopUp != null) + { + delete __pPopUp; + __pPopUp = null; + } + __pPopUp = new(std::nothrow) SharePopup(); + __pPopUp->Initialize(); BookmarkData* pBookmark = dynamic_cast(__pData->GetAt(index)); if (pBookmark != null) { @@ -878,11 +884,9 @@ BookmarkListForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListVie __pPopUp->AddShareInfo(pShareInfo); } - if (__pPopUp != null) - { - __pPopUp->SetShowState(true); - __pPopUp->Show(); - } + __pPopUp->SetShowState(true); + __pPopUp->Show(); + } break; default: @@ -1005,7 +1009,10 @@ void BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, Tizen::Ui::Controls::SearchBarMode mode) { result r = E_FAILURE; - AppLog("ABCD::BookmarkListForm::OnSearchBarModeChanged"); + AppLog("ABCD::BookmarkListForm::OnSearchBarModeChanged %d",GetClientAreaBounds().height); + + __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()); + __pSearchListView->Invalidate(false); if (mode == SEARCH_BAR_MODE_NORMAL) { @@ -1016,7 +1023,7 @@ BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, __searchBookmark = false; r = __pListview->UpdateList(); // __pSearchListView->SetBounds(0,0,GetClientAreaBounds().width,GetClientAreaBounds().height -__pSearchBar->GetHeight()); - __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), __pSearchListView->GetHeight())); + __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight())); TryCatch( !IsFailed(r),,"BookmarkListForm::OnSearchBarModeChanged Update list failed %s",GetErrorMessage(r)); CATCH:return; } @@ -1028,10 +1035,10 @@ BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source, if(__pSearchBar) { - r = __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), __pSearchListView->GetHeight())); + AppLog("heightarea %d",GetClientAreaBounds().height - __pSearchBar->GetHeight()); + r = __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight())); __pSearchBar->SetText(L""); } - AppLog("OnSearchBarModeChanged SetContentAreaSize heihgt %d, %d",__pSearchListView->GetHeight() , GetClientAreaBounds().height - __pSearchBar->GetHeight()); __pListview->UpdateList(); __pSearchListView->UpdateList(); } @@ -1041,7 +1048,7 @@ void BookmarkListForm::OnKeypadWillOpen(Tizen::Ui::Control& source) { AppLog("ABCD::BookmarkListForm::OnKeypadWillOpen"); - GetFooter()->SetShowState(false); +// GetFooter()->SetShowState(false); __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight()); __pSearchListView->SetEnabled(false); __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight())); @@ -1053,7 +1060,6 @@ BookmarkListForm::OnKeypadOpened(Tizen::Ui::Control& source) { AppLog("ABCD::BookmarkListForm::OnKeypadOpened"); GetFooter()->SetShowState(false); - AppLog("ABCD::BookmarkListForm::OnKeypadOpened"); __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()); __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight())); Invalidate(true); @@ -1064,10 +1070,10 @@ BookmarkListForm::OnKeypadClosed(Tizen::Ui::Control& source) { AppLog("ABCD::BookmarkListForm::OnKeypadClosed"); AppLog("jahsjkdad %d",Clipboard::GetInstance()->IsPopupVisible()); - if(Clipboard::GetInstance()->IsPopupVisible() == true) - { - return; - } +// if(Clipboard::GetInstance()->IsPopupVisible() == true) +// { +// return; +// } GetFooter()->SetShowState(true); __pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()); __pSearchListView->Invalidate(false); @@ -1114,9 +1120,10 @@ BookmarkListForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui: void BookmarkListForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source) { + AppLog("ABCD::BookmarkListForm::OnKeypadBoundsChanged"); FloatRectangle clientRect; clientRect = GetClientAreaBoundsF(); - AppLogDebug("SearchBarForm::OnKeypadBoundsChanged ClientBounds(%f, %f, %f, %f)",clientRect.x, clientRect.y, clientRect.width, clientRect.height); + AppLogDebug("ABCD::SearchBarForm::OnKeypadBoundsChanged ClientBounds(%f, %f, %f, %f)",clientRect.x, clientRect.y, clientRect.width, clientRect.height); __pSearchBar->SetContentAreaSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF())); __pSearchListView->SetSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF())); __pListview->SetSize(FloatDimension(clientRect.width, clientRect.height - __pSearchBar->GetHeightF())); @@ -1163,8 +1170,14 @@ void BookmarkListForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus) { AppLog("BookmarkListForm::OnOrientationChanged start"); - __pListview->SetBackgroundColor(GetBackgroundColor()); - __pSearchListView->SetBackgroundColor(GetBackgroundColor()); + if (__pListview) + { + __pListview->SetBackgroundColor(GetBackgroundColor()); + } + if (__pSearchListView) + { + __pSearchListView->SetBackgroundColor(GetBackgroundColor()); + } if (__pListview) { if(__pSearchBar->GetShowState()) @@ -1175,7 +1188,7 @@ BookmarkListForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen: { __pListview->SetBounds(__pListview->GetX(),0,GetClientAreaBounds().width ,GetClientAreaBounds().height); } - __pListview->UpdateList(); + } if (__pSearchListView && __pListview) @@ -1220,3 +1233,18 @@ BookmarkListForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneI return; } +void +BookmarkListForm::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; + } + } +}