Remove unused privilege && minor UI improvements. 62/282862/2 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.055918 accepted/tizen/7.0/unified/hotfix/20221116.111650 accepted/tizen/unified/20221013.014006 tizen_7.0_m2_release
authorErnest Borowski <e.borowski@samsung.com>
Wed, 12 Oct 2022 12:13:35 +0000 (14:13 +0200)
committerErnest Borowski <e.borowski@samsung.com>
Wed, 12 Oct 2022 12:17:35 +0000 (14:17 +0200)
Change-Id: I7948e7a310d4a1b52207126eca245a4b5c73b730
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
SettingCertificates/SettingCertificates/WidgetSettingCertificates.cs
SettingCertificates/SettingCertificates/res/locale/Resource.Designer.cs
SettingCertificates/SettingCertificates/res/locale/Resources.Designer.cs
SettingCertificates/SettingCertificates/res/locale/Resources.en.resx
SettingCertificates/SettingCertificates/res/locale/Resources.ko-KR.resx
SettingCertificates/SettingCertificates/res/locale/Resources.pl.resx
SettingCertificates/SettingCertificates/res/locale/Resources.resx
SettingCertificates/SettingCertificates/tizen-manifest.xml
SettingCertificates/SettingView/SettingView.cs
packaging/org.tizen.cssetting-certificates-1.0.0.tpk

index 348f13a..1247dcd 100644 (file)
@@ -48,6 +48,8 @@ namespace SettingCertificates
             _rootView.BackgroundColor = Color.White;
             _rootView.Size2D = window.Size;
             _rootView.PivotPoint = PivotPoint.Center;
+            _rootView.WidthSpecification = LayoutParamPolicies.MatchParent;
+            _rootView.HeightSpecification = LayoutParamPolicies.MatchParent;
             window.GetDefaultLayer().Add(_rootView);
             _navigator = window.GetDefaultNavigator();
             _navigator.Push(CreateFirstPage());
@@ -55,13 +57,17 @@ namespace SettingCertificates
         private ContentPage CreateFirstPage()
         {
             ScrollableBase content = CreateScrollableBase();
+            content.WidthSpecification = LayoutParamPolicies.MatchParent;
+            content.HeightSpecification = LayoutParamPolicies.MatchParent;
             var rootCert = new DefaultLinearItem()
             {
                 WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
                 Text = Resources.IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB/*"Trusted root CA certificates"*/,
                 IsSelectable = false,
                 Margin = new Extents(20, 20, 1, 1),
                 BackgroundColor = Color.White,
+                CornerRadius = new Vector4(10, 10, 10, 10)
             };
 
             rootCert.Clicked += (o, e) =>
@@ -72,6 +78,7 @@ namespace SettingCertificates
             var userCert = new DefaultLinearItem()
             {
                 WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
                 Text = Resources.IDS_ST_BODY_USER_CERTIFICATES/*"User certificates"*/,
                 IsSelectable = false,
                 Margin = new Extents(20, 20, 1, 1),
@@ -87,6 +94,8 @@ namespace SettingCertificates
 
             ContentPage firstPage = CreateContentPage(Resources.IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB/*"Manage certificates"*/, content);
             firstPage.AppBar.AutoNavigationContent = false;
+            firstPage.WidthSpecification = LayoutParamPolicies.MatchParent;
+            firstPage.HeightSpecification = LayoutParamPolicies.MatchParent;
 
             var navigationContent = new Button(((AppBarStyle)ThemeManager.GetStyle("Tizen.NUI.Components.AppBar")).BackButton);
             navigationContent.Clicked += (o, e) =>
@@ -103,11 +112,29 @@ namespace SettingCertificates
         {
             ScrollableBase content = CreateScrollableBase();
             content.BackgroundColor = new Color("#EFEFEF");
+            if (certificates == null || certificates.Count == 0)
+            {
+                var item = new DefaultLinearItem()
+                {
+                    WidthSpecification = LayoutParamPolicies.MatchParent,
+                    Text = Resources.IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL,
+                    IsSelectable = false,
+                    Margin = new Extents(20, 20, 1, 1),
+                    BackgroundColor = Color.White,
+                    CornerRadius = new Vector4(10, 10, 10, 10),
+                    CellHorizontalAlignment = HorizontalAlignmentType.Center,
+                    CellVerticalAlignment = VerticalAlignmentType.Center,
+                    HeightSpecification = LayoutParamPolicies.MatchParent,
+                };
+                content.Add(item);
+                return CreateContentPage(title, content);
+            }
             foreach (certificateMetadata cert in certificates)
             {
                 var item = new DefaultLinearItem()
                 {
                     WidthSpecification = LayoutParamPolicies.MatchParent,
+                    HeightSpecification = LayoutParamPolicies.MatchParent,
                     Text = cert.title,
                     IsSelectable = false,
                     Margin = new Extents(20, 20, 1, 1),
@@ -418,6 +445,8 @@ namespace SettingCertificates
                 },
                 Content = content,
                 BackgroundColor = new Color("#EFEFEF"),
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification= LayoutParamPolicies.MatchParent,
             };
         }
 
index 693caad..56bc521 100644 (file)
@@ -224,5 +224,12 @@ namespace SettingPrivacy.res.locale
                 return ResourceManager.GetString("IDS_ST_BODY_SIGNATURE_ALGORITHM_C", resourceCulture);
             }
         }
