Fixed Nabi Issues and Hardware Key Implementation
authorVinay Sachdeva <v.sachdeva@samsung.com>
Wed, 12 Jun 2013 23:27:26 +0000 (04:57 +0530)
committerVinay Sachdeva <v.sachdeva@samsung.com>
Wed, 12 Jun 2013 23:27:26 +0000 (04:57 +0530)
Change-Id: I6cb21f706d51bce61052de398d79d3c8ef91eac1
Signed-off-by: Vinay Sachdeva <v.sachdeva@samsung.com>
14 files changed:
inc/IntAddBookmarkForm.h
inc/IntCreateBookmarkFolderForm.h
inc/IntInternetApp.h
inc/IntMainForm.h
res/screen-size-normal/IDL_FORM_HW_KEY.xml [new file with mode: 0644]
src/IntAddBookmarkForm.cpp
src/IntBookmarkListForm.cpp
src/IntCreateBookmarkFolderForm.cpp
src/IntEditHistoryListForm.cpp
src/IntHistoryListForm.cpp
src/IntHistoryPresentationModel.cpp
src/IntInternetApp.cpp
src/IntMainForm.cpp
src/IntSettingForm.cpp

index a7d7bfc..2d7b627 100644 (file)
@@ -32,6 +32,7 @@
 class AddBookmarkForm
   : public Tizen::Ui::Controls::Form
   , public Tizen::Ui::IActionEventListener
+  , public Tizen::Ui::Controls::IFormBackEventListener
   , public Tizen::Ui::IKeypadEventListener
   , public Tizen::Ui::Controls::IListViewItemEventListener
   , public Tizen::Ui::Controls::IListViewItemProvider
@@ -85,6 +86,9 @@ class AddBookmarkForm
        //IActionEventListener
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
+       //IFormBackEventListener
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
        //IKeypadEventListener
        virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction);
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
index d8b19cd..9f15aab 100644 (file)
@@ -32,6 +32,7 @@
 class CreateBookmarkFolderForm
        : public Tizen::Ui::Controls::Form
        , public Tizen::Ui::IActionEventListener
+       , public Tizen::Ui::Controls::IFormBackEventListener
        , public Tizen::Ui::IKeypadEventListener
        , public Tizen::Ui::Scenes::ISceneEventListener
        , public Tizen::Ui::ITextEventListener
@@ -68,6 +69,9 @@ public:
        // IActionEventListener
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
+       //IFormBackEventListener
+       virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
        //IKeypadListener
        virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction);
        virtual void OnKeypadClosed(Tizen::Ui::Control& source);
index bf2cb14..b52c35c 100644 (file)
@@ -54,6 +54,7 @@ public:
        virtual ~InternetApp(void);
 
 public:
+       bool IsHwBackKeyExists(void);
 
        bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
 
@@ -83,6 +84,7 @@ public:
 private:
        MultipleWindowPresentationModel* __pMultiWindowManager;
        WindowInfo* __pNewWindowInfo;//the new window object to be created either by the normal launch of application or as an appcontrol launch
+       bool __isHwBackButtonExists;
 };
 
 #endif // _INT_INTERNET_APP_H_
index 10b9711..626d2ec 100644 (file)
@@ -48,6 +48,7 @@ enum AddressBarMode
 
 class MainForm
        : public Tizen::Ui::Controls::Form
+       , public Tizen::Ui::Controls::IFormMenuEventListener
        , public Tizen::Ui::Controls::IListViewItemEventListener
        , public Tizen::Ui::Controls::IListViewItemProvider
        , public Tizen::Ui::IActionEventListener
@@ -98,6 +99,9 @@ public:
 
        void LoadUrl(Tizen::Base::String& url);
 
+       //IFormMenuEventListener
+       virtual void    OnFormMenuRequested (Tizen::Ui::Controls::Form &source);
+
        virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
 
        virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
@@ -284,6 +288,7 @@ private:
        result InitAddressbar(void);
        result InitFooter(void);
        result InitContextMenu(Tizen::Graphics::Point& p);
+       result InitOptionMenu(void);
        result InitFindWordPanel(void);
        result InitImageContextMenu(Tizen::Graphics::Point p);
        result InitImageLinkContextMenu(Tizen::Graphics::Point p);
@@ -355,6 +360,8 @@ private:
        Tizen::Web::Controls::HitElementResult* __pHitElementResult;
        Tizen::Ui::Controls::ContextMenu* __pImageMenu;
        Tizen::Ui::Controls::ContextMenu* __pMenu;
+
+       Tizen::Ui::Controls::OptionMenu* __pOptionMenu;
        Tizen::Ui::Controls::Button* __pMoreButton;
        Tizen::Ui::Controls::Button* __pMultiWindowButton;
 //     Tizen::Ui::Controls::Button* __pNewWindowButton;
@@ -387,6 +394,7 @@ private:
        Tizen::Ui::Controls::Button* __pReaderBtn;
        Tizen::Graphics::Point __longPressPoint;
        int __fontSize;
