From: Yunchan Cho Date: Mon, 22 Apr 2013 05:26:03 +0000 (+0900) Subject: Handle 'mouse-event' attribute differently according to configuration of web-provider... X-Git-Tag: accepted/tizen_2.1/20130425.023916~5^2~1^2 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fweb%2Fwrt-installer.git;a=commitdiff_plain;h=c55a82f6878cdb2e65a9b549f9fbafdc98a2a3d4 Handle 'mouse-event' attribute differently according to configuration of web-provider's plugin [Issue#] N/A [Problem] For general appwidgets, value of 'mouse-event' isn't unconditionally indicated as false to its webapp's manifest(xml) [Cause] wrt-installer didn't distinguish general appwidgets and commericalized appwidgets. [Solution] For only commercialized appwidget, wrt-installer adds value of 'mouse-event' as 'true' to its manifest(xml), if value of 'mouse-event' is 'true' on its webapp's config.xml. [SCMRequest] First, livebox.web-provider-1.10 must be merged to obs server. Change-Id: Ia1d50746eb1245ee4c279eb68132a69a758e6fb2 --- diff --git a/src/jobs/widget_install/task_database.cpp b/src/jobs/widget_install/task_database.cpp index 329b618..bf49632 100644 --- a/src/jobs/widget_install/task_database.cpp +++ b/src/jobs/widget_install/task_database.cpp @@ -323,10 +323,19 @@ void TaskDatabase::StepLiveboxDBInsert() } else { autoLaunch = 0; } + LogInfo("livebox auto-launch: " << autoLaunch); + + int mouseEvent; + if ((**it).m_boxInfo.m_boxMouseEvent == L"true") { + mouseEvent = 1; + } else { + mouseEvent = 0; + } + LogInfo("livebox mouse-event: " << mouseEvent); int ret = web_provider_livebox_insert_box_info( - boxId.c_str(), tizenId.c_str(), boxType.c_str(), autoLaunch); + boxId.c_str(), tizenId.c_str(), boxType.c_str(), autoLaunch, mouseEvent); if (ret < 0) { LogDebug("failed to set type of livebox: " << boxId); diff --git a/src/jobs/widget_install/task_manifest_file.cpp b/src/jobs/widget_install/task_manifest_file.cpp index 0abe0f1..18ddf7e 100644 --- a/src/jobs/widget_install/task_manifest_file.cpp +++ b/src/jobs/widget_install/task_manifest_file.cpp @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include #include #include @@ -1024,13 +1026,28 @@ void TaskManifestFile::setLiveBoxInfo(Manifest& manifest) } if (ConfigInfo->m_boxInfo.m_boxMouseEvent == L"true") { - box.boxMouseEvent = ConfigInfo->m_boxInfo.m_boxMouseEvent; + std::string boxType; + if (ConfigInfo->m_type == L"") { + // in case of default livebox + boxType = web_provider_livebox_get_default_type(); + } else { + boxType = DPL::ToUTF8String(ConfigInfo->m_type); + } + + int box_scrollable = + web_provider_plugin_get_box_scrollable(boxType.c_str()); + + if (box_scrollable) { + box.boxMouseEvent = L"true"; + } else { + box.boxMouseEvent = L"false"; + } } else { box.boxMouseEvent = L"false"; } if (ConfigInfo->m_boxInfo.m_boxTouchEffect == L"true") { - box.boxTouchEffect = ConfigInfo->m_boxInfo.m_boxTouchEffect; + box.boxTouchEffect = L"true"; } else { box.boxTouchEffect= L"false"; }