Landing Page code cleaning 17/85217/3
authorDariusz Frankiewicz <d.frankiewic@samsung.com>
Tue, 23 Aug 2016 14:48:02 +0000 (16:48 +0200)
committerHye Kyoung Hwang <cookie@samsung.com>
Mon, 29 Aug 2016 00:34:53 +0000 (17:34 -0700)
[Issue]    http://suprem.sec.samsung.net/jira/browse/TWF-1800
[Problem]  There was some unused code.
[Solution] Refactored and removed some unused code.
[Verify]   Launch browser, behavior should stay unchanged.

Change-Id: Ia8c41b74b11ed88a3c1a9c3321fe500402aab6e6

services/QuickAccess/CMakeLists.txt
services/QuickAccess/DetailPopup.cpp [deleted file]
services/QuickAccess/DetailPopup.h [deleted file]
services/QuickAccess/QuickAccess.cpp
services/QuickAccess/QuickAccess.h
services/QuickAccess/edc/DetailPopup.edc [deleted file]
services/SimpleUI/SimpleUI.cpp
services/SimpleUI/SimpleUI.h

index fba34c6a839967c005ee754731c7964a205fc211..45883c7ca1a15eb87de3683a04b8988cac881c54 100644 (file)
@@ -2,7 +2,6 @@ project(QuickAccess)
 
 set(QuickAccess_SRCS
     QuickAccess.cpp
-    DetailPopup.cpp
     )
 
 include(Coreheaders)
@@ -29,7 +28,6 @@ if (${PROFILE} MATCHES "mobile")    # mobile profile
 else (${PROFILE} MATCHES "mobile")  # tv profile
     set(edcFiles
         QuickAccess.edc
-        DetailPopup.edc
         )
 endif (${PROFILE} MATCHES "mobile")
 
