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

Change-Id: I196746e4153d0b9ce86b562fbcd82f33068eef14

55 files changed:
core/AbstractInterfaces/AbstractFavoriteService.h
core/Tools/BookmarkItem.cpp
core/Tools/BookmarkItem.h
services/BookmarkManagerUI/AddNewFolderPopup.cpp [new file with mode: 0644]
services/BookmarkManagerUI/AddNewFolderPopup.h [new file with mode: 0644]
services/BookmarkManagerUI/BookmarkManagerUI.cpp [new file with mode: 0644]
services/BookmarkManagerUI/BookmarkManagerUI.h [new file with mode: 0644]
services/BookmarkManagerUI/CMakeLists.txt [new file with mode: 0644]
services/BookmarkManagerUI/edc/AddNewFolderPopup.edc [new file with mode: 0644]
services/BookmarkManagerUI/edc/BookmarkManagerUI.edc [new file with mode: 0644]
services/BookmarkManagerUI/images/btn_bar_new_dis.png [new file with mode: 0644]
services/BookmarkManagerUI/images/btn_bar_new_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/btn_bar_new_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/btn_bar_stop_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/favicon.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_add_bookmark.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_bookmark_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_bookmark_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_desktopview_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_desktopview_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_exit_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_exit_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_focusmode_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_focusmode_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_history_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_history_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_minibrowser_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_minibrowser_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_mobileview_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_mobileview_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_pointermode_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_pointermode_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_readermode_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_readermode_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_setting_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_setting_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_share_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_share_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_zoom_foc.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_more_zoom_nor.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_thumbnail_folder.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_thumbnail_folder_all.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ic_thumbnail_folder_mark.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ico_bg_round_shape_37x37.png [new file with mode: 0644]
services/BookmarkManagerUI/images/ico_delete.png [new file with mode: 0644]
services/BookmarkManagerUI/images/modal_dialogs_bg.png [new file with mode: 0644]
services/BookmarkManagerUI/images/modal_dialogs_title_bg.png [new file with mode: 0644]
services/BookmarkManagerUI/images/web_frame_selected.png [new file with mode: 0644]
services/BookmarkManagerUI/images/web_shadow.png [new file with mode: 0644]
services/BookmarkService/BookmarkService.cpp
services/BookmarkService/BookmarkService.h
services/CMakeLists.txt
services/SimpleUI/CMakeLists.txt
services/SimpleUI/SimpleUI.cpp
services/SimpleUI/SimpleUI.h

index 5c24c4f63351ea566f6d03ea62316acb916dfb4b..4d3292051620e74d595c523d19765a752a645d20 100644 (file)
@@ -89,7 +89,7 @@ public:
      *
      * @return list of bookmark items in folder with id, folder_id
      */
