bool __isLoadingData;
bool __isLoadingCompleted;
+ bool __isClipboardOpen;
int __progressPercentage;
Tizen::Ui::Controls::Label* __pAddressbarBg;
virtual void OnAddressBarKeypadBoundsChanged(const Addressbar&) = 0;
//virtual void OnAddressBarModeChanged(const Addressbar&) = 0;
virtual void OnAddressCancelledClicked(const Addressbar&) = 0;
+ virtual void OnClipboardClosed(const Addressbar&) = 0;
//virtual void OnBackClicked(const Addressbar&) = 0;
//virtual void OnForwardClicked(const Addressbar&) = 0;
virtual void OnReaderClicked(const Addressbar&) = 0;
virtual ~ISettingChangeEventListener(void) {};
virtual void OnClearCache(void) = 0;
virtual void OnClearCookie(void) = 0;
+ virtual void OnClearFormData(void) = 0;
+ virtual void OnClearPasswords(void) = 0;
virtual void OnSettingsChange(int settingvalue) = 0;
virtual void OnSettingsReset(void) = 0;
};
void OnAddressBarModeChanged(/*const Addressbar&*/);
+ virtual void OnClipboardClosed(const Addressbar&);
+
void OnBackClicked(/*const Addressbar&*/);
void OnForwardClicked(/*const Addressbar&*/);
//ISettingsChangeListener
void OnClearCache(void);
void OnClearCookie(void);
+ void OnClearFormData(void);
+ void OnClearPasswords(void);
void OnSettingsChange(int settingvalue);
void OnSettingsReset(void);
result InitContextMenu(Tizen::Graphics::Point& p);
result InitFindWordPanel(void);
result InitImageContextMenu(Tizen::Graphics::Point p);
+ result InitImageLinkContextMenu(Tizen::Graphics::Point p);
result InitSelectTextContextMenu(Tizen::Graphics::Point p, bool pasteOption, bool onlyPasteOption);
result InitMostVisitedSitesPanel(Tizen::Ui::OrientationStatus orientationStatus);
result InitMostVisitedSitesView(Tizen::Ui::OrientationStatus orientationStatus);
SETTING_SHOW_SECURITY_WARNINGS, //13
SETTING_ACCEPT_COOKIES, //14
SETTING_CLEAR_COOKIE_DATA, //15
+ SETTING_CLEAR_FORM_DATA, //16
+ SETTING_CLEAR_PASSWORDS, //17
SETTING_SEARCH_ENGINE_TITLE, //20
SETTING_SEARCH_ENGINE_YAHOO, //21
SETTING_SEARCH_ENGINE_NAVER, //22
void ClearCookie(void);
/**
+ * @brief Opens a popup to clear all Saved Form Data.
+ */
+ void ClearFormData(void);
+
+ /**
+ * @brief Opens a popup to clear all Saved Passwords.
+ */
+ void ClearPasswords(void);
+
+ /**
* @brief Opens a popup to clear the browser history
*/
void ClearHistory(void);
* @name ClearCookie
* @brief The method used to clear the cache of web browser
* @param[in] void
- * @return String The Search URL
+ * @return void
*/
void ClearCookie(void);
/**
+ * @name ClearFormData
+ * @brief The method used to clear the Form Data of web browser
+ * @param[in] void
+ * @return void
+ */
+ void ClearFormData(void);
+
+ /**
+ * @name ClearPasswords
+ * @brief The method used to clear the Passwords of web browser
+ * @param[in] void
+ * @return void
+ */
+ void ClearPasswords(void);
+
+ /**
* @brief The method used to get the default view
* @param[in] void
* @return String The default view value
<text id="IDS_BR_BODY_CLEAR_HISTORY">Clear history</text>
<text id="IDS_COM_BODY_FEB">Feb</text>
<text id="IDS_COM_FAILED_TO_SAVE_IMAGE">Failed to save Image</text>
+ <text id="IDS_BR_POP_EMPTY_FORM_DATA_BNO">Delete all saved form data?</text>
+ <text id="IDS_BR_POP_EMPTY_PASSWORDS_BNO">Delete all saved passwords?</text>
</string_table>
-->
<!DOCTYPE Scene SYSTEM "UIForm.dtd">
-<Scene Bversion="2.0.0.201304161803" Dversion="20120315">
+<Scene Bversion="2.0.0.201304191935" Dversion="20120315">
<LogicalCoordinate>720</LogicalCoordinate>
<Form id="IDL_FORM">
<property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
</Panel>
<Panel id="IDC_FOOTER_PANEL" parent="IDL_FORM">
<property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
- <layout bottomRelation="IDL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0" y="1168.0"/>
+ <layout bottomRelation="IDL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0" y="1108.0"/>
<layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="105.0" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="1200.0" x="0" y="555.0"/>
</Panel>
<Label id="IDC_CHECK_LABEL" parent="IDC_FOOTER_PANEL">
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="63.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="63.0" x="26.0" y="25.0"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="95.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_FOOTER_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="10.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="112.0" x="0.0" y="10.0"/>
</Button>
+ <Button id="IDC_STOP_BUTTON" parent="IDC_FOOTER_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="I01_field_btn_Clear.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="43.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="42.0" x="454.0" y="40.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="55.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="None" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="10.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_FOOTER_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="64.0" x="982.0" y="35.0"/>
+ </Button>
<EditField id="IDC_URL_EDIT_FIELD" parent="IDC_FOOTER_PANEL">
<property accessibilityHint="" disabledBGBitmapPath="" disabledColor="" disabledColorOpacity="100" disabledTextColor="" ellipsisPosition="ELLIPSIS_POSITION_END" enableClear="false" groupStyle="GROUP_STYLE_NONE" guideText="" guideTextColor="" highlightedBGBitmapPath="EditBackground.png" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalMargin="16.0" inputStyle="INPUT_STYLE_OVERLAY" keypadAction="KEYPAD_ACTION_ENTER" keypadEnabled="true" limitLength="100" linkTextColor="" lowerCaseMode="false" normalBGBitmapPath="EditBackground.png" normalColor="" normalColorOpacity="100" normalTextColor="#4E4945" pressedBGBitmapPath="EditBackground.png" pressedColor="" pressedColorOpacity="100" text="" textHorizontalAlignment="ALIGNMENT_LEFT" textSize="32.0" titleStyle="EDIT_FIELD_TITLE_STYLE_NONE" titleText="" titleTextColor="" verticalMargin="12.0" viewMode="false"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="71.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" style="EDIT_FIELD_STYLE_URL_SMALL" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="241.0" x="212.0" y="25.0"/>
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_MULTIWINDOW_BUTTON" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_PAGEBACK_BUTTON" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" style="EDIT_FIELD_STYLE_URL_SMALL" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="832.0" x="224.0" y="19.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_MULTIWINDOW_BUTTON" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_STOP_BUTTON" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" style="EDIT_FIELD_STYLE_URL_SMALL" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="758.0" x="224.0" y="19.0"/>
</EditField>
<Label id="IDC_PROGRESS_BAR_LABEL" parent="IDC_FOOTER_PANEL">
<property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
<layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="12.0" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0" y="0.0"/>
<layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="12.0" horizontalFitPolicy="FIT_POLICY_PARENT" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0" y="0.0"/>
</Label>
- <Button id="IDC_STOP_BUTTON" parent="IDC_FOOTER_PANEL">
- <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="I01_field_btn_Clear.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="43.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="42.0" x="454.0" y="40.0"/>
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="55.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="10.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_URL_EDIT_FIELD" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="64.0" x="982.0" y="35.0"/>
- </Button>
<Button id="IDC_CLEAR_BUTTON" parent="IDC_FOOTER_PANEL">
<property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="I01_field_btn_Clear.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="43.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="42.0" x="454.0" y="40.0"/>
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="55.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="10.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_URL_EDIT_FIELD" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="64.0" x="982.0" y="35.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="55.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="None" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="10.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_FOOTER_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="64.0" x="982.0" y="35.0"/>
</Button>
<Button id="IDC_REFRESH_BUTTON" parent="IDC_FOOTER_PANEL">
<property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="I01_search_icon_refresh.png" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
}
}
+ __pEditFieldTitle->ShowKeypad();
if ( previousSceneId != IDSCN_CREATE_BOOKMARK_FOLDER )
{
if (__pEditFieldTitle != NULL)
__listHeight = H_TITLE_ITEM_HEIGHT + (__pList->GetItemCount() - 1) * H_ITEM_HEIGHT;
__pList->SetBounds(__pList->GetX(),__pList->GetY(),__pList->GetWidth(),__listHeight);
}
+
+ Invalidate(true);
// __pList->RefreshList(0, LIST_REFRESH_TYPE_ITEM_MODIFY);
CATCH : return;
}
__pToolBarLabel = null;
__pAddressbarURLLabel = null;
__pAddressBackBtn = null;
+ __isClipboardOpen = false;
}
Addressbar::~Addressbar(void)
void
Addressbar::OnKeypadClosed(Tizen::Ui::Control& source)
{
+ if(__isClipboardOpen == true)
+ {
+ __isClipboardOpen = false;
+ __pListener->OnClipboardClosed(*this);
+ return;
+ }
SetShowState(false);
if(__pListener != null)
{
void
Addressbar::OnKeypadOpened(Tizen::Ui::Control& source)
{
+ AppLog("Addressbar::OnKeypadClosed %d",Clipboard::GetInstance()->IsPopupVisible());
+ __isClipboardOpen = Clipboard::GetInstance()->IsPopupVisible();
if(__pListener != null)
{
__pListener->OnAddressBarKeypadOpened(*this);
month = GetMonth(strMonth);
text.Append(month);
}
- text.Append(L".)");
+ text.Append(L")");
}
r = pItem->SetElement(text, null);
return;
}
__pSearchListView->SetEnabled(true);
- __pGroupedListView->SetBounds(0, __pSearchBar->GetY() + __pSearchBar->GetHeight(), GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight());
+ if(__pSearchBar != null)
+ __pGroupedListView->SetBounds(0, __pSearchBar->GetY() + __pSearchBar->GetHeight(), GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight());
Invalidate(true);
__searchHistory = false;
r = __pGroupedListView->UpdateList();
__pSearchListView->SetBounds(__pSearchListView->GetX(), __pSearchListView->GetY(), __pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight());
__pSearchListView->Invalidate(false);
__pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()));
+ __pGroupedListView->SetBounds(0, __pSearchBar->GetY() + __pSearchBar->GetHeight(), GetClientAreaBounds().width, GetClientAreaBounds().height - __pSearchBar->GetHeight());
Invalidate(true);
}
const int IDA_STOP_BTN_CLICKED = 217;
const int IDA_CLEAR_URL = 218;
+const int IDA_HYPERLINK_OPEN_CLICKED = 219;
+const int IDA_HYPERLINK_COPY_LINK_CLICKED = 220;
+const int IDA_HYPERLINK_SAVE_IMAGE_CLICKED = 222;
+const int IDA_HYPERLINK_SHARE_IMAGE_CLICKED = 223;
+
const int DEFAULT_PROGRESS_PERCENTAGE = 10;
const int MainForm::IDA_FORMAT_BITMAP = 500;
__pFooterUrlField->SetGuideText(CommonUtil::GetString(L"IDS_BR_BODY_SEARCH_OR_ENTER_URL"));
}
+
//Add the go Back Button
__pGoBackBtn = static_cast<Button*> (GetControl(L"IDC_PAGEBACK_BUTTON",true));
if (__pGoBackBtn == NULL)
CATCH: return r;
}
+result
+MainForm::InitImageLinkContextMenu(Tizen::Graphics::Point p)
+{
+ result r = E_SUCCESS;
+ ContextMenuAnchorDirection direction = CONTEXT_MENU_ANCHOR_DIRECTION_AUTO;
+
+ AppLog("MainForm::InitImageContextMenu clicked on image");
+ if (__pImageMenu != null)
+ {
+ delete __pImageMenu;
+ __pImageMenu = null;
+ }
+
+ p.y = p.y + __pAddressbar->GetHeight() + 12;
+ if (p.y < 100)
+ {
+ direction = CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD;
+ }
+ else
+ {
+ direction = CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD;
+ }
+ __pImageMenu = new (std::nothrow) ContextMenu();
+ 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_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);
+
+ CATCH: return r;
+
+}
+
result MainForm::InitSelectTextContextMenu(Tizen::Graphics::Point p, bool pasteOption, bool onlyPasteOption = false)
{
result r = E_SUCCESS;
AppLogDebug("Clicked : %d", actionId);
switch (actionId)
{
+// case IDA_BACKBTN_CLICKED:
+// {
+// if (__pWebViewer && __pWebViewer->CanGoBack())
+// {
+// __pWebViewer->GoBack();
+// }
+// else
+// {
+// UiApp* pApp = null;
+// pApp = UiApp::GetInstance();
+// if (pApp != null)
+// {
+// r = pApp->Terminate();
+// if (IsFailed(r))
+// {
+// AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+// return;
+// }
+// }
+// }
+// }
+// break;
+
case IDA_BACKBTN_CLICKED:
- {
- if (__pWebViewer && __pWebViewer->CanGoBack())
{
- __pWebViewer->GoBack();
- }
- else
- {
- UiApp* pApp = null;
- pApp = UiApp::GetInstance();
- if (pApp != null)
+ if (__pWebViewer && __pWebViewer->CanGoBack())
{
- r = pApp->Terminate();
- if (IsFailed(r))
+ __pWebViewer->GoBack();
+ }
+ else if(__pWindowInfo->isJavascriptInitiated == false)
+ {
+ UiApp* pApp = null;
+ pApp = UiApp::GetInstance();
+ if (pApp != null)
+ {
+ r = pApp->Terminate();
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ }
+ }
+ else
+ {
+ UiApp* pApp = null;
+ WindowInfo* pWindowInfo = null;
+ int totalCount = 0;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ if (pSceneManager == null)
{
- AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
return;
}
+ ArrayList* pAllWindowList = MultipleWindowPresentationModel::GetInstance()->GetAllWindowArrayList();
+ if (pAllWindowList == NULL)
+ {
+ pApp = UiApp::GetInstance();
+ if (pApp != null)
+ {
+ r = pApp->Terminate();
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ }
+ }
+ totalCount = pAllWindowList->GetCount();
+
+ for (int count = 0; count < totalCount; count++)
+ {
+ pWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(count));
+ if (pWindowInfo == null)
+ {
+ pApp = UiApp::GetInstance();
+ if (pApp != null)
+ {
+ r = pApp->Terminate();
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ }
+ }
+ if (pSceneManager->GetCurrentSceneId() == pWindowInfo->sceneID && pWindowInfo->isJavascriptInitiated == true)
+ {
+ r = SceneRegister::DestroyAndUnRegisterScene(pWindowInfo->sceneID);
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ r = pAllWindowList->RemoveAt(count, true);
+ __pWindowInfo = null;
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ if(count > 0)
+ {
+ pWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(count - 1));
+ }
+ else
+ {
+ pWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(pAllWindowList->GetCount() - 1));
+ }
+ if (pWindowInfo == null)
+ {
+ pApp = UiApp::GetInstance();
+ if (pApp != null)
+ {
+ r = pApp->Terminate();
+ return;
+ }
+ }
+ else
+ {
+ r = pSceneManager->GoBackward(BackwardSceneTransition(pWindowInfo->sceneID ,SCENE_TRANSITION_ANIMATION_TYPE_NONE));
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ }
+ break;
+ }
+
+ }
+
}
}
- }
- break;
+ break;
case IDA_FORWARD_CLICKED:
if (__pWebViewer == null)
InitFindWordPanel();
__pMenu->SetShowState(false);
__pMenu->Invalidate(false);
- ShowFindWordPanel(true);
__pFindWordEditField->SetFocus();
/*
__pWebViewer->ReleaseBlock();
}
*/
-
+ ShowFindWordPanel(true);
}
break;
case IDA_PRIVATEON_CLICKED:
}
}
break;
+ case IDA_HYPERLINK_OPEN_CLICKED:
+ {
+ AppLogDebug("IDA_VIEW_IMAGE_CLICKED");
+ WindowInfo* pNewWindowInfo = null;
+ if (__pHitElementResult != null)
+ {
+ String srcUrl = __pHitElementResult->GetUrl();
+ AppLog("MainForm::OnTouchLongPressed srcUrl is %ls",srcUrl.GetPointer());
+ LoadUrl(srcUrl);
+ }
+ }
+ break;
+ case IDA_HYPERLINK_SHARE_IMAGE_CLICKED:
+ {
+ if(__pPopUp != null)
+ {
+ delete __pPopUp;
+ __pPopUp = null;
+ }
+ __pPopUp = new(std::nothrow) SharePopup();
+ __pPopUp->Initialize();
+
+ ShareInfo* pShareInfo = new(std::nothrow) ShareInfo();
+
+ if(__pHitElementResult == null)
+ {
+ return;
+ }
+
+ pShareInfo->SetPageUrl(__pHitElementResult->GetUrl());
+ pShareInfo->SetImageAttached(false);
+ __pPopUp->RemoveAllShareInfo();
+ __pPopUp->AddShareInfo(pShareInfo);
+
+ __pPopUp->SetShowState(true);
+ __pPopUp->Show();
+ }
+ break;
+ case IDA_HYPERLINK_COPY_LINK_CLICKED:
+ {
+ ClipboardItem item;
+ String url;
+ if (__pHitElementResult != null)
+ {
+ url = __pHitElementResult->GetUrl();
+ }
+
+ String resourcePath = App::GetInstance()->GetAppResourcePath();
+ item.Construct(CLIPBOARD_DATA_TYPE_TEXT , url);
+
+ // copying the item to clipboard
+ Clipboard* pClipboard = Clipboard::GetInstance();
+ if (pClipboard != null)
+ {
+ pClipboard->CopyItem(item);
+ }
+ }
+ break;
case IDA_FIND_TEXT__CLICKED:
{
AppLogDebug("MainForm::OnActionPerformed find word clicked");
void
MainForm::LoadUrl(String& url)
{
+ url.Trim();
String encodedUrl;
// UrlEncoder::Encode(url, L"UTF-8", encodedUrl);
AppLogDebug("MainForm::LoadUrl enter");
void
MainForm::OnBackClicked(/*const Addressbar& addBar*/)
{
- AppLog("MainForm::OnBackClicked");
+// AppLog("MainForm::OnBackClicked");
result r = E_FAILURE;
+//
+// if (__pWebViewer != null && __pWebViewer->CanGoBack())
+// {
+// __pWebViewer->GoBack();
+// }
+// else
+// {
+// UiApp* pApp = null;
+// pApp = UiApp::GetInstance();
+// if(pApp != null)
+// {
+// r = pApp->Terminate();
+// if (IsFailed(r))
+// {
+// return;
+// }
+// }
+// }
+
+
+
+
+
+
+
- if (__pWebViewer != null && __pWebViewer->CanGoBack())
+ if (__pWebViewer && __pWebViewer->CanGoBack())
{
__pWebViewer->GoBack();
}
- else
+ else if(__pWindowInfo->isJavascriptInitiated == false)
{
UiApp* pApp = null;
pApp = UiApp::GetInstance();
- if(pApp != null)
+ if (pApp != null)
{
r = pApp->Terminate();
if (IsFailed(r))
{
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
return;
}
}
}
+ else
+ {
+ UiApp* pApp = null;
+ WindowInfo* pWindowInfo = null;
+ int totalCount = 0;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ if (pSceneManager == null)
+ {
+ return;
+ }
+ ArrayList* pAllWindowList = MultipleWindowPresentationModel::GetInstance()->GetAllWindowArrayList();
+ if (pAllWindowList == NULL)
+ {
+ pApp = UiApp::GetInstance();
+ if (pApp != null)
+ {
+ r = pApp->Terminate();
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ }
+ }
+ totalCount = pAllWindowList->GetCount();
+
+ for (int count = 0; count < totalCount; count++)
+ {
+ pWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(count));
+ if (pWindowInfo == null)
+ {
+ pApp = UiApp::GetInstance();
+ if (pApp != null)
+ {
+ r = pApp->Terminate();
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ }
+ }
+ if (pSceneManager->GetCurrentSceneId() == pWindowInfo->sceneID && pWindowInfo->isJavascriptInitiated == true)
+ {
+ r = SceneRegister::DestroyAndUnRegisterScene(pWindowInfo->sceneID);
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ r = pAllWindowList->RemoveAt(count, true);
+ __pWindowInfo = null;
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ if(count > 0)
+ {
+ pWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(count - 1));
+ }
+ else
+ {
+ pWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(pAllWindowList->GetCount() - 1));
+ }
+ if (pWindowInfo == null)
+ {
+ pApp = UiApp::GetInstance();
+ if (pApp != null)
+ {
+ r = pApp->Terminate();
+ return;
+ }
+ }
+ else
+ {
+ r = pSceneManager->GoBackward(BackwardSceneTransition(pWindowInfo->sceneID ,SCENE_TRANSITION_ANIMATION_TYPE_NONE));
+ if (IsFailed(r))
+ {
+ AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+ return;
+ }
+ }
+ break;
+ }
+
+ }
+
+ }
+
}
void
}
void
+MainForm::OnClipboardClosed(const Addressbar& addBar)
+{
+ RelayoutControls(false);
+}
+
+void
MainForm::OnAddressBarKeypadClosed(const Addressbar& addBar, bool footerState)
{
if(__pAddressbar)
if (show == true)
{
InitFindWordPanel();
- __pFindWordEditField->SetText(__currentSearchStr);
+// __pFindWordEditField->SetText(__currentSearchStr);
//__pFindWordCountLabel->SetText(L"");
- __pFindWordCountLabel->SetText(L"0/0");
+// __pFindWordCountLabel->SetText(L"0/0");
__pFindWordControl->SetShowState(true);
}
else
__pImageMenu->Show();
__pImageMenu->Invalidate(true);
}
+ else if(__pHitElementResult->HasUrl() == true)
+ {
+ String tempURl = __pHitElementResult->GetUrl();
+ AppLog("tempURl is %ls", tempURl.GetPointer());
+ const Bitmap* pBitmap = __pHitElementResult->GetImage();
+ if (pBitmap != null)
+ {
+ AppLog("not null");
+ }
+ else
+ {
+ AppLog(null);
+ }
+ InitImageLinkContextMenu(currentPosition);
+ __pImageMenu->SetShowState(true);
+ __pImageMenu->Show();
+ __pImageMenu->Invalidate(true);
+ }
else
{
String tagName = __pHitElementResult->GetTagName();
__currentSelectedStr.Clear();
__currentSelectedStr = __pWebViewer->GetTextFromBlock();
+ AppLog("tag name is %ls", tagName.GetPointer());
+ AppLog("type is %ls", type.GetPointer());
+ AppLog("innerHtml is %ls", innerHtml.GetPointer());
+
if (((tagName.CompareTo(L"INPUT") == 0) || tagName.CompareTo(L"TEXTAREA") == 0) && value.GetLength() == 0 && innerHtml.GetLength() == 0 && __isWebKeypadOpened == true)
{
AppLog("MainForm::OnWebPageBlockSelected show paste option");
}
}
+void
+MainForm::OnClearFormData()
+{
+ result r = E_SUCCESS;
+
+ if (__pWebViewer != NULL)
+ {
+ __pWebViewer->ClearFormData();
+ }
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("Cookie cleared success");
+ }
+ else
+ {
+ AppLogDebug("Cache cleared fail");
+ }
+}
+
+void
+MainForm::OnClearPasswords()
+{
+ result r = E_SUCCESS;
+
+ if (__pWebViewer != NULL)
+ {
+ __pWebViewer->ClearLoginFormData();
+ }
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("Cookie cleared success");
+ }
+ else
+ {
+ AppLogDebug("Cache cleared fail");
+ }
+}
+
+
double
MainForm::findDistance(int x1,int y1,int x2, int y2)
{
pGroupItemCount = new(std::nothrow) int[5];
pGroupItemCount[0] = 5; //Homepage
pGroupItemCount[1] = 6; //Page content settings
- pGroupItemCount[2] = 5; //Private and Security
+ pGroupItemCount[2] = 7; //Private and Security
pGroupItemCount[3] = 4; //Search
pGroupItemCount[4] = 1; //Website settings and Reset
settingInfo[SETTING_CLEAR_COOKIE_DATA].subText = CommonUtil::GetString(L"IDS_BR_HEADER_COOKIES");
settingInfo[SETTING_CLEAR_COOKIE_DATA].itemType = ITEM_TYPE_NORMAL;
+ settingInfo[SETTING_CLEAR_FORM_DATA].titleText = CommonUtil::GetString(L"IDS_BR_BODY_CLEAR_FORM_DATA");
+ settingInfo[SETTING_CLEAR_FORM_DATA].subText = CommonUtil::GetString(L"IDS_BR_HEADER_FORM_DATA");
+ settingInfo[SETTING_CLEAR_FORM_DATA].itemType = ITEM_TYPE_NORMAL;
+
+ settingInfo[SETTING_CLEAR_PASSWORDS].titleText = CommonUtil::GetString(L"IDS_BR_BODY_CLEAR_PASSWORDS");
+ settingInfo[SETTING_CLEAR_PASSWORDS].subText = L"";
+ settingInfo[SETTING_CLEAR_PASSWORDS].itemType = ITEM_TYPE_NORMAL;
+
settingInfo[SETTING_SEARCH_ENGINE_TITLE].titleText = CommonUtil::GetString(L"IDS_BR_BODY_SEARCH_ENGINE");
settingInfo[SETTING_SEARCH_ENGINE_TITLE].subText = SettingPresentationModel::GetInstance()->GetSearchEngine();
settingInfo[SETTING_SEARCH_ENGINE_TITLE].itemType = ITEM_TYPE_DROPDOWN;
ClearCookie();
break;
+ case SETTING_CLEAR_FORM_DATA:
+ ClearFormData();
+ break;
+
+ case SETTING_CLEAR_PASSWORDS:
+ ClearPasswords();
+ break;
+
case SETTING_SEARCH_ENGINE_YAHOO:
SettingPresentationModel::GetInstance()->SetSearchEngine(settingInfo[SETTING_SEARCH_ENGINE_YAHOO].titleText);
listView.UpdateList();
message = CommonUtil::GetString(L"IDS_BR_POP_DELETED");
SettingPresentationModel::GetInstance()->ClearCookie();
}
+ else if (__pConfirmationPopup->GetMessage() == CommonUtil::GetString(L"IDS_BR_POP_EMPTY_FORM_DATA_BNO"))
+ {
+ message = CommonUtil::GetString(L"IDS_BR_POP_DELETED");
+ SettingPresentationModel::GetInstance()->ClearFormData();
+ }
+ else if (__pConfirmationPopup->GetMessage() == CommonUtil::GetString(L"IDS_BR_POP_EMPTY_PASSWORDS_BNO"))
+ {
+ message = CommonUtil::GetString(L"IDS_BR_POP_DELETED");
+ SettingPresentationModel::GetInstance()->ClearPasswords();
+ }
else if (__pConfirmationPopup->GetMessage() == CommonUtil::GetString(L"IDS_BR_POP_DELETE_LOCALLY_CACHED_CONTENT_AND_DATABASES_Q"))
{
message = CommonUtil::GetString(L"IDS_BR_POP_DELETED");
}
void
+SettingForm::ClearFormData(void)
+{
+ String message = CommonUtil::GetString(L"IDS_BR_POP_EMPTY_FORM_DATA_BNO");
+ if(!__pConfirmationPopup)
+ {
+ __pConfirmationPopup = new(std::nothrow) ConfirmationPopup();
+ __pConfirmationPopup->Initialize();
+ __pConfirmationPopup->RemoveActionListener(*this);
+ __pConfirmationPopup->AddActionListener(*this);
+ __pConfirmationPopup->setMessage(message);
+ __pConfirmationPopup->Show();
+ }
+}
+
+void
+SettingForm::ClearPasswords(void)
+{
+ String message = CommonUtil::GetString(L"IDS_BR_POP_EMPTY_PASSWORDS_BNO");
+ if(!__pConfirmationPopup)
+ {
+ __pConfirmationPopup = new(std::nothrow) ConfirmationPopup();
+ __pConfirmationPopup->Initialize();
+ __pConfirmationPopup->RemoveActionListener(*this);
+ __pConfirmationPopup->AddActionListener(*this);
+ __pConfirmationPopup->setMessage(message);
+ __pConfirmationPopup->Show();
+ }
+}
+
+
+void
SettingForm::ResetToDefault()
{
String message = CommonUtil::GetString(L"IDS_BR_POP_RESET_ALL_SETTINGS_TO_DEFAULT_Q");
}
}
+void
+SettingPresentationModel::ClearFormData(void)
+{
+ for (int index = 0; index < __listenerList.GetCount(); index++)
+ {
+ ISettingChangeEventListener* pSettingsListener = static_cast< ISettingChangeEventListener* >(__listenerList.GetAt(index));
+ if (pSettingsListener)
+ pSettingsListener->OnClearFormData();
+ }
+}
+
+void
+SettingPresentationModel::ClearPasswords(void)
+{
+ for (int index = 0; index < __listenerList.GetCount(); index++)
+ {
+ ISettingChangeEventListener* pSettingsListener = static_cast< ISettingChangeEventListener* >(__listenerList.GetAt(index));
+ if (pSettingsListener)
+ pSettingsListener->OnClearPasswords();
+ }
+}
+
result
SettingPresentationModel::Construct(void)
{