diff --git a/services/QuickAccess/DetailPopup.cpp b/services/QuickAccess/DetailPopup.cpp
deleted file mode 100644 (file)
index 5ead9b8..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#include <Elementary.h>
-#include <vector>
-#include <algorithm>
-#include "app_i18n.h"
-#include "services/HistoryService/HistoryItem.h"
-#include "BrowserAssert.h"
-#include "DetailPopup.h"
-#include "BrowserLogger.h"
-#include "Tools/GeneralTools.h"
-#include "Tools/EflTools.h"
-#include "QuickAccess.h"
-
-namespace tizen_browser{
-namespace base_ui{
-
-const char * DetailPopup::URL_SEPARATOR = " - ";
-const int DetailPopup::HISTORY_ITEMS_NO = 5;
-
-DetailPopup::DetailPopup(QuickAccess *quickAccess)
-    : m_main_view(nullptr)
-    , m_parent(nullptr)
-    , m_layout(nullptr)
-    , m_historyList(nullptr)
-    , m_urlButton(nullptr)
-    , m_history_item_class(nullptr)
-    , m_quickAccess(quickAccess)
-{
-    edjFilePath = EDJE_DIR;
-    edjFilePath.append("QuickAccess/DetailPopup.edj");
-    elm_theme_extension_add(nullptr, edjFilePath.c_str());
-
-    m_history_item_class = elm_genlist_item_class_new();
-    m_history_item_class->item_style = "history_grid_item";
-    m_history_item_class->func.text_get = _get_history_link_text;
-    m_history_item_class->func.content_get =  nullptr;
-    m_history_item_class->func.state_get = nullptr;
-    m_history_item_class->func.del = nullptr;
-}
-
-DetailPopup::~DetailPopup()
-{
-    elm_genlist_item_class_free(m_history_item_class);
-}
-
-void DetailPopup::createLayout()
-{
-    m_layout = elm_layout_add(m_parent);
-    elm_layout_file_set(m_layout, edjFilePath.c_str(), "popup");
-    evas_object_size_hint_weight_set(m_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(m_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    // TODO: add following (or simillar) callback for hardware back button when it will be available
-    //evas_object_event_callback_add(m_layout, EVAS_CALLBACK_KEY_DOWN, _back, this);
-    edje_object_signal_callback_add(elm_layout_edje_get(m_layout), "mouse,clicked,1", "bg", _bg_click, this);
-    m_urlButton = elm_button_add(m_layout);     // add button to receive focus
-    elm_object_style_set(m_urlButton, "invisible_button");
-    evas_object_smart_callback_add(m_urlButton, "clicked", _url_click_button, this);
-    evas_object_show(m_urlButton);
-    elm_layout_content_set(m_layout, "url_over", m_urlButton);
-    elm_object_focus_custom_chain_unset(m_main_view);
-    elm_object_focus_custom_chain_append(m_main_view, m_urlButton, NULL);
-    elm_object_focus_set(m_urlButton, EINA_TRUE);
-
-    edje_object_signal_callback_add(elm_layout_edje_get(m_layout), "mouse,clicked,1", "thumbnail", _url_click, this);
-    elm_object_translatable_part_text_set(m_layout, "history_title", "IDS_BR_MBODY_HISTORY");
-    elm_layout_text_set(m_layout, "url", tools::clearURL(m_item->getUrl()).c_str());
-
-    m_historyList = elm_genlist_add(m_layout);
-    evas_object_size_hint_weight_set(m_historyList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(m_historyList, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    elm_genlist_select_mode_set(m_historyList, ELM_OBJECT_SELECT_MODE_ALWAYS);
-    elm_object_focus_custom_chain_append(m_main_view, m_historyList, NULL);
-    for (auto it = m_prevItems->begin(); it != m_prevItems->end(); ++it) {
-        elm_genlist_item_append(m_historyList, m_history_item_class, it->get(), nullptr, ELM_GENLIST_ITEM_NONE, _history_url_click, this);
-    }
-    evas_object_show(m_historyList);
-    elm_object_part_content_set(m_layout, "history_list", m_historyList);
-
-    if (m_item->getThumbnail()) {
-        Evas_Object * thumb = m_item->getThumbnail()->getEvasImage(m_layout);
-        elm_object_part_content_set(m_layout, "thumbnail", thumb);
-    }
-
-    evas_object_show(m_layout);
-}
-
-void DetailPopup::show(Evas_Object *parent, Evas_Object *main_view, std::shared_ptr<services::HistoryItem> currItem, std::shared_ptr<services::HistoryItemVector> prevItems)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    m_main_view = main_view;
-    m_parent = parent;
-    m_item = currItem;
-    m_prevItems = prevItems;
-    createLayout();
-}
-
-void DetailPopup::hide()
-{
-    edje_object_signal_callback_del(elm_layout_edje_get(m_layout), "mouse,clicked,1", "bg", _bg_click);
-    elm_object_focus_custom_chain_unset(m_main_view);
-    evas_object_smart_callback_del(m_urlButton, "clicked", _url_click_button);
-    edje_object_signal_callback_del(elm_layout_edje_get(m_layout), "mouse,clicked,1", "thumbnail", _url_click);
-    elm_genlist_clear(m_historyList);
-    evas_object_hide(m_layout);
-    evas_object_del(m_layout);
-    m_layout = nullptr;
-#if !PROFILE_MOBILE
-    m_quickAccess->refreshFocusChain();
-#endif
-}
-
-void DetailPopup::_bg_click(void* data, Evas_Object*, const char*, const char*)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    DetailPopup *dp = reinterpret_cast<DetailPopup*>(data);
-    dp->hide();
-}
-
-void DetailPopup::_url_click(void* data, Evas_Object*, const char*, const char*)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    DetailPopup *dp = reinterpret_cast<DetailPopup*>(data);
-    dp->openURL(dp->m_item, dp->m_quickAccess->isDesktopMode());
-    dp->hide();
-}
-
-void DetailPopup::_url_click_button(void* data, Evas_Object*, void*)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    DetailPopup *dp = reinterpret_cast<DetailPopup*>(data);
-    dp->openURL(dp->m_item, dp->m_quickAccess->isDesktopMode());
-    dp->hide();
-}
-
-void DetailPopup::_history_url_click(void* data, Evas_Object*, void* event_info)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    Elm_Object_Item *glit = reinterpret_cast<Elm_Object_Item*>(event_info);
-    void *itemData = elm_object_item_data_get(glit);
-    services::HistoryItem *item = reinterpret_cast<services::HistoryItem*>(itemData);
-
-    DetailPopup *dp = reinterpret_cast<DetailPopup*>(data);
-    // find shared pointer pointed to HistoryItem object
-    auto it = std::find_if(dp->m_prevItems->begin(),
-                           dp->m_prevItems->end(),
-                           [item] (const std::shared_ptr<services::HistoryItem> i)
-                           { return i.get() == item; }
-                          );
-    std::shared_ptr<services::HistoryItem> itemPtr= *it;
-    dp->openURL(itemPtr, dp->m_quickAccess->isDesktopMode());
-    dp->hide();
-}
-
-char* DetailPopup::_get_history_link_text(void* data, Evas_Object*, const char* part)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-
-    services::HistoryItem *item = reinterpret_cast<services::HistoryItem*>(data);
-    if (!strcmp(part, "page_dsc")) {
-        if (item != nullptr) {
-            std::string text = item->getTitle() + URL_SEPARATOR + tools::clearURL(item->getUrl());
-            return strdup(text.c_str());
-        }
-    }
-    return strdup("");
-}
-
-}
-}
diff --git a/services/QuickAccess/DetailPopup.h b/services/QuickAccess/DetailPopup.h
deleted file mode 100644 (file)
index 3b8670b..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __DETAIL_POPUP_H__
-#define __DETAIL_POPUP_H__
-
-#include <Evas.h>
-#include <string>
-#include <memory>
-#include <boost/signals2/signal.hpp>
-#include "services/HistoryService/HistoryItemTypedef.h"
-
-namespace tizen_browser{
-namespace base_ui{
-
-    class QuickAccess;
-
-    class DetailPopup {
-    public:
-        DetailPopup(QuickAccess *quickAccess);
-        ~DetailPopup();
-
-        /**
-        * @brief Show popup window
-        */
-        void show(Evas_Object *parent, Evas_Object *main_view, std::shared_ptr<services::HistoryItem> currItem, std::shared_ptr<services::HistoryItemVector> prevItems);
-
-        /**
-        * @brief Hide popup
-        */
-        void hide();
-
-        bool isVisible() { return m_layout; }
-
-        boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::HistoryItem>, bool)> openURL;
-
-        static const int HISTORY_ITEMS_NO;
-    private:
-        /**
-        * @brief Mouse background click callback
-        */
-        static void _bg_click(void *data, Evas_Object *obj, const char *emission, const char *source);
-
-        /**
-        * @brief URL rectangle click callback
-        */
-        static void _url_click(void *data, Evas_Object *obj, const char *emission, const char *source);
-        static void _url_click_button(void *data, Evas_Object *obj, void *event_info);
-
-        /**
-         * @brief History genlist item click callback
-         */
-        static void _history_url_click(void *data, Evas_Object *o, void *event_info);
-
-        /**
-         * @brief Create main layout and all compnents.
-         */
-        void createLayout();
-
-        /**
-        * @brief Provide texts for history genlist
-        */
-        static char* _get_history_link_text(void *data, Evas_Object *obj, const char *part);
-
-        Evas_Object* m_main_view;
-        Evas_Object* m_parent;
-        Evas_Object *m_layout;
-        Evas_Object *m_historyList;
-        Evas_Object* m_urlButton;
-        Elm_Gengrid_Item_Class * m_history_item_class;
-        QuickAccess *m_quickAccess;
-        std::string edjFilePath;
-        std::shared_ptr<services::HistoryItem> m_item;
-        std::shared_ptr<services::HistoryItemVector> m_prevItems;
-
-        static const char * URL_SEPARATOR;
-    };
-
-}
-}
-
-#endif // __DETAIL_POPUP_H__
index 1ccac5575815e83e7869401ca0eb513d6c3683bf..0a3929dff94848dfacdc24ecfca5a5c3da1b5906 100644 (file)
@@ -58,10 +58,9 @@ QuickAccess::QuickAccess()
     , m_currPage(QuickAccess::QUICKACCESS_PAGE)
     , m_quickAccess_item_class(nullptr)
     , m_mostVisited_item_class(nullptr)