+       bool __isHwKeySupported;
 };
 
 #endif  //_INT_MAIN_FORM_H_
diff --git a/res/screen-size-normal/IDL_FORM_HW_KEY.xml b/res/screen-size-normal/IDL_FORM_HW_KEY.xml
new file mode 100644 (file)
index 0000000..9c23632
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201306101756" Dversion="20120315">
+    <LogicalCoordinate>720</LogicalCoordinate>
+    <Form id="IDL_FORM_HW_KEY">
+        <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"/>
+        <layout mode="Portrait" style="FORM_STYLE_INDICATOR" type="LAYOUT_RELATIVE"/>
+        <layout mode="Landscape" style="FORM_STYLE_INDICATOR" type="LAYOUT_RELATIVE"/>
+    </Form>
+    <Panel id="IDC_ADDRESSBAR_PANEL" parent="IDL_FORM_HW_KEY">
+        <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="94.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="" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0" y="0.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="94.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="RECT_EDGE_RELATION_TOP_TO_TOP" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0" y="0.0"/>
+    </Panel>
+    <Panel id="IDC_FOOTER_PANEL" parent="IDL_FORM_HW_KEY">
+        <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+        <layout bottomRelation="" bottomRelationType="" 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="1280.0" x="0" y="555.0"/>
+    </Panel>
+    <Label id="IDC_CHECK_LABEL" parent="IDC_FOOTER_PANEL">
+        <property accessibilityHint="" backgroundBitmapPath="I01_toolbar_bg_02.png" 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="" centerHorizontal="false" centerVertical="false" height="112.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="720.0" x="0.0" y="0.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="105.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" 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.0" y="0.0"/>
+    </Label>
+    <Button id="IDC_MULTIWINDOW_BUTTON" parent="IDC_FOOTER_PANEL">
+        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="20.0" NormalBitmapY="20.0" PressedBitmapX="20.0" PressedBitmapY="20.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="EditBackground.png" normalBitmapPath="I01_toolbar_icon_windows_manager_empty.png" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="EditBackground.png" pressedBitmapPath="I01_controlbar_icon_multiview.png" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="60.0" verticalAlign="ALIGN_MIDDLE"/>
+        <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="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="112.0" x="0.0" y="10.0"/>
+    </Button>
+    <Button id="IDC_PAGEFORWARD_BUTTON" parent="IDC_FOOTER_PANEL">
+        <property DisabledBitmapX="20.0" DisabledBitmapY="20.0" NormalBitmapX="20.0" NormalBitmapY="20.0" PressedBitmapX="20.0" PressedBitmapY="20.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="EditBackground.png" disabledBitmapPath="I01_toolbar_icon_forward_web_disabled.png" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="EditBackground.png" normalBitmapPath="I01_toolbar_icon_forward_web.png" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="EditBackground.png" pressedBitmapPath="I01_toolbar_icon_forward_press_web.png" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+        <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="635.0" y="25.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="95.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="112.0" x="1168.0" y="10.0"/>
+    </Button>
+    <Button id="IDC_PAGEBACK_BUTTON" parent="IDC_FOOTER_PANEL">
+        <property DisabledBitmapX="20.0" DisabledBitmapY="20.0" NormalBitmapX="20.0" NormalBitmapY="20.0" PressedBitmapX="20.0" PressedBitmapY="20.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="EditBackground.png" disabledBitmapPath="I01_toolbar_icon_back_web_disabled.png" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="20.0" highlightedBitmapY="20.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="EditBackground.png" normalBitmapPath="I01_toolbar_icon_back_web.png" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="EditBackground.png" pressedBitmapPath="I01_toolbar_icon_back_press_web.png" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="60.0" verticalAlign="ALIGN_MIDDLE"/>
+        <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="542.0" y="25.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="95.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="112.0" x="1056.0" y="10.0"/>
+    </Button>
+    <Label id="IDC_FOOTER_LABEL" parent="IDC_FOOTER_PANEL">
+        <property accessibilityHint="" backgroundBitmapPath="I01_toolbar_bg_02.png" 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="" 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="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="363.0" x="149.0" y="25.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="944.0" x="112.0" y="19.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="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" 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="2048" 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="304.0" x="149.0" y="25.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" style="EDIT_FIELD_STYLE_URL_SMALL" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="870.0" x="112.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="" centerHorizontal="false" centerVertical="false" height="12.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="720.0" x="0.0" y="0.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="12.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" 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.0" y="0.0"/>
+    </Label>
+    <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="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" 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"/>
+        <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="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="54.0" x="982.0" y="35.0"/>
+    </Button>
+    <Button id="IDC_READER_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"/>
+        <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="212.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="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="54.0" x="982.0" y="35.0"/>
+    </Button>
+    <Panel id="IDC_FIND_ON_PAGE_PANEL" parent="IDL_FORM_HW_KEY">
+        <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="82.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="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="82.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="RECT_EDGE_RELATION_TOP_TO_TOP" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0" y="0.0"/>
+    </Panel>
+</Scene>
index 5998543..f341684 100644 (file)
@@ -105,6 +105,7 @@ AddBookmarkForm::OnInitializing(void)
 
        pHeader = GetHeader();
 
