if (!params_.link_url.is_empty())
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_OPEN_LINK_IN_NEW_WINDOW,
- std::string("Open in new window"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_OPEN_LINK_IN_NEW_TAB_ABB")),
std::string(),
params_.link_url.spec(),
std::string());
if (!params_.selection_text.empty())
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_CUT,
- std::string("Cut"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_CUT_ABB")),
std::string(),
std::string(),
std::string());
if (params_.is_editable) {
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_SELECT_WORD,
- std::string("Select"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_SELECT_ABB")),
std::string(),
std::string(),
std::string());
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_SELECT_ALL,
- std::string("Select All"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_SELECT_ALL_ABB")),
std::string(),
std::string(),
std::string());
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_PASTE,
- std::string("Paste"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_PASTE")),
std::string(),
std::string(),
std::string());
if (!params_.selection_text.empty())
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_COPY,
- std::string("Copy"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_COPY")),
std::string(),
std::string(),
std::string());
if (params_.has_image_contents && !params_.link_url.is_empty())
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_OPEN_IMAGE_IN_NEW_WINDOW,
- std::string("Open Image"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_OPEN_IMAGE_IN_NEW_TAB_ABB")),
params_.link_url.spec(),
params_.link_url.spec(),
std::string());
if (!params_.has_image_contents && !params_.link_url.is_empty())
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_TEXT_SELECTION_MODE,
- std::string("Select Mode"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_SELECTION_MODE_ABB")),
params_.link_url.spec(),
params_.link_url.spec(),
std::string());
AddItemToPropsedList(MENU_ITEM_TYPE_ACTION,
MENU_ITEM_CLIPBOARD,
- std::string("Clipboard"),
+ std::string(dgettext("WebKit","IDS_WEBVIEW_OPT_CLIPBOARD")),
std::string(),
std::string(),
std::string());
#include <Edje.h>
+// FIXME: To use BLINK_TEXT_DIR, following line needs to be modified later.
+#define WEBKIT_TEXT_DIR "/usr/share/ewebkit2-0/locale/po"
+
namespace content {
static const int menuHeight = 140;// The Height fo the context menu.
input_handle_(new SelectionHandleEfl(this, SelectionHandleEfl::HANDLE_TYPE_INPUT, parent_view->evas_object())),
magnifier_(new SelectionMagnifierEfl(this)) {
evas_object_event_callback_add(parent_view_->evas_object(), EVAS_CALLBACK_MOVE, &EvasParentViewMoveCallback, this);
+
+#if defined(OS_TIZEN)
+ setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET));
+ bindtextdomain("WebKit", WEBKIT_TEXT_DIR);
+ vconf_notify_key_changed(VCONFKEY_LANGSET, PlatformLanguageChanged, this);
+#endif
}
void SelectionControllerEfl::SetSelectionStatus(bool enable) {
return selection_data_->GetStatus();
}
+#if defined(OS_TIZEN)
+void SelectionControllerEfl::PlatformLanguageChanged(keynode_t* keynode, void* data) {
+ setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET));
+ bindtextdomain("WebKit", WEBKIT_TEXT_DIR);
+
+ SelectionControllerEfl* selection_controller = static_cast<SelectionControllerEfl*>(data);
+ if (!selection_controller)
+ return;
+
+ if (selection_controller->GetSelectionStatus())
+ selection_controller->ClearSelectionViaEWebView();
+ selection_controller->HideHandleAndContextMenu();
+}
+#endif
+
void SelectionControllerEfl::SetSelectionEditable(bool enable) {
TRACE_EVENT1("selection,efl", __PRETTY_FUNCTION__, "enable", enable);
selection_data_->SetEditable(enable);
magnifier_->UpdateScreen(img);
}
+void SelectionControllerEfl::ClearSelectionViaEWebView() {
+ parent_view_->ClearSelection();
+}
+
void SelectionControllerEfl::UpdateSelectionDataAndShow(const gfx::Rect& left_rect, const gfx::Rect& right_rect, bool is_anchor_first) {
TRACE_EVENT0("selection,efl", __PRETTY_FUNCTION__);
selection_data_->UpdateRectData(left_rect, right_rect, is_anchor_first);
#include "selection_handle_efl.h"
#include "selection_magnifier_efl.h"
+#if defined(OS_TIZEN)
+#include "vconf/vconf.h"
+#endif
+
+#include <libintl.h>
+
class EWebView;
namespace content {
// Clears the selection and hides context menu and handles
void ClearSelection();
+ void ClearSelectionViaEWebView();
EWebView* GetParentView() { return parent_view_; }
void HideHandle();
void HideHandleAndContextMenu();
static void EvasParentViewMoveCallback(void *data, Evas *e, Evas_Object *obj, void *event_info)
{ reinterpret_cast<SelectionControllerEfl*>(data)->OnParentParentViewMove(); }
+#if defined(OS_TIZEN)
+ static void PlatformLanguageChanged(keynode_t* keynode, void* data);
+#endif
+
void OnParentParentViewMove();
// Is required to send back selction points and range extenstion co-ordinates