Task TT-77 Implement More Menu view 13/45213/4
authork.lis2 <k.lis2@samsung.com>
Tue, 4 Aug 2015 08:24:57 +0000 (10:24 +0200)
committerJanusz Majnert <j.majnert@samsung.com>
Wed, 5 Aug 2015 09:24:14 +0000 (11:24 +0200)
    [Issue#]   https://bugs.tizen.org/jira/browse/TT-77
    [Task]     TT-77 Implement More Menu view
    [Cause]    -
    [Solution] Add MoreMenuUI. Enable code referring to
               MoreMenuUI in SimpleUI
    [Verify]   Perform basic sanity check.

Change-Id: If623da956d560be47550a429f461443919ce3675

51 files changed:
services/CMakeLists.txt
services/MoreMenuUI/AddBookmarkPopup.cpp [new file with mode: 0644]
services/MoreMenuUI/AddBookmarkPopup.h [new file with mode: 0644]
services/MoreMenuUI/CMakeLists.txt [new file with mode: 0644]
services/MoreMenuUI/MoreMenuUI.cpp [new file with mode: 0644]
services/MoreMenuUI/MoreMenuUI.h [new file with mode: 0644]
services/MoreMenuUI/NewFolderPopup.cpp [new file with mode: 0644]
services/MoreMenuUI/NewFolderPopup.h [new file with mode: 0644]
services/MoreMenuUI/edc/AddBookmarkPopup.edc [new file with mode: 0644]
services/MoreMenuUI/edc/MoreMenu.edc [new file with mode: 0644]
services/MoreMenuUI/edc/NewFolderPopup.edc [new file with mode: 0644]
services/MoreMenuUI/edc/error.edc [new file with mode: 0644]
services/MoreMenuUI/images/btn_bar_new_dis.png [new file with mode: 0644]
services/MoreMenuUI/images/btn_bar_new_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/btn_bar_new_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/btn_bar_stop_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/favicon.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_add_bookmark.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_bookmark_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_bookmark_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_desktopview_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_desktopview_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_exit_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_exit_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_focusmode_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_focusmode_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_history_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_history_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_minibrowser_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_minibrowser_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_mobileview_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_mobileview_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_pointermode_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_pointermode_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_readermode_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_readermode_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_setting_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_setting_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_share_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_share_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_zoom_foc.png [new file with mode: 0644]
services/MoreMenuUI/images/ic_more_zoom_nor.png [new file with mode: 0644]
services/MoreMenuUI/images/ico_bg_round_shape_37x37.png [new file with mode: 0644]
services/MoreMenuUI/images/ico_delete.png [new file with mode: 0644]
services/MoreMenuUI/images/modal_dialogs_bg.png [new file with mode: 0644]
services/MoreMenuUI/images/modal_dialogs_title_bg.png [new file with mode: 0644]
services/MoreMenuUI/images/web_frame_selected.png [new file with mode: 0644]
services/MoreMenuUI/images/web_shadow.png [new file with mode: 0644]
services/SimpleUI/CMakeLists.txt
services/SimpleUI/SimpleUI.cpp
services/SimpleUI/SimpleUI.h

index 8a137c9..5515ac1 100644 (file)
@@ -1,14 +1,13 @@
 project(services)
 
 add_subdirectory(WebKitEngineService)
-# MERGE_ME
-#add_subdirectory(MoreMenuUI)
+add_subdirectory(MoreMenuUI)
 add_subdirectory(MainUI)
 # MERGE_ME
 #add_subdirectory(HistoryUI)
 add_subdirectory(TabUI)
 add_subdirectory(SimpleUI)
-#MERGE_ME
+# MERGE_ME
 #add_subdirectory(SettingsUI)
 add_subdirectory(SimpleURI)
 add_subdirectory(BookmarkManagerUI)
diff --git a/services/MoreMenuUI/AddBookmarkPopup.cpp b/services/MoreMenuUI/AddBookmarkPopup.cpp
new file mode 100644 (file)
index 0000000..fea26c4
--- /dev/null
@@ -0,0 +1,344 @@
+/*
+ * Copyright (c) 2014 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 <boost/concept_check.hpp>
+#include <vector>
+
+#include "Tools/EflTools.h"
+#include "AddBookmarkPopup.h"
+#include "BrowserLogger.h"
+
+namespace tizen_browser{
+namespace base_ui{
+
+typedef struct _BookmarkFolderItemData
+{
+    int index;
+    std::shared_ptr<tizen_browser::services::BookmarkItem> item;
+    std::shared_ptr<tizen_browser::base_ui::AddBookmarkPopup> addBookmarkPopup;
+} BookmarkFolderItemData;
+
+
+AddBookmarkPopup::AddBookmarkPopup(Evas_Object* main_layout):
+    m_popup(nullptr),
+    m_gengrid(nullptr),
+    m_mainLayout(main_layout),
+    m_itemClass(nullptr)
+{
+}
+
+AddBookmarkPopup::~AddBookmarkPopup ()
+{}
+
+void AddBookmarkPopup::show()
+{
+    BROWSER_LOGD("[%s],", __func__);
+    bm_edjFilePath = EDJE_DIR;
+    bm_edjFilePath.append("MoreMenuUI/AddBookmarkPopup.edj");
+    elm_theme_extension_add(0, bm_edjFilePath.c_str());
+    m_popup = elm_layout_add(m_mainLayout);
+    if (m_popup != nullptr)
+    {
+        elm_object_signal_emit(m_mainLayout, "elm,state,show", "elm");
+        elm_layout_file_set(m_popup, bm_edjFilePath.c_str(), "bookmark_popup");
+        BROWSER_LOGI("PATH: %s", bm_edjFilePath.c_str());
+
+        m_gengrid = elm_gengrid_add(m_popup);
+
+        if (m_gengrid != nullptr)
+        {
+            evas_object_smart_callback_add(m_gengrid, "item,focused", focusItem, nullptr);
+            evas_object_smart_callback_add(m_gengrid, "item,unfocused", unFocusItem, nullptr);
+        //  evas_object_smart_callback_add(m_gengrid, "activated", _itemSelected, this);
+
+              if (!m_itemClass) {
+                    m_itemClass = elm_gengrid_item_class_new();
+                    m_itemClass->item_style = "folder_grid_item";
+                    m_itemClass->func.text_get = _grid_text_get;
+                    m_itemClass->func.content_get =  _grid_content_get;
+                    m_itemClass->func.state_get = nullptr;
+                    m_itemClass->func.del = nullptr;
+                }
+
+            elm_gengrid_align_set(m_gengrid, 0, 0);
+            elm_gengrid_select_mode_set(m_gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
+            elm_gengrid_multi_select_set(m_gengrid, EINA_FALSE);
+            elm_gengrid_horizontal_set(m_gengrid, EINA_FALSE);
+            elm_scroller_policy_set(m_gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+            elm_scroller_page_size_set(m_gengrid, 0, 327);
+            evas_object_size_hint_weight_set(m_gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+            evas_object_size_hint_align_set(m_gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
+            double efl_scale = elm_config_scale_get() / elm_app_base_scale_get();
+            elm_gengrid_item_size_set(m_gengrid, 226 * efl_scale, 226 * efl_scale);
+
+            elm_object_part_content_set(m_popup, "elm.swallow.gengrid", m_gengrid);
+            elm_object_part_content_set(m_mainLayout, "popup", m_popup);
+            evas_object_show(m_gengrid);
+        }
+    }
+}
+
+void AddBookmarkPopup::hide()
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    elm_object_signal_emit(m_mainLayout, "elm,state,hide", "elm");
+    evas_object_hide(elm_layout_content_get(m_popup, "elm.swallow.gengrid"));
+    evas_object_hide(elm_layout_content_get(m_mainLayout, "popup"));
+    evas_object_hide(m_gengrid);
+    evas_object_hide(m_popup);
+    clearItems();
+}
+
+Evas_Object * AddBookmarkPopup::getContent()
+{
+    return m_gengrid;
+}
+
+void AddBookmarkPopup::setEmptyGengrid(bool setEmpty)
+{
+    if(setEmpty) {
+        elm_object_part_content_set(m_gengrid, "elm.swallow.empty", createNoHistoryLabel());
+    } else {
+        elm_object_part_content_set(m_gengrid, "elm.swallow.empty", nullptr);
+    }
+}
+
+Evas_Object* AddBookmarkPopup::createNoHistoryLabel()
+{
+    Evas_Object *label = elm_label_add(m_popup);
+    if (label != nullptr)
+    {
+        elm_object_text_set(label, "No favorite websites.");
+        evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    }
+    return label;
+}
+
+void AddBookmarkPopup::addBookmarkFolderItem(std::shared_ptr<tizen_browser::services::BookmarkItem> hi , int ind)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    BookmarkFolderItemData *itemData = new BookmarkFolderItemData();
+    if (itemData != nullptr)
+    {
+        itemData->item = hi;
+        itemData->index = ind;
+        itemData->addBookmarkPopup = std::shared_ptr<tizen_browser::base_ui::AddBookmarkPopup>(this);
+        Elm_Object_Item* BookmarkFolderView = elm_gengrid_item_append(m_gengrid, m_itemClass, itemData, nullptr, this);
+        if (BookmarkFolderView)
+        {
+            if(ind == 1)
+            {
+                 BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+                 m_map_bookmark_folder_views.insert(std::pair<std::string,Elm_Object_Item*>("new_folder_button",BookmarkFolderView));
+            }
+            else
+                m_map_bookmark_folder_views.insert(std::pair<std::string,Elm_Object_Item*>(hi->getAddress(),BookmarkFolderView));
+
+            elm_gengrid_item_selected_set(BookmarkFolderView, EINA_FALSE);
+            setEmptyGengrid(false);
+        }
+    }
+}
+
+void AddBookmarkPopup::addBookmarkFolderItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > items)
+{
+    BROWSER_LOGD("%s:%d %s Bookmark Folder Items: %d", __FILE__, __LINE__, __func__, items.size());
+    int i = 1;
+    addBookmarkFolderItem(nullptr, i);
+    for (auto it = items.begin(); it != items.end(); ++it, ++i) {
+        addBookmarkFolderItem(*it, i);
+    }
+    elm_object_part_content_set(m_popup, "elm.swallow.gengrid",getContent());
+    evas_object_show(getContent());
+}
+
+char* AddBookmarkPopup::_grid_text_get(void *data, Evas_Object *, const char *part)
+{
+    BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
+    if ((data != nullptr) && (part != nullptr))
+    {
+        static const char* part_name = "page_title";
+        static const int part_len = strlen(part_name);
+
+        BookmarkFolderItemData *itemData = reinterpret_cast<BookmarkFolderItemData*>(data);
+        if (!strncmp(part, part_name, part_len)) {
+              if(itemData->item)
+                return strdup(itemData->item->getTittle().c_str());
+        }
+    }
+    return strdup("");
+}
+
+const char* AddBookmarkPopup::getImageFileNameForType(int index, bool focused)
+{
+    static char* file_name = "";
+    if (index == 1)
+    {
+        if (focused)
+        {
+            file_name = "btn_bar_new_foc.png";
+        }
+        else
+        {
+            file_name = "btn_bar_new_nor.png";
+        }
+    }
+    return file_name;
+}
+
+Evas_Object * AddBookmarkPopup::_grid_content_get(void *data, Evas_Object *obj, const char *part)
+{
+    BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
+    if ((data != nullptr) && (obj != nullptr) && (part != nullptr))
+    {
+        BookmarkFolderItemData *itemData = reinterpret_cast<BookmarkFolderItemData*>(data);
+
+        static const char* part1_name = "elm.thumbnail";
+        static const char* part2_name = "elm.thumbButton";
+        static const int part1_len = strlen(part1_name);
+        static const int part2_len = strlen(part2_name);
+
+        if (!strncmp(part, part1_name, part1_len) && (itemData->index == 1)) {
+            BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+            Evas_Object* thumb_nail = elm_icon_add(obj);
+            const char* file_name = getImageFileNameForType(itemData->index, false);
+            BROWSER_LOGD("%s:%d %s file=%s", __FILE__, __LINE__, __func__, file_name);
+            if (thumb_nail != nullptr)
+            {
+                elm_image_file_set(thumb_nail, itemData->addBookmarkPopup->bm_edjFilePath.c_str(), file_name);
+            }
+            return thumb_nail;
+        }
+        if (!strncmp(part, part2_name, part2_len)) {
+            Evas_Object *thumbButton = elm_button_add(obj);
+            if (thumbButton != nullptr)
+            {
+                elm_object_style_set(thumbButton, part2_name);
+                if(itemData->index == 1)
+                {
+                    evas_object_smart_callback_add(thumbButton, "clicked", tizen_browser::base_ui::AddBookmarkPopup::_newFolderButton, data);
+                    evas_object_event_callback_add(thumbButton, EVAS_CALLBACK_MOUSE_IN, __cb_mouse_in, data);
+                    evas_object_event_callback_add(thumbButton, EVAS_CALLBACK_MOUSE_OUT, __cb_mouse_out, data);
+                }
+                else
+                    evas_object_smart_callback_add(thumbButton, "clicked", tizen_browser::base_ui::AddBookmarkPopup::_thumbSelected, data);
+            }
+            return thumbButton;
+        }
+
+    }
+    return nullptr;
+}
+
+void AddBookmarkPopup::__cb_mouse_in(void * data, Evas *, Evas_Object *obj, void *)
+{
+    BROWSER_LOGD("[%s:%d]", __PRETTY_FUNCTION__, __LINE__);
+    if ((data != nullptr) && (obj != nullptr))
+    {
+        elm_object_focus_set(obj, EINA_TRUE);
+        BookmarkFolderItemData *itemData = reinterpret_cast<BookmarkFolderItemData*>(data);
+
+        const char* file_name = getImageFileNameForType(itemData->index, true);
+        Elm_Object_Item * selected = itemData->addBookmarkPopup->m_map_bookmark_folder_views["new_folder_button"];
+        if (selected != nullptr)
+        {
+            Evas_Object *thumb_nail = elm_object_item_part_content_get(selected, "elm.thumbnail");
+            if (thumb_nail != nullptr)
+            {
+                elm_image_file_set(thumb_nail, itemData->addBookmarkPopup->bm_edjFilePath.c_str(), file_name);
+            }
+        }
+    }
+}
+
+void AddBookmarkPopup::__cb_mouse_out(void * data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    BROWSER_LOGD("[%s:%d]", __PRETTY_FUNCTION__, __LINE__);
+    BookmarkFolderItemData *itemData = reinterpret_cast<BookmarkFolderItemData*>(data);
+    elm_object_focus_set(obj, EINA_FALSE);
+    const char* file_name = getImageFileNameForType(itemData->index, false);
+    Elm_Object_Item * selected = itemData->addBookmarkPopup->m_map_bookmark_folder_views["new_folder_button"];
+    Evas_Object *thumb_nail = elm_object_item_part_content_get(selected, "elm.thumbnail");
+    elm_image_file_set(thumb_nail, itemData->addBookmarkPopup->bm_edjFilePath.c_str(), file_name);
+}
+
+void AddBookmarkPopup::_itemSelected(void * data, Evas_Object * /* obj */, void * event_info)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    /*Elm_Object_Item * selected = reinterpret_cast<Elm_Object_Item *>(event_info);
+    HistoryItemData * itemData = reinterpret_cast<HistoryItemData *>(elm_object_item_data_get(selected));
+    AddBookmarkPopup * self = reinterpret_cast<AddBookmarkPopup *>(data);
+
+    self->bookmarkClicked(itemData->item);*/
+}
+
+
+void AddBookmarkPopup::_newFolderButton(void * data, Evas_Object * /* obj */, void * /* event_info */)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    BookmarkFolderItemData * itemData = reinterpret_cast<BookmarkFolderItemData *>(data);
+    itemData->addBookmarkPopup->addNewFolderClicked(std::string());
+}
+
+void AddBookmarkPopup::_thumbSelected(void * data, Evas_Object * /* obj */, void * /* event_info */)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    BookmarkFolderItemData * itemData = reinterpret_cast<BookmarkFolderItemData *>(data);
+    itemData->addBookmarkPopup->folderSelected(itemData->item->getId());
+}
+
+void AddBookmarkPopup::clearItems()
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    elm_gengrid_clear(m_gengrid);
+    m_map_bookmark_folder_views.clear();
+    elm_theme_extension_del(nullptr, bm_edjFilePath.c_str());
+    elm_theme_full_flush();
+    elm_cache_all_flush();
+}
+
+
+void AddBookmarkPopup::updateGengrid()
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    elm_gengrid_clear(m_gengrid);
+    m_map_bookmark_folder_views.clear();
+}
+
+void AddBookmarkPopup::focusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
+    elm_object_item_signal_emit( item, "mouse,in", "over2");
+
+    // selected manually
+    elm_gengrid_item_selected_set(item, EINA_TRUE);
+}
+
+void AddBookmarkPopup::unFocusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
+    elm_object_item_signal_emit( item, "mouse,out", "over2");
+
+    // unselected manually
+    elm_gengrid_item_selected_set(item, EINA_FALSE);
+}
+
+}
+}
diff --git a/services/MoreMenuUI/AddBookmarkPopup.h b/services/MoreMenuUI/AddBookmarkPopup.h
new file mode 100644 (file)
index 0000000..62d86e7
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef ADDBOOKMARKPOPUP_H
+#define ADDBOOKMARKPOPUP_H
+
+#include <Elementary.h>
+#include <boost/signals2.hpp>
+
+#include "AbstractUIComponent.h"
+#include "AbstractService.h"
+#include "ServiceFactory.h"
+#include "service_macros.h"
+#include "BookmarkItem.h"
+
+namespace tizen_browser{
+namespace base_ui{
+
+class AddBookmarkPopup{
+
+public:
+    AddBookmarkPopup(Evas_Object *main_layout);
+    ~AddBookmarkPopup();
+
+    Evas_Object *getContent();
+    void addBookmarkFolderItem(std::shared_ptr<tizen_browser::services::BookmarkItem> , int);
+    void addBookmarkFolderItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> >);
+    void clearItems();
+    void updateGengrid();
+    Evas_Object* createNoHistoryLabel();
+    void setEmptyGengrid(bool setEmpty);
+
+    boost::signals2::signal<void (std::string)> blockClicked;
+    boost::signals2::signal<void (int)> folderSelected;
+    boost::signals2::signal<void (std::string)> addNewFolderClicked;
+    /**
+     * Theese setters should be called before showing popup.
+     */
+    void show();
+    void hide();
+
+private:
+    static char* _grid_text_get(void *data, Evas_Object *, const char *part);
+    static Evas_Object * _grid_content_get(void *data, Evas_Object *obj, const char *part);
+    static void _itemSelected(void * data, Evas_Object * obj, void * event_info);
+    static void _thumbSelected(void * data, Evas_Object * obj, void * event_info);
+    static void _newFolderButton(void *data, Evas_Object *obj, void *event_info);
+    static Evas_Object* listItemContentGet(void *data, Evas_Object *obj, const char *part);
+    static char*        listItemTextGet(void *data, Evas_Object *obj, const char *part);
+
+    static void item_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+    static void close_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+
+    static const char* getImageFileNameForType(int index, bool focused);
+
+    Evas_Object *m_mainLayout;
+    Evas_Object *m_popup;
+    Evas_Object *m_gengrid;
+
+    Elm_Gengrid_Item_Class * m_itemClass;
+    std::map<std::string,Elm_Object_Item*> m_map_bookmark_folder_views;
+    std::string bm_edjFilePath;
+    bool m_gengridSetup;
+
+    static void __cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
+    static void __cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+    static void focusItem(void* data, Evas_Object* obj, void* event_info);
+    static void unFocusItem(void* data, Evas_Object* obj, void* event_info);
+};
+}
+}
+#endif
diff --git a/services/MoreMenuUI/CMakeLists.txt b/services/MoreMenuUI/CMakeLists.txt
new file mode 100644 (file)
index 0000000..611598b
--- /dev/null
@@ -0,0 +1,44 @@
+project(MoreMenuUI)
+
+set(MoreMenuUI_SRCS
+    MoreMenuUI.cpp
+    AddBookmarkPopup.cpp
+    NewFolderPopup.cpp
+    )
+
+set(MoreMenuUI_HEADERS
+    MoreMenuUI.h
+    AddBookmarkPopup.h
+    NewFolderPopup.h
+    )
+
+include(Coreheaders)
+include(EFLHelpers)
+
+include_directories(${CMAKE_SOURCE_DIR}/services/FavoriteService)
+
+add_library(${PROJECT_NAME} SHARED ${MoreMenuUI_SRCS})
+
+if(TIZEN_BUILD)
+    target_link_libraries(${PROJECT_NAME} ${pkgs_LDFLAGS})
+endif(TIZEN_BUILD)
+
+install(TARGETS ${PROJECT_NAME}
+            LIBRARY DESTINATION services
+            ARCHIVE DESTINATION services/static)
+
+include(EDCCompile)
+#please do not add edc/ directory
+set(edcFiles
+    MoreMenu.edc
+    AddBookmarkPopup.edc
+    NewFolderPopup.edc
+    )
+
+foreach(edec ${edcFiles})
+    string(REPLACE ".edc" ".edj" target_name ${edec})
+    EDJ_TARGET(${target_name}
+               ${CMAKE_CURRENT_SOURCE_DIR}/edc/${edec}
+               ${CMAKE_CURRENT_BINARY_DIR})
+endforeach(edec)
+
diff --git a/services/MoreMenuUI/MoreMenuUI.cpp b/services/MoreMenuUI/MoreMenuUI.cpp
new file mode 100644 (file)
index 0000000..492f3ea
--- /dev/null
@@ -0,0 +1,460 @@
+/*
+ * Copyright (c) 2014 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 <boost/concept_check.hpp>
+#include <vector>
+#include <AbstractMainWindow.h>
+
+#include "MoreMenuUI.h"
+#include "ServiceManager.h"
+#include "BrowserLogger.h"
+#include "Tools/EflTools.h"
+#include "../Tools/BrowserImage.h"
+
+#define efl_scale       (elm_config_scale_get() / elm_app_base_scale_get())
+
+namespace tizen_browser{
+namespace base_ui{
+
+EXPORT_SERVICE(MoreMenuUI, "org.tizen.browser.moremenuui")
+
+struct ItemData{
+        tizen_browser::base_ui::MoreMenuUI * m_moreMenu;
+        tizen_browser::services::HistoryItem * h_item;
+        Elm_Object_Item * e_item;
+    };
+
+typedef struct _MoreItemData
+{
+       ItemType item;
+       std::shared_ptr<tizen_browser::base_ui::MoreMenuUI> moreMenuUI;
+} MoreMenuItemData;
+
+MoreMenuUI::MoreMenuUI()
+    : m_gengrid(NULL)
+    , m_parent(NULL)
+    , m_item_class(NULL)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    edjFilePath = EDJE_DIR;
+    edjFilePath.append("MoreMenuUI/MoreMenu.edj");
+}
+
+MoreMenuUI::~MoreMenuUI()
+{
+}
+
+void MoreMenuUI::show(Evas_Object* parent)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_parent = parent;
+    elm_theme_extension_add(NULL, edjFilePath.c_str());
+    m_mm_layout = elm_layout_add(parent);
+    elm_layout_file_set(m_mm_layout, edjFilePath.c_str(), "moremenu-layout");
+    evas_object_size_hint_weight_set(m_mm_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(m_mm_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    evas_object_show(m_mm_layout);
+
+    m_gengrid = elm_gengrid_add(m_mm_layout);
+    elm_object_part_content_set(m_mm_layout, "elm.swallow.grid", m_gengrid);
+
+    /*evas_object_smart_callback_add(m_gengrid, "item,focused", focusItem, NULL);
+    evas_object_smart_callback_add(m_gengrid, "item,unfocused", unFocusItem, NULL);
+    evas_object_smart_callback_add(m_gengrid, "activated", _itemSelected, this);*/
+
+      if (!m_item_class) {
+            m_item_class = elm_gengrid_item_class_new();
+            m_item_class->item_style = "menu_item";
+            m_item_class->func.text_get = _grid_text_get;
+            m_item_class->func.content_get =  _grid_content_get;
+            m_item_class->func.state_get = NULL;
+            m_item_class->func.del = NULL;
+        }
+
+    elm_gengrid_align_set(m_gengrid, 0, 0);
+    elm_gengrid_select_mode_set(m_gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
+    elm_gengrid_multi_select_set(m_gengrid, EINA_FALSE);
+    elm_gengrid_horizontal_set(m_gengrid, EINA_FALSE);
+    elm_scroller_policy_set(m_gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+    elm_scroller_page_size_set(m_gengrid, 0, 327);
+    evas_object_size_hint_weight_set(m_gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(m_gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    elm_gengrid_item_size_set(m_gengrid, 364 * efl_scale, 320 * efl_scale);
+
+    addItems();
+}
+
+void MoreMenuUI::showCurrentTab(const std::shared_ptr<tizen_browser::services::HistoryItem> item)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    elm_theme_extension_add(NULL, edjFilePath.c_str());
+    m_genList = elm_genlist_add(m_mm_layout);
+    elm_object_part_content_set(m_mm_layout, "elm.swallow.genlist", m_genList);
+    elm_genlist_homogeneous_set(m_genList, EINA_FALSE);
+    elm_genlist_multi_select_set(m_genList, EINA_FALSE);
+    elm_genlist_select_mode_set(m_genList, ELM_OBJECT_SELECT_MODE_ALWAYS);
+    elm_genlist_mode_set(m_genList, ELM_LIST_LIMIT);
+    elm_genlist_decorate_mode_set(m_genList, EINA_TRUE);
+    evas_object_size_hint_weight_set(m_genList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+    /*evas_object_smart_callback_add(m_genList, "item,focused", focusItem, this);
+    evas_object_smart_callback_add(m_genList, "item,unfocused", unFocusItem, NULL);*/
+
+    m_itemClass = elm_genlist_item_class_new();
+    m_itemClass->item_style = "current_tab";
+    m_itemClass->func.text_get = &listItemTextGet;
+    m_itemClass->func.content_get = &listItemContentGet;
+    m_itemClass->func.state_get = 0;
+    m_itemClass->func.del = 0;
+
+    ItemData * id = new ItemData;
+    id->m_moreMenu = this;
+    id->h_item = item ? item.get() : NULL;
+    Elm_Object_Item* elmItem = elm_genlist_item_append(m_genList,            //genlist
+                                                      m_itemClass,          //item Class
+                                                      id,
+                                                      NULL,                    //parent item
+                                                      ELM_GENLIST_ITEM_NONE,  //item type
+                                                      NULL,
+                                                      NULL                  //data passed to above function
+                                                     );
+    id->e_item = elmItem;
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+}
+
+Evas_Object* MoreMenuUI::listItemContentGet(void* data, Evas_Object* obj, const char* part)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    ItemData * id = static_cast<ItemData *>(data);
+    if(!strcmp(part, "favicon") && id->h_item && id->h_item->getFavIcon())
+    {
+        // Currently favicon is not getting fetched from the engine, so we are showing Google's favicon by default.
+        Evas_Object* thumb_nail = elm_icon_add(obj);
+         const char* file_name = "favicon.png";
+         elm_image_file_set(thumb_nail, id->m_moreMenu->edjFilePath.c_str(), file_name);
+         return thumb_nail;
+         //return tizen_browser::tools::EflTools::getEvasImage(id->h_item->getFavIcon(), obj);
+    }
+    else if(!strcmp(part, "star_click"))
+    {
+        Evas_Object *star_click = elm_button_add(obj);
+        elm_object_style_set(star_click, "hidden_button");
+        evas_object_smart_callback_add(star_click, "clicked", MoreMenuUI::star_clicked_cb, id);
+        return star_click;
+    }
+    else if(!strcmp(part, "close_click"))
+    {
+        Evas_Object *close_click = elm_button_add(obj);
+        elm_object_style_set(close_click, "hidden_button");
+        evas_object_smart_callback_add(close_click, "clicked", MoreMenuUI::close_clicked_cb, id);
+        return close_click;
+    }
+    return NULL;
+}
+
+void MoreMenuUI::item_clicked_cb(void* data, Evas_Object* /* obj */, void* /* event_info */)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+}
+
+void MoreMenuUI::star_clicked_cb(void* data, Evas_Object* /* obj */, void* /* event_info */)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    ItemData * id = static_cast<ItemData *>(data);
+    id->m_moreMenu->AddBookmarkPopupCalled();
+}
+
+void MoreMenuUI::AddBookmarkPopupCalled()
+{   //m_map_bookmark_folder_list.clear();
+    popup = std::shared_ptr<tizen_browser::base_ui::AddBookmarkPopup> (new AddBookmarkPopup(m_mm_layout));
+    popup->show();
+    popup->addBookmarkFolderItems(m_map_bookmark_folder_list);
+    popup->folderSelected.disconnect_all_slots();
+    popup->folderSelected.connect(boost::bind(&MoreMenuUI::addToBookmarks, this, _1));
+    popup->addNewFolderClicked.disconnect_all_slots();
+    popup->addNewFolderClicked.connect(boost::bind(&MoreMenuUI::newFolderPopup, this,_1));
+}
+
+void MoreMenuUI::newFolderPopup(std::string)
+{
+   BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+   m_popup = std::shared_ptr <tizen_browser::base_ui::NewFolderPopup > (new NewFolderPopup(m_mm_layout, NULL,"Add New Folder for adding to Bookmark","New Folder","Add to bookmark","Cancel"));
+   m_popup->on_ok.disconnect_all_slots();
+   m_popup->on_ok.connect(boost::bind(&MoreMenuUI::NewFolderCreate, this, _1));
+   m_popup->on_cancel.disconnect_all_slots();
+   m_popup->on_cancel.connect(boost::bind(&MoreMenuUI::CancelClicked, this, _1));
+   popup->hide();
+   m_popup->show();
+}
+
+void MoreMenuUI::NewFolderCreate(Evas_Object * popup_content)
+{
+   BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+   m_folderName = elm_entry_entry_get(popup_content);
+   BookmarkFolderCreated(m_folderName.c_str(), 0,0);
+   m_popup->hide();
+}
+
+void MoreMenuUI::CancelClicked(Evas_Object * popup)
+{
+   BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+   m_popup->hide();
+}
+
+void MoreMenuUI::addToBookmarks(int folder_id)
+{
+     AddBookmarkInput(folder_id);
+     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+     popup->hide();
+     popup.reset();
+}
+void MoreMenuUI::close_clicked_cb(void* data, Evas_Object* /* obj */, void* /* event_info */)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    ItemData * id = static_cast<ItemData *>(data);
+    id->m_moreMenu->closeMoreMenuClicked(std::string());
+    id->m_moreMenu->clearItems();
+}
+
+char* MoreMenuUI::listItemTextGet(void* data, Evas_Object* /* obj */, const char* part)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    ItemData * id = static_cast<ItemData *>(data);
+    if(!strcmp(part, "webpage_title"))
+    {
+       if(!id->h_item)
+           return strdup("New Tab");
+        if(!id->h_item->getTitle().empty()){
+            return strdup(id->h_item->getTitle().c_str());
+        }
+    }
+    else if(!strcmp(part, "webpage_url"))
+    {
+       if(!id->h_item)
+            return strdup("");
+        if(!id->h_item->getUrl().empty()){
+            return strdup(id->h_item->getUrl().c_str());
+        }
+    }
+    return strdup("");
+}
+
+void MoreMenuUI::hide()
+{
+       evas_object_hide(elm_layout_content_get(m_mm_layout, "elm.swallow.grid"));
+       evas_object_hide(elm_layout_content_get(m_mm_layout, "elm.swallow.genlist"));
+       evas_object_hide(m_mm_layout);
+}
+
+void MoreMenuUI::addItems()
+{
+        BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+        for (size_t i = 0; i < 10; i++) {
+            MoreMenuItemData *itemData = new MoreMenuItemData();
+            itemData->item = static_cast<ItemType>(i);;
+            itemData->moreMenuUI = std::shared_ptr<tizen_browser::base_ui::MoreMenuUI>(this);
+            Elm_Object_Item* bookmarkView = elm_gengrid_item_append(m_gengrid, m_item_class, itemData, NULL, this);
+            m_map_menu_views.insert(std::pair<ItemType, Elm_Object_Item*>(itemData->item, bookmarkView));
+            elm_gengrid_item_selected_set(bookmarkView, EINA_FALSE);
+        }
+        BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+}
+
+char* MoreMenuUI::_grid_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       MoreMenuItemData *itemData = reinterpret_cast<MoreMenuItemData*>(data);
+
+        BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
+       if (!strcmp(part, "menu_label")) {
+                const char* item_name = NULL;
+                switch(itemData->item) {
+                case READER_MODE:
+                        item_name = "Reader mode"; break;
+                case BOOKMARK_MANAGER:
+                        item_name = "Bookmark manager"; break;
+                case HISTORY:
+                        item_name = "History"; break;
+                case SCREEN_ZOOM:
+                        item_name = "Screen zoom"; break;
+                case START_MINIBROWSER:
+                        item_name = "Start minibrowser"; break;
+                case FOCUS_MODE:
+                        item_name = "Focus mode"; break;
+                case VIEW_MOBILE_WEB:
+                        item_name = "View mobile web"; break;
+                case SHARE:
+                        item_name = "Share"; break;
+                case SETTINGS:
+                        item_name = "Settings"; break;
+                case EXIT_BROWSER:
+                        item_name = "Exit browser"; break;
+                default:
+                        item_name = "";
+                }
+               return strdup(item_name);
+       }
+       return NULL;
+}
+
+static const char* getImageFileNameForType(ItemType type, bool focused)
+{
+       const char* file_name = NULL;
+         switch(type) {
+                case READER_MODE:
+                        file_name = focused ? "ic_more_readermode_foc.png" : "ic_more_readermode_nor.png"; break;
+                case BOOKMARK_MANAGER:
+                        file_name = focused ? "ic_more_bookmark_foc.png" : "ic_more_bookmark_nor.png"; break;
+                case HISTORY:
+                        file_name = focused ? "ic_more_history_foc.png" : "ic_more_history_nor.png"; break;
+                case SCREEN_ZOOM:
+                        file_name = focused ? "ic_more_zoom_foc.png" : "ic_more_zoom_nor.png"; break;
+                case START_MINIBROWSER:
+                        file_name = focused ? "ic_more_minibrowser_foc.png" : "ic_more_minibrowser_nor.png"; break;
+                case FOCUS_MODE:
+                        file_name = focused ? "ic_more_focusmode_foc.png" : "ic_more_focusmode_nor.png"; break;
+                case VIEW_MOBILE_WEB:
+                        file_name = focused ? "ic_more_mobileview_foc.png" : "ic_more_mobileview_nor.png"; break;
+                case SHARE:
+                        file_name = focused ? "ic_more_share_foc.png" : "ic_more_share_nor.png"; break;
+                case SETTINGS:
+                        file_name = focused ? "ic_more_setting_foc.png" : "ic_more_setting_nor.png"; break;
+                case EXIT_BROWSER:
+                        file_name = focused ? "ic_more_exit_foc.png" : "ic_more_exit_nor.png"; break;
+                default:
+                        file_name = "";
+         }
+       return file_name;
+}
+
+Evas_Object * MoreMenuUI::_grid_content_get(void *data, Evas_Object *obj, const char *part)
+{
+    BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
+    MoreMenuItemData *itemData = reinterpret_cast<MoreMenuItemData*>(data);
+
+    if (!strcmp(part, "thumbnail_item")) {
+        Evas_Object* thumb_nail = elm_icon_add(obj);
+        const char* file_name = getImageFileNameForType(itemData->item, false);
+        elm_image_file_set(thumb_nail, itemData->moreMenuUI->edjFilePath.c_str(), file_name);
+        return thumb_nail;
+    }
+    else if (!strcmp(part, "thumbbutton_item")) {
+               Evas_Object *thumbButton = elm_button_add(obj);
+               elm_object_style_set(thumbButton, "clickButton");
+               evas_object_smart_callback_add(thumbButton, "clicked", tizen_browser::base_ui::MoreMenuUI::_thumbSelected, data);
+               evas_object_event_callback_add(thumbButton, EVAS_CALLBACK_MOUSE_IN, __cb_mouse_in, data);
+               evas_object_event_callback_add(thumbButton, EVAS_CALLBACK_MOUSE_OUT, __cb_mouse_out, data);
+               return thumbButton;
+    }
+    return NULL;
+}
+
+void MoreMenuUI::__cb_mouse_in(void * data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    BROWSER_LOGD("[%s:%d]", __PRETTY_FUNCTION__, __LINE__);
+    elm_object_focus_set(obj, EINA_TRUE);
+    MoreMenuItemData *itemData = reinterpret_cast<MoreMenuItemData*>(data);
+
+    const char* file_name = getImageFileNameForType(itemData->item, true);
+    Elm_Object_Item * selected = itemData->moreMenuUI->m_map_menu_views[itemData->item];
+    Evas_Object *thumb_nail = elm_object_item_part_content_get(selected, "thumbnail_item");
+    elm_image_file_set(thumb_nail, itemData->moreMenuUI->edjFilePath.c_str(), file_name);
+}
+
+void MoreMenuUI::__cb_mouse_out(void * data, Evas *e, Evas_Object *obj, void *event_info)
+{
+    BROWSER_LOGD("[%s:%d]", __PRETTY_FUNCTION__, __LINE__);
+    MoreMenuItemData *itemData = reinterpret_cast<MoreMenuItemData*>(data);
+    elm_object_focus_set(obj, EINA_FALSE);
+    const char* file_name = getImageFileNameForType(itemData->item, false);
+    Elm_Object_Item * selected = itemData->moreMenuUI->m_map_menu_views[itemData->item];
+    Evas_Object *thumb_nail = elm_object_item_part_content_get(selected, "thumbnail_item");
+    elm_image_file_set(thumb_nail, itemData->moreMenuUI->edjFilePath.c_str(), file_name);
+}
+
+void MoreMenuUI::_itemSelected(void * data, Evas_Object * /* obj */, void * event_info)
+{
+    BROWSER_LOGD("[%s:%d]", __PRETTY_FUNCTION__, __LINE__);
+}
+
+void MoreMenuUI::_thumbSelected(void * data, Evas_Object * /* obj */, void * /* event_info */)
+{
+    BROWSER_LOGD("[%s:%d]", __PRETTY_FUNCTION__, __LINE__);
+    MoreMenuItemData *itemData = reinterpret_cast<MoreMenuItemData*>(data);
+    switch(itemData->item) {
+                case READER_MODE:
+                        break;
+                case BOOKMARK_MANAGER:
+                        break;
+                case HISTORY:
+                        itemData->moreMenuUI->historyUIClicked(std::string()); break;
+                case SCREEN_ZOOM:
+                       break;
+                case START_MINIBROWSER:
+                        break;
+                case FOCUS_MODE:
+                        break;
+                case VIEW_MOBILE_WEB:
+                        break;
+                case SHARE:
+                        break;
+                case SETTINGS:
+                        itemData->moreMenuUI->settingsClicked(std::string()); break;
+                case EXIT_BROWSER:
+                        break;
+    }
+}
+
+void MoreMenuUI::getBookmarkFolderList(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > folderList)
+{
+    m_map_bookmark_folder_list = folderList;
+}
+
+void MoreMenuUI::clearItems()
+{
+    hide();
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    elm_gengrid_clear(m_gengrid);
+    elm_genlist_clear(m_genList);
+    m_map_menu_views.clear();
+    m_map_bookmark_folder_list.clear();
+    elm_theme_extension_del(NULL, edjFilePath.c_str());
+    elm_theme_full_flush();
+    elm_cache_all_flush();
+}
+
+void MoreMenuUI::focusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
+    elm_object_item_signal_emit( item, "mouse,in", "over2");
+
+    // selected manually
+    elm_gengrid_item_selected_set(item, EINA_TRUE);
+}
+
+void MoreMenuUI::unFocusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
+    elm_object_item_signal_emit( item, "mouse,out", "over2");
+
+    // unselected manually
+    elm_gengrid_item_selected_set(item, EINA_FALSE);
+}
+
+}
+}
diff --git a/services/MoreMenuUI/MoreMenuUI.h b/services/MoreMenuUI/MoreMenuUI.h
new file mode 100644 (file)
index 0000000..7bff048
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2014 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 MOREMENUUI_H
+#define MOREMENUUI_H
+
+#include <Evas.h>
+#include <boost/signals2/signal.hpp>
+
+#include "AbstractUIComponent.h"
+#include "AbstractService.h"
+#include "ServiceFactory.h"
+#include "service_macros.h"
+//#include "../SimpleUI/SimpleUI.h"
+
+#include "BookmarkItem.h"
+#include "AddBookmarkPopup.h"
+#include "NewFolderPopup.h"
+#include "../BookmarkManagerUI/AddNewFolderPopup.h"
+#include "services/HistoryService/HistoryItem.h"
+
+namespace tizen_browser{
+namespace base_ui{
+
+class SimpleUI;
+enum ItemType {
+    READER_MODE,
+    BOOKMARK_MANAGER,
+    HISTORY,
+    SCREEN_ZOOM,
+    START_MINIBROWSER,
+    FOCUS_MODE,
+    VIEW_MOBILE_WEB,
+    SHARE,
+    SETTINGS,
+    EXIT_BROWSER
+} item;
+
+class BROWSER_EXPORT MoreMenuUI
+        : public tizen_browser::interfaces::AbstractUIComponent
+        , public tizen_browser::core::AbstractService
+{
+public:
+    MoreMenuUI();
+    ~MoreMenuUI();
+    void show(Evas_Object *main_layout);
+    void showCurrentTab(const std::shared_ptr<tizen_browser::services::HistoryItem> item);
+    virtual std::string getName();
+    void addItems();
+    void hide();
+    void clearItems();
+    void getBookmarkFolderList(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > );
+
+    boost::signals2::signal<void (std::string)> historyUIClicked;
+    boost::signals2::signal<void (const char*, int, int)> BookmarkFolderCreated;
+    boost::signals2::signal<void (std::string)> closeMoreMenuClicked;
+    boost::signals2::signal<void (std::string)> BookmarkFoldersListImport;
+    boost::signals2::signal<void (const std::string&)> settingsClicked;
+    boost::signals2::signal<void (int)> AddBookmarkInput;
+private:
+    static char* _grid_text_get(void *data, Evas_Object *obj, const char *part);
+    static Evas_Object * _grid_content_get(void *data, Evas_Object *obj, const char *part);
+    static void _itemSelected(void * data, Evas_Object * obj, void * event_info);
+    static void _thumbSelected(void * data, Evas_Object * obj, void * event_info);
+
+    static Evas_Object* listItemContentGet(void *data, Evas_Object *obj, const char *part);
+    static char*        listItemTextGet(void *data, Evas_Object *obj, const char *part);
+
+    void newFolderPopup(std::string);
+    void NewFolderCreate(Evas_Object * popup_content);
+    void CancelClicked(Evas_Object * popup_content);
+
+    void AddBookmarkPopupCalled();
+    void addToBookmarks(int folder_id);
+    static void item_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+    static void star_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+    static void close_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+
+    static void __cb_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info);
+    static void __cb_mouse_out(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+private:
+    Evas_Object *m_genList;
+    std::shared_ptr<tizen_browser::base_ui::NewFolderPopup > m_popup;
+    Evas_Object *m_mm_layout;
+    std::shared_ptr<tizen_browser::base_ui::AddBookmarkPopup > popup;
+    Elm_Genlist_Item_Class *m_itemClass;
+    Evas_Object *m_gengrid;
+    Evas_Object *m_parent;
+    Elm_Gengrid_Item_Class * m_item_class;
+    std::map<ItemType,Elm_Object_Item*> m_map_menu_views;
+    std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > m_map_bookmark_folder_list;
+    std::string edjFilePath;
+    std::string m_folderName;
+    bool m_gengridSetup;
+
+    static void focusItem(void* data, Evas_Object* obj, void* event_info);
+    static void unFocusItem(void* data, Evas_Object* obj, void* event_info);
+};
+
+}
+}
+
+#endif // BOOKMARKSUI_H
diff --git a/services/MoreMenuUI/NewFolderPopup.cpp b/services/MoreMenuUI/NewFolderPopup.cpp
new file mode 100644 (file)
index 0000000..32b8f69
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2014 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 <boost/concept_check.hpp>
+#include <vector>
+
+#include "Tools/EflTools.h"
+#include "NewFolderPopup.h"
+#include "BrowserLogger.h"
+
+#define efl_scale       (elm_config_scale_get() / elm_app_base_scale_get())
+
+namespace tizen_browser{
+namespace base_ui{
+
+NewFolderPopup::NewFolderPopup(Evas_Object* main_layout) :
+    m_popup(NULL),
+    m_content(NULL),
+    m_mainLayout(main_layout)
+{
+
+}
+
+NewFolderPopup::NewFolderPopup(Evas_Object *main_layout, Evas_Object *content, const char *message, char* title, char* okButtonText, char* cancelButtonText) :
+    m_popup(NULL),
+    m_mainLayout(main_layout),
+    m_content(content),
+    m_message(message),
+    m_title(title),
+    m_okButtonText(okButtonText),
+    m_cancelButtonText(cancelButtonText)
+{
+
+}
+
+void NewFolderPopup::setTitle(const std::string& title)
+{
+    m_title = title;
+}
+
+void NewFolderPopup::setMessage(const std::string& message)
+{
+    m_message = message;
+}
+
+void NewFolderPopup::setContent(Evas_Object* content)
+{
+    m_content = content;
+}
+
+void NewFolderPopup::setOkButtonText(const std::string& okButtonText)
+{
+    m_okButtonText = okButtonText;
+}
+
+void NewFolderPopup::setCancelButtonText(const std::string& cancelButtonText)
+{
+    m_cancelButtonText = cancelButtonText;
+}
+
+void NewFolderPopup::show()
+{
+    BROWSER_LOGD("[%si %d],", __func__, __LINE__);
+    std::string edjePath = std::string(EDJE_DIR);
+    edjePath.append("MoreMenuUI/NewFolderPopup.edj");
+    elm_theme_extension_add(0, edjePath.c_str());
+    m_popup = elm_layout_add(m_mainLayout);
+    elm_layout_file_set(m_popup, edjePath.c_str(), "new_folder_popup");
+    elm_object_part_text_set(m_popup, "title_text", m_title.c_str());
+
+    Evas_Object *buttonsBox = elm_box_add(m_popup);
+    elm_box_horizontal_set(buttonsBox, EINA_TRUE);
+
+     /* for margins */
+    Evas_Object *layout = elm_layout_add(m_popup);
+    elm_layout_file_set(layout, edjePath.c_str() , "popup_input_text");
+    evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    elm_object_content_set(m_popup, layout);
+    elm_object_part_text_set(m_popup, "title,text", m_title.c_str());
+
+    m_editfield_entry = elm_entry_add(layout);
+    elm_object_style_set(m_editfield_entry, "uri_entry_popup");
+    evas_object_size_hint_weight_set(m_editfield_entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(m_editfield_entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    elm_entry_editable_set(m_editfield_entry, EINA_TRUE);
+    elm_entry_cnp_mode_set(m_editfield_entry, ELM_CNP_MODE_PLAINTEXT);
+    elm_entry_scrollable_set(m_editfield_entry, EINA_TRUE);
+    elm_entry_autocapital_type_set(m_editfield_entry, ELM_AUTOCAPITAL_TYPE_NONE);
+    elm_entry_prediction_allow_set(m_editfield_entry, EINA_FALSE);
+    elm_entry_single_line_set(m_editfield_entry, EINA_TRUE);
+
+    elm_entry_input_panel_layout_set(m_editfield_entry, ELM_INPUT_PANEL_LAYOUT_URL);
+    elm_entry_input_panel_return_key_type_set(m_editfield_entry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
+    elm_object_part_content_set(layout, "elm.swallow.content" , m_editfield_entry);
+    elm_entry_cursor_end_set(m_editfield_entry);
+
+    if (!m_okButtonText.empty())
+    {
+        BROWSER_LOGD("Button1, %s", edjePath.c_str());
+        Evas_Object *btn1 = elm_button_add(buttonsBox);
+        evas_object_size_hint_weight_set(btn1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        evas_object_size_hint_align_set(btn1, 0.5, 0.5);
+        elm_object_style_set(btn1, "bookmark_button");
+        elm_object_part_text_set(btn1, "elm.text", m_okButtonText.c_str());
+        elm_box_pack_end(buttonsBox, btn1);
+        evas_object_smart_callback_add(btn1, "clicked", popup_ok_cb, (void*)this);
+        evas_object_show(btn1);
+    }
+
+    if (!m_cancelButtonText.empty())
+    {
+        BROWSER_LOGD("Button2");
+        Evas_Object *btn2 = elm_button_add(buttonsBox);
+        evas_object_size_hint_weight_set(btn2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+        evas_object_size_hint_align_set(btn2, 0.5, 0.5);
+        elm_object_style_set(btn2, "bookmark_button");
+        elm_object_part_text_set(btn2, "elm.text", m_cancelButtonText.c_str());
+        elm_box_pack_end(buttonsBox, btn2);
+        evas_object_smart_callback_add(btn2, "clicked", popup_cancel_cb, (void*)this);
+        evas_object_show(btn2);
+    }
+
+    if(!m_message.empty())
+        elm_object_part_text_set(m_popup, "elm.text", m_message.c_str());
+
+    evas_object_show(m_editfield_entry);
+    evas_object_show(buttonsBox);
+    evas_object_show(layout);
+    elm_object_part_content_set(m_popup, "buttons", buttonsBox);
+    elm_object_part_content_set(m_popup, "content", layout);
+    elm_object_part_content_set(m_mainLayout, "popup", m_popup);
+
+    elm_object_signal_emit(m_mainLayout, "elm,state,show", "elm");
+}
+
+void NewFolderPopup::hide()
+{
+   evas_object_hide(m_popup);
+   elm_object_signal_emit(m_mainLayout, "elm,state,hide", "elm");
+}
+
+void NewFolderPopup::popup_ok_cb(void *data, Evas_Object *btn, void*)
+{
+    BROWSER_LOGD("[%s],", __func__);
+    NewFolderPopup *ownPopup = static_cast<NewFolderPopup*>(data);
+    ownPopup->on_ok(ownPopup->m_editfield_entry);
+}
+void NewFolderPopup::popup_cancel_cb(void *data, Evas_Object *btn, void*)
+{
+    BROWSER_LOGD("[%s],", __func__);
+    NewFolderPopup *ownPopup = static_cast<NewFolderPopup*>(data);
+    ownPopup->on_cancel(ownPopup->m_editfield_entry);
+}
+
+}
+}
diff --git a/services/MoreMenuUI/NewFolderPopup.h b/services/MoreMenuUI/NewFolderPopup.h
new file mode 100644 (file)
index 0000000..18edd11
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef NEWFOLDERPOPUP_H
+#define NEWFOLDERPOPUP_H
+
+#include <Elementary.h>
+#include <boost/signals2.hpp>
+
+#include "AbstractUIComponent.h"
+#include "AbstractService.h"
+#include "ServiceFactory.h"
+#include "service_macros.h"
+#include "BookmarkItem.h"
+
+namespace tizen_browser{
+namespace base_ui{
+
+class NewFolderPopup{
+
+public:
+    NewFolderPopup(Evas_Object *main_layout);
+    NewFolderPopup(Evas_Object *main_layout, Evas_Object *content, const char *message, char *title, char* okButtonText, char* cancelButtonText);
+
+    /**
+     * Theese setters should be called before showing popup.
+     */
+    void setContent(Evas_Object *content);
+    void setMessage(const std::string &message);
+    void setTitle(const std::string &title);
+    void setOkButtonText(const std::string &okButtonText);
+    void setCancelButtonText(const std::string &cancelButtonText);
+
+    void show();
+    void hide();
+    boost::signals2::signal<void (Evas_Object *)> on_ok;
+    boost::signals2::signal<void (Evas_Object *)> on_cancel;
+
+private:
+    static void popup_ok_cb(void *data, Evas_Object *btn, void*);
+    static void popup_cancel_cb(void *data, Evas_Object *btn, void*);
+    Evas_Object *m_popup;
+    Evas_Object *m_editfield_entry;
+    Evas_Object *m_content;
+    std::string m_message, m_title, m_okButtonText, m_cancelButtonText;
+
+protected:
+    Evas_Object *m_mainLayout;
+};
+
+}
+}
+#endif
diff --git a/services/MoreMenuUI/edc/AddBookmarkPopup.edc b/services/MoreMenuUI/edc/AddBookmarkPopup.edc
new file mode 100644 (file)
index 0000000..ec3c60a
--- /dev/null
@@ -0,0 +1,370 @@
+#define CONTENT_HEIGHT 99;
+#define CONTENT_BG_HEIGHT (CONTENT_HEIGHT+294);
+
+#define DEBUG_RECT_OVER(over_part, r, g, b)                         \
+    part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__));   \
+                                                                    \
+scale:1;                                                            \
+        type : RECT;                                                \
+        repeat_events: 1;                                           \
+        description {                                               \
+            state: "default" 0.0;                                   \
+            visible: 1;                                             \
+            color: r g b 128;                                       \
+            rel1 { to: over_part; relative: 0 0; }                  \
+            rel2 { to: over_part; relative: 1 1; }                  \
+        }                                                           \
+    }
+
+#define RESOURCE_IMAGE_LOSSY( FILE_NAME ) \
+   group { \
+      name: FILE_NAME; \
+      images.image: FILE_NAME LOSSY 100; \
+      parts { \
+         part { name: "image"; \
+            description { \
+               state: "default" 0.0; \
+               image.normal: FILE_NAME; \
+               min: 134 167; \
+               max: 134 167; \
+               aspect_preference: BOTH; \
+            } \
+         } \
+      } \
+   }
+
+
+
+collections{
+    RESOURCE_IMAGE_LOSSY("btn_bar_new_foc.png")
+    RESOURCE_IMAGE_LOSSY("btn_bar_new_nor.png")
+
+    group { name: "bookmark_popup";
+      parts{
+       part{ name: "content_bg";
+            type: RECT;
+            scale: 1;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                color: 255 255 255 255;
+                align: 0.5 0.5;
+                min: 740 658;
+                max: 740 884;
+                rel1 {relative: 0.0 0.0;}
+                rel2 {relative: 1.0 1.0;}
+              }
+          }
+            part{ name: "title_bg";
+                type: RECT;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    color: 255 255 255 255;
+                    min: 740 144;
+                    max: 740 144;
+                    align: 0.0 0;
+                    rel1 {relative: 0.0 0.0; to: "content_bg"; offset: 0 0;}
+                    rel2 {relative: 1.0 1.0; to: "content_bg";}
+                }
+            }
+           part{ name: "title_text_bm";
+                type: TEXT;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    rel1 {relative: 0.0 0.0; to: "title_bg"; offset: 40 46;}
+                    rel2 {relative: 1.0 1.0; to: "title_bg"; offset: -40 0;}
+                    color: 51 51 51 255;
+                    text{
+                        text: "Add to bookmark";
+                        font: "Sans";
+                        size: 42;
+                        align: 0.5 0.0;
+                    }
+                }
+            }
+           part{ name: "sub_title_text_bm";
+                type: TEXT;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    rel1 {relative: 0.0 0.0; to: "title_bg"; offset: 40 112;}
+                    rel2 {relative: 1.0 1.0; to: "title_bg"; offset: -40 0;}
+                    color: 104 104 104 255;
+                    text{
+                        text: "Select folder for adding to bookmark";
+                        font: "Sans";
+                        size: 32;
+                        align: 0.5 0.0;
+                    }
+                }
+            }
+            part{ name: "gengrid_bg";
+                type: RECT;
+                mouse_events: 0;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    color: 255 255 255 255;
+                    rel1 {relative: 0.0 1.0; to: "title_bg"; offset: 40 40;}
+                    rel2 {relative: 1.0 1.0; }
+                    align: 0 0;
+                    min: 698 452;
+                    max: 698 678;
+                }
+            }
+            part{ name: "elm.swallow.gengrid";
+                type: SWALLOW;
+                scale: 1;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 0 0;
+                    rel1 {relative: 0.0 0.0; to: "gengrid_bg";}
+                    rel2 {relative: 1.0 1.0; to: "gengrid_bg";}
+                    align: 0.0 0.0;
+                    min: 698 452;
+                    max: 698 678;
+                }
+            }
+       }
+  }
+
+  /* group {
+        name: "own_popup_bm_long";
+        inherit: "own_popup_bm";
+        parts {
+                        part{ name: "content";
+            type: SWALLOW;
+            scale: 1;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                rel1 {relative: 0.0 0.0;}
+                rel2 {relative: 1.0 1.0;}
+        fixed: 1 1;
+                align: 0.5 0.5;
+        min: 542 0;
+        max: 542 450;
+                }
+            }
+        }
+    }
+  */
+
+group { name: "elm/gengrid/item/folder_grid_item/default";
+    data.item: "texts" "page_title";
+    data.item: "contents" "elm.thumbnail elm.thumbButton";
+    images {
+        image: "web_frame_selected.png" COMP;
+        image: "ico_bg_round_shape_37x37.png" COMP;
+        image: "btn_bar_new_nor.png" COMP;
+    }
+    parts {
+        part { name: "bg";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+                visible: 1;
+                min: 226 226;
+                max: 226 226;
+                color: 255 255 255 255;
+                rel1.offset: -18 -18;
+            }
+            description { state: "selected";
+                inherit: "default" 0.0;
+                color: 70 143 254 255;
+            }
+        }
+
+        part { name: "thumbnail_bg";
+            type: RECT;
+            description { state: "default" 0.0;
+                visible: 1;
+                min: 208 208;
+                max: 208 208;
+                align: 0.0 0.0;
+                color : 231 231 231 255;
+                rel1 {
+                    relative: 0.0  0.0; to: "bg";
+                }
+                rel2 {
+                    relative: 1.0  1.0; to: "bg";
+                }
+            }
+            description { state: "selected";
+                inherit: "default" 0.0;
+                color: 70 143 254 255;
+            }
+        }
+        part { name: "elm.thumbnail";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+                fixed: 1 0;
+                visible: 1;
+                align: 0.0 0.0;
+                color : 255 255 255 255;
+                rel1 {
+                    relative: 0.0  0.0; to: "thumbnail_bg";
+                }
+                rel2 {
+                    relative: 1.0  1.0; to: "thumbnail_bg";
+                }
+            }
+            description { state: "selected";
+                inherit: "default" 0.0;
+            }
+        }
+        part { name: "page_title";
+            type: TEXT;
+            description { state: "default" 0.0;
+                align: 0.5 0.5;
+                rel1 {
+                    to: "thumbnail_bg";
+                    relative: 0.0 0.0;
+                    offset: 0 0;
+                }
+                rel2 {
+                    to: "thumbnail_bg";
+                    relative: 1.0  1.0;
+                }
+                color: 51 51 51 255;
+                    text {
+                        text: "Web page title";
+                        font: "Sans";
+                        size: 32;
+                        align: 0.5 0.5;
+                    }
+                }
+                description { state: "selected" 0.0;
+                    inherit: "default" 0.0;
+                    color: 255 255 255 255;
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    //color: highlightTextColor;
+                }
+        }
+         part { name: "elm.thumbButton";
+            type: SWALLOW;
+            mouse_events: 1;
+            description { state: "default" 0.0;
+                rel1.to: "elm.thumbnail";
+                rel2.to: "elm.thumbnail";
+            }
+        }
+        part { name: "over";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+                color: 0 0 0 0;
+                rel1.to: "thumbnail_bg";
+                rel2.to: "thumbnail_bg";
+            }
+        }
+        }
+ programs{
+       program {
+                name: "mouse_click_newtab";
+                signal: "mouse,clicked,1";
+                source: "over";
+                script {
+                    emit("elm,action,click", "");
+                }
+            }
+       program {
+                name: "mouse_click_thumbbutton";
+                signal: "mouse,clicked";
+                source: "elm.thumbButton";
+                script {
+                    emit("clicked", "elm.thumbButton");
+                }
+            }
+        program { name: "mouse_in";
+            signal: "mouse,in";
+            source: "over";
+            action:  STATE_SET "selected" 0.0;
+            target: "thumbnail_bg";
+            target: "page_title";
+        }
+        program { name: "mouse_out";
+            signal: "mouse,out";
+            source: "over";
+            action:  STATE_SET "default" 0.0;
+            target: "thumbnail_bg";
+            target: "page_title";
+        }
+    }
+}
+
+
+group{
+        name: "elm/button/base/hidden_bm_button";
+        parts{
+            part{
+                name: "button";
+                type: RECT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    color: 0 0 0 0;
+                }
+            }
+            part{
+                name: "over";
+                type: RECT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    rel1 { relative: 0.0 0.0;to: "button";}
+                    rel2 { relative: 1.0 1.0;to: "button";}
+                    color: 0 0 0 0;
+                }
+            }
+        }
+        programs{
+            program {
+                name: "mouse_click";
+                signal: "mouse,clicked,1";
+                source: "over";
+                script {
+                    emit("elm,action,click", "");
+                }
+            }
+        }
+    }
+group { name: "elm/button/base/elm.thumbButton";
+        images {
+            image: "ico_delete.png" COMP;
+        }
+        parts {
+            part { name: "elm.swallow.content";
+                type: RECT;
+                mouse_events: 1;
+                repeat_events: 1;
+                description { state: "default" 0.0;
+                    color: 0 0 0 0;
+                    visible: 1;
+                    rel1.relative: 0.0 0.0;
+                    rel2.relative: 1.0 1.0;
+                    align: 0.0 0.0;
+                }
+            }
+        }
+
+        programs {
+            program { name: "mouse,clicked";
+                signal: "mouse,down,1";
+                source: "elm.swallow.content";
+                action: SIGNAL_EMIT "elm,action,click" "";
+            }
+        }
+
+}
diff --git a/services/MoreMenuUI/edc/MoreMenu.edc b/services/MoreMenuUI/edc/MoreMenu.edc
new file mode 100644 (file)
index 0000000..e7b67a7
--- /dev/null
@@ -0,0 +1,969 @@
+#define DEBUG_RECT_OVER(over_part, r, g, b)                         \
+    part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__));   \
+                                                                   \
+scale:1;                                                            \
+        type : RECT;                                                \
+        repeat_events: 1;                                           \
+        description {                                               \
+            state: "default" 0.0;                                   \
+            visible: 1;                                             \
+            color: r g b 128;                                       \
+            rel1 { to: over_part; relative: 0 0; }                  \
+            rel2 { to: over_part; relative: 1 1; }                  \
+        }                                                           \
+    }
+
+#define RESOURCE_IMAGE_LOSSY( FILE_NAME ) \
+   group { \
+      name: FILE_NAME; \
+      images.image: FILE_NAME LOSSY 100; \
+      parts { \
+         part { name: "image"; \
+            description { \
+               state: "default" 0.0; \
+               image.normal: FILE_NAME; \
+               aspect: 1 1; \
+               aspect_preference: BOTH; \
+            } \
+         } \
+      } \
+   }
+
+collections {
+
+RESOURCE_IMAGE_LOSSY("ic_more_readermode_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_bookmark_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_history_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_zoom_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_minibrowser_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_focusmode_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_mobileview_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_share_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_setting_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_more_exit_nor.png")
+RESOURCE_IMAGE_LOSSY("ic_add_bookmark.png")
+RESOURCE_IMAGE_LOSSY("ic_more_readermode_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_bookmark_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_history_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_zoom_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_minibrowser_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_focusmode_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_mobileview_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_share_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_setting_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_more_exit_foc.png")
+RESOURCE_IMAGE_LOSSY("favicon.png")
+
+#define WIDTH 1920
+#define HEIGHT 366
+#define ITEM_WIDTH 1200
+
+    group {
+        name: "elm/genlist/item/current_tab/default";
+        min: WIDTH HEIGHT;
+        max: WIDTH HEIGHT;
+        images {
+            image: "ico_delete.png" COMP;
+            image: "ic_add_bookmark" COMP;
+            image: "thumbnail.png" COMP;
+            image: "btn_bar_stop_nor.png" COMP;
+        }
+        data.item: "texts" "webpage_title webpage_url";
+        data.item: "contents" "favicon star_click close_click";
+        color_classes{
+            color_class{
+                name: "defaultBgColor";
+                color: 18 22 34 255;
+            }
+            color_class{
+                name: "focusBgColor";
+                color: 69 143 255 255;
+            }
+            color_class{
+                name: "highlightBgColor";
+                color: 69 143 255 102;
+            }
+            color_class{
+                name: "imageHighlight";
+                color: 255 255 255 102;
+            }
+            color_class{
+                name: "focusDelBgColor";
+                color: 96 114 146 255;
+            }
+            color_class{
+                name: "titleTextColor";
+                color: 74 74 74 255;
+            }
+            color_class{
+                name: "focusTextColor";
+                color: 255 255 255 255;
+            }
+            color_class{
+                name: "highlightTextColor";
+                color: 255 255 255 51;
+            }
+            color_class{
+                name: "urlTextColor";
+                color: 116 116 116 204;
+            }
+            color_class{
+                name: "transparent";
+                color: 0 0 0 0;
+            }
+        }
+        parts {
+            part {
+                name: "bg_rect";
+                scale:1;
+                mouse_events: 1;
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                    color: 231 231 231 255;
+                    align: 0 0;
+                    min: 1920 366;
+                    max: 1920 366;
+                   rel1 { relative: 0.0 0.0; offset: 0 0;}
+                }
+            }
+           part {
+                name: "action_bar_bg";
+                type: RECT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    min: 1920 104;
+                    max: 1920 104;
+                    align: 0 0;
+                    rel1 { relative: 0.0 0.0;to: "bg_rect"; offset: 0 0;}
+                    rel2 { relative: 1.0 1.0;to: "bg_rect";}
+                    color : 255 255 255 255;
+                }
+            }
+           part { name: "action_bar_shadow";
+                type: IMAGE;
+                scale: 1;
+                repeat_events: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0.0 0.0;
+                    fixed: 0 0;
+                    min: 1920 14;
+                    max: 1920 14;
+                    image.normal: "web_shadow.png";
+                    rel1 { relative: 0.0 1.0; to: "action_bar_bg"; }
+                    rel2 { relative: 1.0 1.0; }
+                }
+             }
+           part { name: "moremenu_title";
+                scale: 1;
+                type: TEXT;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    min: 500 58;
+                    max: 500 58;
+                    align: 0.5 0.5;
+                    rel1 { relative: 0.0 0.0; to: "action_bar_bg";}
+                    rel2 { relative: 1.0 1.0; to: "action_bar_bg";}
+                    color_class: titleTextColor;
+                    text {
+                        text: "More menu";
+                        font: "Sans";
+                        size: 58;
+                        align: 0.5 0.5;
+                    }
+                }
+            }
+           part {
+                name: "close_bg";
+                scale:1;
+                mouse_events: 1;
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    align: 0 0.5;
+                    min: 82 102;
+                    max: 82 102;
+                    rel1 { relative: 0.0 0.0; to: "action_bar_bg"; offset: 1758 0;}
+                    rel2 { relative: 1.0 1.0; to: "action_bar_bg";}
+                    color_class: transparent;
+                }
+                description {
+                    state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: focusBgColor;
+                    visible: 1;
+                }
+                  description {
+                    state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: focusDelBgColor;
+                    visible: 1;
+                }
+            }
+           part {
+                name: "close_icon";
+                type: IMAGE;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    align: 0 0;
+                    min: 82 102;
+                    max: 82 102;
+                    rel1 { relative: 0.0 0.0; to: "close_bg";}
+                    rel2 { relative: 1.0 1.0; to: "close_bg";}
+                    image.normal: "btn_bar_stop_nor.png";
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                }
+                description { state: "focus" 0.0;
+                    inherit: "highlight" 0.0;
+                }
+            }
+           part {
+                name: "close_over";
+                scale:1;
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0 0;
+                    fixed: 1 1;
+                    min: 82 102;
+                    max: 82 102;
+                    rel1 { relative: 0.0 0.0; to: "close_bg";}
+                    rel2 { relative: 1.0 1.0; to: "close_bg";}
+                    color_class: transparent;
+                }
+            }
+            part {
+                name: "close_click";
+                scale:1;
+                type: SWALLOW;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0 0;
+                    fixed: 1 1;
+                    min: 82 102;
+                    max: 82 102;
+                    rel1 { relative: 0.0 0.0; to: "close_over";}
+                    rel2 { relative: 1.0 1.0; to: "close_over";}
+                    color_class: transparent;
+                }
+            }
+            part {
+                name: "item_background";
+                type: RECT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    min: 1200 78;
+                    max: 1200 78;
+                    align: 0 0;
+                    rel1 { relative: 0.0 0.0;to: "bg_rect"; offset: 62 190;}
+                    rel2 { relative: 1.0 1.0;to: "bg_rect";}
+                   color : 231 231 231 231;
+                    //color_class: defaultBgColor;
+                }
+            }
+            //SPACER_ITEM_BR("horizontal_line", ITEM_WIDTH, 2, "bg_rect")
+            part {
+                name: "favicon_bg";
+                type: RECT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 0;
+                    min: 58 58;
+                    max: 58 58;
+                    align: 0.0 0.5;
+                    rel1 { relative: 0.0 0.0; to: "item_background";}
+                    rel2 { relative: 1.0 1.0; to: "item_background";}
+                    color_class: transparent;
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: imageHighlight;
+                }
+                description { state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: focusTextColor;
+                }
+            }
+            part {
+                name: "favicon";
+                type: SWALLOW;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    min: 58 58;
+                    max: 58 58;
+                    align: 0.0 0.0;
+                    rel1 { relative: 0.0 0.0; to: "favicon_bg";}
+                    rel2 { relative: 1.0 1.0; to: "favicon_bg";}
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: imageHighlight;
+                }
+                description { state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: focusTextColor;
+                }
+            }
+            part {
+                name: "webpage_title";
+                scale: 1;
+                type: TEXT;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    min: 216 36;
+                    max: 216 36;
+                    align: 0 0.0;
+                    rel1 { relative: 0.0 0.0; to: "item_background"; offset: 98 0;}
+                    rel2 { relative: 1.0 1.0; to: "item_background";}
+                    color_class: titleTextColor;
+                    text {
+                        text: "Web page title";
+                        font: "font_name";
+                        size: 36;
+                        align: 0 0.5;
+                    }
+                }
+                description { state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: focusTextColor;
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: highlightTextColor;
+                }
+            }
+            part {
+                name: "webpage_url";
+                scale: 1;
+                type: TEXT;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    min: 765 27;
+                    max: 765 27;
+                    align: 0 0;
+                    rel1 { relative: 0.0 0.0; to: "item_background"; offset: 98 51;}
+                    rel2 { relative: 1.0 1.0; to: "item_background";}
+                    color_class: urlTextColor;
+                    text {
+                        text: "http:/onet.pl";
+                        font: "font_name";
+                        size: 27;
+                        align: 0 0.5;
+                    }
+                }
+                description { state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: focusTextColor;
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: highlightTextColor;
+                }
+            }
+            part {
+                name: "star_bg";
+                scale:1;
+                mouse_events: 1;
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    align: 0 0;
+                    min: 338 58;
+                    max: 338 58;
+                    rel1 { relative: 0.0 0.0; to: "bg_rect"; offset: 1519 200;}
+                    rel2 { relative: 1.0 1.0; to: "bg_rect";}
+                    color: 255 255 255 255;
+                }
+                description {
+                    state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: focusBgColor;
+                    visible: 1;
+                }
+                  description {
+                    state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    color_class: focusDelBgColor;
+                    visible: 1;
+                }
+            }
+            part{
+                name: "add_to_bookmark_text";
+                type: TEXT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    rel1 { relative: 0.0 0.0;to: "star_bg";}
+                    rel2 { relative: 1.0 1.0;to: "star_bg";}
+                    color: 0 0 0 255;
+                    text {
+                        text: "Add to bookmark";
+                        font: "Sans";
+                        size: 28;
+                        align: 0.5 0.5;
+                    }
+                }
+            }
+
+            part {
+                name: "star_over";
+                scale:1;
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0 0;
+                    fixed: 1 1;
+                    min: 338 58;
+                    max: 338 58;
+                    rel1 { relative: 0.0 0.0; to: "star_bg";}
+                    rel2 { relative: 1.0 1.0; to: "star_bg";}
+                    color_class: transparent;
+                }
+            }
+            part {
+                name: "star_click";
+                scale:1;
+                type: SWALLOW;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0 0;
+                    fixed: 1 1;
+                    min: 338 58;
+                    max: 338 58;
+                    rel1 { relative: 0.0 0.0; to: "star_over";}
+                    rel2 { relative: 1.0 1.0; to: "star_over";}
+                    color_class: transparent;
+                }
+            }
+        }
+        programs{
+            program {
+                name: "mouse_in_star_click";
+                signal: "mouse,in";
+                source: "star_click";
+                script {
+                    emit("mouse_in_star_click", "");
+                }
+            }
+            program {
+                name: "mouse_out_star_click";
+                signal: "mouse,out";
+                source: "star_click";
+                script {
+                    emit("mouse_out_star_click", "");
+                }
+            }
+            program {
+                name: "mouse_in_star";
+                signal: "mouse_in_star_click";
+                source: "";
+                action: STATE_SET "highlight" 0.0;
+                //target: "item_background";
+                //target: "favicon";
+                //target: "webpage_title";
+                //target: "webpage_url";
+                target: "star_bg";
+                //target: "star_icon";
+                //target: "over";
+            }
+            program {
+                name: "mouse_out_star";
+                signal: "mouse_out_star_click";
+                source: "";
+                action: STATE_SET "default" 0.0;
+                //target: "item_background";
+                //target: "favicon";
+                //target: "webpage_title";
+                //target: "webpage_url";
+                target: "star_bg";
+                //target: "star_icon";
+                //target: "over";
+            }
+           program {
+                name: "mouse_in_close_click";
+                signal: "mouse,in";
+                source: "close_click";
+                script {
+                    emit("mouse_in_close_click", "");
+                }
+            }
+            program {
+                name: "mouse_out_close_click";
+                signal: "mouse,out";
+                source: "close_click";
+                script {
+                    emit("mouse_out_close_click", "");
+                }
+            }
+            program {
+                name: "mouse_in_close";
+                signal: "mouse_in_close_click";
+                source: "";
+                action: STATE_SET "highlight" 0.0;
+                //target: "item_background";
+                //target: "favicon";
+                //target: "webpage_title";
+                //target: "webpage_url";
+                //target: "star_bg";
+                //target: "star_icon";
+                //target: "over";
+                target: "close_over";
+                target: "close_bg";
+                target: "close_icon";
+            }
+            program {
+                name: "mouse_out_close";
+                signal: "mouse_out_close_click";
+                source: "";
+                action: STATE_SET "default" 0.0;
+                //target: "item_background";
+                //target: "favicon";
+                //target: "webpage_title";
+                //target: "webpage_url";
+                //target: "star_bg";
+                //target: "star_icon";
+                //target: "over";
+                target: "close_over";
+                target: "close_bg";
+                target: "close_icon";
+            }
+        }
+    }
+
+    group{
+        name: "elm/button/base/hidden_button";
+        parts{
+            part{
+                name: "button";
+                type: RECT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    color: 0 0 0 0;
+                }
+            }
+            part{
+                name: "over";
+                type: RECT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    rel1 { relative: 0.0 0.0;to: "button";}
+                    rel2 { relative: 1.0 1.0;to: "button";}
+                    color: 0 0 0 0;
+                }
+            }
+        }
+        programs{
+            program {
+                name: "mouse_click";
+                signal: "mouse,clicked,1";
+                source: "over";
+                script {
+                    emit("elm,action,click", "");
+                }
+            }
+        }
+    }
+
+group { name: "elm/button/base/clickButton";
+               images {
+                       image: "ico_delete.png" COMP;
+               }
+               parts {
+                       part { name: "elm.swallow.content";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       visible: 1;
+                                       rel1.relative: 0.0 0.0;
+                       rel2.relative: 1.0 1.0;
+                       align: 0.0 0.0;
+               }
+                       }
+               }
+
+               programs {
+                       program { name: "mouse,clicked";
+                               signal: "mouse,down,1";
+                               source: "elm.swallow.content";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+               }
+}
+
+group {
+       name: "moremenu-layout";
+    data {
+        item: "highlight_focus" "off";
+    }
+
+       images {
+            image: "web_shadow.png" COMP;
+        }
+        parts {
+            part { name: "genlist_bg";
+                type: RECT;
+                mouse_events: 0;
+                description { state: "default" 0.0;
+                               visible: 1;
+                               align: 0.0 0.0;
+                               min: 1920 366;
+                               max: 1920 366;
+                                color: 70 143 254 255;
+                    rel1 {
+                                                relative: 0 0;
+                    }
+                    rel2{
+                                                relative: 1 1;
+                    }
+                }
+            }
+           part { name: "gengrid_bg";
+                type: RECT;
+                mouse_events: 0;
+                description { state: "default" 0.0;
+                               visible: 1;
+                               align: 0.0 0.0;
+                               min: 1920 714;
+                               max: 1920 714;
+                                        color: 231 231 231 255;
+                    rel1 {
+                                                relative: 0 1; to: "genlist_bg";
+                    }
+                    rel2{
+                                                relative: 1 1;
+                    }
+                }
+            }
+            part { name: "elm.swallow.genlist";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    min: 1920 366;
+                    max: 1920 366;
+                    align: 0.0 0.0;
+                    fixed: 0 0;
+                    rel1 { relative: 0.0 0.0; to: "genlist_bg";}
+                    rel2 { relative: 1.0 1.0; }
+                }
+                description {
+                    state: "hidden" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 0;
+                }
+                description {
+                    state: "visible" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                }
+             }
+            part { name: "elm.swallow.grid";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    min: 1920 714;
+                   max: 1920 714;
+                    align: 0.0 0.0;
+                    fixed: 0 0;
+                    rel1 { relative: 0.0 0.0; to: "gengrid_bg"; offset: 63 0;}
+                    rel2 { relative: 1.0 1.0; }
+                }
+                description {
+                    state: "hidden" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 0;
+                }
+                description {
+                    state: "visible" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                }
+           }
+            part { name: "elm.swallow.empty";
+                type: SWALLOW;
+                description { state: "default" 0.0;
+                align: 0.5 0.5;
+                    rel1 {
+                        relative: 0.5 0.5;
+                    }
+                    rel2 {
+                        relative: 0.5 0.5;
+                    }
+                }
+            }
+            part {name: "popup_bg";
+                type: RECT;
+                scale: 1;
+                mouse_events: 1;
+                description {state: "default" 0.0;
+                visible: 0;
+                align: 0.0 0.0;
+                min: 1920 1080;
+                max: 1920 1080;
+                fixed: 1 1;
+                color: 0 0 0 102;
+                rel1 {relative: 0.0 0.0; }
+                rel2 {relative: 1.0 1.0; }
+                }
+                description {state: "visible" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+         part { name: "popup";
+             type: SWALLOW;
+             scale: 1;
+             description { state: "default" 0.0;
+                 visible: 0;
+                 min: 740 658;
+                 max: 740 884;
+                 fixed: 1 1;
+                 align: 0.5 0.5;
+                 rel1 { relative: 0.0 0.0; to: "popup_bg";}
+                 rel2 { relative: 1.0 1.0; to: "popup_bg";}
+             }
+             description { state: "visible" 0.0;
+                 inherit: "default" 0.0;
+                 visible: 1;
+                 max: 1920 1080;
+             }
+         }
+    }
+    programs{
+        program {name: "show_popup";
+    signal: "elm,state,show"; source: "elm";
+    action: STATE_SET "visible" 0.0;
+    transition: LINEAR 0.0;
+    target: "popup";
+    target: "popup_bg";
+        }
+    program {name: "hide_popup";
+    signal: "elm,state,hide"; source: "elm";
+    action: STATE_SET "default" 0.0;
+    transition: LINEAR 0.0;
+    target: "popup";
+    target: "popup_bg";
+        }
+
+     }
+
+    }
+}
+
+group { name: "elm/gengrid/item/menu_item/default";
+       data.item: "texts" "menu_label";
+       data.item: "contents" "thumbnail_item thumbbutton_item";
+       images {
+               image: "web_frame_selected.png" COMP;
+               image: "ico_bg_round_shape_37x37.png" COMP;
+       }
+   styles {
+      style { name: "textblock_white";
+         base: "font=Sans font_size="20" color=#5c5c5c";
+      }
+   }
+   styles {
+      style { name: "textblock_white_bold";
+         base: "font=Sans:style=Bold font_size="20" color=#5c5c5c";
+      }
+   }
+       parts {
+               part { name: "thumbnail_bg";
+                       type: RECT;
+                       mouse_events: 0;
+                       description { state: "default" 0.0;
+                               min: 338 294;
+                               max: 338 294;
+                               visible: 1;
+                               color: 255 255 255 255;
+                               rel1.offset: -26 -26;
+                       }
+                       description { state: "selected";
+                               inherit: "default" 0.0;
+                               color: 70 143 254 255;
+                       }
+               }
+
+               part { name: "thumbnail_item";
+                       type: SWALLOW;
+                       description { state: "default" 0.0;
+                               fixed: 1 0;
+                               align: 0.0 0.0;
+                               //color : 255 255 255 255;
+                               min: 338 207;
+                               max: 338 207;
+                               rel1 {
+                                       relative: 0.0  0.0; to: "thumbnail_bg";
+                               }
+                               rel2 {
+                                       relative: 1.0  1.0; to: "thumbnail_bg";
+                               }
+                       }
+                       description { state: "selected";
+                               inherit: "default" 0.0;
+                       }
+               }
+
+               part { name: "highlight_focus";
+                       type: IMAGE;
+                       description { state: "default" 0.0;
+                               rel1 {
+                                       to: "thumbnail_item";
+                                       relative: 0.0  0.0;
+                               }
+                               rel2 {
+                                       to: "thumbnail_item";
+                                       relative: 1.0  1.0;
+                               }
+                               image.normal: "web_frame_selected.png";
+                               image.border: 8 8 8 0;
+                               image.border_scale: 1;
+                               image.middle: NONE;
+                               visible: 0;
+                       }
+                       description { state: "selected";
+                               inherit: "default" 0.0;
+                               visible: 1;
+                       }
+               }
+
+               part { name: "menu_label_bg";
+                       type: RECT;
+                       description { state: "default" 0.0;
+                               min: 338 87;
+                               max: 338 87;
+                               align: 0.0 0.0;
+                               color: 255 255 255 255;
+                               rel1 {
+                                       to: "thumbnail_item";
+                                       relative: 0.0  1.0;
+                               }
+                               rel2 {
+                                       relative: 1.0  1.0;
+                               }
+                       }
+                       description { state: "selected" 0.0;
+                               inherit: "default" 0.0;
+                               color: 70 143 254 255;
+                       }
+               }
+
+               part { name: "menu_label";
+                       type: TEXT;
+                       description { state: "default" 0.0;
+                               min: 338 87;
+                               max: 338 87;
+                               align: 0 0;
+                               fixed: 0 0;
+                               visible: 1;
+                               rel1 {
+                                       to: "menu_label_bg";
+                                       relative: 0.0 0.0;
+                               }
+                               rel2 {
+                                       to: "menu_label_bg";
+                                       relative: 1.0  1.0;
+                               }
+                           color: 92 92 92 255; 
+                           text {
+                               text: "Web page title";
+                               font: "Sans";
+                               size: 28;
+                               align: 0.5 0.5;
+                           }
+                        }
+                       description { state: "selected" 0.0;
+                           inherit: "default" 0.0;
+                           color: 255 255 255 255;
+                       }
+               }
+
+               part { name: "thumbbutton_item";
+                       type: SWALLOW;
+                       description { state: "default" 0.0;
+                               rel1.to: "thumbnail_bg";
+                               rel2.to: "thumbnail_bg";
+                       }
+               }
+
+               part { name: "over2";
+                       type: RECT;
+                       mouse_events: 1;
+                       repeat_events: 1;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               rel1.to: "thumbnail_bg";
+                               rel2.to: "menu_label_bg";
+                       }
+               }
+               part { name: "over3";
+                       type: RECT;
+                       mouse_events: 1;
+                       repeat_events: 1;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               rel1.to: "menu_label_bg";
+                               rel2.to: "menu_label_bg";
+                       }
+               }
+       }
+
+       programs{
+               program { name: "mouse_in";
+                       signal: "mouse,in";
+                       source: "over2";
+                       action: STATE_SET "selected" 0.0;
+                       target: "menu_label_bg";
+                       target: "highlight_focus";
+                       target: "thumbnail_bg";
+                       target: "menu_label";
+               }
+               program { name: "mouse_out";
+                       signal: "mouse,out";
+                       source: "over2";
+                       action: STATE_SET "default" 0.0;
+                       target: "menu_label_bg";
+                       target: "highlight_focus";
+                       target: "thumbnail_bg";
+                       target: "menu_label";
+               }
+       }
+}
+}
diff --git a/services/MoreMenuUI/edc/NewFolderPopup.edc b/services/MoreMenuUI/edc/NewFolderPopup.edc
new file mode 100644 (file)
index 0000000..7be85ae
--- /dev/null
@@ -0,0 +1,463 @@
+#define CONTENT_HEIGHT 99;
+#define POPUP_EDITFIELD_LAYOUT_MINMAX_HEIGHT_INC 40
+#define POPUP_CONTENT_DEFAULT_PADDING_LEFT_MIN_INC 65
+#define POPUP_CONTENT_DEFAULT_PADDING_RIGHT_MIN_INC 65
+#define CONTENT_BG_HEIGHT (CONTENT_HEIGHT+294);
+#define DEBUG_RECT_OVER(over_part, r, g, b)                         \
+    part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__));   \
+                                                                    \
+scale:1;                                                            \
+        type : RECT;                                                \
+        repeat_events: 1;                                           \
+        description {                                               \
+            state: "default" 0.0;                                   \
+            visible: 1;                                             \
+            color: r g b 128;                                       \
+            rel1 { to: over_part; relative: 0 0; }                  \
+            rel2 { to: over_part; relative: 1 1; }                  \
+        }                                                           \
+    }
+#define SPACER_ITEM_BR(spacer_name, W, H, elem)                     \
+    part { name: spacer_name;                                       \
+        type: RECT;                                                 \
+        scale:1;                                                    \
+        description {                                               \
+            state: "default" 0.0;                                   \
+            visible: 1;                                             \
+            align: 0 0;                                             \
+            min: W H;                                               \
+            max: W H;                                               \
+            fixed: 1 1;                                             \
+            color: 227 227 227 255;                                  \
+            rel1 { relative: 0.0 1.0; to: elem;}                    \
+            rel2 { relative: 1.0 1.0; }                    \
+        }                                                           \
+        description {                                               \
+          state: "focus" 0.0;                                       \
+          inherit: "default" 0.0;                                   \
+            color: 0 119 246 255;                                   \
+        }                                                           \
+    }
+#define SPACER_ITEM_HOR(spacer_name, W, H, elem)                     \
+    part { name: spacer_name;                                       \
+        type: RECT;                                                 \
+        scale:1;                                                    \
+        description {                                               \
+            state: "default" 0.0;                                   \
+            visible: 1;                                             \
+            align: 0 0;                                             \
+            min: W H;                                               \
+            max: W H;                                               \
+            fixed: 1 1;                                             \
+            color: 227 227 227 255;                                  \
+            rel1 { relative: 0.0 0.0; to: elem;}                    \
+            rel2 { relative: 1.0 1.0; to: elem;}                    \
+        }                                                           \
+        description {                                               \
+          state: "focus" 0.0;                                       \
+          inherit: "default" 0.0;                                   \
+            color: 0 119 246 255;                                   \
+        }                                                           \
+    }                                                               \
+
+collections{
+    group { name: "new_folder_popup";
+        images{
+            image: "modal_dialogs_bg.png" COMP;
+            image: "modal_dialogs_title_bg.png" COMP;
+        }
+        parts{
+part{ name: "content_bg";
+            type: RECT;
+            scale: 1;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                color: 255 255 255 255;
+                align: 0.5 0.5;
+                min: 740 378;
+                max: 740 378;
+                rel1 {relative: 0.0 0.0;}
+                rel2 {relative: 1.0 1.0;}
+              }
+          }
+         part{ name: "title_bg";
+                type: RECT;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    color: 255 255 255 255;
+                    min: 740 144;
+                    max: 740 144;
+                    align: 0.0 0;
+                    rel1 {relative: 0.0 0.0; to: "content_bg"; offset: 0 0;}
+                    rel2 {relative: 1.0 1.0; to: "content_bg";}
+                }
+            }
+         part{ name: "title_text_bm";
+                type: TEXT;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    rel1 {relative: 0.0 0.0; to: "title_bg"; offset: 40 46;}
+                    rel2 {relative: 1.0 1.0; to: "title_bg"; offset: -40 0;}
+                    color: 51 51 51 255;
+                    text{
+                        text: "Add New Folder";
+                        font: "Sans";
+                        size: 42;
+                        align: 0.5 0.0;
+                    }
+                }
+            }
+           part{ name: "sub_title_text_bm";
+                type: TEXT;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    rel1 {relative: 0.0 0.0; to: "title_bg"; offset: 40 112;}
+                    rel2 {relative: 1.0 1.0; to: "title_bg"; offset: -40 0;}
+                    color: 104 104 104 255;
+                    text{
+                        text: "Add folder for adding to bookmark";
+                        font: "Sans";
+                        size: 32;
+                        align: 0.5 0.0;
+                    }
+                }
+            }
+            part{ name: "content";
+                type: SWALLOW;
+                scale: 1;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    rel1 {relative: 0.0 1.0; to: "title_bg"; offset: 100 0;}
+                    rel2 {relative: 1.0 1.0;}
+                    fixed: 1 1;
+                    color: 0 0 0 255;
+                    align: 0.0 0.0;
+                    min: 540 144;
+                    max: 540 144;
+                }
+            }
+            SPACER_ITEM_BR("horizontal_line", 740, 1, "content")
+            part{
+                name: "buttons";
+                type: SWALLOW;
+                scale: 1;
+                description{
+                    state: "default" 0.0;
+                    visible: 1;
+                    rel1 {relative: 0.0 1.0; to: "content"; offset: -100 1;}
+                    rel2 {relative: 1.0 1.0;}
+                    align: 0.0 0.0;
+                    min: 740 90;
+                    max: 740 90;
+                }
+            }
+        }
+    }
+    /*****************************************************************/
+    group {
+        name: "elm/button/base/bookmark_button";
+        parts {
+            part {
+                name: "bg";
+                type: RECT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    align: 0.5 0.5;
+                    fixed: 1 1;
+                    color: 225 225 225 255;
+                    min: 370 90;
+                    max: 370 90;
+                }
+                description { state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    color: 0 119 246 255;
+                }
+                description { state: "dim" 0.0;
+                    inherit: "default" 0.0;
+                    color: 225 225 225 102;
+                }
+            }
+            SPACER_ITEM_HOR("vertical_line", 1, 90,"bg")
+            part {
+                name: "elm.text";
+                type: TEXT;
+                scale: 1;
+                description { state: "default" 0.0;
+                    visible: 1;
+                    fixed: 1 1;
+                    align: 0.5 0.5;
+                    min: 360 70;
+                    rel1 { relative: 0.0 0.0; to: "bg"; offset: 30 0;}
+                    rel2 { relative: 1.0 1.0; to: "bg"; offset: -30 0;}
+                    color: 87 87 87 255;
+                    text {
+                        text: "dshfj";
+                        font: "font_name";
+                        size: 36;
+                        align: 0.5 0.5;
+                        min: 1 1;
+                        }
+                }
+                description { state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    color: 255 255 255 255;
+                    text.font: "Tizen:style=Bold";
+                }
+                description { state: "dim" 0.0;
+                    inherit: "default" 0.0;
+                    color: 89 89 89 102;
+                }
+            }
+            part {
+                name: "over";
+                scale:1;
+                mouse_events: 1;
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    rel1 { relative: 0.0 0.0; to: "bg";}
+                    rel2 { relative: 1.0 1.0; to: "bg";}
+                    color: 0 0 0 0;
+                }
+            }
+        }
+        programs{
+            program {
+                name: "mouse_in";
+                signal: "mouse,in";
+                source: "over";
+                action: STATE_SET "focus" 0.0;
+                target: "elm.text";
+                target: "bg";
+                script {
+                    new st[31];
+                    new Float:vl;
+                    get_state(PART:"elm.text",  st,  30,  vl);
+                    if(!strcmp(st,  "default")) {
+                        set_state(PART:"bg",  "focus",  0.0);
+                        set_state(PART:"elm.text",  "focus",  0.0);
+                    }
+                }
+            }
+            program {
+                name: "mouse_out";
+                signal: "mouse,out";
+                source: "over";
+                action: STATE_SET "default" 0.0;
+                target: "elm.text";
+                target: "bg";
+                script {
+                    new st[31];
+                    new Float:vl;
+                    get_state(PART:"elm.text",  st,  30,  vl);
+                    if(!strcmp(st,  "focus")) {
+                        set_state(PART:"bg",  "visible",  0.0);
+                        set_state(PART:"elm.text",  "visible",  0.0);
+                    }
+                }
+            }
+            program {
+                name: "mouse_click";
+                signal: "mouse,clicked,1";
+                source: "over";
+                script {
+                    emit("elm,action,click", "");
+                }
+            }
+            program {
+                name: "disable";
+                signal: "elm,state,disabled";
+                source: "elm";
+                action: STATE_SET "dim" 0.0;
+                target: "elm.text";
+                target: "bg";
+            }
+            program {
+                name: "enable";
+                signal: "elm,state,enabled";
+                source: "elm";
+                action: STATE_SET "default" 0.0;
+                target: "elm.text";
+                target: "bg";
+            }
+        }
+    }
+group { name: "elm/entry/selection/browser_entry";
+    parts {
+        part { name: "bg";
+            scale:1;
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+                color: 255 255 255 255;
+            }
+        }
+    }
+}
+group { name: "elm/entry/cursor/browser_entry";
+ parts {
+        part { name: "bg";
+            scale:1;
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+                color: 22 120 237 255;
+                min: 2 36;
+                max: 2 36;
+                visible: 0;
+            }
+            description {
+                state: "focused" 0.0;
+                inherit: "default" 0.0;
+                visible: 1;
+            }
+        }
+    }
+    programs {
+        program { name: "focused";
+            signal: "elm,action,focus";
+            source: "elm";
+            action: STATE_SET "focused" 0.0;
+            target: "bg";
+        }
+        program { name: "unfocused";
+            signal: "elm,action,unfocus";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "bg";
+        }
+    }
+}
+  group {
+    name: "elm/entry/base-single/uri_entry_popup";
+    styles {
+        style {
+            name: "browser-entry-uri-style-unselected";
+            base: "font=Sans:style=SVD_Medium font_size="34" wrap=none color=#515151";
+        }
+        style {
+            name: "browser-entry-uri-style-selected";
+            base: "font=Sans:style=SVD_Medium font_size="34" wrap=none color=#dddddd";
+        }
+    }
+    data {
+        item: focus_highlight "off";
+    }
+    parts {
+
+    part { name: "bg";
+            scale:1;
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+                color: 255 255 255 255;
+            }
+        }
+
+    part {
+            name: "elm.guide";
+            scale:1;
+            type: TEXTBLOCK;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+                rel1.relative: 0.0 0.0;
+                rel2.relative: 1.0 1.0;
+                align: 0.0 0.0;
+                text {
+                    style: "browser-entry-uri-style-unselected";
+                    min: 0 1;
+                }
+            }
+            description { state: "hidden" 0.0;
+                inherit: "default" 0.0;
+                visible: 0;
+            }
+        }
+            part { name: "label.text.clip";
+            scale:1;
+            type: RECT;
+            description {
+                state: "default" 0.0;
+            }
+        }
+        part {
+            name: "elm.text";
+            scale:1;
+            multiline: 0;
+            entry_mode: EDITABLE;
+            select_mode: DEFAULT;
+            cursor_mode: BEFORE;
+            type: TEXTBLOCK;
+            clip_to: "label.text.clip";
+            source: "elm/entry/selection/browser_entry";
+            source4: "elm/entry/cursor/browser_entry";
+            description { state: "default" 0.0;
+                rel1.relative: 0.0 0.0;
+                rel2.relative: 1.0 1.0;
+                align: 0.0 0.0;
+                text {
+                    style: "browser-entry-uri-style-unselected";
+                    min: 0 1;
+                }
+            }
+        }
+    }
+    programs {
+        program { name: "focus";
+            signal: "load";
+            source: "";
+            action: FOCUS_SET;
+            target: "elm.text";
+        }
+        program { name: "gdisabled";
+            signal: "elm,guide,disabled";
+            source: "elm";
+            action: STATE_SET "hidden" 0.0;
+            target: "elm.guide";
+        }
+        program { name: "genabled";
+            signal: "elm,guide,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.guide";
+        }
+    }
+}//group
+
+group {
+        name: "popup_input_text";
+        parts {
+            part {
+                name: "elm.swallow.content";
+                type: SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    min: 0 POPUP_EDITFIELD_LAYOUT_MINMAX_HEIGHT_INC;
+                    max: -1 POPUP_EDITFIELD_LAYOUT_MINMAX_HEIGHT_INC;
+                    align: 0.0 0.5;
+                    min: 0   0 ;
+                    max: 540  100 ;
+                    rel1 {
+                        relative: 0.0 0.0 ;
+                    }
+                    rel2 {
+                        relative: 1.0 1.0;
+                   }
+                }
+            }
+      }
+    }
+
+
+}
diff --git a/services/MoreMenuUI/edc/error.edc b/services/MoreMenuUI/edc/error.edc
new file mode 100644 (file)
index 0000000..0291971
--- /dev/null
@@ -0,0 +1,144 @@
+collections {
+    images {
+        image: "web_browsing_icon_error.png" COMP;
+    }
+    group { name: "error_message";
+    styles {
+        style { name: "mssage_style";
+            base: "font=Sans font_size=35 color=#d3d3d3 wrap=word align=0.5";
+        }
+        style { name: "mssage_hint_style";
+            base: "font=Sans font_size=24 color=#868686 wrap=word align=0.5";
+        }
+    }
+    parts {
+        part{
+            name: "message_background";
+            type: RECT;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                rel1.relative: 0 0;
+                rel2.relative: 1 1;
+                color: 42 50 64 255;
+            }
+        }
+        part{
+            name: "error_message_background";
+            type:RECT;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                min: 1582 730;
+                max: 1582 730;
+                fixed: 1 1;
+                align: 0.5 0.5;
+                color: 30 38 50 153;
+            }
+        }
+        part{
+            name: "err_ico";
+            type: IMAGE;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                min: 140 140;
+                max:140 140;
+                fixed: 1 1;
+                align: 0.5 0;
+                rel1{
+                    relative: 0 0;
+                    offset:0 163;
+                    to: "error_message_background";
+                }
+                rel2{
+                    relative: 1 1;
+                    to: "error_message_background";
+                    }
+                image{
+                    normal: "web_browsing_icon_error.png";
+                }
+            }
+        }
+
+        part{
+            name: "error_text";
+            type: TEXTBLOCK;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                min: 1502 96;
+                max: 1502 96;
+                //color: 211 211 211 255;
+                align: 0.5 0;
+                rel1{
+                    relative: 0 1;
+                    to_x: "error_message_background";
+                    to_y: "err_ico";
+                }
+                rel2{
+                    relative: 1 1;
+                    to: "error_message_background";
+                }
+                text{
+                    style: "mssage_style";
+                    text: "Server not found.<br/>sdf Please check the followings:";
+                    //min: 0 0;
+                    //max: 1 1;
+                    //align: 1 0;
+                    //size: 35;
+                }
+            }
+        }
+
+
+        part{
+            name: "error_hint";
+            type: TEXTBLOCK;
+            description{
+                state: "default" 0.0;
+                visible: 1;
+                fixed: 1 1;
+                min: 1502 117;
+                max: 1502 117;
+                color: 134 134 134 255;
+                align: 0.5 0;
+                rel1{
+                    relative: 0 1;
+                    to_x: "error_message_background";
+                    to_y: "error_text";
+                }
+                rel2{
+                    relative: 1 1;
+                    to: "error_message_background";
+                }
+                text{
+                    max: 0 1;
+                    style: "mssage_hint_style";
+                    text: "Check for any typing error in URL. <br/>"
+                    "Check your network settings.<br/>"
+                    "Try again later.<br/>"
+                    "Click refresh to reload.";
+                }
+            }
+        }
+    }
+/*
+      programs {
+         program { name: "mouse_down";
+            signal: "mouse,down,1";
+            source: "logo";
+            action: STATE_SET "hide" 0.0;
+            target: "logo";
+         }
+         program { name: "mouse_up";
+            signal: "mouse,up,1";
+            source: "logo";
+            action: STATE_SET "default" 0.0;
+            target: "logo";
+         }
+      }
+*/
+   }
+}
diff --git a/services/MoreMenuUI/images/btn_bar_new_dis.png b/services/MoreMenuUI/images/btn_bar_new_dis.png
new file mode 100644 (file)
index 0000000..af49c5a
Binary files /dev/null and b/services/MoreMenuUI/images/btn_bar_new_dis.png differ
diff --git a/services/MoreMenuUI/images/btn_bar_new_foc.png b/services/MoreMenuUI/images/btn_bar_new_foc.png
new file mode 100644 (file)
index 0000000..2a5c00b
Binary files /dev/null and b/services/MoreMenuUI/images/btn_bar_new_foc.png differ
diff --git a/services/MoreMenuUI/images/btn_bar_new_nor.png b/services/MoreMenuUI/images/btn_bar_new_nor.png
new file mode 100644 (file)
index 0000000..352a2f4
Binary files /dev/null and b/services/MoreMenuUI/images/btn_bar_new_nor.png differ
diff --git a/services/MoreMenuUI/images/btn_bar_stop_nor.png b/services/MoreMenuUI/images/btn_bar_stop_nor.png
new file mode 100644 (file)
index 0000000..c5cdc11
Binary files /dev/null and b/services/MoreMenuUI/images/btn_bar_stop_nor.png differ
diff --git a/services/MoreMenuUI/images/favicon.png b/services/MoreMenuUI/images/favicon.png
new file mode 100644 (file)
index 0000000..15ac957
Binary files /dev/null and b/services/MoreMenuUI/images/favicon.png differ
diff --git a/services/MoreMenuUI/images/ic_add_bookmark.png b/services/MoreMenuUI/images/ic_add_bookmark.png
new file mode 100644 (file)
index 0000000..0ea3265
Binary files /dev/null and b/services/MoreMenuUI/images/ic_add_bookmark.png differ
diff --git a/services/MoreMenuUI/images/ic_more_bookmark_foc.png b/services/MoreMenuUI/images/ic_more_bookmark_foc.png
new file mode 100644 (file)
index 0000000..7cfbba9
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_bookmark_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_bookmark_nor.png b/services/MoreMenuUI/images/ic_more_bookmark_nor.png
new file mode 100644 (file)
index 0000000..addcd5a
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_bookmark_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_desktopview_foc.png b/services/MoreMenuUI/images/ic_more_desktopview_foc.png
new file mode 100644 (file)
index 0000000..21bcc68
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_desktopview_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_desktopview_nor.png b/services/MoreMenuUI/images/ic_more_desktopview_nor.png
new file mode 100644 (file)
index 0000000..462151f
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_desktopview_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_exit_foc.png b/services/MoreMenuUI/images/ic_more_exit_foc.png
new file mode 100644 (file)
index 0000000..779fc48
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_exit_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_exit_nor.png b/services/MoreMenuUI/images/ic_more_exit_nor.png
new file mode 100644 (file)
index 0000000..b6dcd88
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_exit_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_focusmode_foc.png b/services/MoreMenuUI/images/ic_more_focusmode_foc.png
new file mode 100644 (file)
index 0000000..f5fdac8
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_focusmode_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_focusmode_nor.png b/services/MoreMenuUI/images/ic_more_focusmode_nor.png
new file mode 100644 (file)
index 0000000..f7a61fb
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_focusmode_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_history_foc.png b/services/MoreMenuUI/images/ic_more_history_foc.png
new file mode 100644 (file)
index 0000000..a397ea0
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_history_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_history_nor.png b/services/MoreMenuUI/images/ic_more_history_nor.png
new file mode 100644 (file)
index 0000000..698a8cf
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_history_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_minibrowser_foc.png b/services/MoreMenuUI/images/ic_more_minibrowser_foc.png
new file mode 100644 (file)
index 0000000..4f37952
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_minibrowser_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_minibrowser_nor.png b/services/MoreMenuUI/images/ic_more_minibrowser_nor.png
new file mode 100644 (file)
index 0000000..0c29899
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_minibrowser_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_mobileview_foc.png b/services/MoreMenuUI/images/ic_more_mobileview_foc.png
new file mode 100644 (file)
index 0000000..e95981d
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_mobileview_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_mobileview_nor.png b/services/MoreMenuUI/images/ic_more_mobileview_nor.png
new file mode 100644 (file)
index 0000000..91aebfe
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_mobileview_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_pointermode_foc.png b/services/MoreMenuUI/images/ic_more_pointermode_foc.png
new file mode 100644 (file)
index 0000000..8785d75
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_pointermode_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_pointermode_nor.png b/services/MoreMenuUI/images/ic_more_pointermode_nor.png
new file mode 100644 (file)
index 0000000..7a32e22
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_pointermode_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_readermode_foc.png b/services/MoreMenuUI/images/ic_more_readermode_foc.png
new file mode 100644 (file)
index 0000000..d257732
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_readermode_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_readermode_nor.png b/services/MoreMenuUI/images/ic_more_readermode_nor.png
new file mode 100644 (file)
index 0000000..b8d4ee2
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_readermode_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_setting_foc.png b/services/MoreMenuUI/images/ic_more_setting_foc.png
new file mode 100644 (file)
index 0000000..a881c62
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_setting_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_setting_nor.png b/services/MoreMenuUI/images/ic_more_setting_nor.png
new file mode 100644 (file)
index 0000000..284d423
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_setting_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_share_foc.png b/services/MoreMenuUI/images/ic_more_share_foc.png
new file mode 100644 (file)
index 0000000..dadf09b
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_share_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_share_nor.png b/services/MoreMenuUI/images/ic_more_share_nor.png
new file mode 100644 (file)
index 0000000..2863187
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_share_nor.png differ
diff --git a/services/MoreMenuUI/images/ic_more_zoom_foc.png b/services/MoreMenuUI/images/ic_more_zoom_foc.png
new file mode 100644 (file)
index 0000000..4433579
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_zoom_foc.png differ
diff --git a/services/MoreMenuUI/images/ic_more_zoom_nor.png b/services/MoreMenuUI/images/ic_more_zoom_nor.png
new file mode 100644 (file)
index 0000000..de75812
Binary files /dev/null and b/services/MoreMenuUI/images/ic_more_zoom_nor.png differ
diff --git a/services/MoreMenuUI/images/ico_bg_round_shape_37x37.png b/services/MoreMenuUI/images/ico_bg_round_shape_37x37.png
new file mode 100644 (file)
index 0000000..00182ed
Binary files /dev/null and b/services/MoreMenuUI/images/ico_bg_round_shape_37x37.png differ
diff --git a/services/MoreMenuUI/images/ico_delete.png b/services/MoreMenuUI/images/ico_delete.png
new file mode 100644 (file)
index 0000000..92f42cc
Binary files /dev/null and b/services/MoreMenuUI/images/ico_delete.png differ
diff --git a/services/MoreMenuUI/images/modal_dialogs_bg.png b/services/MoreMenuUI/images/modal_dialogs_bg.png
new file mode 100644 (file)
index 0000000..6ce4506
Binary files /dev/null and b/services/MoreMenuUI/images/modal_dialogs_bg.png differ
diff --git a/services/MoreMenuUI/images/modal_dialogs_title_bg.png b/services/MoreMenuUI/images/modal_dialogs_title_bg.png
new file mode 100644 (file)
index 0000000..36aaab4
Binary files /dev/null and b/services/MoreMenuUI/images/modal_dialogs_title_bg.png differ
diff --git a/services/MoreMenuUI/images/web_frame_selected.png b/services/MoreMenuUI/images/web_frame_selected.png
new file mode 100644 (file)
index 0000000..4470ca4
Binary files /dev/null and b/services/MoreMenuUI/images/web_frame_selected.png differ
diff --git a/services/MoreMenuUI/images/web_shadow.png b/services/MoreMenuUI/images/web_shadow.png
new file mode 100644 (file)
index 0000000..f9018b0
Binary files /dev/null and b/services/MoreMenuUI/images/web_shadow.png differ
index 6234cb8..4a5c6d7 100644 (file)
@@ -79,8 +79,7 @@ add_dependencies(${PROJECT_NAME} SessionStorage)
 target_link_libraries(${PROJECT_NAME} SimpleURI)
 target_link_libraries(${PROJECT_NAME} StorageService)
 target_link_libraries(${PROJECT_NAME} HistoryService)
