Add nodisplay setting
authorleerang song <leerang.song@samsung.com>
Tue, 4 Dec 2012 05:48:35 +0000 (14:48 +0900)
committerleerang song <leerang.song@samsung.com>
Tue, 4 Dec 2012 06:10:51 +0000 (15:10 +0900)
[Issue#] N/A
[Bug] N/A
[Cause] N/A
[Solution] N/A
[Verification] N/A

Change-Id: I2cb0b984d11020acc8cef171f25de66ddf09e007

configuration/config.tizen.xsd [changed mode: 0644->0755]
configuration/config.xml [changed mode: 0644->0755]
src/jobs/widget_install/task_manifest_file.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index a981896..0f8700d
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- Widget Configuration Document Extensions XSD For TIZEN -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"   xmlns:tizen="http://tizen.org/ns/widgets" targetNamespace="http://tizen.org/ns/widgets">
-
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"   xmlns:tizen="http://tizen.org/ns/widgets" targetNamespace="http://tizen.org/ns/widgets" xmlns:widgets="http://www.w3.org/ns/widgets">
+    <xs:import namespace="http://www.w3.org/ns/widgets" schemaLocation="config.xsd"/>
 <xs:simpleType name="appserviceOperationType">
     <!--
     <xs:restriction base="xs:token">
@@ -60,6 +60,7 @@
         <xs:attribute name="contextmenu" type="tizen:activationType" use="optional"/>
         <xs:attribute name="context-menu" type="tizen:activationType" use="optional"/>
         <xs:attribute name="background-support" type="tizen:activationType" use="optional"/>
+        <xs:attribute name="nodisplay" type="widgets:data.boolean" use="optional"/>
     </xs:complexType>
 </xs:element>
 
old mode 100644 (file)
new mode 100755 (executable)
index 4038a23..3e2cda8
@@ -32,4 +32,5 @@
   <!-- tizen setting element -->
   <tizen:setting screen-orientation="portrait" />
   <tizen:setting contextmenu="disable" />
+  <tizen:setting nodisplay="false" />
 </widget>
old mode 100644 (file)
new mode 100755 (executable)
index 3acb023..c22bd09
@@ -56,6 +56,9 @@ using namespace WrtDB;
 namespace {
 typedef std::map<DPL::String, DPL::String> LanguageTagMap;
 
+const char* const ST_TRUE = "true";
+const char* const ST_NODISPLAY = "nodisplay";
+
 LanguageTagMap getLanguageTagMap()
 {
     LanguageTagMap map;
@@ -727,7 +730,20 @@ void TaskManifestFile::setWidgetManifest(Manifest & manifest)
 
 void TaskManifestFile::setWidgetOtherInfo(UiApplication & uiApp)
 {
-    uiApp.setNodisplay(false);
+    FOREACH(it, m_context.widgetConfig.configInfo.settingsList)
+    {
+         if(!strcmp(DPL::ToUTF8String(it->m_name).c_str(), ST_NODISPLAY)) {
+             if(!strcmp(DPL::ToUTF8String(it->m_value).c_str(), ST_TRUE)) {
+                uiApp.setNodisplay(true);
+             }
+             else {
+                uiApp.setNodisplay(false);
+            }
+         }
+         else {
+            uiApp.setNodisplay(false);
+         }
+     }
     //TODO
     //There is no "X-TIZEN-PackageType=wgt"
     //There is no X-TIZEN-PackageID in manifest "X-TIZEN-PackageID=" << DPL::ToUTF8String(*widgetID).c_str()