From 7508a4597d15c9fb41678309f1e97818642903e7 Mon Sep 17 00:00:00 2001 From: Vinay Sachdeva Date: Thu, 10 Oct 2013 04:15:17 +0530 Subject: [PATCH] Fixed Nabi Issues 52332,54256,54601,54130,54264,54471 Change-Id: I9079177b4c5085b470b087e0cc689f77ab6dafe8 Signed-off-by: Vinay Sachdeva --- inc/IntEditHistoryListForm.h | 2 ++ res/ara-AE.xml | 2 +- res/screen-size-normal/IDL_EDIT_HISTORY_LIST.xml | 2 +- src/IntBookmarkListForm.cpp | 13 +++++++------ src/IntBookmarkPresentationModel.cpp | 12 +++++++----- src/IntEditBookmarkListForm.cpp | 2 +- src/IntEditHistoryListForm.cpp | 13 ++++++++----- src/IntInternetApp.cpp | 8 ++++++++ src/IntMainForm.cpp | 24 ++++++++++++++---------- src/IntSharePopup.cpp | 3 --- 10 files changed, 49 insertions(+), 32 deletions(-) diff --git a/inc/IntEditHistoryListForm.h b/inc/IntEditHistoryListForm.h index d1097ad..e30fd1d 100644 --- a/inc/IntEditHistoryListForm.h +++ b/inc/IntEditHistoryListForm.h @@ -27,6 +27,7 @@ #include #include #include "IntConfirmationPopup.h" +#include "IntNotificationPanel.h" class EditHistoryListForm @@ -132,6 +133,7 @@ class EditHistoryListForm int __selectedCount; int __fontSize; ConfirmationPopup* __pConfirmationPopup; + NotificationPanel* __pNotification; class GroupItemClass :public Tizen::Base::Object diff --git a/res/ara-AE.xml b/res/ara-AE.xml index 5254104..284e8a0 100644 --- a/res/ara-AE.xml +++ b/res/ara-AE.xml @@ -210,7 +210,7 @@ طباعة توجد مشاكل في شهادة الأمان الخاصة بهذا الموقع السطوع - ؟مسح + مسح؟ حجم الخط اكتشاف تلقائي تذكر بيانات النموذج diff --git a/res/screen-size-normal/IDL_EDIT_HISTORY_LIST.xml b/res/screen-size-normal/IDL_EDIT_HISTORY_LIST.xml index b1da021..5a3762b 100644 --- a/res/screen-size-normal/IDL_EDIT_HISTORY_LIST.xml +++ b/res/screen-size-normal/IDL_EDIT_HISTORY_LIST.xml @@ -14,7 +14,7 @@ diff --git a/src/IntBookmarkListForm.cpp b/src/IntBookmarkListForm.cpp index cd13765..6952b54 100644 --- a/src/IntBookmarkListForm.cpp +++ b/src/IntBookmarkListForm.cpp @@ -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)); @@ -1009,7 +1009,7 @@ 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); if (mode == SEARCH_BAR_MODE_NORMAL) { @@ -1020,7 +1020,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; } @@ -1032,7 +1032,8 @@ 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""); } __pListview->UpdateList(); @@ -1044,7 +1045,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())); diff --git a/src/IntBookmarkPresentationModel.cpp b/src/IntBookmarkPresentationModel.cpp index 891723c..1311fbb 100644 --- a/src/IntBookmarkPresentationModel.cpp +++ b/src/IntBookmarkPresentationModel.cpp @@ -1253,22 +1253,24 @@ BookmarkPresentationModel::DoesBookmarkExist(const Tizen::Base::String& Url, boo result r = E_FAILURE; bool nextRowPresent = false; int count = 0; + String tempURL = Url; + tempURL.Replace(L"'", L"''"); query.Append(L"SELECT COUNT(ID) FROM "); query.Append(bookmarkTable); query.Append(" WHERE ADDRESS = '"); - query.Append(Url); - if(Url.EndsWith(L"/")) + query.Append(tempURL); + if(tempURL.EndsWith(L"/")) { query.Append("' OR ADDRESS = '"); String newUrl = L""; - Url.SubString(0,Url.GetLength()-1 ,newUrl); + tempURL.SubString(0,tempURL.GetLength()-1 ,newUrl); query.Append(newUrl); } else { query.Append("' OR ADDRESS = '"); - String newUrl = Url; + String newUrl = tempURL; // Url.SubString(0,Url.GetLength()-1 ,newUrl); newUrl.Append(L"/"); query.Append(newUrl); @@ -1302,7 +1304,7 @@ BookmarkPresentationModel::DoesBookmarkExist(const Tizen::Base::String& Url, boo { exist = true ; } - + tempURL.Replace(L"''",L"'"); CATCH: return r; } diff --git a/src/IntEditBookmarkListForm.cpp b/src/IntEditBookmarkListForm.cpp index ff69d4d..805deb2 100644 --- a/src/IntEditBookmarkListForm.cpp +++ b/src/IntEditBookmarkListForm.cpp @@ -969,7 +969,7 @@ void EditBookmarkListForm::OnOrientationChanged(const Tizen::Ui::Control &source } } - __pListview->UpdateList(); +// __pListview->UpdateList(); for (int count = 0;count < itemCount ;count++) { diff --git a/src/IntEditHistoryListForm.cpp b/src/IntEditHistoryListForm.cpp index 06c9b8c..6e24801 100644 --- a/src/IntEditHistoryListForm.cpp +++ b/src/IntEditHistoryListForm.cpp @@ -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) { } @@ -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; @@ -548,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; @@ -1241,6 +1241,9 @@ void EditHistoryListForm::OnOrientationChanged(const Tizen::Ui::Control& source, { __pListView->UpdateList(); } + + if(__pNotification) + __pNotification->SetShowState(false); } void diff --git a/src/IntInternetApp.cpp b/src/IntInternetApp.cpp index e08e942..147cb41 100644 --- a/src/IntInternetApp.cpp +++ b/src/IntInternetApp.cpp @@ -270,6 +270,14 @@ InternetApp::OnForeground(void) { pCurrentForm->SendUserEvent(FORE_GROUND_APP_EVENT, NULL); } + Frame* pCurrentFrame = null; + pCurrentFrame = Application::GetInstance()->GetAppFrame()->GetFrame(); + + if (pCurrentFrame != null) + { + pCurrentFrame->SetEnabled(true); + pCurrentFrame->Invalidate(true); + } if ( __isShowMsg == true ) { diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index f134e21..c99477c 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -1039,7 +1039,7 @@ MainForm::InitSelectTextContextMenuF(FloatPoint p, bool pasteOption, bool onlyPa - if(onlyPasteOption == false) + if(onlyPasteOption == false && __pHitElementResult->GetAttributeValue("type").Equals(L"password",false) == false) { r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_COM_OPT_COPY"),IDA_COPY_TEXT_CLICKED); } @@ -1047,7 +1047,7 @@ MainForm::InitSelectTextContextMenuF(FloatPoint p, bool pasteOption, bool onlyPa { r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_COM_BODY_PASTE"),IDA_PASTE_TEXT_CLICKED); } - if(onlyPasteOption == false) + if(onlyPasteOption == false && __pHitElementResult->GetAttributeValue("type").Equals(L"password",false) == false) { r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_FIND_ON_PAGE_ABB"),IDA_FIND_TEXT__CLICKED); r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_SHARE"),IDA_SHARE_TEXT_CLICKED); @@ -2519,8 +2519,8 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) String* pNameCount = __pWebViewer->EvaluateJavascriptN(str); str.Clear(); - str = L"document.getElementsByName('"; - str.Append(nameElement); + str = L"document.getElementsByClassName('"; + str.Append(classElement); str.Append("').length"); String* pClassCount = __pWebViewer->EvaluateJavascriptN(str); @@ -2537,10 +2537,10 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) } else if(idElement.GetLength() != 0) { - script = L"function insertAtCursor(myField, myValue) { if (document.selection) { document.getElementById(myField).focus(); sel = document.selection.createRange(); sel.text = myValue; } else if (document.getElementById(myField).selectionStart || document.getElementById(myField).selectionStart == '0'){ var startPos = document.getElementById(myField).selectionStart; var endPos = document.getElementById(myField).selectionEnd; document.getElementById(myField).value = document.getElementById(myField).value.substring(0, startPos)+ myValue + document.getElementById(myField).value.substring(endPos, document.getElementById(myField).value.length); } else { document.getElementById(myField).value += myValue; } } "; - script.Append("insertAtCursor('"); - script.Append(idElement); - script.Append("',"); + script = L"function insertAtCursor(myField, myValue) { if (document.selection) { myField.focus(); sel = document.selection.createRange(); sel.text = myValue; } else if (myField.selectionStart || myField.selectionStart == '0'){ var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos)+ myValue + myField.value.substring(endPos, myField.value.length); } else { myField.value += myValue; } } "; + script.Append("insertAtCursor("); + script.Append(L"document.activeElement"); + script.Append(","); script.Append("\""); script.Append(*pString); script.Append("\");"); @@ -2887,6 +2887,10 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, } } + if(__pMostVisitedListView && __pMostVisitedListView->GetShowState() == true) + { + __pMostVisitedListView->UpdateList(); + } if (__pAddressbar != null && pArgs != null && (previousSceneId == IDSCN_BOOKMARK_VIEW || previousSceneId == IDSCN_HISTORY_LIST)) { String* pBookmarkUrl = dynamic_cast< String* >(pArgs->GetAt(0)); @@ -4080,7 +4084,7 @@ MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint { AppLog("MainForm::OnWebPageBlockSelected show paste option"); - InitSelectTextContextMenuF(FloatPoint(endPoint.x,endPoint.y + __pWebViewer->GetY()),true); + InitSelectTextContextMenuF(FloatPoint(startPoint.x,startPoint.y + __pWebViewer->GetY()),true); if(__pImageMenu) { __pImageMenu->SetShowState(true); @@ -4097,7 +4101,7 @@ MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint __currentSelectedStr.Clear(); __currentSelectedStr = __pHitElementResult->GetUrl(); } - InitSelectTextContextMenuF(FloatPoint(endPoint.x,endPoint.y + __pWebViewer->GetY()),false); + InitSelectTextContextMenuF(FloatPoint(startPoint.x,startPoint.y + __pWebViewer->GetY()),false); if(__pImageMenu) { __pImageMenu->SetShowState(true); diff --git a/src/IntSharePopup.cpp b/src/IntSharePopup.cpp index 7c0254d..1490144 100644 --- a/src/IntSharePopup.cpp +++ b/src/IntSharePopup.cpp @@ -401,9 +401,6 @@ void SharePopup::RemoveAllShareInfo() __pShareList->RemoveAll(); } - - - void SharePopup::StartAppControl(int index) { -- 2.7.4