Fixed the logic to apply default theme.
authorYuni Jeong <yhnet.jung@samsung.com>
Mon, 10 Sep 2012 09:20:34 +0000 (18:20 +0900)
committerYuni Jeong <yhnet.jung@samsung.com>
Mon, 10 Sep 2012 11:15:29 +0000 (20:15 +0900)
[Title] Fixed the logic to apply default theme.
[Issue#] N/A
[Problem] Text selection handlers are not displayed.
[Cause] Because text selection use fixed default theme path.
        - In spite of default theme change, text selection's default theme is not changed.
[Solution] Fixed the logic to apply default theme

Change-Id: I6923ba5521736ae76f44a626edad0c91da335e1e

Source/WebKit2/UIProcess/API/efl/editor/TextSelection.cpp

index dfcf25e..0112fb5 100755 (executable)
@@ -32,6 +32,7 @@
 #include <WebCore/NotImplemented.h>
 
 #include "NativeWebMouseEvent.h"
+#include <Elementary.h>
 
 using namespace WebCore;
 
@@ -47,7 +48,11 @@ TextSelection::TextSelection(Evas_Object* viewWidget, WebPageProxy* page, PageCl
         m_isTextSelectionEnable(true)
 {
     ASSERT(viewWidget);
-    static const String themePath = "/usr/share/elementary/themes/blue-hd.edj";
+
+    const Eina_List* themes = elm_theme_list_get(elm_object_theme_get(m_object));
+    const char* theme = static_cast<const char*>(eina_list_data_get(themes));
+    String themePath = String::fromUTF8(elm_theme_list_item_path_get(theme, NULL));
+
     m_leftHandle = new TextSelectionHandle(m_object, themePath, "elm/entry/selection/block_handle_left", true, this);
     m_rightHandle = new TextSelectionHandle(m_object, themePath, "elm/entry/selection/block_handle_right", false, this);
     m_magnifier = new TextSelectionMagnifier(m_object, page, pageClient);