Open Domain setting menu
authorJihoon Chung <jihoon.chung@samsung.com>
Sat, 12 Jan 2013 06:23:34 +0000 (15:23 +0900)
committerJihoon Chung <jihoon.chung@samsung.com>
Sat, 12 Jan 2013 06:49:47 +0000 (15:49 +0900)
[Issue#] JIRA (#TDIS-2210)
[Problem] Have no method check the security information
[Cause] Temporarily block domain menu for prevent the crash issue
[Solution] Open domain display menu
Also fixed crash issue in the license menu
[SCMRequest] N/A

Change-Id: I3d308b81c4764050f9e3e23767e5bd253cc3e7f7

webapp-detail/detailview.cpp

index 90d43a6..eb2bce2 100644 (file)
@@ -718,15 +718,15 @@ void DetailView::addDefInfo(Evas_Object *gl)
     ver = m_dao->getVersion();
     bindtextdomain("ug-webapp-common-efl", "/usr/ug/res/locale");
     addTitleText(gl,D_("IDS_COM_BODY_DETAILS_NAME"),
-            m_localizedInfo.name.IsNull() ? "" :
-            DPL::ToUTF8String((*m_localizedInfo.name)).c_str());
+                 m_localizedInfo.name.IsNull() ? "" :
+                 DPL::ToUTF8String((*m_localizedInfo.name)).c_str());
     addTitleText(gl,U_("IDS_ST_BODY_VERSION"), ver.IsNull() ? "" :
-            DPL::ToUTF8String((*ver)).c_str());
-    //addTitleText(gl,U_("IDS_ST_BODY_DOMAIN_SECURITY_STATUS"),
-    //    m_dao->isTrusted() ? "Trusted" : "Untrusted");
+                 DPL::ToUTF8String((*ver)).c_str());
+    addTitleText(gl,U_("IDS_ST_BODY_DOMAIN_SECURITY_STATUS"),
+                 m_dao->isTrusted() ? "Trusted" : "Untrusted");
     addTitleText(gl,D_("IDS_COM_BODY_DESCRIPTION"),
-            m_localizedInfo.description.IsNull() ? "" :
-            DPL::ToUTF8String((*m_localizedInfo.description)).c_str());
+                 m_localizedInfo.description.IsNull() ? "" :
+                 DPL::ToUTF8String((*m_localizedInfo.description)).c_str());
 }
 
 void DetailView::addViewModes(Evas_Object *gl)
@@ -870,23 +870,27 @@ void DetailView::addLicenseInfo(Evas_Object *gl, const char* title)
 
     Assert(gl);
     try {
-    detailData = new DetailData(this,
-                                title,
-                                DPL::ToUTF8String(
-                                    *m_localizedInfo.license).c_str());
-    itc.item_style = "dialogue/1text";
-    itc.func.text_get =getTitle ;
-    itc.func.content_get = NULL;
-    itc.func.state_get = NULL;
-    itc.func.del = NULL;
+        detailData = new DetailData(
+            this,
+            title,
+            m_localizedInfo.license.IsNull() ?
+            "" : DPL::ToUTF8String((*m_localizedInfo.license)).c_str());
+        itc.item_style = "dialogue/1text";
+        itc.func.text_get =getTitle ;
+        itc.func.content_get = NULL;
+        itc.func.state_get = NULL;
+        itc.func.del = NULL;
 
-    it = elm_genlist_item_append(gl,
-                                 &itc,
-                                 static_cast<void *>(detailData),
-                                 NULL,
-                                 ELM_GENLIST_ITEM_NONE,
-                                 viewlicenseCallback,
-                                 static_cast<void *>(detailData));
+        it = elm_genlist_item_append(gl,
+                                     &itc,
+                                     static_cast<void *>(detailData),
+                                     NULL,
+                                     ELM_GENLIST_ITEM_NONE,
+                                     viewlicenseCallback,
+                                     static_cast<void *>(detailData));
+        if (m_localizedInfo.license.IsNull()) {
+            elm_object_item_disabled_set(it, EINA_TRUE);
+        }
     } catch (const std::bad_alloc &) {
     }
 }