-    , m_detailPopup(this)
     , m_index(nullptr)
     , m_verticalScroller(nullptr)
-    , m_quickAccessTileclass(nullptr)
+    , m_quickAccess_tile_class(nullptr)
     , m_landscapeView(isOrientationLandscape())
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
@@ -78,7 +77,7 @@ QuickAccess::~QuickAccess()
     clearMostVisitedGengrid();
     elm_gengrid_item_class_free(m_quickAccess_item_class);
     elm_gengrid_item_class_free(m_mostVisited_item_class);
-    elm_gengrid_item_class_free(m_quickAccessTileclass);
+    elm_gengrid_item_class_free(m_quickAccess_tile_class);
     eina_list_free(m_parentFocusChain);
 }
 
@@ -117,13 +116,13 @@ void QuickAccess::createItemClasses()
         m_mostVisited_item_class->func.state_get = nullptr;
         m_mostVisited_item_class->func.del = _grid_mostVisited_del;
     }
-    if (!m_quickAccessTileclass) {
-        m_quickAccessTileclass = elm_gengrid_item_class_new();
-        m_quickAccessTileclass->item_style = "bookmark_manager";
-        m_quickAccessTileclass->func.text_get = nullptr;
-        m_quickAccessTileclass->func.content_get = nullptr;
-        m_quickAccessTileclass->func.state_get = nullptr;
-        m_quickAccessTileclass->func.del = nullptr;
+    if (!m_quickAccess_tile_class) {
+        m_quickAccess_tile_class = elm_gengrid_item_class_new();
+        m_quickAccess_tile_class->item_style = "bookmark_manager";
+        m_quickAccess_tile_class->func.text_get = nullptr;
+        m_quickAccess_tile_class->func.content_get = nullptr;
+        m_quickAccess_tile_class->func.state_get = nullptr;
+        m_quickAccess_tile_class->func.del = nullptr;
     }
 }
 