+       SetFormBackEventListener(this);
        if (pHeader != null)
        {
                pHeader->AddActionEventListener(*this);
@@ -434,6 +435,30 @@ AddBookmarkForm::OnActionPerformed(const Control& source, int actionId)
 }
 
 void
+AddBookmarkForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+{
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+
+       if (pSceneManager == null)
+       {
+               return ;
+       }
+
+       if (__pEditFieldTitle != NULL)
+       {
+               __pEditFieldTitle->Clear();
+       }
+
+       if (__pEditFieldUrl != NULL)
+       {
+               __pEditFieldUrl->Clear();
+       }
+
+       pSceneManager->GoBackward(BackwardSceneTransition());
+
+
+}
+void
 AddBookmarkForm::OnListViewItemLongPressed(ListView& listView, int index, int elementId, bool& invokeListViewItemCallback)
 {
        return;
index 704a632..741aa3e 100644 (file)
@@ -1033,10 +1033,10 @@ BookmarkListForm::OnSearchBarModeChanged(Tizen::Ui::Controls::SearchBar& source,
 
                if(__pSearchBar)
                {
-                       __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), GetClientAreaBounds().height - __pSearchBar->GetHeight()));
+                       r = __pSearchBar->SetContentAreaSize(Dimension(__pSearchListView->GetWidth(), __pSearchListView->GetHeight()));
                        __pSearchBar->SetText(L"");
                }
-               AppLog("OnSearchBarModeChanged SetContentAreaSize heihgt %d",__pSearchListView->GetHeight());
+               AppLog("OnSearchBarModeChanged SetContentAreaSize heihgt %d, %d",__pSearchListView->GetHeight() , GetClientAreaBounds().height - __pSearchBar->GetHeight());
                 __pListview->UpdateList();
                __pSearchListView->UpdateList();
        }
index bd5dc10..1a1e9d8 100644 (file)
@@ -74,6 +74,7 @@ CreateBookmarkFolderForm::OnInitializing(void)
        SceneManager* pSceneManager = SceneManager::GetInstance();
        AppAssert(pSceneManager);
        pSceneManager->AddSceneEventListener(IDSCN_CREATE_BOOKMARK_FOLDER, *this);
+       SetFormBackEventListener(this);
 
        __pFolderTitle = static_cast< EditField* >(GetControl(L"IDC_EDITFIELD_FOLDER_TITLE"));
 
@@ -377,6 +378,27 @@ CreateBookmarkFolderForm::OnActionPerformed(const Control& source, int actionId)
 }
 
 void
+CreateBookmarkFolderForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+{
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       if (pSceneManager == null)
+       {
+               return;
+       }
+       result r;
+       if (__pFolderTitle != NULL)
+       {
+               __pFolderTitle->Clear();
+               __pFolderTitle->HideKeypad();
+       }
+
+       r = pSceneManager->GoBackward(BackwardSceneTransition());
+       AppLogDebug("SCENE_ADD_BOOKMARK error = %s",GetErrorMessage(r));
+
+
+}
+
+void
 CreateBookmarkFolderForm::OnKeypadActionPerformed(Control& source, KeypadAction keypadAction)
 {
 
index 095da6c..514eb6a 100644 (file)
@@ -740,7 +740,7 @@ EditHistoryListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previou
                __pListView->UpdateList();
        }
        __pSelectAllCheck->SetSelected(false);
-
+       __selectedCount = 0;
        GetFooter()->SetItemEnabled(0, false);
        Invalidate(true);
 }
index 578126a..5fe41f4 100644 (file)
@@ -112,13 +112,20 @@ HistoryListForm::OnInitializing(void)
        Bitmap *pIconBitmap = null;
        AppResource* pAppResource = UiApp::GetInstance()->GetAppResource();
        const Color brown = Color(32, 32, 32, 0xFF);
-
+//     bool isHwBackButtonExist = false;
+//     Tizen::System::SystemInfo::GetValue(L"http:://tizen.org/feature/input.back.key",isHwBackButtonExist);
+//
+//     SetFormStyle(FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER);
        // Setup back event listener
        SetFormBackEventListener(this);
 
        GetHeader()->AddActionEventListener(*this);
        GetFooter()->AddActionEventListener(*this);
 
+//     if(isHwBackButtonExist)
+//     {
+//             GetFooter()->SetBackButtonEnabled(false);
+//     }
        AddOrientationEventListener(*this);
        SettingInfo::AddSettingEventListener(*this);
 