+        internal static string IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL
+        {
+            get
+            {
+                return ResourceManager.GetString("IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL", resourceCulture);
+            }
+        }
     }
 }
index 1b73135..1cc0dbc 100644 (file)
@@ -239,5 +239,14 @@ namespace SettingCertificates.res.locale {
                 return ResourceManager.GetString("IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB", resourceCulture);
             }
         }
+
+        /// <summary>
+        ///   Looks up a localized string similar to After you install certificates, they will be shown here..
+        /// </summary>
+        internal static string IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL {
+            get {
+                return ResourceManager.GetString("IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL", resourceCulture);
+            }
+        }
     }
 }
index 07c961f..d9b1bc4 100644 (file)
   <data name="IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB" xml:space="preserve">
     <value>Manage certificates</value>
   </data>
+  <data name="IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL" xml:space="preserve">
+    <value>After you install certificates, they will be shown here.</value>
+  </data>
 </root>
\ No newline at end of file
index d35b53e..c1c71fc 100644 (file)
   <data name="IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB" xml:space="preserve">
     <value>인증서 관리</value>
   </data>
+  <data name="IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL" xml:space="preserve">
+    <value>인증서 추가 후에 인증서를 여기서 볼 수 있습니다.</value>
+  </data>
 </root>
\ No newline at end of file
index 23e7ec7..5b6c472 100644 (file)
   <data name="IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB" xml:space="preserve">
     <value>Zarządzanie certyfikatami</value>
   </data>
+  <data name="IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL" xml:space="preserve">
+    <value>Po zainstalowaniu, certyfikaty będą tutaj widoczne.</value>
+  </data>
 </root>
\ No newline at end of file
index 07c961f..d9b1bc4 100644 (file)
   <data name="IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB" xml:space="preserve">
     <value>Manage certificates</value>
   </data>
+  <data name="IDS_ST_TPOP_NO_CERTIFICATE_FOUND_DETAIL" xml:space="preserve">
+    <value>After you install certificates, they will be shown here.</value>
+  </data>
 </root>
\ No newline at end of file
index 5f79a4c..b9fa85c 100644 (file)
@@ -17,7 +17,6 @@
                <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
        </widget-application>
        <privileges>
-               <privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
                <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
        </privileges>
 </manifest>
index 15c714f..11d0691 100644 (file)
@@ -17,6 +17,7 @@
 using System;
 using Tizen.NUI;
 using Tizen.Applications;
+using Tizen.NUI.BaseComponents;
 
 namespace SettingView
 {
@@ -44,6 +45,8 @@ namespace SettingView
 
             mWidgetView = WidgetViewManager.Instance.AddWidget("certificates@org.tizen.cssetting-certificates", encodedBundle, window.Size.Width, window.Size.Height, 0.0f);
             mWidgetView.Position = new Position(0, 0);
+            mWidgetView.WidthSpecification = LayoutParamPolicies.MatchParent;
+            mWidgetView.HeightSpecification = LayoutParamPolicies.MatchParent;
             window.GetDefaultLayer().Add(mWidgetView);
         }
 
@@ -59,7 +62,6 @@ namespace SettingView
         {
             var appCustomBorder = new SettingViewBorder();
             var app = new Program("", new Size2D(800, 400), new Position2D(300, 100), appCustomBorder);
-
             app.Run(args);
         }
     }
index 9634adf..926042d 100644 (file)
Binary files a/packaging/org.tizen.cssetting-certificates-1.0.0.tpk and b/packaging/org.tizen.cssetting-certificates-1.0.0.tpk differ