@@ -334,13 +333,12 @@ void QuickAccess::setMostVisitedItems(std::shared_ptr<services::HistoryItemVecto
 void QuickAccess::addQuickAccessItem(std::shared_ptr<tizen_browser::services::BookmarkItem> bi)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    //TODO: It should be guaranted that items added here are not folders.
     if (bi->is_folder())
         return;
     BookmarkItemData *itemData = new BookmarkItemData();        // deleted in _grid_bookmark_del
     itemData->item = bi;
     itemData->quickAccess = this;
-    elm_gengrid_item_append(m_quickAccessGengrid, m_quickAccess_item_class, itemData, _thumbBookmarkClicked, itemData);
+    elm_gengrid_item_append(m_quickAccessGengrid, m_quickAccess_item_class, itemData, _thumbQuickAccessClicked, itemData);
 }
 
 void QuickAccess::clearMostVisitedGengrid()
@@ -363,7 +361,7 @@ void QuickAccess::setQuickAccessItems(std::vector<std::shared_ptr<tizen_browser:
 
 void QuickAccess::addToQuickAccessTile()
 {
-    elm_gengrid_item_append(m_quickAccessGengrid, m_quickAccessTileclass, this, _addToQuickAccess_clicked, this);
+    elm_gengrid_item_append(m_quickAccessGengrid, m_quickAccess_tile_class, this, _addToQuickAccess_clicked, this);
 }
 
 void QuickAccess::setIndexPage(const uintptr_t page) const
@@ -391,8 +389,8 @@ void QuickAccess::orientationChanged()
 
     m_landscapeView = isOrientationLandscape();
     createBox(m_horizontalScroller);
-    setQuickAccessItems(m_QuickAccessItems);
-    setMostVisitedItems(m_mostVisitedItems);
+    getQuickAccessItems();
+    getMostVisitedItems();
 }
 
 void QuickAccess::_quickAccess_tile_realized(void* data, Evas_Object*, void* event_info)
@@ -494,7 +492,7 @@ void QuickAccess::_grid_mostVisited_del(void *data, Evas_Object *)
     }
 }
 
-void QuickAccess::_thumbBookmarkClicked(void * data, Evas_Object * , void *)
+void QuickAccess::_thumbQuickAccessClicked(void * data, Evas_Object * , void *)
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     HistoryItemData * itemData = reinterpret_cast<HistoryItemData *>(data);
@@ -564,7 +562,7 @@ void QuickAccess::showUI()
 
     evas_object_show(m_layout);
     getMostVisitedItems();