-#MERGE_ME
-#target_link_libraries(${PROJECT_NAME} MoreMenuUI)
+target_link_libraries(${PROJECT_NAME} MoreMenuUI)
 target_link_libraries(${PROJECT_NAME} MainUI)
 #MERGE_ME
 #target_link_libraries(${PROJECT_NAME} HistoryUI)
index e585130..d5e6a6d 100644 (file)
@@ -64,8 +64,8 @@ SimpleUI::SimpleUI()
     , m_popup(nullptr)
 #if MERGE_ME
     , m_settings()
-    , m_moreMenuUI()
 #endif
+    , m_moreMenuUI()
     , m_tabUI()
     , m_bookmarkManagerUI()
     , m_mainUI()
@@ -1118,7 +1118,6 @@ void SimpleUI::closeSettingsUI(const std::string& str)
 
 void SimpleUI::showMoreMenu()
 {
-#if MERGE_ME
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     bool current_tab_as_new_tab = isHomePageActive() || (m_historyService->getHistoryItemsCount() == 0);
     if(!m_moreMenuUI){
@@ -1140,15 +1139,12 @@ void SimpleUI::showMoreMenu()
         m_moreMenuUI->showCurrentTab(current_tab_as_new_tab ? nullptr : m_historyService->getHistoryItems().front());
        BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     }
-#endif
 }
 
 void SimpleUI::closeMoreMenu(const std::string& str)
 {
-#if MERGE_ME
        BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
        m_moreMenuUI.reset() ;
-#endif
 }
 
 void SimpleUI::showBookmarkManagerMenu()
index a6c4acc..9d64421 100644 (file)
@@ -34,8 +34,8 @@
 
 // components
 #include "AbstractWebEngine.h"
-#if MERGE_ME
 #include "MoreMenuUI.h"
+#if MERGE_ME
 #include "HistoryUI.h"
 #include "SettingsUI.h"
 #endif
@@ -292,9 +292,7 @@ private:
     std::shared_ptr<ButtonBar> rightButtonBar;
     std::shared_ptr<tizen_browser::interfaces::AbstractFavoriteService> m_favoriteService;
     std::shared_ptr<tizen_browser::services::HistoryService> m_historyService;
-#if MERGE_ME
     std::shared_ptr<tizen_browser::base_ui::MoreMenuUI> m_moreMenuUI;
-#endif
     std::shared_ptr<tizen_browser::base_ui::BookmarkManagerUI> m_bookmarkManagerUI;
     std::shared_ptr<tizen_browser::base_ui::MainUI> m_mainUI;
 #if MERGE_ME