From b6e5a8aa578815b93d0436dd3099b41880ebbf97 Mon Sep 17 00:00:00 2001 From: Vinay Sachdeva Date: Sun, 5 May 2013 03:39:12 +0530 Subject: [PATCH] Fixed Nabi Issues Change-Id: I5b15f24c009941dc14ff9c34aa6c2c89193be567 Signed-off-by: Vinay Sachdeva --- inc/IntAddressbar.h | 1 + src/IntAddressbar.cpp | 14 ++++++++++++++ src/IntMainForm.cpp | 22 ++++++++++++++++++---- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/inc/IntAddressbar.h b/inc/IntAddressbar.h index 4faad28..9054466 100644 --- a/inc/IntAddressbar.h +++ b/inc/IntAddressbar.h @@ -192,6 +192,7 @@ class Addressbar bool __isLoadingCompleted; bool __isClipboardOpen; bool __isKeyboardConnected; + bool __isCancelledClicked; int __progressPercentage; Tizen::Ui::Controls::Label* __pAddressbarBg; diff --git a/src/IntAddressbar.cpp b/src/IntAddressbar.cpp index 9bdfd44..aeb2690 100644 --- a/src/IntAddressbar.cpp +++ b/src/IntAddressbar.cpp @@ -79,6 +79,7 @@ Addressbar::Addressbar(void) __pAddressBackBtn = null; __isClipboardOpen = false; __isKeyboardConnected = false; + __isCancelledClicked = false; } Addressbar::~Addressbar(void) @@ -659,6 +660,7 @@ Addressbar::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { __pAddressbarUrlField->HideKeypad(); __pListener->OnAddressCancelledClicked(*this); + __isCancelledClicked = true; //SetAddressbarMode(ADDRESSBAR_MODE_LOADING_COMPLETE); } break; @@ -732,6 +734,18 @@ Addressbar::OnKeypadClosed(Tizen::Ui::Control& source) return; } +// if(__isCancelledClicked == true) + { + if(__pAddressbarUrlField) + __pAddressbarUrlField->SetText(__displayUrl); + __editTextUrl = L""; + SetShowState(false); + if(__pListener != null) + { + __pListener->OnAddressBarKeypadClosed(*this); + } + } + __isCancelledClicked = false; } void diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index 11bd171..7647607 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -1166,10 +1166,17 @@ MainForm::GetItemCount (void) void MainForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state) { - History* pHistory = static_cast < History* >(__pMostVisitedSites->GetAt(index)); - String url = pHistory->GetHistoryUrl(); - HistoryPresentationModel::GetInstance()->DeleteHistory(url); - __pMostVisitedListView->UpdateList(); + if(__pMostVisitedSites != null) + { + History* pHistory = static_cast < History* >(__pMostVisitedSites->GetAt(index)); + if (pHistory != null) + { + String url = pHistory->GetHistoryUrl(); + + HistoryPresentationModel::GetInstance()->DeleteHistory(url); + __pMostVisitedListView->UpdateList(); + } + } } void @@ -3901,6 +3908,13 @@ MainForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::Ori { AppLog("MainForm::OnOrientationChanged GetClientAreaBounds %d, %d",GetClientAreaBounds().width,GetClientAreaBounds().height); int widthContextItem = 0; + + if(__pWebViewer != null) + { + // this is added because if any text is selected on long press followed by on rotation we are hiding the context menu therefore we should release the text block also + __pWebViewer->ReleaseBlock(); + } + if(__pFindWordControl != null) ShowFindWordPanel(__pFindWordControl->GetShowState(), false); if ( __pFooterLabel != null) -- 2.7.4