-    getBookmarksItems();
+    getQuickAccessItems();
     showScrollerPage(m_currPage);
 }
 
@@ -576,11 +574,6 @@ void QuickAccess::hideUI()
     clearQuickAccessGengrid();
 }
 
-void QuickAccess::openDetailPopup(std::shared_ptr<services::HistoryItem> currItem, std::shared_ptr<services::HistoryItemVector> prevItems)
-{
-    m_detailPopup.show(m_layout, m_parent, currItem, prevItems);
-}
-
 void QuickAccess::showNoMostVisitedLabel()
 {
     elm_object_translatable_part_text_set(m_mostVisitedView, "elm.text.empty", "IDS_BR_BODY_NO_VISITED_SITES");
@@ -610,27 +603,15 @@ void QuickAccess::setDesktopMode(bool mode)
     m_desktopMode = mode;
 }
 
-DetailPopup& QuickAccess::getDetailPopup()
-{
-    return m_detailPopup;
-}
-
 bool QuickAccess::canBeBacked(int tabCount)
 {
-    if (m_detailPopup.isVisible())
-        return true;
-    else
-        return (tabCount != 0);
+    return (tabCount != 0);
 }
 
 void QuickAccess::backButtonClicked()
 {
-    if (m_detailPopup.isVisible()) {
-        m_detailPopup.hide();
-    } else {
-        hideUI();
-        switchViewToWebPage();
-    }
+    hideUI();
+    switchViewToWebPage();
 }
 
 bool QuickAccess::isMostVisitedActive() const
index 5fe284328b9f9b7ed796c10a6fe26f376e964f2d..f2cd778db618b8ece1810df05287a45502ee90fa 100644 (file)
@@ -27,8 +27,8 @@
 #include "ServiceFactory.h"
 #include "service_macros.h"
 #include "services/HistoryService/HistoryItem.h"
+#include "services/HistoryService/HistoryItemTypedef.h"
 #include "BookmarkItem.h"
-#include "DetailPopup.h"
 
 namespace tizen_browser{
 namespace base_ui{
@@ -47,10 +47,8 @@ public:
     void hideUI();
     void showUI();
     virtual std::string getName();
-    void openDetailPopup(std::shared_ptr<services::HistoryItem> currItem, std::shared_ptr<services::HistoryItemVector> prevItems);
     bool isDesktopMode() const;
     void setDesktopMode(bool mode);
-    DetailPopup & getDetailPopup();
     bool canBeBacked(int tabCount);
     void backButtonClicked();
     inline bool isMostVisitedActive() const;
@@ -58,11 +56,9 @@ public:
     void showMostVisited();
     void showQuickAccess();
 
-    boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::HistoryItem>, int)> mostVisitedTileClicked;
     boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::HistoryItem>, bool)> openURL;
     boost::signals2::signal<void ()> getMostVisitedItems;
-    boost::signals2::signal<void ()> getBookmarksItems;
-    boost::signals2::signal<void ()> bookmarkManagerClicked;
+    boost::signals2::signal<void ()> getQuickAccessItems;
     boost::signals2::signal<void ()> addQuickAccessClicked;
     boost::signals2::signal<void ()> switchViewToWebPage;
 
@@ -93,7 +89,7 @@ private:
     static char* _grid_mostVisited_text_get(void *data, Evas_Object *obj, const char *part);
     static Evas_Object * _grid_mostVisited_content_get(void *data, Evas_Object *obj, const char *part);
     static void _grid_mostVisited_del(void *data, Evas_Object *obj);
-    static void _thumbBookmarkClicked(void * data, Evas_Object * obj, void * event_info);
+    static void _thumbQuickAccessClicked(void * data, Evas_Object * obj, void * event_info);
     static void _thumbMostVisitedClicked(void * data, Evas_Object * obj, void * event_info);
     void setEmptyView(bool empty);
     void showNoMostVisitedLabel();
@@ -119,7 +115,6 @@ private:
     int m_currPage;
     Elm_Gengrid_Item_Class * m_quickAccess_item_class;
     Elm_Gengrid_Item_Class * m_mostVisited_item_class;
-    DetailPopup m_detailPopup;
     std::shared_ptr<services::HistoryItemVector> m_mostVisitedItems;
     bool m_gengridSetup;
     std::string edjFilePath;