-    virtual std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > getBookmarks(int folder_id = 0)= 0;
+    virtual std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > getBookmarks(int folder_id = -1)= 0;
 
     /**
      * @brief Get bookmark folders from platform service and store it in private m_bookmarkFoldersList
index 3f994fdbc376775de22fd09b4208fe23a380b950..b427afd99fcdebea49c794c8927b0d7a62cd20d0 100644 (file)
@@ -31,23 +31,24 @@ namespace services{
 
 BookmarkItem::BookmarkItem()
 : m_saved_id(0)
-, m_url(std::string())
-, m_tittle(std::string())
-, m_thumbnail(std::shared_ptr<tizen_browser::tools::BrowserImage>())
-, m_favicon(std::shared_ptr<tizen_browser::tools::BrowserImage>())
+, m_url()
+, m_title()
+, m_note()
+, m_thumbnail(std::make_shared<tizen_browser::tools::BrowserImage>())
+, m_favicon(std::make_shared<tizen_browser::tools::BrowserImage>())
 {
 }
 
 BookmarkItem::BookmarkItem(
                 const std::string& url,
-                const std::string& tittle,
+                const std::string& title,
                 const std::string& note,
                 unsigned int dir,
                 unsigned int id
                         )
 : m_saved_id(id)
 , m_url(url)
-, m_tittle(tittle)
+, m_title(title)
 , m_note(note)
 , m_directory(dir)
 {
index 84fe48958973a044a8be7a56e8334b3b7a2949f2..fd34070b6f4216e3b53c7d83dad0ca3e9429ee23 100644 (file)
@@ -36,7 +36,7 @@ public:
     BookmarkItem();
     BookmarkItem(
         const std::string& url,
-        const std::string& tittle,
+        const std::string& title,
         const std::string& note,
         unsigned int dir = 0,
         unsigned int id = 0
@@ -46,8 +46,8 @@ public:
     void setAddress(const std::string & url) { m_url = url; };
     std::string getAddress() const { return m_url; };
 
-    void setTittle(const std::string & tittle) { m_tittle = tittle; };
-    std::string getTittle() const { return m_tittle; };
+    void setTittle(const std::string & tittle) { m_title = tittle; };
+    std::string getTittle() const { return m_title; };
 
     void setNote(const std::string& note){m_note = note;};
     std::string getNote() const { return m_note;};
@@ -76,7 +76,7 @@ public:
 private:
     unsigned int m_saved_id;
     std::string m_url;
-    std::string m_tittle;
+    std::string m_title;
     std::string m_note;
     std::shared_ptr<tizen_browser::tools::BrowserImage> m_thumbnail;
     std::shared_ptr<tizen_browser::tools::BrowserImage> m_favicon;
diff --git a/services/BookmarkManagerUI/AddNewFolderPopup.cpp b/services/BookmarkManagerUI/AddNewFolderPopup.cpp
new file mode 100644 (file)
index 0000000..10b6114
--- /dev/null
@@ -0,0 +1,142 @@
+
+
+#include <Elementary.h>
+#include <boost/concept_check.hpp>
+#include <vector>
+
+#include "Tools/EflTools.h"
+#include "BrowserLogger.h"
+
+#include "AddNewFolderPopup.h"
+#include "BrowserLogger.h"
+#include "ServiceManager.h"
+#include "AbstractMainWindow.h"
+
+
+namespace tizen_browser{
+namespace base_ui{
+
+AddNewFolderPopup::AddNewFolderPopup(Evas_Object* main_layout) :
+    m_popup(nullptr),
+    m_cancel_button(nullptr),
+    m_editfield_entry(nullptr),
+    m_ok_button(nullptr),
+    m_mainLayout(main_layout)
+{
+}
+
+AddNewFolderPopup::AddNewFolderPopup(Evas_Object *main_layout, Evas_Object *content, const std::string& message,
+                                     const std::string& title, const std::string& okButtonText,
+                                     const std::string& cancelButtonText) :
+    m_popup(nullptr),
+    m_cancel_button(nullptr),
+    m_editfield_entry(nullptr),
+    m_ok_button(nullptr),
+    m_content(content),
+    m_message(message),
+    m_title(title),
+    m_okButtonText(okButtonText),
+    m_cancelButtonText(cancelButtonText),
+    m_mainLayout(main_layout)
+{
+
+}
+
+void AddNewFolderPopup::setTitle(const std::string& title)
+{
+    m_title = title;
+}
+
+void AddNewFolderPopup::setMessage(const std::string& message)
+{
+    m_message = message;
+}
+
+void AddNewFolderPopup::setContent(Evas_Object* content)
+{
+    m_content = content;
+}
+
+void AddNewFolderPopup::setOkButtonText(const std::string& okButtonText)
+{
+    m_okButtonText = okButtonText;
+}
+
+void AddNewFolderPopup::setCancelButtonText(const std::string& cancelButtonText)
+{
+    m_cancelButtonText = cancelButtonText;
+}
+
+void AddNewFolderPopup::show()
+{
+    std::string edjePath = std::string(EDJE_DIR);
+    edjePath.append("BookmarkManagerUI/AddNewFolderPopup.edj");
+    elm_theme_extension_add(0, edjePath.c_str());
+    m_popup = elm_popup_add(m_mainLayout);
+    evas_object_size_hint_weight_set(m_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+    /* 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);
+
+    m_cancel_button = elm_button_add(m_popup);
+    elm_object_style_set(m_cancel_button, "popup");
+    elm_object_part_content_set(m_popup, "button1",m_cancel_button);
+    elm_object_part_text_set(m_cancel_button, "elm.text", m_cancelButtonText.c_str());
+    evas_object_smart_callback_add(m_cancel_button, "clicked", popup_cancel_cb, this);
+
+    m_ok_button = elm_button_add(m_popup);
+    elm_object_style_set(m_ok_button, "popup");
+    elm_object_part_content_set(m_popup, "button2", m_ok_button);
+    elm_object_part_text_set(m_ok_button, "elm.text", m_okButtonText.c_str());
+    evas_object_smart_callback_add(m_ok_button, "clicked", popup_ok_cb, this);
+
+    evas_object_show(m_popup);
+}
+
+void AddNewFolderPopup::hide()
+{
+    evas_object_hide(m_popup);
+    elm_object_signal_emit(m_mainLayout, "elm,state,hide", "elm");
+}
+
+void AddNewFolderPopup::popup_ok_cb(void *data, Evas_Object *, void*)
+{
+    BROWSER_LOGD("[%s],", __func__);
+    if (data != nullptr)
+    {
+        AddNewFolderPopup *ownPopup = static_cast<AddNewFolderPopup*>(data);
+        ownPopup->on_ok(ownPopup->m_editfield_entry);
+    }
+}
+void AddNewFolderPopup::popup_cancel_cb(void *data, Evas_Object *, void*)
+{
+    BROWSER_LOGD("[%s],", __func__);
+    if (data != nullptr)
+    {
+        AddNewFolderPopup *ownPopup = static_cast<AddNewFolderPopup*>(data);
+        ownPopup->on_cancel(ownPopup->m_editfield_entry);
+    }
+}
+
+}
+}
diff --git a/services/BookmarkManagerUI/AddNewFolderPopup.h b/services/BookmarkManagerUI/AddNewFolderPopup.h
new file mode 100644 (file)
index 0000000..4f2d6a5
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef ADDNEWFOLDERPOPUP_H
+#define ADDNEWFOLDERPOPUP_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 AddNewFolderPopup{
+
+public:
+    AddNewFolderPopup(Evas_Object *main_layout);
+    AddNewFolderPopup(Evas_Object *main_layout, Evas_Object *content, const std::string& message,
+                      const std::string& title, const std::string& okButtonText, const std::string& cancelButtonText);
+
+    /*
+     * These 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 *, void*);
+    static void popup_cancel_cb(void *data, Evas_Object *, void*);
+    Evas_Object *m_popup;
+    Evas_Object *m_cancel_button;
+    Evas_Object *m_editfield_entry;
+    Evas_Object *m_ok_button;
+    Evas_Object *m_content;
+    std::string m_message;
+    std::string m_title;
+    std::string m_okButtonText;
+    std::string m_cancelButtonText;
+
+protected:
+    Evas_Object *m_mainLayout;
+};
+
+}
+}
+#endif
diff --git a/services/BookmarkManagerUI/BookmarkManagerUI.cpp b/services/BookmarkManagerUI/BookmarkManagerUI.cpp
new file mode 100644 (file)
index 0000000..a44f7bd
--- /dev/null
@@ -0,0 +1,549 @@
+/*
+ * 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 "AddNewFolderPopup.h"
+#include "BookmarkManagerUI.h"
+#include "ServiceManager.h"
+#include "BrowserLogger.h"
+#include "Tools/EflTools.h"
+#include "../Tools/BrowserImage.h"
+
+namespace tizen_browser{
+namespace base_ui{
+
+EXPORT_SERVICE(BookmarkManagerUI, "org.tizen.browser.bookmarkmanagerui")
+
+struct ItemData
+{
+    tizen_browser::base_ui::BookmarkManagerUI * m_bookmarkManager;
+    tizen_browser::services::BookmarkItem * h_item;
+    Elm_Object_Item * e_item;
+};
+
+typedef struct
+{
+    std::shared_ptr<tizen_browser::services::BookmarkItem> item;
+    std::shared_ptr<tizen_browser::base_ui::BookmarkManagerUI> bookmarkManagerUI;
+} BookmarkItemData, BookmarkFolderItemData;
+
+BookmarkManagerUI::BookmarkManagerUI()
+    : m_genList(nullptr)
+    , popup_content(nullptr)
+    , b_mm_layout(nullptr)
+    , m_itemClass(nullptr)
+    , m_gengrid(nullptr)
+    , m_parent(nullptr)
+    , m_item_class(nullptr)
+    , m_detail_item_class(nullptr)
+    , m_gengridSetup(false)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    edjFilePath = EDJE_DIR;
+    edjFilePath.append("BookmarkManagerUI/BookmarkManagerUI.edj");
+}
+
+BookmarkManagerUI::~BookmarkManagerUI()
+{
+}
+
+void BookmarkManagerUI::show(Evas_Object* parent)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_parent = parent;
+    m_folder.clear();
+    elm_theme_extension_add(nullptr, edjFilePath.c_str());
+    b_mm_layout = elm_layout_add(parent);
+    elm_layout_file_set(b_mm_layout, edjFilePath.c_str(), "bookmarkmanager-layout");
+    evas_object_size_hint_weight_set(b_mm_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(b_mm_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+    evas_object_show(b_mm_layout);
+
+    m_gengrid = elm_gengrid_add(b_mm_layout);
+    elm_object_part_content_set(b_mm_layout, "elm.swallow.grid", m_gengrid);
+
+    elm_object_style_set(m_gengrid, "back_ground");
+    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_item_class) {
+            m_item_class = elm_gengrid_item_class_new();
+            m_item_class->item_style = "grid_bm_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 = nullptr;
+            m_item_class->func.del = nullptr;
+        }
+
+      if (!m_detail_item_class) {
+            m_detail_item_class = elm_gengrid_item_class_new();
+            m_detail_item_class->item_style = "grid_ds_item";
+            m_detail_item_class->func.text_get = _grid_bookmark_text_get;
+            m_detail_item_class->func.content_get =  _grid_bookmark_content_get;
+            m_detail_item_class->func.state_get = nullptr;
+            m_detail_item_class->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_TRUE);
+    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, 404 * efl_scale, 320 * efl_scale);
+}
+
+void BookmarkManagerUI::showTopContent()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    elm_theme_extension_add(nullptr, edjFilePath.c_str());
+    m_genList = elm_genlist_add(b_mm_layout);
+    elm_object_part_content_set(b_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, nullptr);*/
+
+    m_itemClass = elm_genlist_item_class_new();
+    m_itemClass->item_style = "topContent";
+    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_bookmarkManager = this;
+    Elm_Object_Item* elmItem = elm_genlist_item_append(m_genList,            //genlist
+                                                      m_itemClass,          //item Class
+                                                      id,
+                                                      nullptr,                    //parent item
+                                                      ELM_GENLIST_ITEM_NONE,  //item type
+                                                      nullptr,
+                                                      nullptr                  //data passed to above function
+                                                     );
+    id->e_item = elmItem;
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+}
+
+Evas_Object* BookmarkManagerUI::listItemContentGet(void* data, Evas_Object* obj, const char* part)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if ((data != nullptr) && (obj != nullptr) && (part != nullptr))
+    {
+        const char *part_name1 = "new_folder_click";
+        const char *part_name2 = "close_click";
+        static const int part_name1_len = strlen(part_name1);
+        static const int part_name2_len = strlen(part_name2);
+        ItemData * id = static_cast<ItemData *>(data);
+        if(!strncmp(part_name1, part, part_name1_len))
+        {
+            Evas_Object *new_folder_click = elm_button_add(obj);
+            elm_object_style_set(new_folder_click, "hidden_button");
+            evas_object_smart_callback_add(new_folder_click, "clicked", BookmarkManagerUI::new_folder_clicked_cb, id);
+            return new_folder_click;
+        }
+        if(!strncmp(part_name2, part, part_name2_len))
+        {
+            Evas_Object *close_click = elm_button_add(obj);
+            elm_object_style_set(close_click, "hidden_button");
+            evas_object_smart_callback_add(close_click, "clicked", BookmarkManagerUI::close_clicked_cb, id);
+            return close_click;
+        }
+    }
+    return nullptr;
+}
+
+void BookmarkManagerUI::item_clicked_cb(void*, Evas_Object*, void*)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+}
+
+void BookmarkManagerUI::close_clicked_cb(void* data, Evas_Object*, void*)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (data != nullptr)
+    {
+        ItemData * id = static_cast<ItemData *>(data);
+        id->m_bookmarkManager->closeBookmarkManagerClicked(std::string());
+        id->m_bookmarkManager->clearItems();
+    }
+}
+
+void BookmarkManagerUI::new_folder_clicked_cb(void* data, Evas_Object*, void*)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (data != nullptr)
+    {
+        ItemData * id = static_cast<ItemData *>(data);
+        id->m_bookmarkManager->newFolderPopup();
+    }
+}
+
+void BookmarkManagerUI::newFolderPopup()
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    m_popup.reset(new AddNewFolderPopup(m_parent, nullptr,"Add New Folder?","New Folder","Ok","Cancel"));
+    m_popup->on_ok.disconnect_all_slots();
+    m_popup->on_ok.connect(boost::bind(&BookmarkManagerUI::NewFolderCreate, this, _1));
+    m_popup->on_cancel.disconnect_all_slots();
+    m_popup->on_cancel.connect(boost::bind(&BookmarkManagerUI::CancelClicked, this, _1));
+    m_popup->show();
+}
+
+void BookmarkManagerUI::NewFolderCreate(Evas_Object * popup_content)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (popup_content != nullptr)
+    {
+        m_folderName = elm_entry_entry_get(popup_content);
+        saveFolderClicked(m_folderName.c_str(), 0,0);
+        m_popup->hide();
+    }
+}
+
+void BookmarkManagerUI::CancelClicked(Evas_Object * popup)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (popup != nullptr)
+    {
+        m_popup->hide();
+    }
+}
+
+char* BookmarkManagerUI::listItemTextGet(void* data, Evas_Object*, const char* part)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if ((data != nullptr) && (part != nullptr))
+    {
+        const char *part_name = "folder_text";
+        static const int part_name_len = strlen(part_name);
+        ItemData * id = static_cast<ItemData *>(data);
+        if(!strncmp(part_name, part, part_name_len))
+        {
+            if(!id->m_bookmarkManager->m_folder.empty())
+            {
+                std::string s = std::string("Bookmark > ") + id->m_bookmarkManager->m_folder;
+                return strdup(s.c_str());
+            }
+        }
+    }
+    return strdup("Bookmark");
+}
+
+void BookmarkManagerUI::hide()
+{
+    evas_object_hide(elm_layout_content_get(b_mm_layout, "elm.swallow.grid"));
+    evas_object_hide(elm_layout_content_get(b_mm_layout, "elm.swallow.genlist"));
+    evas_object_hide(b_mm_layout);
+}
+
+Evas_Object * BookmarkManagerUI::getGenList()
+{
+    return m_genList;
+}
+
+Evas_Object * BookmarkManagerUI::getContent()
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    return m_gengrid;
+}
+
+void BookmarkManagerUI::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* BookmarkManagerUI::createNoHistoryLabel()
+{
+    Evas_Object *label = elm_label_add(m_parent);
+    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 BookmarkManagerUI::addBookmarkFolderItem(std::shared_ptr<tizen_browser::services::BookmarkItem> hi)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    BookmarkFolderItemData *itemData = new BookmarkFolderItemData();
+    itemData->item = hi;
+    itemData->bookmarkManagerUI.reset(this);
+    Elm_Object_Item* BookmarkFolderView = elm_gengrid_item_append(m_gengrid, m_item_class, itemData, nullptr, this);
+    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 BookmarkManagerUI::addBookmarkFolderItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > items)
+{
+     BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+     for (auto it = items.begin(); it != items.end(); ++it)
+     {
+         addBookmarkFolderItem(*it);
+     }
+     elm_object_part_content_set(b_mm_layout, "elm.swallow.grid",getContent());
+     evas_object_show(getContent());
+}
+
+
+void BookmarkManagerUI::addBookmarkItem(std::shared_ptr<tizen_browser::services::BookmarkItem> hi)
+{
+    BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+    BookmarkItemData *itemData = new BookmarkItemData();
+    itemData->item = hi;
+    itemData->bookmarkManagerUI.reset(this);
+    Elm_Object_Item* BookmarkView = elm_gengrid_item_append(m_gengrid, m_detail_item_class, itemData, nullptr, this);
+    m_map_bookmark_folder_views.insert(std::pair<std::string,Elm_Object_Item*>(hi->getAddress(),BookmarkView));
+    elm_gengrid_item_selected_set(BookmarkView, EINA_FALSE);
+    setEmptyGengrid(false);
+}
+
+void BookmarkManagerUI::addBookmarkItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > items)
+{
+     BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+     for (auto it = items.begin(); it != items.end(); ++it)
+     {
+         addBookmarkItem(*it);
+     }
+     elm_object_part_content_set(b_mm_layout, "elm.swallow.grid",getContent());
+     evas_object_show(getContent());
+}
+
+char* BookmarkManagerUI::_grid_text_get(void *data, Evas_Object *, const char *part)
+{
+    if ((data != nullptr) && (part != nullptr))
+    {
+        BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
+        BookmarkFolderItemData *itemData = static_cast<BookmarkFolderItemData*>(data);
+        const char *part_name1 = "page_title";
+        const char *part_name2 = "page_url";
+        static const int part_name1_len = strlen(part_name1);
+        static const int part_name2_len = strlen(part_name2);
+        ItemData * id = static_cast<ItemData *>(data);
+        if (!strncmp(part_name1, part, part_name1_len) && !itemData->item->getTittle().empty())
+        {
+            return strdup(itemData->item->getTittle().c_str());
+        }
+        if (!strncmp(part_name2, part, part_name2_len) && !itemData->item->getAddress().empty())
+        {
+            return strdup(itemData->item->getAddress().c_str());
+        }
+    }
+    return strdup("");
+}
+
+Evas_Object * BookmarkManagerUI::_grid_content_get(void *data, Evas_Object *obj, const char *part)
+{
+    if ((data != nullptr) && (obj != nullptr) && (part != nullptr))
+    {
+        BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
+        BookmarkFolderItemData *itemData = static_cast<BookmarkFolderItemData*>(data);
+        const char *part_name1 = "elm.thumbnail";
+        const char *part_name2 = "elm.thumbButton";
+        static const int part_name1_len = strlen(part_name1);
+        static const int part_name2_len = strlen(part_name2);
+        if (!strncmp(part_name1, part, part_name1_len))
+        {
+            Evas_Object * thumb = nullptr;
+            std::shared_ptr<tizen_browser::tools::BrowserImage> image = itemData->item->getThumbnail();
+            if (image)
+            {
+                thumb = tizen_browser::tools::EflTools::getEvasImage(image, itemData->bookmarkManagerUI->m_parent);
+            }
+            return thumb;
+        }
+        else if (!strncmp(part_name2, part, part_name2_len))
+        {
+            Evas_Object *thumbButton = elm_button_add(obj);
+            if (thumbButton != nullptr)
+            {
+                elm_object_style_set(thumbButton, "thumbButton");
+                evas_object_smart_callback_add(thumbButton, "clicked", tizen_browser::base_ui::BookmarkManagerUI::_thumbSelected, data);
+            }
+            return thumbButton;
+        }
+    }
+    return nullptr;
+}
+
+char* BookmarkManagerUI::_grid_bookmark_text_get(void *data, Evas_Object *, const char *part)
+{
+    if ((data != nullptr) && (part != nullptr))
+    {
+        BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
+        BookmarkItemData *itemData = static_cast<BookmarkItemData*>(data);
+        const char *part_name1 = "page_title";
+        const char *part_name2 = "page_url";
+        static const int part_name1_len = strlen(part_name1);
+        static const int part_name2_len = strlen(part_name2);
+        if (!strncmp(part_name1, part, part_name1_len))
+        {
+            return strdup(itemData->item->getTittle().c_str());
+        }
+        else if (!strncmp(part_name2, part, part_name2_len))
+        {
+            return strdup(itemData->item->getAddress().c_str());
+        }
+    }
+    return strdup("");
+}
+
+Evas_Object * BookmarkManagerUI::_grid_bookmark_content_get(void *data, Evas_Object *obj, const char *part)
+{
+    if ((data != nullptr) && (obj != nullptr) && (part != nullptr))
+    {
+        BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
+        BookmarkItemData *itemData = static_cast<BookmarkItemData*>(data);
+        const char *part_name1 = "elm.thumbnail";
+        const char *part_name2 = "elm.thumbButton";
+        static const int part_name1_len = strlen(part_name1);
+        static const int part_name2_len = strlen(part_name2);
+        if (!strncmp(part_name1, part, part_name1_len))
+        {
+            std::shared_ptr<tizen_browser::tools::BrowserImage> image = itemData->item->getThumbnail();
+            if (image)
+            {
+                return tizen_browser::tools::EflTools::getEvasImage(image, itemData->bookmarkManagerUI->m_parent);
+            }
+            else
+            {
+                return nullptr;
+            }
+        }
+        else if (!strncmp(part_name2, part, part_name2_len))
+        {
+            Evas_Object *thumbButton = elm_button_add(obj);
+            if (thumbButton != nullptr)
+            {
+                elm_object_style_set(thumbButton, "thumbButton");
+                evas_object_smart_callback_add(thumbButton, "clicked", tizen_browser::base_ui::BookmarkManagerUI::_bookmark_thumbSelected, data);
+            }
+            return thumbButton;
+        }
+    }
+    return nullptr;
+}
+
+void BookmarkManagerUI::_itemSelected(void * data, Evas_Object *, void * event_info)
+{
+    (void)data;
+    (void)event_info;
+#if 0
+    if ((data != nullptr) && (event_info != nullptr))
+    {
+        Elm_Object_Item * selected = static_cast<Elm_Object_Item *>(event_info);
+        BookmarkManagerUI * self = static_cast<BookmarkManagerUI *>(data);
+        HistoryItemData * itemData = static_cast<HistoryItemData *>(elm_object_item_data_get(selected));
+        if (itemData != nullptr)
+        {
+            self->bookmarkClicked(itemData->item);
+        }
+    }
+#endif
+}
+
+void BookmarkManagerUI::_thumbSelected(void * data, Evas_Object *, void *)
+{
+    if (data != nullptr)
+    {
+        BookmarkFolderItemData * itemData = reinterpret_cast<BookmarkFolderItemData *>(data);
+        BROWSER_LOGD("Folder ID: %d" , itemData->item->getId());
+        itemData->bookmarkManagerUI->set_folder(itemData->item->getTittle().c_str());
+        itemData->bookmarkManagerUI->bookmarkFolderClicked(itemData->item->getId());
+    }
+}
+
+
+void BookmarkManagerUI::_bookmark_thumbSelected(void * data, Evas_Object *, void *)
+{
+    (void)data;
+#if 0
+    if (data != nullptr)
+    {
+        HistoryItemData * itemData = reinterpret_cast<HistoryItemData *>(data);
+        itemData->bookmarkManagerUI->bookmarkClicked(itemData->item);
+    }
+#endif
+}
+
+void BookmarkManagerUI::clearItems()
+{
+    hide();
+    BROWSER_LOGD("Deleting all items from gengrid");
+    elm_gengrid_clear(m_gengrid);
+    elm_genlist_clear(m_genList);
+    m_map_bookmark_folder_views.clear();
+    elm_theme_extension_del(nullptr, edjFilePath.c_str());
+    elm_theme_full_flush();
+    elm_cache_all_flush();
+}
+
+
+void BookmarkManagerUI::updateGengrid()
+{
+    elm_genlist_clear(m_genList);
+    elm_gengrid_clear(m_gengrid);
+    m_map_bookmark_folder_views.clear();
+}
+
+void BookmarkManagerUI::focusItem(void*, Evas_Object*, void* event_info)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (event_info != nullptr)
+    {
+        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 BookmarkManagerUI::unFocusItem(void*, Evas_Object*, void* event_info)
+{
+    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    if (event_info != nullptr)
+    {
+        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/BookmarkManagerUI/BookmarkManagerUI.h b/services/BookmarkManagerUI/BookmarkManagerUI.h
new file mode 100644 (file)
index 0000000..419f508
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * 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 BOOKMARKMANAGERUI_H
+#define BOOKMARKMANAGERUI_H
+
+#include <Evas.h>
+#include <boost/signals2/signal.hpp>
+
+#include "AbstractUIComponent.h"
+#include "AbstractService.h"
+#include "ServiceFactory.h"
+#include "service_macros.h"
+#include "services/HistoryService/HistoryItem.h"
+#include "BookmarkItem.h"
+#include "AddNewFolderPopup.h"
+
+namespace tizen_browser{
+namespace base_ui{
+
+class BROWSER_EXPORT BookmarkManagerUI
+        : public tizen_browser::interfaces::AbstractUIComponent
+        , public tizen_browser::core::AbstractService
+{
+public:
+    BookmarkManagerUI();
+    ~BookmarkManagerUI();
+    void show(Evas_Object *main_layout);
+    Evas_Object *getContent();
+    Evas_Object *getGenList();
+    void showTopContent();
+    virtual std::string getName();
+    void addBookmarkFolderItem(std::shared_ptr<tizen_browser::services::BookmarkItem>);
+    void addBookmarkFolderItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> >);
+    void addBookmarkItem(std::shared_ptr<tizen_browser::services::BookmarkItem>);
+    void addBookmarkItems(std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> >);
+    void hide();
+    void clearItems();
+    void set_folder(const std::string &name) {m_folder = name;};
+    void updateGengrid();
+    void newFolderPopup();
+    Evas_Object* createNoHistoryLabel();
+    void setEmptyGengrid(bool setEmpty);
+
+    boost::signals2::signal<void (std::string)> closeBookmarkManagerClicked;
+    boost::signals2::signal<void (std::string)> addNewFolderClicked;
+    boost::signals2::signal<void (const char*, int, int)> saveFolderClicked;
+    boost::signals2::signal<void (int)> bookmarkFolderClicked;
+
+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 char* _grid_bookmark_text_get(void *data, Evas_Object *obj, const char *part);
+    static Evas_Object * _grid_bookmark_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 _bookmark_thumbSelected(void * data, Evas_Object *, void *);
+
+    void NewFolderCreate(Evas_Object * popup_content);
+    void CancelClicked(Evas_Object * popup_content);
+
+    static Evas_Object* listItemContentGet(void *data, Evas_Object *obj, const char *part);
+    static char*        listItemTextGet(void *data, Evas_Object *, const char *part);
+
+    static void item_clicked_cb(void *, Evas_Object *, void *);
+    static void close_clicked_cb(void *data, Evas_Object *, void *);
+    static void new_folder_clicked_cb(void *data, Evas_Object *, void *);
+
+private:
+    std::string m_folderName;
+    Evas_Object *m_genList;
+    Evas_Object *popup_content;
+    std::shared_ptr<tizen_browser::base_ui::AddNewFolderPopup > m_popup;
+    Evas_Object *b_mm_layout;
+    Elm_Genlist_Item_Class *m_itemClass;
+    Evas_Object *m_gengrid;
+    Evas_Object *m_parent;
+    Elm_Gengrid_Item_Class * m_item_class;
+    Elm_Gengrid_Item_Class * m_detail_item_class;
+    std::map<std::string,Elm_Object_Item*> m_map_bookmark_folder_views;
+    std::string edjFilePath;
+    std::string m_folder;
+    bool m_gengridSetup;
+
+    static void focusItem(void*, Evas_Object*, void* event_info);
+    static void unFocusItem(void*, Evas_Object*, void* event_info);
+};
+
+}
+}
+
+#endif // BOOKMARKSUI_H
diff --git a/services/BookmarkManagerUI/CMakeLists.txt b/services/BookmarkManagerUI/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7ff57b7
--- /dev/null
@@ -0,0 +1,40 @@
+project(BookmarkManagerUI)
+
+set(BookmarkManagerUI_SRCS
+    BookmarkManagerUI.cpp
+    AddNewFolderPopup.cpp
+    )
+
+set(BookmarkManagerUI_HEADERS
+    BookmarkManagerUI.h
+    AddNewFolderPopup.h
+    )
+
+include(Coreheaders)
+include(EFLHelpers)
+
+include_directories(${CMAKE_SOURCE_DIR}/services/FavoriteService)
+
+add_library(${PROJECT_NAME} SHARED ${BookmarkManagerUI_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)
+
+#please do not add edc/ directory
+set(edcFiles
+    BookmarkManagerUI.edc
+    AddNewFolderPopup.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/BookmarkManagerUI/edc/AddNewFolderPopup.edc b/services/BookmarkManagerUI/edc/AddNewFolderPopup.edc
new file mode 100644 (file)
index 0000000..3ae44b9
--- /dev/null
@@ -0,0 +1,198 @@
+#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
+
+collections {
+
+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: "popup_input_text";
+        parts {
+            part {
+                name: "elm.text.message";
+                type: TEXT;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    min: 0   0 ;
+                    max: 670  80 ;
+                    align: 0.0 0.5;
+                    rel1 {
+                        relative: 0.0 0.0; offset: 65 0;
+                    }
+                    rel2 {
+                        relative: 1.0 1.0;
+                    }
+                    color: 0 0 0 255;
+                  text
+                      {  text: "Add a New Folder?";
+                         font: "Sans,Edje-Vera";
+                         size: 34;
+                         min: 0 1;
+                         align: 0.0 0.5;
+                      }
+                }
+            }
+            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 1.0 ;
+                        to: "elm.text.message";
+                    }
+                    rel2 {
+                        relative: 1.0 1.0;
+                   }
+                }
+            }
+      }
+    }
+  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
+}
diff --git a/services/BookmarkManagerUI/edc/BookmarkManagerUI.edc b/services/BookmarkManagerUI/edc/BookmarkManagerUI.edc
new file mode 100644 (file)
index 0000000..6b29ccb
--- /dev/null
@@ -0,0 +1,1118 @@
+#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_exit_nor.png")
+RESOURCE_IMAGE_LOSSY("btn_bar_new_nor.png")
+RESOURCE_IMAGE_LOSSY("btn_bar_new_foc.png")
+RESOURCE_IMAGE_LOSSY("ic_thumbnail_folder.png")
+RESOURCE_IMAGE_LOSSY("ic_thumbnail_folder_all.png")
+RESOURCE_IMAGE_LOSSY("ic_thumbnail_folder_mark.png")
+
+#define WIDTH 1920
+#define HEIGHT 181
+#define ITEM_WIDTH 1200
+
+    group {
+        name: "elm/genlist/item/topContent/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 folder_text";
+        data.item: "contents" "favicon star_click close_click new_folder_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: 255 255 255 255;
+                    align: 0 0;
+                    min: 1920 285;
+                    max: 1920 285;
+                   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 5;
+                    max: 1920 5;
+                    image.normal: "web_shadow.png";
+                    rel1 { relative: 0.0 1.0; to: "action_bar_bg"; }
+                    rel2 { relative: 1.0 1.0; }
+                }
+             }
+           part {
+                name: "new_folder_bg";
+                scale:1;
+                mouse_events: 1;
+                type: RECT;
+                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: "action_bar_bg"; offset: 10 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: "new_folder_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: "new_folder_bg";}
+                    rel2 { relative: 1.0 1.0; to: "new_folder_bg";}
+                    image.normal: "btn_bar_new_nor.png";
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                }
+                description { state: "focus" 0.0;
+                    inherit: "highlight" 0.0;
+                    image.normal: btn_bar_new_foc.png;
+                }
+            }
+           part {
+                name: "new_folder_over";
+                scale:1;
+                type: RECT;
+                mouse_events :1;
+                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: "new_folder_bg";}
+                    rel2 { relative: 1.0 1.0; to: "new_folder_bg";}
+                    color_class: transparent;
+                }
+            }
+       part {
+                name: "new_folder_click";
+                scale:1;
+                type: SWALLOW;
+                mouse_events :1;
+                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: "new_folder_over";}
+                    rel2 { relative: 1.0 1.0; to: "new_folder_over";}
+                    color_class: transparent;
+                }
+            }
+       part {
+                name: "title_text";
+                scale: 1;
+                type: TEXT;
+                description { state: "default" 0.0;
+                  visible: 1;
+                  fixed: 1 1;
+                  rel1 { relative: 0.0 0.0;to: "action_bar_bg";}
+                  rel2 { relative: 1.0 1.0;to: "action_bar_bg";}
+                  color: 116 116 116 255;
+                  text {
+                      text: "Bookmark Manager";
+                      font: "Sans";
+                      size: 42;
+                      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: 1828 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;
+              mouse_events: 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;
+              mouse_events: 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: "folder_bg";
+              scale:1;
+              mouse_events: 1;
+              type: RECT;
+              description {
+                  state: "default" 0.0;
+                  visible: 1;
+                  fixed: 1 1;
+                  align: 0 0.0;
+                  min: 1920 181;
+                  max: 1920 181;
+                  rel1 { relative: 0.0 1.0; to: "action_bar_bg";}
+                  rel2 { relative: 1.0 1.0; }
+                  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: "folder_text";
+                scale: 1;
+                type: TEXT;
+                description { state: "default" 0.0;
+                  visible: 1;
+                  fixed: 1 1;
+                  rel1 { relative: 0.0 0.0;to: "folder_bg"; offset : 62 104; }
+                  rel2 { relative: 1.0 1.0;to: "folder_bg";}
+                  color: 116 116 116 255;
+                  text {
+                      text: "Bookmark";
+                      font: "Sans";
+                      size: 34;
+                      align: 0.0 0.0;
+                     }
+                  }
+               }
+      }
+      programs{
+            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_new_folder_click";
+              signal: "mouse,in";
+              source: "new_folder_*";
+              script {
+                  emit("mouse_in_new_folder_click", "");
+              }
+          }
+          program {
+              name: "mouse_out_new_folder_click";
+              signal: "mouse,out";
+              source: "new_folder_*";
+              script {
+                  emit("mouse_out_new_folder_click", "");
+              }
+          }
+          program {
+              name: "mouse_in_close";
+              signal: "mouse_in_close_click";
+              source: "";
+              action: STATE_SET "highlight" 0.0;
+              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: "close_over";
+              target: "close_bg";
+              target: "close_icon";
+          }
+          program {
+              name: "mouse_in_new_folder";
+              signal: "mouse_in_new_folder_click";
+              source: "";
+              action: STATE_SET "highlight" 0.0;
+              target: "new_folder_over";
+              target: "new_folder_bg";
+              target: "new_folder_icon";
+          }
+          program {
+              name: "mouse_out_new_folder";
+              signal: "mouse_out_new_folder_click";
+              source: "";
+              action: STATE_SET "default" 0.0;
+              target: "new_folder_over";
+              target: "new_folder_bg";
+              target: "new_folder_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: "bookmarkmanager-layout";
+    data {
+        item: "highlight_focus" "off";
+    }
+
+       images {
+            image: "web_shadow.png" COMP;
+        }
+        parts {
+            part { name: "window_bg";
+                type: RECT;
+                mouse_events: 0;
+                description { state: "default" 0.0;
+                               align: 0.0 0.0;
+                               visible: 1;
+                               min: 1920 1080;
+                       max: 1920 1080;
+                    rel1 {
+                       relative: 0 0;
+                    }
+                    rel2{
+                       relative: 1 1;
+                    }
+                }
+            }
+            part { name: "genlist_bg";
+                type: RECT;
+                mouse_events: 0;
+                description { state: "default" 0.0;
+                               visible: 1;
+                               align: 0.0 0.0;
+                               min: 1920 285;
+                       max: 1920 285;
+                color: 70 143 254 255;
+                rel1 {
+                       relative: 0 0; to: "window_bg";
+                    }
+                    rel2{
+                      relative: 1 1;
+                    }
+                }
+            }
+            part { name: "elm.swallow.genlist";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    min: 1920 285;
+                    max: 1920 285;
+                    align: 0.0 0.0;
+                    fixed: 0 0;
+                    rel1 { relative: 0.0 0.0; to: "genlist_bg";}
+                    rel2 { relative: 1.0 1.0; to: "genlist_bg";}
+                }
+                description {
+                    state: "hidden" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 0;
+                }
+                description {
+                    state: "visible" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                }
+             }
+           part { name: "gengrid_bg";
+                type: RECT;
+                mouse_events: 0;
+                description { state: "default" 0.0;
+                               visible: 1;
+                               align: 0.0 0.0;
+                               min: 1920 614;
+                               max: 1920 614;
+                color: 255 255 255 255;
+                rel1 {
+                       relative: 0 1; to: "genlist_bg";
+                    }
+                rel2{
+                                                relative: 1 1;
+                    }
+                }
+            }
+            part { name: "elm.swallow.grid";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    min: 1920 795;
+                           max: 1920 795;
+                    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; to: "gengrid_bg";}
+                }
+                description {
+                    state: "hidden" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 0;
+                }
+                description {
+                    state: "visible" 0.0;
+                    inherit: "default" 0.0;
+                    visible: 1;
+                }
+           }
+
+           part { name: "genlist2_bg";
+                type: RECT;
+                mouse_events: 0;
+                description { state: "default" 0.0;
+                               visible: 1;
+                               align: 0.0 0.0;
+                               min: 1920 181;
+                               max: 1920 181;
+                color: 255 255 255 255;
+                rel1 {
+                       relative: 0 1; to: "gengrid_bg";
+                    }
+                rel2{
+                       relative: 1 1;
+                    }
+                }
+            }
+            part { name: "elm.swallow.genlist2";
+                type : SWALLOW;
+                scale: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    min: 1920 149;
+                    max: 1920 149;
+                    align: 0.0 0.0;
+                    fixed: 0 0;
+                    rel1 { relative: 0.0 0.0; to: "genlist2_bg"; offset: 0 32;}
+                    rel2 { relative: 1.0 1.0; to: "genlist2_bg";}
+                }
+                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;
+                    }
+                }
+            }
+       }
+}
+
+group { name: "elm/gengrid/base/back_ground";
+    data {
+        item: "focus_highlight" "off";
+    }
+
+        parts {
+            part { name: "clipper";
+                type: RECT;
+                mouse_events: 0;
+                description { state: "default" 0.0;
+                color: 70 143 254 255;
+                    rel1 {
+                        relative: 0 0;
+                    }
+                    rel2{
+                        relative: 1 1;
+                    }
+                }
+            }
+           part { name: "background";
+                type: RECT;
+                mouse_events: 0;
+                description { state: "default" 0.0;
+                    color: 255 255 255 255;
+                    rel1 {
+                        relative: 0 0;
+                    }
+                    rel2{
+                        relative: 1 1;
+                    }
+                }
+            }
+            part { name: "elm.swallow.content";
+                type: SWALLOW;
+                description { state: "default" 0.0;
+                    rel1 {
+                        relative: 0 0;
+                        offset: 0 0;
+                    }
+                    rel2 {
+                        relative: 1 1;
+                        offset: 0 0;
+                    }
+                }
+            }
+            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;
+                    }
+                }
+            }
+    }
+}
+
+group { name: "elm/gengrid/item/grid_bm_item/default";
+    data.item: "texts" "page_title page_url";
+    data.item: "contents" "elm.thumbnail elm.thumbButton";
+    images {
+        image: "web_frame_selected.png" COMP;
+        image: "ico_bg_round_shape_37x37.png" COMP;
+    }
+    parts {
+        part { name: "win_bg";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+                min: 378 294;
+                max: 378 294;
+                visible: 0;
+                align: 0.0 0.0;
+                color: 231 231 231 255;
+                rel1.offset: -26 -26;
+            }
+            description { state: "selected";
+                inherit: "default" 0.0;
+                color: 70 143 254 255;
+            }
+        }
+
+        part { name: "bg";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+                min: 378 212;
+                max: 378 212;
+                visible: 1;
+                align: 0.0 0.0;
+                color : 97 109 124 255;
+                rel1 {
+                    relative: 0.0  0.0; to: "win_bg";
+                }
+                rel2 {
+                    relative: 1.0  1.0;
+                }
+
+            }
+            description { state: "selected";
+                inherit: "default" 0.0;
+            }
+        }
+
+       part { name: "folder_image";
+                type: IMAGE;
+                scale: 1;
+                repeat_events: 1;
+                description {
+                    state: "default" 0.0;
+                    visible: 1;
+                    align: 0.5 0.5;
+                    fixed: 0 0;
+                    min: 140 140;
+                    max: 140 140;
+                    image.normal: "ic_thumbnail_folder.png";
+                    rel1 { relative: 0.0 0.0; to: "bg"; }
+                    rel2 { relative: 1.0 1.0; to: "bg"; }
+                }
+             }
+
+        part { name: "elm.thumbnail";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+                fixed: 1 0;
+                align: 0.0 0.0;
+                min: 378 212;
+                max: 378 212;
+                rel1 {
+                    relative: 0.0  0.0; to: "bg";
+                }
+                rel2 {
+                    relative: 1.0  1.0; to: "bg";
+                }
+            }
+            description { state: "selected";
+                inherit: "default" 0.0;
+            }
+        }
+
+        part { name: "focus_highlight";
+            type: IMAGE;
+            description { state: "default" 0.0;
+                
+                rel1 {
+                    to: "elm.thumbnail";
+                    relative: 0.0  0.0;
+                }
+                rel2 {
+                    to: "elm.thumbnail";
+                    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: "background";
+            type: RECT;
+            description { state: "default" 0.0;
+                min: 378 82;
+                max: 378 82;
+                align: 0.0 0.0;
+               color: 86 98 113 255;
+                rel1 {
+                    to: "elm.thumbnail";
+                    relative: 0.0  1.0;
+                }
+                rel2 {
+                    relative: 1.0  1.0;
+                }
+            }
+            description { state: "selected" 0.0;
+                inherit: "default" 0.0;
+                color: 0 119 246 255;
+            }
+        }
+
+        part { name: "page_title";
+            type: TEXT;
+            description { state: "default" 0.0;
+                min: 342 54;
+                max: 342 54;
+                align: 0.0 0.5;
+                rel1 {
+                    to: "background";
+                    relative: 0.0 0.0;
+                    offset: 18 0;
+                }
+                rel2 {
+                    to: "background";
+                    relative: 1.0  1.0;
+                }
+                color: 255 255 255 255;
+                    text {
+                        text: "Web page title";
+                        font: "Sans";
+                        size: 28;
+                        align: 0 0.5;
+                    }
+                }
+                description { state: "selected" 0.0;
+                    inherit: "default" 0.0;
+                   //color: focusTextColor;
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    //color: highlightTextColor;
+                }
+        }
+
+        part { name: "elm.thumbButton";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+                rel1.to: "elm.thumbnail";
+                rel2.to: "elm.thumbnail";
+            }
+        }
+
+        part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+                color: 0 0 0 0;
+                rel1.to: "win_bg";
+                rel2.to: "background";
+            }
+        }
+        part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+                color: 0 0 0 0;
+                rel1.to: "background";
+                rel2.to: "background";
+            }
+        }
+    }
+
+    programs{
+        program { name: "mouse_in";
+            signal: "mouse,in";
+            source: "over2";
+            action:  STATE_SET "selected" 0.0;
+            target: "background";
+            target: "focus_highlight";
+            //target: "bg";
+        }
+        program { name: "mouse_out";
+            signal: "mouse,out";
+            source: "over2";
+            action:  STATE_SET "default" 0.0;
+            target:  "background";
+            target: "focus_highlight";
+           //target: "bg";
+        }
+    }
+}
+
+group { name: "elm/gengrid/item/grid_ds_item/default";
+    data.item: "texts" "page_title page_url";
+    data.item: "contents" "elm.thumbnail elm.thumbButton";
+    images {
+        image: "web_frame_selected.png" COMP;
+        image: "ico_bg_round_shape_37x37.png" COMP;
+    }
+    parts {
+        part { name: "bg";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+                min: 378 294;
+                            max: 378 294;
+                visible: 1;
+                color: 231 231 231 255;
+                rel1.offset: -26 -26;
+            }
+            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;
+                align: 0.0 0.0;
+                color : 231 231 231 255;
+                min: 378 198;
+                max: 378 198;
+                rel1 {
+                    relative: 0.0  0.0; to: "bg";
+                }
+                rel2 {
+                    relative: 1.0  1.0; to: "bg";
+                }
+            }
+            description { state: "selected";
+                inherit: "default" 0.0;
+            }
+        }
+
+        part { name: "focus_highlight";
+            type: IMAGE;
+            description { state: "default" 0.0;
+                rel1 {
+                    to: "elm.thumbnail";
+                    relative: 0.0  0.0;
+                }
+                rel2 {
+                    to: "elm.thumbnail";
+                    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: "background";
+            type: RECT;
+            description { state: "default" 0.0;
+                min: 378 96;
+                max: 378 96;
+                align: 0.0 0.0;
+                color: 231 231 231 255;
+                rel1 {
+                    to: "elm.thumbnail";
+                    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: "page_title";
+            type: TEXT;
+            description { state: "default" 0.0;
+                min: 300 48;
+                max: 300 48;
+                align: 0.0 0.5;
+                rel1 {
+                    to: "background";
+                    relative: 0.0 0.0;
+                    offset: 17 0;
+                }
+                rel2 {
+                    to: "background";
+                    relative: 1.0  1.0;
+                }
+        color: 51 51 51 255;
+                    text {
+                        text: "Web page title";
+                        font: "Sans";
+                        size: 27;
+                        align: 0 0.5;
+                    }
+                }
+                description { state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    //color: focusTextColor;
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    //color: highlightTextColor;
+                }
+        }
+
+        part { name: "page_url";
+                        type: TEXT;
+                        description { state: "default" 0.0;
+                                min: 300 48;
+                                max: 300 48;
+                                align: 0 0.5;
+                                rel1 {
+                                        to: "page_title";
+                                        relative: 0.0 1.0;
+                                }
+                                rel2 {
+                                        to: "page_title";
+                                        relative: 1.0  1.0;
+                                }
+                color: 153 153 153 255;
+                    text {
+                        text: "Web page url";
+                        font: "Sans";
+                        size: 24;
+                        align: 0 0.5;
+                    }
+                }
+                description { state: "focus" 0.0;
+                    inherit: "default" 0.0;
+                    //color: focusTextColor;
+                }
+                description { state: "highlight" 0.0;
+                    inherit: "default" 0.0;
+                    //color: highlightTextColor;
+                }
+                }
+
+        part { name: "elm.thumbButton";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+                rel1.to: "elm.thumbnail";
+                rel2.to: "elm.thumbnail";
+            }
+        }
+
+        part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+                color: 0 0 0 0;
+                rel1.to: "bg";
+                rel2.to: "background";
+            }
+        }
+        part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+                color: 0 0 0 0;
+                rel1.to: "background";
+                rel2.to: "background";
+            }
+        }
+    }
+
+    programs{
+        program { name: "mouse_in";
+            signal: "mouse,in";
+            source: "over2";
+            action:  STATE_SET "selected" 0.0;
+            target:  "background";
+            target: "focus_highlight";
+            target: "bg";
+        }
+        program { name: "mouse_out";
+            signal: "mouse,out";
+            source: "over2";
+            action:  STATE_SET "default" 0.0;
+            target:  "background";
+            target: "focus_highlight";
+            target: "bg";
+        }
+    }
+
+}
+
+}
diff --git a/services/BookmarkManagerUI/images/btn_bar_new_dis.png b/services/BookmarkManagerUI/images/btn_bar_new_dis.png
new file mode 100644 (file)
index 0000000..af49c5a
Binary files /dev/null and b/services/BookmarkManagerUI/images/btn_bar_new_dis.png differ
diff --git a/services/BookmarkManagerUI/images/btn_bar_new_foc.png b/services/BookmarkManagerUI/images/btn_bar_new_foc.png
new file mode 100644 (file)
index 0000000..2a5c00b
Binary files /dev/null and b/services/BookmarkManagerUI/images/btn_bar_new_foc.png differ
diff --git a/services/BookmarkManagerUI/images/btn_bar_new_nor.png b/services/BookmarkManagerUI/images/btn_bar_new_nor.png
new file mode 100644 (file)
index 0000000..352a2f4
Binary files /dev/null and b/services/BookmarkManagerUI/images/btn_bar_new_nor.png differ
diff --git a/services/BookmarkManagerUI/images/btn_bar_stop_nor.png b/services/BookmarkManagerUI/images/btn_bar_stop_nor.png
new file mode 100644 (file)
index 0000000..c5cdc11
Binary files /dev/null and b/services/BookmarkManagerUI/images/btn_bar_stop_nor.png differ
diff --git a/services/BookmarkManagerUI/images/favicon.png b/services/BookmarkManagerUI/images/favicon.png
new file mode 100644 (file)
index 0000000..15ac957
Binary files /dev/null and b/services/BookmarkManagerUI/images/favicon.png differ
diff --git a/services/BookmarkManagerUI/images/ic_add_bookmark.png b/services/BookmarkManagerUI/images/ic_add_bookmark.png
new file mode 100644 (file)
index 0000000..0ea3265
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_add_bookmark.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_bookmark_foc.png b/services/BookmarkManagerUI/images/ic_more_bookmark_foc.png
new file mode 100644 (file)
index 0000000..7cfbba9
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_bookmark_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_bookmark_nor.png b/services/BookmarkManagerUI/images/ic_more_bookmark_nor.png
new file mode 100644 (file)
index 0000000..addcd5a
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_bookmark_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_desktopview_foc.png b/services/BookmarkManagerUI/images/ic_more_desktopview_foc.png
new file mode 100644 (file)
index 0000000..21bcc68
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_desktopview_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_desktopview_nor.png b/services/BookmarkManagerUI/images/ic_more_desktopview_nor.png
new file mode 100644 (file)
index 0000000..462151f
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_desktopview_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_exit_foc.png b/services/BookmarkManagerUI/images/ic_more_exit_foc.png
new file mode 100644 (file)
index 0000000..779fc48
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_exit_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_exit_nor.png b/services/BookmarkManagerUI/images/ic_more_exit_nor.png
new file mode 100644 (file)
index 0000000..b6dcd88
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_exit_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_focusmode_foc.png b/services/BookmarkManagerUI/images/ic_more_focusmode_foc.png
new file mode 100644 (file)
index 0000000..f5fdac8
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_focusmode_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_focusmode_nor.png b/services/BookmarkManagerUI/images/ic_more_focusmode_nor.png
new file mode 100644 (file)
index 0000000..f7a61fb
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_focusmode_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_history_foc.png b/services/BookmarkManagerUI/images/ic_more_history_foc.png
new file mode 100644 (file)
index 0000000..a397ea0
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_history_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_history_nor.png b/services/BookmarkManagerUI/images/ic_more_history_nor.png
new file mode 100644 (file)
index 0000000..698a8cf
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_history_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_minibrowser_foc.png b/services/BookmarkManagerUI/images/ic_more_minibrowser_foc.png
new file mode 100644 (file)
index 0000000..4f37952
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_minibrowser_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_minibrowser_nor.png b/services/BookmarkManagerUI/images/ic_more_minibrowser_nor.png
new file mode 100644 (file)
index 0000000..0c29899
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_minibrowser_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_mobileview_foc.png b/services/BookmarkManagerUI/images/ic_more_mobileview_foc.png
new file mode 100644 (file)
index 0000000..e95981d
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_mobileview_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_mobileview_nor.png b/services/BookmarkManagerUI/images/ic_more_mobileview_nor.png
new file mode 100644 (file)
index 0000000..91aebfe
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_mobileview_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_pointermode_foc.png b/services/BookmarkManagerUI/images/ic_more_pointermode_foc.png
new file mode 100644 (file)
index 0000000..8785d75
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_pointermode_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_pointermode_nor.png b/services/BookmarkManagerUI/images/ic_more_pointermode_nor.png
new file mode 100644 (file)
index 0000000..7a32e22
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_pointermode_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_readermode_foc.png b/services/BookmarkManagerUI/images/ic_more_readermode_foc.png
new file mode 100644 (file)
index 0000000..d257732
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_readermode_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_readermode_nor.png b/services/BookmarkManagerUI/images/ic_more_readermode_nor.png
new file mode 100644 (file)
index 0000000..b8d4ee2
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_readermode_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_setting_foc.png b/services/BookmarkManagerUI/images/ic_more_setting_foc.png
new file mode 100644 (file)
index 0000000..a881c62
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_setting_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_setting_nor.png b/services/BookmarkManagerUI/images/ic_more_setting_nor.png
new file mode 100644 (file)
index 0000000..284d423
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_setting_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_share_foc.png b/services/BookmarkManagerUI/images/ic_more_share_foc.png
new file mode 100644 (file)
index 0000000..dadf09b
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_share_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_share_nor.png b/services/BookmarkManagerUI/images/ic_more_share_nor.png
new file mode 100644 (file)
index 0000000..2863187
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_share_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_zoom_foc.png b/services/BookmarkManagerUI/images/ic_more_zoom_foc.png
new file mode 100644 (file)
index 0000000..4433579
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_zoom_foc.png differ
diff --git a/services/BookmarkManagerUI/images/ic_more_zoom_nor.png b/services/BookmarkManagerUI/images/ic_more_zoom_nor.png
new file mode 100644 (file)
index 0000000..de75812
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_more_zoom_nor.png differ
diff --git a/services/BookmarkManagerUI/images/ic_thumbnail_folder.png b/services/BookmarkManagerUI/images/ic_thumbnail_folder.png
new file mode 100644 (file)
index 0000000..57fc200
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_thumbnail_folder.png differ
diff --git a/services/BookmarkManagerUI/images/ic_thumbnail_folder_all.png b/services/BookmarkManagerUI/images/ic_thumbnail_folder_all.png
new file mode 100644 (file)
index 0000000..c23e195
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_thumbnail_folder_all.png differ
diff --git a/services/BookmarkManagerUI/images/ic_thumbnail_folder_mark.png b/services/BookmarkManagerUI/images/ic_thumbnail_folder_mark.png
new file mode 100644 (file)
index 0000000..6ea1fa2
Binary files /dev/null and b/services/BookmarkManagerUI/images/ic_thumbnail_folder_mark.png differ
diff --git a/services/BookmarkManagerUI/images/ico_bg_round_shape_37x37.png b/services/BookmarkManagerUI/images/ico_bg_round_shape_37x37.png
new file mode 100644 (file)
index 0000000..00182ed
Binary files /dev/null and b/services/BookmarkManagerUI/images/ico_bg_round_shape_37x37.png differ
diff --git a/services/BookmarkManagerUI/images/ico_delete.png b/services/BookmarkManagerUI/images/ico_delete.png
new file mode 100644 (file)
index 0000000..92f42cc
Binary files /dev/null and b/services/BookmarkManagerUI/images/ico_delete.png differ
diff --git a/services/BookmarkManagerUI/images/modal_dialogs_bg.png b/services/BookmarkManagerUI/images/modal_dialogs_bg.png
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/services/BookmarkManagerUI/images/modal_dialogs_title_bg.png b/services/BookmarkManagerUI/images/modal_dialogs_title_bg.png
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/services/BookmarkManagerUI/images/web_frame_selected.png b/services/BookmarkManagerUI/images/web_frame_selected.png
new file mode 100644 (file)
index 0000000..4470ca4
Binary files /dev/null and b/services/BookmarkManagerUI/images/web_frame_selected.png differ
diff --git a/services/BookmarkManagerUI/images/web_shadow.png b/services/BookmarkManagerUI/images/web_shadow.png
new file mode 100644 (file)
index 0000000..f9018b0
Binary files /dev/null and b/services/BookmarkManagerUI/images/web_shadow.png differ
index 7e30362e142062c40bb187b4b38a41eaa2d5873e..2489359a84c049313fc16bb84c48466231e04644 100644 (file)
@@ -190,7 +190,7 @@ int BookmarkService::getBookmarkId(const std::string & url)
 
 std::vector<std::shared_ptr<BookmarkItem> > BookmarkService::getBookmarks(int folder_id)
 {
-    BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+    BROWSER_LOGD("[%s:%d] folder_id = %d", __func__, __LINE__, folder_id);
     int *ids = nullptr;
     int ids_count = 0;
     int ret = bp_bookmark_adaptor_get_ids_p(&ids, &ids_count, -1, 0, folder_id, 0, -1, -1, BP_BOOKMARK_O_SEQUENCE, 0);
@@ -200,15 +200,15 @@ std::vector<std::shared_ptr<BookmarkItem> > BookmarkService::getBookmarks(int fo
     }
 
     m_bookmarks.clear();
-
     BROWSER_LOGD("Bookmark items: %d", ids_count);
 
     for(int i = 0; i<ids_count; i++)
     {
         bp_bookmark_info_fmt bookmark_info;
         bp_bookmark_adaptor_get_easy_all(ids[i], &bookmark_info);
-        std::string url = (bookmark_info.url != nullptr) ? bookmark_info.url : "";
-        std::string title = (bookmark_info.title != nullptr) ? bookmark_info.title : "";
+        std::string url = (bookmark_info.url ? bookmark_info.url : "");
+        std::string title = (bookmark_info.title ? bookmark_info.title : "");
+
         std::shared_ptr<BookmarkItem> bookmark = std::make_shared<BookmarkItem>(url, title, std::string(""),(int) bookmark_info.parent, ids[i]);
 
         std::shared_ptr<tizen_browser::tools::BrowserImage> bi = std::make_shared<tizen_browser::tools::BrowserImage>();
@@ -228,7 +228,6 @@ std::vector<std::shared_ptr<BookmarkItem> > BookmarkService::getBookmarks(int fo
         fav->imageData = (void*)malloc(bookmark_info.favicon_length);
         memcpy(fav->imageData, (void*)image_bytes, bookmark_info.favicon_length);
         bookmark->setFavicon(fav);
-
         m_bookmarks.push_back(bookmark);
     }
     free(ids);
index 75ed2f27e47288b227e0772fecba829e59d070bb..8ce4790262bc25b165b67842d05526134d83611f 100644 (file)
@@ -83,7 +83,7 @@ public:
      *
      * @return list of bookmark items, bookmark items in a folder & bookmark folders
      */
-    std::vector<std::shared_ptr<BookmarkItem> > getBookmarks(int folder_id = 0);
+    std::vector<std::shared_ptr<BookmarkItem> > getBookmarks(int folder_id = -1);
     std::vector<std::shared_ptr<BookmarkItem> > getBookmarkFolders();
 
    /**
index 547901f1d791c3f18fb6e3a1787d27a62b3d9c9a..8a137c9ae3eda3eb4d60129b40e84e2afc659dc1 100644 (file)
@@ -11,8 +11,7 @@ add_subdirectory(SimpleUI)
 #MERGE_ME
 #add_subdirectory(SettingsUI)
 add_subdirectory(SimpleURI)
-#MERGE_ME
-#add_subdirectory(BookmarkManagerUI)
+add_subdirectory(BookmarkManagerUI)
 add_subdirectory(StorageService)
 add_subdirectory(HistoryService)
 add_subdirectory(PlatformInputManager)
index 62578b1cac035e1525165603f14a7d2e13b5d20b..6234cb80d7033afb928287b8a6f0d9cc2aa4b43b 100644 (file)
@@ -43,8 +43,7 @@ include_directories(${CMAKE_SOURCE_DIR}/services/SimpleURI)
 include_directories(${CMAKE_SOURCE_DIR}/services/WebEngineService)
 include_directories(${CMAKE_SOURCE_DIR}/services/WebEngineService/src)
 include_directories(${CMAKE_SOURCE_DIR}/services/StorageService)
-#MERGE_ME
-#include_directories(${CMAKE_SOURCE_DIR}/services/BookmarkManagerUI)
+include_directories(${CMAKE_SOURCE_DIR}/services/BookmarkManagerUI)
 include_directories(${CMAKE_SOURCE_DIR}/services/StorageService/Storage/include)
 include_directories(${CMAKE_SOURCE_DIR}/services/FavoriteService)
 include_directories(${CMAKE_SOURCE_DIR}/services/HistoryService)
@@ -69,7 +68,7 @@ add_dependencies(${PROJECT_NAME} StorageService)
 add_dependencies(${PROJECT_NAME} HistoryService)
 #MERGE_ME
 #add_dependencies(${PROJECT_NAME} MoreMenuUI)
-#add_dependencies(${PROJECT_NAME} BookmarkManagerUI)
+add_dependencies(${PROJECT_NAME} BookmarkManagerUI)
 add_dependencies(${PROJECT_NAME} MainUI)
 #MERGE_ME
 #add_dependencies(${PROJECT_NAME} HistoryUI)
@@ -87,8 +86,7 @@ target_link_libraries(${PROJECT_NAME} MainUI)
 #target_link_libraries(${PROJECT_NAME} HistoryUI)
 #target_link_libraries(${PROJECT_NAME} SettingsUI)
 target_link_libraries(${PROJECT_NAME} TabUI)
-#MERGE_ME
-#target_link_libraries(${PROJECT_NAME} BookmarkManagerUI)
+target_link_libraries(${PROJECT_NAME} BookmarkManagerUI)
 target_link_libraries(${PROJECT_NAME} PlatformInputManager)
 target_link_libraries(${PROJECT_NAME} SessionStorage)
 target_link_libraries(${PROJECT_NAME} ${EFL_LDFLAGS})
index edf05bd94608c8a6967b015bfc5e74d7fad27d2f..e585130ae2ba3f7386ff9017e6240ee88272a8c5 100644 (file)
@@ -67,9 +67,7 @@ SimpleUI::SimpleUI()
     , m_moreMenuUI()
 #endif
     , m_tabUI()
-#if MERGE_ME
     , m_bookmarkManagerUI()
-#endif
     , m_mainUI()
     , m_initialised(false)
     , m_isHomePageActive(false)
@@ -1155,7 +1153,6 @@ void SimpleUI::closeMoreMenu(const std::string& str)
 
 void SimpleUI::showBookmarkManagerMenu()
 {
-#if MERGE_ME
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     if(!m_bookmarkManagerUI){
         m_bookmarkManagerUI =
@@ -1173,24 +1170,19 @@ void SimpleUI::showBookmarkManagerMenu()
         m_bookmarkManagerUI->addBookmarkFolderItems(getBookmarkFolders());
         m_bookmarkManagerUI->showTopContent();
     }
-#endif
 }
 
 void SimpleUI::updateBookmakMangaerGenGrid(int folder_id)
 {
-#if MERGE_ME
     m_bookmarkManagerUI->updateGengrid();
     m_bookmarkManagerUI->addBookmarkItems(getBookmarks(folder_id));
     m_bookmarkManagerUI->showTopContent();
-#endif
 }
 
 void SimpleUI::closeBookmarkManagerMenu(std::string& str)
 {
-#if MERGE_ME
     BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
     m_bookmarkManagerUI.reset();
-#endif
 }
 
 void SimpleUI::openLinkFromPopup(const std::string &uri)
@@ -1412,12 +1404,10 @@ void SimpleUI::saveFolder(const char* title,int folder_id, int by_operator)
     if (id >= 0 )
      {     BROWSER_LOGD("[%s], Added New Folder", __func__);
      }
-#if MERGE_ME
     if(m_bookmarkManagerUI)
     {   m_bookmarkManagerUI->updateGengrid();
         m_bookmarkManagerUI->addBookmarkFolderItems(getBookmarkFolders());
     }
-#endif
 }
 
 
index ea7220c91be4b42385b12edb3d213899d724e30d..a6c4accb072a99ad28fda91ffb6d3b24eb76af56 100644 (file)
@@ -35,7 +35,6 @@
 // components
 #include "AbstractWebEngine.h"
 #if MERGE_ME
-#include "BookmarkManagerUI.h"
 #include "MoreMenuUI.h"
 #include "HistoryUI.h"
 #include "SettingsUI.h"
@@ -44,9 +43,7 @@
 #include "TabUI.h"
 #include "ButtonBar.h"
 #include "HistoryService.h"
-#if MERGE_ME
 #include "BookmarkManagerUI.h"
-#endif
 #include "SimpleURI.h"
 #include "SimpleScroller.h"
 #include "WebTitleBar.h"
@@ -125,7 +122,7 @@ private:
     void tabClosed(const tizen_browser::basic_webengine::TabId& id);
 
     void bookmarkCheck();
-    std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > getBookmarks(int folder_id = 0);
+    std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > getBookmarks(int folder_id = -1);
     std::vector<std::shared_ptr<tizen_browser::services::BookmarkItem> > getBookmarkFolders();
     std::vector<std::shared_ptr<tizen_browser::services::HistoryItem> > getHistory();
     void onBookmarkAdded(std::shared_ptr<tizen_browser::services::BookmarkItem> bookmarkItem);
@@ -297,8 +294,8 @@ private:
     std::shared_ptr<tizen_browser::services::HistoryService> m_historyService;
 #if MERGE_ME
     std::shared_ptr<tizen_browser::base_ui::MoreMenuUI> m_moreMenuUI;
-    std::shared_ptr<tizen_browser::base_ui::BookmarkManagerUI> m_bookmarkManagerUI;
 #endif
+    std::shared_ptr<tizen_browser::base_ui::BookmarkManagerUI> m_bookmarkManagerUI;
     std::shared_ptr<tizen_browser::base_ui::MainUI> m_mainUI;
 #if MERGE_ME
     std::shared_ptr<tizen_browser::base_ui::HistoryUI> m_historyUI;