index 893f9ba..6c592c6 100644 (file)
@@ -743,6 +743,7 @@ HistoryPresentationModel::GetHistoryCountWithTimeRange(Tizen::Base::DateTime& st
        for (int counter = 0 ; counter < count; counter++)
        {
                History *pHistory = dynamic_cast<History*>(__pDataList->GetAt(counter));
+               AppLog("vinayhistorytimecomparison %d, %d",pHistory->GetVisitedTime().CompareTo(startTime),pHistory->GetVisitedTime().CompareTo(endTime));
                if(pHistory != null && pHistory->GetVisitedTime().CompareTo(startTime) > 0 && pHistory->GetVisitedTime().CompareTo(endTime) < 0)
                {
                        historyCount++;
index 2ba1b68..72f8294 100644 (file)
@@ -43,7 +43,7 @@ using namespace Tizen::Ui::Scenes;
 InternetApp::InternetApp(void)
 : __pMultiWindowManager(NULL),__pNewWindowInfo(null)
 {
-
+       __isHwBackButtonExists = false;
 }
 
 InternetApp::~InternetApp(void)
@@ -55,6 +55,12 @@ InternetApp::~InternetApp(void)
        }
 }
 
+bool
+InternetApp::IsHwBackKeyExists(void)
+{
+       return __isHwBackButtonExists;
+}
+
 UiApp*
 InternetApp::CreateInstance(void)
 {
@@ -92,6 +98,7 @@ InternetApp::OnAppInitializing(AppRegistry& appRegistry)
                result r = pAppMgr->SetAppControlProviderEventListener(this);
                AppLogDebug("SetAppControlProviderEventListener result %s",GetErrorMessage(r));
        }
+       Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/input.keys.back",__isHwBackButtonExists);
        return true;
 }
 
index deb1d46..7187e92 100644 (file)
@@ -30,6 +30,7 @@
 #include "IntBookmarkPresentationModel.h"
 #include "IntCommonLib.h"
 #include "IntFaviconManager.h"
+#include "IntInternetApp.h"
 #include "IntMainForm.h"
 #include "IntNotificationPanel.h"
 #include "IntSceneRegister.h"
@@ -154,6 +155,7 @@ MainForm::MainForm(void)
        __pWebViewer = null;
        __pImageMenu = null;
        __pMenu = null;
+       __pOptionMenu = null;
        __pFindWordControl = null;
        __pFindWordPanelLeftToRight = null;
        __pFindWordPanelRightToLeft = null;
@@ -211,6 +213,7 @@ MainForm::MainForm(void)
        __pReaderBtn = null;
        __isWebKeypadOpened = false;
        __fontSize = 44;
+       __isHwKeySupported = false;
 }
 
 MainForm::~MainForm(void)
@@ -261,7 +264,22 @@ MainForm::~MainForm(void)
 bool
 MainForm::Initialize(void)
 {
-       Construct(L"IDL_FORM");
+       InternetApp* pInternet = static_cast<InternetApp*> (Application::GetInstance());
+
+
+       if(pInternet)
+       {
+               __isHwKeySupported = pInternet->IsHwBackKeyExists();
+       }
+       if(__isHwKeySupported)
+       {
+               Construct(L"IDL_FORM_HW_KEY");
+       }
+       else
+       {
+               Construct(L"IDL_FORM");
+       }
+//     SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER);
        return true;
 }
 
@@ -283,6 +301,7 @@ MainForm::OnInitializing(void)
        SettingPresentationModel::GetInstance()->AddSettingsEventListener(*this);
        SceneManager::GetInstance()->AddSceneEventListener(IDSCN_MAIN_VIEW, *this);
        AddOrientationEventListener(*this);
+
        AppLogDebug(" MainForm::OnInitializing ended");
        if (__pMostVisitedSites == null)
        {
@@ -330,7 +349,7 @@ MainForm::OnInitializing(void)
        {
                delete pBitmapPressed;
        }
-
+       SetFormMenuEventListener(this);
        return E_SUCCESS;
 }
 
@@ -596,11 +615,18 @@ MainForm::InitFooter(void)
                return E_FAILURE;
        }
 
-       __pMoreButton = static_cast<Button*>(GetControl(L"IDC_MORE_BUTTON",true));
+       if(__isHwKeySupported == false)
+       {
+               __pMoreButton = static_cast<Button*>(GetControl(L"IDC_MORE_BUTTON",true));
 
-       if ( __pMoreButton == NULL )
+               if ( __pMoreButton == NULL )
+               {
+                       return E_FAILURE;
+               }
+       }
+       else
        {
-               return E_FAILURE;
+               SetFormBackEventListener(this);
        }
 
        if (__pMultiWindowButton != null)
@@ -762,7 +788,6 @@ MainForm::InitFooter(void)
        return E_SUCCESS;
 }
 
-
 result
 MainForm::InitContextMenu(Point& p)
 {
@@ -814,6 +839,56 @@ MainForm::InitContextMenu(Point& p)
        return r;
 }
 