@@ -127,7 +122,7 @@ private:
 
     Evas_Object* m_index;
     Evas_Object* m_verticalScroller;
-    Elm_Gengrid_Item_Class * m_quickAccessTileclass;
+    Elm_Gengrid_Item_Class * m_quickAccess_tile_class;
     std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > m_QuickAccessItems;
     bool m_landscapeView;
     static const int MOST_VISITED_PAGE = 1;
diff --git a/services/QuickAccess/edc/DetailPopup.edc b/services/QuickAccess/edc/DetailPopup.edc
deleted file mode 100644 (file)
index 32bd80a..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-collections { base_scale: 2.0;
-
-    group {
-        name: "popup";
-        images {
-            image: "ic_popup_list_arrow.png" COMP;
-        }
-        parts {
-            part { name: "bg";
-                type: RECT;
-                mouse_events: 1;
-                description { state: "default" 0.0;
-                    color: 0 0 0 102;
-                    visible: 1;
-                    min: 1920 1080;
-                    max: -1 -1;
-                    align: 0.0 0.0;
-                    rel1 {
-                        relative: 0.0 0.0;
-                    }
-                    rel2 {
-                        relative: 1.0 1.0;
-                    }
-                }
-            }
-
-            part { name: "main_rect";
-                type: RECT;
-                mouse_events: 1;
-                description { state: "default" 0.0;
-                    color: 255 255 255 255;
-                    min: 1336 648;
-                    max: 1336 648;
-                    visible: 1;
-                    align: 0.5 0.0;
-                    rel1 {
-                        to: "bg";
-                        offset: 0 264;
-                        relative: 0.0 0.0;
-                    }
-                    rel2 {
-                        to: "bg";
-                        relative: 1.0 1.0;
-                    }
-                }
-            }
-
-            part { name: "thumbnail";
-                type: SWALLOW;
-                description {
-                    min: 840 648;
-                    max: 840 648;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    rel1 {
-                        to: "main_rect";
-                        relative: 0.0 0.0;
-                    }
-                    rel2 {
-                        to: "main_rect";
-                        relative: 1.0 1.0;
-                    }
-                }
-            }
-
-            part { name: "url_bg";
-                type: RECT;
-                description { state: "default" 0.0;
-                    color: 255 255 255 255;
-                    min: 496 122;
-                    max: 496 122;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    rel1 {
-                        to: "thumbnail";
-                        relative: 1.0 0.0;
-                    }
-                    rel2 {
-                        to: "main_rect";
-                        relative: 1.0 1.0;
-                    }
-                }
-                description { state: "selected" 0.0;
-                    inherit: "default" 0.0;
-                    color: 0 119 246 255;
-                }
-            }
-
-            part { name: "url";
-                type: TEXT;
-                description {
-                    visible: 1;
-                    min: 408 122;
-                    max: 408 122;
-                    align: 0.0 0.0;
-                    fixed: 1 1;
-                    color: 51 51 51 255;
-                    rel1 {
-                        to: "url_bg";
-                        relative: 0.0 0.0;
-                        offset: 34 0;
-                    }
-                    rel2 {
-                        to: "url_bg";
-                        relative: 1.0 1.0;
-                    }
-                    text {
-                        text: "Web page title";
-                        font: "Sans";
-                        size: 32;
-                        align: 0 0.5;
-                    }
-                }
-                description { state: "selected" 0.0;
-                    inherit: "default" 0.0;
-                    color: 255 255 255 255;
-                }
-            }
-
-            part { name: "url_arrow";
-                type: IMAGE;
-                scale: 1;
-                repeat_events: 1;
-                description {
-                    state: "default" 0.0;
-                    visible: 1;
-                    align: 0.0 0.5;
-                    min: 38 38;
-                    max: 38 38;
-                    image.normal: "ic_popup_list_arrow.png";
-                    rel1 {
-                        to: "url_bg";
-                        relative: 0.0 0.0;
-                        offset: 442 0;
-                    }
-                    rel2 {
-                        to: "url_bg";
-                        relative: 1.0 1.0;
-                    }
-                }
-            }
-
-            part { name: "url_over";
-                type: SWALLOW;
-                mouse_events: 1;
-                repeat_events: 1;
-                description { state: "default" 0.0;
-                    visible: 1;
-                    color: 0 0 0 0;
-                    rel1.to: "url_bg";
-                    rel2.to: "url_bg";
-                }
-            }
-
-            part { name: "history_title_bg";
-                type: RECT;
-                description {
-                    color: 244 244 244 255;
-                    min: 496 44;
-                    max: 496 44;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    rel1 {
-                        to: "url_bg";
-                        relative: 0.0 1.0;
-                    }
-                    rel2 {
-                        to: "main_rect";
-                        relative: 1.0 1.0;
-                    }
-                }
-            }
-
-            part { name: "history_title";
-                type: TEXT;
-                description {
-                    visible: 1;
-                    min: 428 44;
-                    max: 428 44;
-                    align: 0.0 0.0;
-                    fixed: 1 1;
-                    color: 51 51 51 255;
-                    rel1 {
-                        to: "history_title_bg";
-                        relative: 0.0 0.0;
-                        offset: 34 0;
-                    }
-                    rel2 {
-                        to: "history_title_bg";
-                        relative: 1.0 1.0;
-                    }
-                    text {
-                        text: "Web page title";
-                        font: "Sans";
-                        size: 22;
-                        align: 0 0.5;
-                    }
-                }
-            }
-
-            part { name: "history_list";
-                type: SWALLOW;
-                description {
-                    color: 255 255 255 255;
-                    min: 496 460;
-                    max: 496 460;
-                    visible: 1;
-                    align: 0.0 0.0;
-                    rel1 {
-                        to: "history_title_bg";
-                        relative: 0.0 1.0;
-                        offset: 0 22;
-                    }
-                    rel2 {
-                        to: "main_rect";
-                        relative: 1.0 1.0;
-                    }
-                }
-            }
-        }
-
-        programs {
-            program {
-                name: "mouse_in_url";
-                signal: "mouse,in";
-                source: "url_over";
-                action: STATE_SET "selected" 0.0;
-                target: "url_bg";
-                target: "url";
-            }
-            program {
-                name: "mouse_out_url";
-                signal: "mouse,out";
-                source: "url_over";
-                action: STATE_SET "default" 0.0;
-                target: "url_bg";
-                target: "url";
-            }
-            program {
-                name: "mouse_click";
-                signal: "mouse,clicked,1";
-                source: "url_over";
-                script {
-                    emit("elm,action,click", "");
-                }
-            }
-        }
-    }
-
-    group { name: "elm/genlist/item/history_grid_item/default";
-        data.item: "texts" "page_dsc";
-        parts {
-            part { name: "bg";
-                type: RECT;
-                mouse_events: 1;
-                description { state: "default" 0.0;
-                    min: 496 86;
-                    max: 496 86;
-                    visible: 1;
-                    color: 255 255 255 255;
-                    align: 0.0 0.0;
-                }
-                description { state: "selected" 0.0;
-                    inherit: "default" 0.0;
-                    color: 0 119 246 255;
-                }
-            }
-
-            part { name: "page_dsc";
-                type: TEXT;
-                description { state: "default" 0.0;
-                    min: 428 86;
-                    max: 428 86;
-                    align: 0.0 0.0;
-                    color: 0 0 0 255;
-                    rel1 {
-                        to: "bg";
-                        relative: 0.0 0.0;
-                        offset: 34 0;
-                    }
-                    rel2 {
-                        to: "bg";
-                        relative: 1.0  1.0;
-                    }
-                    text {
-                        font: "Sans";
-                        size: 24;
-                        align: 0 0.5;
-                    }
-                }
-                description { state: "selected" 0.0;
-                    inherit: "default" 0.0;
-                    color: 255 255 255 255;
-                }
-            }
-
-            part { name: "dsc_over";
-                type: RECT;
-                mouse_events: 1;
-                repeat_events: 1;
-                description { state: "default" 0.0;
-                    visible: 1;
-                    color: 0 0 0 0;
-                    rel1.to: "bg";
-                    rel2.to: "bg";
-                }
-            }
-
-        }
-        programs {
-            program {
-                name: "mouse_in_url";
-                signal: "mouse,in";
-                source: "dsc_over";
-                action: STATE_SET "selected" 0.0;
-                target: "bg";
-                target: "page_dsc";
-            }
-            program {
-                name: "mouse_out_url";
-                signal: "mouse,out";
-                source: "dsc_over";
-                action: STATE_SET "default" 0.0;
-                target: "bg";
-                target: "page_dsc";
-            }
-        }
-    }
-}
\ No newline at end of file
index 0747b6a3fe774b4c4d781867cc5e1b23697ec494..cf5dcc3a420308b36cfa8e73937daa536cb78703 100755 (executable)
@@ -41,7 +41,6 @@
 #include "HistoryItem.h"
 #include "boost/date_time/gregorian/gregorian.hpp"
 #include "boost/date_time/posix_time/posix_time.hpp"
