LicenseHref(this),
//localized, so not binded
Icon(this),
- Version(this,
- &BindToWidgetDAO<DPL::OptionalString,
- &WidgetDAOReadOnly::getVersion>::Get),
SplashImg(
this,
&BindToWidgetDAO<DPL::OptionalString,
DPL::Event::Property<OptionalWidgetIcon> Icon;
/**
- * @brief Widget version
- */
- DPL::Event::Property<DPL::OptionalString,
- DPL::Event::PropertyReadOnly,
- DPL::Event::PropertyStorageDynamicCached> Version;
-
- /**
* @brief Widget splash image src
*/
DPL::Event::Property<DPL::OptionalString,
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_message_support.cpp
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_orientation_support.cpp
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_scheme_support.cpp
- ${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_user_agent_support.cpp
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_usermedia_support.cpp
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_web_notification_data.cpp
${PROJECT_SOURCE_DIR}/src/view/webkit/view_logic_web_notification_support.cpp
#include <view_logic_message_support.h>
#include <view_logic_orientation_support.h>
#include <view_logic_scheme_support.h>
-#include <view_logic_user_agent_support.h>
#include <view_logic_usermedia_support.h>
#include <view_logic_web_notification_data.h>
#include <view_logic_web_notification_support.h>
{
LogDebug("prepareEwkView called");
Assert(wkView);
- ViewModule::UserAgentSupport::setUserAgent(m_model, wkView);
-
Ewk_Settings* settings = ewk_view_settings_get(wkView);
+ // set user agent
+ std::string customUserAgent = m_model->SettingList.Get().getUserAgent();
+ if (customUserAgent.empty()) {
+ LogDebug("Setting user agent as: default");
+ ewk_view_user_agent_set(wkView, NULL);
+ std::string defaultUA = ewk_view_user_agent_get(wkView);
+ LogDebug("webkit's UA: " << defaultUA);
+ } else {
+ LogDebug("Setting custom user agent as: " << customUserAgent);
+ ewk_view_user_agent_set(wkView, customUserAgent.c_str());
+ }
+
// set custom header : language
using namespace ViewModule::CustomHeaderSupport;
std::string customHeaderString = getValueByField(ACCEPT_LANGUAGE);