Fix Name field in case of widget label 45/34545/6 accepted/tizen/common/20150129.111432 submit/tizen_common/20150129.104614
authorBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Wed, 28 Jan 2015 17:45:44 +0000 (18:45 +0100)
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Thu, 29 Jan 2015 10:44:59 +0000 (02:44 -0800)
If the short name is empty use the long name instead

Change-Id: Id7f6bd3fa54a9801c0f93e510ae6f723241185e4
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
src/wgt/step/step_parse.cc

index f8d3582..2739f1f 100644 (file)
@@ -117,7 +117,13 @@ void StepParse::fillManifest(const ManifestData* data, manifest_x* manifest) {
 
   manifest->uiapplication->appid = strdup(data->id);
   manifest->uiapplication->type = strdup("webapp");
-  manifest->uiapplication->label->name = strdup(data->short_name);
+
+  // For wgt package use the long name if the short name is emty
+  if ( ( data->short_name ) && ( strlen(data->short_name) ) )
+    manifest->uiapplication->label->name = strdup(data->short_name);
+  else
+    manifest->uiapplication->label->name = strdup(data->name);
+
   manifest->uiapplication->icon->name = strdup(data->icon);
   manifest->uiapplication->next = nullptr;