+result
+MainForm::InitOptionMenu()
+{
+       result r = E_SUCCESS;
+       bool isPrivateBrowsing = false;
+       Bitmap* pBitmap = null;
+
+       if (__pOptionMenu != null)
+       {
+               __pOptionMenu->Invalidate(true);
+               return r;
+       }
+
+       __pOptionMenu = new(std::nothrow) OptionMenu();
+       r = __pOptionMenu->Construct();
+       TryCatch(!IsFailed(r),,"Contextmenu creation failed with%s",GetErrorMessage(r));
+
+       isPrivateBrowsing = SettingPresentationModel::GetInstance()->GetPrivateOn();
+
+
+       if (isPrivateBrowsing == true)
+       {
+               pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_BUTTON_ON);
+       }
+       else
+       {
+               pBitmap  = AppResource::GetInstance()->GetBitmapN(IDB_BUTTON_OFF);
+       }
+
+       r = __pOptionMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_BOOKMARK"), IDA_BOOKMARKBTN_CLICKED);
+
+       if ( pBitmap != NULL)
+       {
+               __pOptionMenu->AddItem(CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"), IDA_PRIVATEON_CLICKED,*pBitmap);
+               delete pBitmap;
+       }
+       r = __pOptionMenu->AddItem(CommonUtil::GetString(L"IDS_BR_TAB_HISTORY"), IDA_HISTORY_CLICKED);
+       r = __pOptionMenu->AddItem(CommonUtil::GetString(L"IDS_COM_OPT_BRIGHTNESS"), IDA_BRIGHTNESS_BTN_CLICKED);
+       r = __pOptionMenu->AddItem(CommonUtil::GetString(L"IDS_COM_BODY_SETTINGS"), IDA_SETTINGS_CLICKED);
+
+
+       __pOptionMenu->SetMaxVisibleItemsCount(6);
+       __pOptionMenu->SetShowState(false);
+       __pOptionMenu->AddActionEventListener(*this);
+       SetControlAlwaysOnTop(*__pOptionMenu, true);
+
+       CATCH:
+       return r;
+}
+
 result MainForm::InitImageContextMenu(Tizen::Graphics::Point p)
 {
        result r = E_SUCCESS;
@@ -1438,8 +1513,16 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                {
                        __pWebViewer->GoForward();
                }
-               __pMenu->SetShowState(false);
-               __pMenu->Invalidate(false);
+               if(__isHwKeySupported == true)
+               {
+                       __pOptionMenu->SetShowState(false);
+                       __pOptionMenu->Invalidate(false);
+               }
+               else
+               {
+                       __pMenu->SetShowState(false);
+                       __pMenu->Invalidate(false);
+               }
                break;
 
        case IDA_FINDONPAGE_CLICKED:
@@ -1448,8 +1531,16 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                __currentSearchStr.Clear();
 
                InitFindWordPanel();
-               __pMenu->SetShowState(false);
-               __pMenu->Invalidate(false);
+               if(__isHwKeySupported == true)
+               {
+                       __pOptionMenu->SetShowState(false);
+                       __pOptionMenu->Invalidate(false);
+               }
+               else
+               {
+                       __pMenu->SetShowState(false);
+                       __pMenu->Invalidate(false);
+               }
 
                ShowFindWordPanel(true);
 
@@ -1514,13 +1605,20 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                __pAddressbar->UpdateFaviconBitmap(true);
                        }
                }
-
-
-               itemIndex = __pMenu->GetItemIndexFromActionId(IDA_PRIVATEON_CLICKED);
-               r = __pMenu->SetItemAt(itemIndex,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
-               AppLog("Result:: %s for index = %d", GetErrorMessage(r),itemIndex);
-               __pMenu->Invalidate(true);
-
+               if(__isHwKeySupported == true)
+               {
+                       itemIndex = __pOptionMenu->GetItemIndexFromActionId(IDA_PRIVATEON_CLICKED);
+                       r = __pOptionMenu->SetItemAt(itemIndex,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
+                       AppLog("Result:: %s for index = %d", GetErrorMessage(r),itemIndex);
+                       __pOptionMenu->Invalidate(true);
+               }
+               else
+               {
+                       itemIndex = __pMenu->GetItemIndexFromActionId(IDA_PRIVATEON_CLICKED);
+                       r = __pMenu->SetItemAt(itemIndex,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
+                       AppLog("Result:: %s for index = %d", GetErrorMessage(r),itemIndex);
+                       __pMenu->Invalidate(true);
+               }
                if ( pBitmap != NULL )
                {
                        delete pBitmap;
@@ -1538,8 +1636,16 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                        pArgList->Add(*__pWindowInfo);
                        SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_SETTINGS), pArgList);
                }
-               __pMenu->SetShowState(false);
-               __pMenu->Invalidate(false);
+               if(__isHwKeySupported)
+               {
+                       __pOptionMenu->SetShowState(false);
+                       __pOptionMenu->Invalidate(false);
+               }
+               else
+               {
+                       __pMenu->SetShowState(false);
+                       __pMenu->Invalidate(false);
+               }
                if (pArgList != null)
                {
                        delete pArgList;
@@ -1607,13 +1713,31 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                        pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ICON_BOOKMARK_ON_TEMP);
                                }
                        }