-#include "DetailPopup.h"
 #include "UrlHistoryList/UrlHistoryList.h"
 #include "NotificationPopup.h"
 #include "ContentPopup_mob.h"
@@ -330,13 +329,9 @@ void SimpleUI::connectUISignals()
     m_webPageUI->requestCurrentPageForWebPageUI.connect(boost::bind(&SimpleUI::requestSettingsCurrentPage, this));
 
     M_ASSERT(m_quickAccess.get());
-    m_quickAccess->getDetailPopup().openURL.connect(boost::bind(&SimpleUI::onOpenURL, this, _1, _2));
     m_quickAccess->openURL.connect(boost::bind(&SimpleUI::onOpenURL, this, _1, _2));
-    m_quickAccess->mostVisitedTileClicked.connect(boost::bind(&SimpleUI::onMostVisitedTileClicked, this, _1, _2));
     m_quickAccess->getMostVisitedItems.connect(boost::bind(&SimpleUI::onMostVisitedClicked, this));
-    m_quickAccess->getBookmarksItems.connect(boost::bind(&SimpleUI::onBookmarkButtonClicked, this));
-    m_quickAccess->bookmarkManagerClicked.connect(boost::bind(&SimpleUI::showBookmarkManagerUI, this,
-        m_favoriteService->getRoot(), BookmarkManagerState::Default));
+    m_quickAccess->getQuickAccessItems.connect(boost::bind(&SimpleUI::onQuickAccessClicked, this));
     m_quickAccess->switchViewToWebPage.connect(boost::bind(&SimpleUI::switchViewToWebPage, this));
 #if PROFILE_MOBILE
     m_quickAccess->isLandscape.connect(boost::bind(&SimpleUI::isLandscape, this));
