static const int WIDTH_CONTEXT_MENU_BUTTON_LANDSCAPE = 800;
static const int HEIGHT_CONTEXT_MENU_BUTTON = 72;
+static const wchar_t* APPCONTROL_OPERATION_ID_IMAGE_VIEWER = L"http://tizen.org/appcontrol/operation/view";
MainForm::MainForm(void)
{
- //__isLongPressedDone = false;
+ __isLongPressedDone = false;
__pHistory = null;
__pAddressbar = null;
// __pMostVisitedSitesPanel = null;
__pStopBtn = null;
__pClearBtn = null;
__pReaderBtn = null;
- __isWebKeypadOpened = false;
+ __isKeypadOpened = false;
__fontSize = 44;
__pNotification = null;
}
__pMultiWindowButton->AddActionEventListener(*this);
__pMultiWindowButton->SetActionId(IDA_MULTIWINDOWBTN_CLICKED);
+ if(pPressedBitmap)
+ {
+ delete pPressedBitmap;
+ pPressedBitmap = null;
+ }
}
if (__pMoreButton)
__pFooterUrlField->SetKeypadAction(KEYPAD_ACTION_GO);
__pFooterUrlField->AddKeypadEventListener(*this);
__pFooterUrlField->SetPropagatedTouchEventListener(this);
+ __pFooterUrlField->AddFocusEventListener(*this);
if (SettingPresentationModel::GetInstance()->GetHomepage().CompareTo((L"IDS_BR_BODY_MOST_VISITED_SITES")) == 0)
{
}
else if (SettingPresentationModel::GetInstance()->GetHomepage().CompareTo((L"IDS_BR_BODY_BLANK_PAGE")) == 0)
{
- __pFooterUrlField->SetGuideText(CommonUtil::GetString(L"IDS_BR_BODY_ABOUT_C_BLANK"));
+ __pFooterUrlField->SetGuideText(CommonUtil::GetString(L"IDS_BR_BODY_BLANK_PAGE"));
}
else
{
if (__pOptionMenu != null)
{
+ __pOptionMenu->SetFocusable(true);
__pOptionMenu->Invalidate(true);
return r;
}
r = __pOptionMenu->Construct();
TryCatch(!IsFailed(r),,"Contextmenu creation failed with%s",GetErrorMessage(r));
+ __pOptionMenu->SetFocusable(true);
isPrivateBrowsing = SettingPresentationModel::GetInstance()->GetPrivateOn();
__pImageMenu->SetMaxVisibleItemsCount(4);
__pImageMenu->AddActionEventListener(*this);
SetControlAlwaysOnTop(*__pImageMenu, true);
+ __pImageMenu->SetFocusable(true);
CATCH: return r;
}
r = __pImageMenu->Construct(p, CONTEXT_MENU_STYLE_LIST, direction);
TryCatch(!IsFailed(r),, "Context image menu creation failed with%s",GetErrorMessage(r));
- r = __pImageMenu->AddItem("Open in new window"/*CommonUtil::GetString(L"IDS_BR_OPT_COPY_IMAGE")*/,IDA_HYPERLINK_OPEN_CLICKED);
- r = __pImageMenu->AddItem("Copy link URL"/*CommonUtil::GetString(L"IDS_DLNA_BODY_SHARE_IMAGE_ABB")*/,IDA_HYPERLINK_COPY_LINK_CLICKED);
+ r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_BODY_OPEN_IN_NEW_WINDOW"),IDA_HYPERLINK_OPEN_CLICKED);
+ r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_COPY_LINK_URL"),IDA_HYPERLINK_COPY_LINK_CLICKED);
//r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_SAVE_IMAGE"),IDA_HYPERLINK_SAVE_IMAGE_CLICKED);
r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_SHARE"),IDA_HYPERLINK_SHARE_IMAGE_CLICKED);
__pImageMenu->SetMaxVisibleItemsCount(3);
__pImageMenu->AddActionEventListener(*this);
SetControlAlwaysOnTop(*__pImageMenu, true);
+ __pImageMenu->SetFocusable(true);
CATCH: return r;
__pImageMenu->SetMaxVisibleItemsCount(3);
__pImageMenu->AddActionEventListener(*this);
SetControlAlwaysOnTop(*__pImageMenu, true);
+ __pImageMenu->SetFocusable(true);
CATCH: return r;
__pImageMenu->SetMaxVisibleItemsCount(3);
__pImageMenu->AddActionEventListener(*this);
SetControlAlwaysOnTop(*__pImageMenu, true);
+ __pImageMenu->SetFocusable(true);
CATCH: return r;
delete pBitmap;
}
}
+ if(__pAddressbar)
+ __pAddressbar->SetShowState(false);
+
+ if(__isKeypadOpened == false)
+ __pFooterPanel->SetShowState(true);
return r;
}
__pFindWordEditField->AddTextEventListener(*this);
__pFindWordEditField->AddKeypadEventListener(*this);
__pFindWordEditField->SetOverlayKeypadCommandButtonVisible(false);
+ __pFindWordEditField->SetColor(EDIT_STATUS_HIGHLIGHTED, Color(0x00, 0x00, 0x00, 0x00));
__pFindWordEditFieldRightToLeft = static_cast<EditField*>(__pFindWordControl->GetControl(L"IDC_FIND_WORD_EDITFIELD2", true));
if (__pFindWordEditFieldRightToLeft == null)
__pFindWordEditFieldRightToLeft->AddTextEventListener(*this);
__pFindWordEditFieldRightToLeft->AddKeypadEventListener(*this);
__pFindWordEditFieldRightToLeft->SetOverlayKeypadCommandButtonVisible(false);
+ __pFindWordEditFieldRightToLeft->SetColor(EDIT_STATUS_HIGHLIGHTED, Color(0x00, 0x00, 0x00, 0x00));
+
+ if(__pAddressbar)
+ __pAddressbar->SetShowState(false);
+ if(__isKeypadOpened == false)
+ __pFooterPanel->SetShowState(true);
return r;
}
if (pageURL.GetLength() == 0)
{
String nourl;
- pAppResource->GetString(L"IDS_BR_BODY_ABOUT_C_BLANK", nourl);
+ pAppResource->GetString(L"IDS_BR_BODY_BLANK_PAGE", nourl);
pageURL = L"<"+ nourl +">";
}
if ( pListIconImage != NULL)
{
listImageRect.SetBounds(screenBounds.x + 16, screenBounds.y + 28 + (__fontSize - 44)/2 , 72, 72);
- pagetTitleRect.SetBounds(listImageRect.x + 72 + 16,10, screenBounds.width - 2 * pListIconImage->GetWidth() - 120, 60 + (__fontSize - 44));
+ pagetTitleRect.SetBounds(listImageRect.x + 72 + 16,10, screenBounds.width - 2 * pListIconImage->GetWidth() - 120, 72 + (__fontSize - 44));
pageURLRect.SetBounds(pagetTitleRect.x, pagetTitleRect.y + pagetTitleRect.height, screenBounds.width - 2 * pListIconImage->GetWidth() - 120, 48);
void
MainForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
{
+ AppLog("MainForm::OnListViewContextItemStateChanged called");
if(__pMostVisitedSites != null)
{
History* pHistory = static_cast < History* >(__pMostVisitedSites->GetAt(index));
if(__pWebViewer)
{
__pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
}
- if(__pItemContext)
+
+ if (__pItemContext)
{
delete __pItemContext;
}
- if(__pItemContextLandscape)
+ if (__pItemContextLandscape)
{
delete __pItemContextLandscape;
}
+ if (__pSaveImage)
+ {
+ delete __pSaveImage;
+ }
+ if (__pMostVisitedSites)
+ {
+ __pMostVisitedSites->RemoveAll(true);
+ delete __pMostVisitedSites;
+ }
return r;
}
{
case IDA_BACKBTN_CLICKED:
{
+ if(__pImageMenu && __pImageMenu->GetShowState() == true)
+ {
+ AppLog("Hiding the menu");
+ __pImageMenu->SetShowState(false);
+ }
if (__pWebViewer && __pWebViewer->CanGoBack())
{
__pWebViewer->GoBack();
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
r = pApp->Terminate();
return;
}
if(__pFindWordPanelLeftToRight && __pFindWordPanelLeftToRight->GetShowState() == true)
{
__pFindWordEditField->SetFocus();
- __pFindWordCountLabel->SetShowState(false);
+// __pFindWordCountLabel->SetShowState(false);
}
else
{
if (__pNotification != null)
{
__pNotification->SetText(message);
- __pNotification->SetPositionDiff(__pFooterPanel->GetHeight());
+ __pNotification->SetPositionDiff(__pFooterPanel->GetHeight() - 12);
__pNotification->ShowNotification();
}
}
if (__pNotification != null)
{
__pNotification->SetText(message);
- __pNotification->SetPositionDiff(__pFooterPanel->GetHeight());
+ __pNotification->SetPositionDiff(__pFooterPanel->GetHeight() - 12);
__pNotification->ShowNotification();
pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ICON_BOOKMARK_ON_TEMP);
}
__pFindWordCountLabel->SetText(L"0/0");
__pWebViewer->SearchText(L"aaaabbbbcccc",true);
AppLog("akjshdasd 1");
- __pFooterPanel->SetShowState(true);
+ if(__isKeypadOpened == false)
+ __pFooterPanel->SetShowState(true);
ShowFindWordPanel(false);
}
break;
__currentSearchStr = L"";
__pFindWordNext->SetEnabled(false);
__pFindWordPrev->SetEnabled(false);
- __pFindWordCountLabel->SetShowState(false);
+// __pFindWordCountLabel->SetShowState(false);
__pFindWordControl->Invalidate(true);
}
break;
__currentSearchStr = L"";
__pFindWordNext->SetEnabled(false);
__pFindWordPrev->SetEnabled(false);
- __pFindWordCountLabelRightToLeft->SetShowState(false);
+// __pFindWordCountLabelRightToLeft->SetShowState(false);
__pFindWordControl->Invalidate(true);
}
break;
{
String idElement = __pHitElementResult->GetAttributeValue(L"id");
String nameElement = __pHitElementResult->GetAttributeValue(L"name");
+ String tagElement = __pHitElementResult->GetTagName();
AppLog("MainForm::IDA_PASTE_TEXT_CLICKED id is %ls",idElement.GetPointer());
String script;
script.Append(*pString);
script.Append("\");");
}
+ else//adding for twitter post page
+ {
+ script = L"function insertAtCursor(myField, myValue) { if (document.selection) { document.getElementsByTagName(myField)[0].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 { document.getElementsByTagName(myField)[0].value += myValue; } } ";
+ script.Append("insertAtCursor(document.getElementsByTagName('");
+ script.Append(tagElement);
+ script.Append("')[0],");
+ script.Append("\"");
+ script.Append(*pString);
+ script.Append("\");");
+ }
AppLog("MainForm::OnTouchLongPressed script is %ls",script.GetPointer());
String* pStr = __pWebViewer->EvaluateJavascriptN(script);
delete pStr;
MainForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
{
result r = E_FAILURE;
+ if(__pImageMenu && __pImageMenu->GetShowState() == true)
+ {
+ AppLog("Hiding the menu");
+ __pImageMenu->SetShowState(false);
+ }
if (__pWebViewer && __pWebViewer->CanGoBack())
{
__pWebViewer->GoBack();
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
r = pApp->Terminate();
return;
}
}
else if(__pWindowInfo != null)
{
- if(__pWindowInfo->pageUrl.GetLength() > 0 &&previousSceneId != IDSCN_BRIGHTNESS && previousSceneId != IDSCN_HISTORY_LIST && previousSceneId != IDSCN_MULTIPLE_WINDOW && previousSceneId != IDSCN_MULTIPLE_WINDOW_GRID && previousSceneId != IDSCN_BOOKMARK_VIEW && previousSceneId != IDSCN_SETTINGS && previousSceneId != IDSCN_MAIN_VIEW)
+ if(__pWindowInfo->pageUrl.GetLength() > 0 &&previousSceneId != IDSCN_BRIGHTNESS && previousSceneId != IDSCN_HISTORY_LIST && previousSceneId != IDSCN_MULTIPLE_WINDOW && previousSceneId != IDSCN_MULTIPLE_WINDOW_GRID && previousSceneId != IDSCN_BOOKMARK_VIEW && previousSceneId != IDSCN_SETTINGS && previousSceneId.Contains(IDSCN_MAIN_VIEW) == false)
+ {
+ LoadUrl(__pWindowInfo->pageUrl);
+ }
+ else if(__pWindowInfo->pageUrl.GetLength() > 0 && __pWindowInfo->isAppcontrolTriggered == true)
{
LoadUrl(__pWindowInfo->pageUrl);
}
delete pBitmap;
}
+ RelayoutControls(false);
AppLog("ABC: OnSceneActivatedN started exit");
}
WindowInfo::pFormCanvasBitmap = new(std::nothrow) Bitmap();
WindowInfo::pFormCanvasBitmap->Construct(*pCanvas,Rectangle(0,0,GetClientAreaBounds().width,GetClientAreaBounds().height - __pFooterPanel->GetHeight()));
delete pCanvas;
+ delete pWebCanvas;
+ if(__pAddressbar)
+ __pAddressbar->SetShowState(false);
AppLog("Coming here");
}
MainForm::OnKeypadOpened(Tizen::Ui::Control& source)
{
AppLog("XYZ::MainForm::OnKeypadOpened");
+ __isKeypadOpened = true;
__pFooterPanel->SetShowState(false);
}
MainForm::OnKeypadClosed(Tizen::Ui::Control& source)
{
AppLog("XYZ::MainForm::OnKeypadClosed");
+ __isKeypadOpened = false;
__pFooterPanel->SetShowState(true);
RelayoutControls(true);
}
}
void
+MainForm::OnFocusGained(const Tizen::Ui::Control& source)
+{
+ AppLog("MainForm::OnFocusGained");
+ if(__pFooterPanel)
+ {
+ __pFooterPanel->SetShowState(false);
+ }
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetShowState(true);
+ __pAddressbar->SetAddressbarURLFocus();
+ }
+ if(__pFindWordControl && __pFindWordControl->GetShowState() == true)
+ {
+ __currentSearchStr = L"";
+ __currentWordIndex = 0;
+ __maxOccurrances = 0;
+
+ if (__pFindWordPanelLeftToRight && __pFindWordPanelLeftToRight->GetShowState() == true)
+ {
+ __pFindWordEditField->SetText(L"");
+ __pFindWordEditField->HideKeypad();
+ __pFindWordControl->SetShowState(false);
+ __pFindWordCountLabel->SetText(L"0/0");
+ }
+ else if(__pFindWordPanelRightToLeft && __pFindWordPanelRightToLeft->GetShowState() == true)
+ {
+ __pFindWordEditFieldRightToLeft->SetText(L"");
+ __pFindWordEditFieldRightToLeft->HideKeypad();
+ __pFindWordControl->SetShowState(false);
+ __pFindWordCountLabelRightToLeft->SetText(L"0/0");
+ }
+
+ __pFindWordNext->SetEnabled(false);
+ __pFindWordPrev->SetEnabled(false);
+
+ __pWebViewer->SearchText(L"aaaabbbbcccc",true);
+ __pFindWordControl->SetShowState(false);
+ }
+ RelayoutControls(false);
+}
+
+void
+MainForm::OnFocusLost(const Tizen::Ui::Control& source)
+{
+ AppLog("MainForm::OnFocusLost called");
+}
+
+void
MainForm::OnStopClicked(Addressbar& addBar)
{
AppLogDebug("MainForm::OnStopClicked called");
void
MainForm::OnBackClicked(/*const Addressbar& addBar*/)
{
-// AppLog("MainForm::OnBackClicked");
+ // AppLog("MainForm::OnBackClicked");
result r = E_FAILURE;
+ if(__pImageMenu && __pImageMenu->GetShowState() == true)
+ {
+ AppLog("Hiding the menu");
+ __pImageMenu->SetShowState(false);
+ }
if (__pWebViewer && __pWebViewer->CanGoBack())
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
+
+
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
+
+
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
+
+
r = pApp->Terminate();
if (IsFailed(r))
{
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
+
+
r = pApp->Terminate();
return;
}
pApp = UiApp::GetInstance();
if (pApp != null)
{
+ RemoveOrientationEventListener(*this);
+
+ if(__pAddressbar)
+ {
+ __pAddressbar->SetAddressbarEventListener(null);
+ }
+
+ if(__pWebViewer)
+ {
+ __pWebViewer->RemoveTouchEventListener(*this);
+ __pWebViewer->SetWebUiEventListenerF(null);
+ __pWebViewer->SetWebKeypadEventListener(null);
+ __pWebViewer->SetTextSearchListener(null);
+ __pWebViewer->SetLoadingListener(null);
+ }
+
+
r = pApp->Terminate();
return;
}
int Height = GetClientAreaBounds().height;
AppLog("MainForm::OnAddressBarFocusLost height is %d",Height);
- if(__pAddressbar)
- __pAddressbar->SetShowState(false);
-
- if (__pFooterPanel != null && addressbarKeyPadState == false)
- {
- AppLog("akjshdasd 3");
- __pFooterPanel->SetShowState(true);
- }
-
RelayoutControls(false);
}
__pAddressbar->SetFaviconBitmap(*pDefaultBmp);
}
}
+ if(pBitmap)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
}
delete tempPath;
}
void
MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint& endPoint)
{
+ if(__isLongPressedDone == false)
+ return;
AppLog("MainForm::OnWebPageBlockSelected");
if (__pHitElementResult != null)
{
else
{
__pWebViewer->SetBounds(0, __webControlPosition.y, GetClientAreaBounds().width, __webControlHeight + 12);
+ AppLog("xyz:: MainForm::RelayoutControls called __webControlHeight %d",__webControlHeight);
__pWebViewer->Invalidate(false);
}
}
__pFindWordPanelRightToLeft->SetShowState(true);
__pFindWordClear->SetShowState(false);
- __pFindWordCountLabel->SetShowState(false);
+// __pFindWordCountLabel->SetShowState(false);
__pFindWordEditField->SetShowState(false);
__pFindWordClearRightToLeft->SetShowState(true);
MainForm::OnWebKeypadWillOpen(Tizen::Web::Controls::Web& source)
{
AppLog("xyz::MainForm::OnWebKeypadWillOpen");
- __isWebKeypadOpened = true;
+ __isKeypadOpened = true;
__pFooterPanel->SetShowState(false);
// OnAddressBarKeypadOpened(*__pAddressbar);
}
void
MainForm::OnWebKeypadOpened(Tizen::Web::Controls::Web& source)
{
+ __isKeypadOpened = true;
AppLog("xyz::MainForm::OnWebKeypadOpened");
if(__pFindWordControl && __pFindWordControl->GetShowState() == true)
__pFooterPanel->SetShowState(true);
// OnAddressBarKeypadClosed(*__pAddressbar);
RelayoutControls(false);
- __isWebKeypadOpened = false;
+ __isKeypadOpened = false;
}
void
- //__isLongPressedDone = true;
+ __isLongPressedDone = true;
result r =__pWebViewer->SetBlockSelectionPosition(currentPosition);
- if (((tagName.CompareTo(L"INPUT") == 0) || tagName.CompareTo(L"TEXTAREA") == 0) && innerHtml.GetLength() == 0 /*&& __isWebKeypadOpened == true*/ && __currentSelectedStr.CompareTo(L"") == 0 && r == E_INVALID_ARG)
+ if (((tagName.CompareTo(L"INPUT") == 0) || tagName.CompareTo(L"TEXTAREA") == 0) && innerHtml.GetLength() == 0 && type.CompareTo(L"submit") !=0/*&& __isWebKeypadOpened == true*/ && __currentSelectedStr.CompareTo(L"") == 0 && r == E_INVALID_ARG)
{
AppLog("MainForm::OnWebPageBlockSelected show paste option");
{
__pAddressbar->SetShowState(false);
}
+ if(__pFooterPanel && __isKeypadOpened == false)
+ {
+ __pFooterPanel->SetShowState(true);
+ }
// Not reuired now.
/*HitElementResult* pHitElement = __pWebViewer->GetElementByPointN(currentPosition);
__pWebViewer->SearchText(L"aaaabbbbcccc",true);
__pFindWordControl->SetShowState(false);
}
+ AppLog("__pAddressbar->GetShowState() %d",__pAddressbar->GetShowState());
if(__pAddressbar->GetShowState() == false)
{
__pAddressbar->SetAddressbarURLFocus();
__pFooterPanel->SetShowState(false);
}
- return true;
+ return false;
}
bool
// if(__pFindWordControl != null)
// ShowFindWordPanel(__pFindWordControl->GetShowState(), false);
+
+ if(__pOptionMenu && __pOptionMenu->GetShowState() == true)
+ {
+ if( GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE)
+ {
+ AppLog(" Orientation landscape");
+ __pOptionMenu->SetMaxVisibleItemsCount(5);
+ }
+ else
+ {
+ AppLog(" Orientation potrait");
+ __pOptionMenu->SetMaxVisibleItemsCount(6);
+ }
+ }
if(__pNotification && __pNotification->GetShowState() == true)
{
__pNotification->SetShowState(false);
}
- if(__pOptionMenu != null)
- __pOptionMenu->SetShowState(false);
+// if(__pOptionMenu != null)
+// __pOptionMenu->SetShowState(false);
if( GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
{
AppLog("MainForm::OnTouchPressed %d",__pFindWordControl->GetShowState());
// ShowFindWordPanel(__pFindWordControl->GetShowState(), true);
}
- //__isLongPressedDone = false;
+ __isLongPressedDone = false;
delete pList;
}
if(__pAddressbar)
+ {
__pAddressbar->SetShowState(false);
+ }
+ if(__pFooterPanel && __isKeypadOpened == false)
+ {
+ __pFooterPanel->SetShowState(true);
+ }
RelayoutControls(false);
return;
}
MainForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
{
// __currentWordIndex = 0;
- //__isLongPressedDone = false;
+ __isLongPressedDone = false;
}
}
else
{
- __pFindWordCountLabel->SetShowState(false);
+// __pFindWordCountLabel->SetShowState(false);
+ __pFindWordCountLabel->SetBounds(__pFindWordCountLabel->GetX(),__pFindWordCountLabel->GetY(),84,__pFindWordCountLabel->GetHeight());
+ __pFindWordEditField->SetBounds(__pFindWordEditField->GetX(),__pFindWordEditField->GetY(),214+80,__pFindWordEditField->GetHeight());
+
}
__pFindWordNext->SetEnabled(false);
__pFindWordPrev->SetEnabled(false);
}
__pMostVisitedListView->SetItemProvider(*this);
__pMostVisitedListView->AddListViewItemEventListener(*this);
- __pMostVisitedListView->SetTextOfEmptyList(CommonUtil::GetString(L"IDS_BR_BODY_NO_RECENTLY_VISITED_SITES"));
+ __pMostVisitedListView->SetTextOfEmptyList(CommonUtil::GetString(L"IDS_BR_BODY_NO_VISITED_SITES"));
AddControl(__pMostVisitedListView);
__pMostVisitedListView->UpdateList();
contentPath.Append(imageName);
contentPath.Append(".jpg");
contentId = contentManager.CreateContent(*aBuffer, contentPath);
- ShowIndicatorNotification(L"Download Complete");
+ ShowIndicatorNotification(L"Download Complete",contentPath);
AppLog("Content manager update content result %s" ,GetErrorMessage(GetLastResult()));
}
void
-MainForm::ShowIndicatorNotification(const String& messageText)
+MainForm::ShowIndicatorNotification(const String& messageText, const String& contentPath)
{
AppLogDebug("ENTER");
NotificationRequest request;
request.SetAlertText(messageText);
request.SetTitleText(L"");
- request.SetAppMessage(L"AppMessage");
-
+ request.SetAppMessage(contentPath);
+ request.SetOngoingActivityType(ONGOING_ACTIVITY_TYPE_TEXT);
+ request.SetNotificationStyle(NOTIFICATION_STYLE_THUMBNAIL);
Tizen::App::App* pApp = Tizen::App::App::GetInstance();
String homePath = pApp->GetAppRootPath();
String iconPath = homePath + L"res/screen-density-xhigh/Notification_download_complete.png";
Tizen::Shell::NotificationManager notiMgr;
notiMgr.Construct();
notiMgr.Notify(request);
-
AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
return;
}
{
__pWebViewer->Pause();
}
+ if(__pImageMenu)
+ {
+ __pImageMenu->SetShowState(false);
+ }
if(__pAddressbar != null)
{
__pAddressbar->SendUserEvent(BACK_GROUND_APP_EVENT,NULL);
if (__pAddressbar)
__pAddressbar->SetShowState(false);
- //AppLog("akjshdasd 5");
- //__pFooterPanel->SetShowState(true);
+ AppLog("akjshdasd 5");
+ __pFooterPanel->SetShowState(true);
if(__pWebViewer)
__pWebViewer->SetFocus();
{
AppLog("MainForm::OnFormMenuRequested called");
InitOptionMenu();
- if (__pWindowInfo != NULL && __pWindowInfo->pageUrl != NULL && __pWebViewer->GetShowState() == true)
+ if (__pWindowInfo != NULL && __pWindowInfo->pageUrl != NULL && __pWebViewer && __pWebViewer->GetShowState() == true)
{
int bookmarkCount=0;
bool exist = false;
result r = E_SUCCESS;
Bitmap* pBitmap = null;
String lastChar = L"";
- if(url.SubString(url.GetLength()-1,lastChar));
+// if(url.SubString(url.GetLength()-1,lastChar));
// if(lastChar == L"/")
// {
// bool exist1 = false;
delete pBitmap;
}
AppLogDebug("ONACTION_PERFORMED:IDA_MOREBTN_CLICKED end");
- __pOptionMenu->SetShowState(true);
+ if(__pAddressbar)
+ __pAddressbar->SetShowState(false);
+ SetFocus();
+ __pFooterPanel->SetShowState(true);
+ result r = __pOptionMenu->SetShowState(true);
+ AppLog("ajsghd %s",GetErrorMessage(r));
__pOptionMenu->Invalidate(true);
__pOptionMenu->Show();