-                       if (pBitmap != null)
+                       if(__isHwKeySupported == true)
                        {
-                               r = __pMenu->SetItemAt(0,CommonUtil::GetString(L"IDS_BR_OPT_ADDTOBOOKMARKS"), IDA_ADDTOBOOKMARK_CLICKED,*pBitmap);
-                               delete pBitmap;
+                               if (pBitmap != null)
+                               {
+                                       r = __pOptionMenu->SetItemAt(1,CommonUtil::GetString(L"IDS_BR_OPT_ADDTOBOOKMARKS"), IDA_ADDTOBOOKMARK_CLICKED,*pBitmap);
+                                       delete pBitmap;
+                               }
+                       }
+                       else
+                       {
+                               if (pBitmap != null)
+                               {
+                                       r = __pMenu->SetItemAt(1,CommonUtil::GetString(L"IDS_BR_OPT_ADDTOBOOKMARKS"), IDA_ADDTOBOOKMARK_CLICKED,*pBitmap);
+                                       delete pBitmap;
+                               }
+                       }
+                       if(__isHwKeySupported == true)
+                       {
+                               __pOptionMenu->Invalidate(true);
+                       }
+                       else
+                       {
+                               __pMenu->Invalidate(true);
                        }
                }
-               __pMenu->Invalidate(true);
 
        }
        break;
@@ -2173,10 +2297,21 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                __currentSearchStr.Append(__currentSelectedStr);
                InitFindWordPanel();
                __pFindWordEditField->SetText(__currentSearchStr);
-               if(__pMenu != null)
+               if(__isHwKeySupported)
                {
-                       __pMenu->SetShowState(false);
-                       __pMenu->Invalidate(false);
+                       if(__pOptionMenu != null)
+                       {
+                               __pOptionMenu->SetShowState(false);
+                               __pOptionMenu->Invalidate(false);
+                       }
+               }
+               else
+               {
+                       if(__pMenu != null)
+                       {
+                               __pMenu->SetShowState(false);
+                               __pMenu->Invalidate(false);
+                       }
                }
 
                __adressPanelPosition.y = 0;
@@ -2379,13 +2514,117 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 void
 MainForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
 {
-
-       UiApp* pApp = UiApp::GetInstance();
-       if (pApp == null)
+       result r = E_FAILURE;
+       if (__pWebViewer && __pWebViewer->CanGoBack())
        {
-               return;
+               __pWebViewer->GoBack();
+       }
+       else if(__pWindowInfo->isJavascriptInitiated == false)
+       {
+               UiApp* pApp = null;
+               pApp = UiApp::GetInstance();
+               if (pApp != null)
+               {
+                       r = pApp->Terminate();
+                       if (IsFailed(r))
+                       {
+                               AppLogException("MainForm::OnFormBackRequested 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("MainForm::OnFormBackRequested failed with %s", GetErrorMessage(r));
+                                       return;
+                               }
+                       }
+               }
+               if (pAllWindowList != null)
+               {
+                       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("MainForm::OnFormBackRequested failed with %s", GetErrorMessage(r));
+                                               return;
+                                       }
+                               }
+                       }
+                       else
+                       {
+                               if (pSceneManager->GetCurrentSceneId() == pWindowInfo->sceneID && pWindowInfo->isJavascriptInitiated == true)
+                               {
+                                       r = SceneRegister::DestroyAndUnRegisterScene(pWindowInfo->sceneID);
+                                       if (IsFailed(r))
+                                       {
+                                               AppLogException("MainForm::OnFormBackRequested failed with %s", GetErrorMessage(r));
+                                               return;
+                                       }
+                                       r = pAllWindowList->RemoveAt(count, true);
+                                       __pWindowInfo = null;
+                                       if (IsFailed(r))
+                                       {
+                                               AppLogException("MainForm::OnFormBackRequested 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("MainForm::OnFormBackRequested failed with %s", GetErrorMessage(r));
+                                                       return;
+                                               }
+                                       }
+                                       break;
+                               }
+                       }
+               }
        }
-       pApp->Terminate();
 }
 
 void
@@ -2520,15 +2759,30 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
                }
        }
 