@@ -748,12 +743,6 @@ void SimpleUI::onOpenURL(const std::string& url, const std::string& title, bool
     }
 }
 
-void SimpleUI::onMostVisitedTileClicked(std::shared_ptr< services::HistoryItem > historyItem, int itemsNumber)
-{
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-    m_quickAccess->openDetailPopup(historyItem, m_historyService->getHistoryItemsByURL(historyItem->getUrl(), itemsNumber));
-}
-
 void SimpleUI::onClearHistoryAllClicked()
 {
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
@@ -774,7 +763,7 @@ void SimpleUI::onMostVisitedClicked()
    m_quickAccess->setMostVisitedItems(getMostVisitedItems());
 }
 
-void SimpleUI::onBookmarkButtonClicked()
+void SimpleUI::onQuickAccessClicked()
 {
    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
    //TODO: Elements added here shouldn't be bookmark items, but quick access items.
index 7b7b0721665b6aa4abd3bdeacb942d1416ebdaa2..1b87dc51905d12c41dbbe5285577582d60acde22 100644 (file)
@@ -168,12 +168,11 @@ private:
      */
     void onOpenURL(const std::string& url);
     void onOpenURL(const std::string& url, const std::string& title, bool desktopMode);
-    void onMostVisitedTileClicked(std::shared_ptr<tizen_browser::services::HistoryItem> historyItem, int itemsNumber);
     void onClearHistoryAllClicked();
     void onDeleteHistoryItems(std::shared_ptr<const std::vector<int>> itemIds);
 
     void onMostVisitedClicked();
-    void onBookmarkButtonClicked();
+    void onQuickAccessClicked();
 
     /**
      * @brief Handles 'generateThumb' signals.