Fix StepParse for tizen:service icon 56/71456/5 accepted/tizen/common/20160621.184529 accepted/tizen/ivi/20160622.093657 accepted/tizen/mobile/20160622.093546 accepted/tizen/tv/20160622.093616 accepted/tizen/wearable/20160622.093637 submit/tizen/20160621.063045
authorTomasz Iwanek <t.iwanek@samsung.com>
Wed, 25 May 2016 10:39:18 +0000 (12:39 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Mon, 20 Jun 2016 15:07:59 +0000 (08:07 -0700)
According to 782d65d706b0bc46e12a2e041a9331893c788f6c
icon path should be always set with full path.

To verify:
 - install widget with <tizen:service> tag and check shared/res/ for icons
   there should be one per tizen:service and one for widget itself.

Change-Id: I58d61c447b88a70de34faabaff81c07133f4cfe4

src/wgt/step/configuration/step_parse.cc
src/wgt/step/filesystem/step_wgt_patch_icons.cc

index 51c86ca..5e1a677 100644 (file)
@@ -343,8 +343,10 @@ bool StepParse::FillServiceApplicationInfo(manifest_x* manifest) {
     }
 
     if (!service_info.icon().empty()) {
+      bf::path icon_path = context_->root_application_path.get()
+          / manifest->package / "res" / "wgt" / service_info.icon();
       icon_x* icon = reinterpret_cast<icon_x*>(calloc(1, sizeof(icon_x)));
-      icon->text = strdup(service_info.icon().c_str());
+      icon->text = strdup(icon_path.c_str());
       icon->lang = strdup(DEFAULT_LOCALE);
       application->icon = g_list_append(application->icon, icon);
     }
index d9a1827..5bcb229 100644 (file)
@@ -13,10 +13,6 @@ namespace bf = boost::filesystem;
 namespace bs = boost::system;
 namespace ci = common_installer;
 
-namespace {
-const char kResWgt[] = "res/wgt";
-}  // namespace
-
 namespace wgt {
 namespace filesystem {