-       if (__pMenu != null && __pMenu->GetItemCount() == 3)
+       if(__isHwKeySupported == true)
        {
-               __pMenu->SetItemAt(0,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
+               if (__pOptionMenu != null && __pOptionMenu->GetItemCount() == 3)
+               {
+                       __pOptionMenu->SetItemAt(0,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
+               }
+               else if (__pOptionMenu != null )
+               {
+                       __pOptionMenu->SetItemAt(3,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
+               }
+
        }
-       else if (__pMenu != null )
+       else
        {
-               __pMenu->SetItemAt(3,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
-       }
+               if (__pMenu != null && __pMenu->GetItemCount() == 3)
+               {
+                       __pMenu->SetItemAt(0,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
+               }
+               else if (__pMenu != null )
+               {
+                       __pMenu->SetItemAt(3,CommonUtil::GetString(L"IDS_BR_BODY_PRIVACY_AND_SECURITY_ABB"),IDA_PRIVATEON_CLICKED,*pBitmap);
+               }
 
+       }
        if (pBitmap != null)
        {
                delete pBitmap;
@@ -2602,11 +2856,24 @@ MainForm::OnLoadingStarted(void)
        {
                return;
        }
+
        // this is added in case if menu is opened and user load the page
-       if(__pMenu != null && __pMenu->GetShowState() == true)
+       if(__isHwKeySupported == true)
        {
-               __pMenu->SetShowState(false);
-               __pMenu->Invalidate(true);
+               if(__pOptionMenu != null && __pOptionMenu->GetShowState() == true)
+               {
+                       __pOptionMenu->SetShowState(false);
+                       __pOptionMenu->Invalidate(true);
+               }
+
+       }
+       else
+       {
+               if(__pMenu != null && __pMenu->GetShowState() == true)
+               {
+                       __pMenu->SetShowState(false);
+                       __pMenu->Invalidate(true);
+               }
        }
        if(__pImageMenu != null && __pImageMenu->GetShowState() == true)
        {
@@ -3755,7 +4022,8 @@ MainForm::StartWordSearch()
 
        __pFindWordPrev->SetEnabled(false);
        String *pCountStr = null;
-       __pWebViewer->SearchTextAllAsync(__currentSearchStr, false);
+       result r = __pWebViewer->SearchTextAllAsync(__currentSearchStr, false);
+       AppLog("Search Result %s",GetErrorMessage(r));
        /*__pWebViewer->EvaluateJavascriptN(L"document.body.textContent.match(/"  + __currentSearchStr + "/gi).length;");
        if (pCountStr != null)
        {
@@ -4189,8 +4457,8 @@ MainForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::Ori
                __pWebViewer->ReleaseBlock();
        }*/
 
-       if(__pFindWordControl != null)
-               ShowFindWordPanel(__pFindWordControl->GetShowState(), false);
+//     if(__pFindWordControl != null)
+//             ShowFindWordPanel(__pFindWordControl->GetShowState(), false);
        if ( __pFooterLabel != null)
        {
                Bitmap *pBitmap = CommonUtil::GetNinepatchedBitmapN(IDB_SEARCH_INPUT_FIELD_BG, __pFooterLabel->GetWidth(), __pFooterLabel->GetHeight());
@@ -4222,8 +4490,16 @@ MainForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::Ori
                }
        }
 
-       if(__pMenu != null)
-               __pMenu->SetShowState(false);
+       if(__isHwKeySupported == true)
+       {
+               if(__pOptionMenu != null)
+                       __pOptionMenu->SetShowState(false);
+       }
+       else
+       {
+               if(__pMenu != null)
+                       __pMenu->SetShowState(false);
+       }
        if( GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
        {
                widthContextItem = WIDTH_CONTEXT_MENU_BUTTON_LANDSCAPE;
@@ -4514,7 +4790,7 @@ MainForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics
        if(__pFindWordControl)
        {
                AppLog("MainForm::OnTouchPressed %d",__pFindWordControl->GetShowState());
-               ShowFindWordPanel(__pFindWordControl->GetShowState(), true);
+//             ShowFindWordPanel(__pFindWordControl->GetShowState(), true);
        }
        //__isLongPressedDone = false;
        if(__pAddressbar)
@@ -4565,11 +4841,11 @@ MainForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics
                }
        }
        if( pList != NULL)
-
        {
                pList->RemoveAll(true);
                delete pList;
        }
+//     RelayoutControls(false);
        return;
 }
 
@@ -5171,9 +5447,109 @@ MainForm::AddressBarCancelledClicked(const Addressbar& addBar)
                __pMostVisitedListView->SetFocus();
        else if(__pMultiWindowButton)
                __pMultiWindowButton->SetFocus();
-       __pMoreButton->SetFocus();
+       else if(__pMoreButton)
+               __pMoreButton->SetFocus();
 
        __pAddressbar->SetShowState(false);
 
        RelayoutControls(false);
 }
+
+void
+MainForm::OnFormMenuRequested (Tizen::Ui::Controls::Form &source)
+{
+       AppLog("MainForm::OnFormMenuRequested called");
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+       InitOptionMenu();
+       if (__pWindowInfo != NULL && __pWindowInfo->pageUrl != NULL && __pWebViewer->GetShowState() == true)
+       {
+               int bookmarkCount=0;
+               bool exist = false;
+               String url=L"";
+               url=__pWindowInfo->pageUrl;
+               result r = E_SUCCESS;
+               Bitmap* pBitmap = null;
+
+               r=BookmarkPresentationModel::GetInstance()->DoesBookmarkExist(url,exist);
+               if (IsFailed(r))
+               {
+                       AppLogDebug("ONACTION_PERFORMED:IDA_MOREBTN_CLICKED failed");
+                       return;
+               }
+               if ( exist == true)
+               {
+                       pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ICON_BOOKMARK_ON_TEMP);
+               }
+               else
+               {
+                       pBitmap = AppResource::GetInstance()->GetBitmapN(IDB_ICON_BOOKMARK_OFF_TEMP);
+               }
+               AppLogDebug("ONACTION_PERFORMED:IDA_MOREBTN_CLICKED 3");
+
+               if (__pOptionMenu->GetItemCount() == 9)
+               {
+                       r = __pOptionMenu->SetItemAt(1,CommonUtil::GetString(L"IDS_BR_OPT_ADDTOBOOKMARKS"), IDA_ADDTOBOOKMARK_CLICKED,*pBitmap);
+               }
+               else
+               {
+                       r = __pOptionMenu->InsertItemAt(1,CommonUtil::GetString(L"IDS_BR_OPT_ADDTOBOOKMARKS"), IDA_ADDTOBOOKMARK_CLICKED,*pBitmap);
+               }
+
+               if (IsFailed(r))
+               {
+                       AppLogException("ONACTION_PERFORMED:IDA_MOREBTN_CLICKED Add to Bookmark failed with %s", GetErrorMessage(r));
+                       delete pBitmap;
+                       return ;
+               }
+               AppLogDebug("ONACTION_PERFORMED:IDA_MOREBTN_CLICKED 4");
+               if (__pOptionMenu->GetItemCount() != 9)
+               {
+                       __pOptionMenu->InsertItemAt(1,CommonUtil::GetString(L"IDS_BR_OPT_ADDTOBOOKMARKS"), IDA_ADDTOBOOKMARK_CLICKED);
+                       __pOptionMenu->InsertItemAt(2,CommonUtil::GetString(L"IDS_BR_BODY_PRINT"), IDA_PRINT_CLICKED);
+//                             __pOptionMenu->InsertItemAt(2,L"Add to Home"/*CommonUtil::GetString(L"IDS_BR_OPT_SHARE")*/, IDA_ADD_TO_HOME_CLICKED);
+                       __pOptionMenu->InsertItemAt(3,CommonUtil::GetString(L"IDS_BR_OPT_SHARE"), IDA_SHARE_CLICKED);
+                       __pOptionMenu->InsertItemAt(4,CommonUtil::GetString(L"IDS_BR_OPT_FIND_ON_PAGE_ABB"), IDA_FINDONPAGE_CLICKED);
+                       __pOptionMenu->SetMaxVisibleItemsCount(6);
+               }
+               if( GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE)
+               {
+                       AppLog(" Orientation landscape");
+                       __pOptionMenu->SetMaxVisibleItemsCount(5);
+               }
+               else
+               {
+                       AppLog(" Orientation potrait");
+                       __pOptionMenu->SetMaxVisibleItemsCount(6);
+               }
+
+               AppLogDebug("ONACTION_PERFORMED:IDA_MOREBTN_CLICKED 5");
+               delete pBitmap;
+       }
+       AppLogDebug("ONACTION_PERFORMED:IDA_MOREBTN_CLICKED end");
+       __pOptionMenu->SetShowState(true);
+       __pOptionMenu->Invalidate(true);
+       __pOptionMenu->Show();
+
+
+
+
+
+
+
+
+
+}
index b8d496d..7c611c5 100644 (file)
@@ -28,6 +28,7 @@
 #include "IntDefaultCustomItem.h"
 #include "IntDropDownCustomItem.h"
 #include "IntHistoryPresentationModel.h"
+#include "IntInternetApp.h"
 #include "IntMultipleWindowPresentationModel.h"
 #include "IntNotificationPanel.h"
 #include "IntRadioCustomItem.h"
@@ -257,7 +258,18 @@ SettingForm::OnInitializing(void)
        SceneManager* pSceneManager = NULL;
 
        __fontSize = CommonUtil::GetFontSize();
+       InternetApp* pInternet = static_cast<InternetApp*> (Application::GetInstance());
 
+       bool isHwKeySupported = false;
+       if(pInternet)
+       {
+               isHwKeySupported = pInternet->IsHwBackKeyExists();
+       }
+
+       if(isHwKeySupported)
+       {
+               SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR);
+       }
        __pList = static_cast< GroupedListView* >(GetControl(L"IDC_SETTING_LIST"));
        if ( __pList != NULL )
        {
@@ -272,8 +284,9 @@ SettingForm::OnInitializing(void)
        {
                AppLogDebug("setting back button");
                pFooter->SetBackButtonEnabled(true);
-               SetFormBackEventListener(this);
        }
+       SetFormBackEventListener(this);
+       AppLog("SetFormBackEventListener result %s",GetErrorMessage(GetLastResult()));
        pSceneManager = SceneManager::GetInstance();
        if (pSceneManager != null)
        {
@@ -782,6 +795,7 @@ SettingForm::GetItemCount(int groupIndex)
 void
 SettingForm::OnFormBackRequested(Form& source)
 {
+       AppLog("SettingForm::OnFormBackRequested entered");
        String* pSelectedScene = NULL;
        Object* value = NULL;
        MultipleWindowPresentationModel::GetInstance()->GetValue(SELECTED_SCENE_ID, &value);