cui/source/options/certpath.cxx                    |    2 
 cui/uiconfig/ui/certdialog.ui                      |   23 +++++-----
 xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui |   45 +++++++++++---------
 xmlsecurity/uiconfig/ui/selectcertificatedialog.ui |   46 ++++++++++++---------
 4 files changed, 68 insertions(+), 48 deletions(-)

New commits:
commit f2f1782d23abc48dadc21a82181417c557b2090d
Author:     Moritz Duge <moritz.d...@allotropia.de>
AuthorDate: Wed Jul 17 17:35:45 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Thu Jul 25 10:23:17 2024 +0200

    tdf#161909: Fix resize for cert listings (GtkBox instead of GtkGrid)
    
    - "Certificate Path" dialog (select Mozilla profile for NSS)
      - resizing broken since commit db9e1ef04d13ecc1b8f8f156b059173143ea03ea
      - also increased default width to account for long filesystem paths
    - "Digital Signatures" dialog
    - "Select Certificate" dialog
      - resizable=True is the default (Glade removes explicit defaults)
      - Make long translations wrap instead of being cut.
    
    Glade set expand=False and fill=True as defaults inside GtkBox.
    
    Change-Id: I2d7719e83e5162d06d30e25b3e307fa23e0d605e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170694
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index f3edc9c10501..ed24e4904af2 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -29,7 +29,7 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
     , m_sAddDialogText(m_xBuilder->weld_label(u"certdir"_ustr)->get_label())
     , m_sManualLabel(m_xBuilder->weld_label(u"manual"_ustr)->get_label())
 {
-    
m_xCertPathList->set_size_request(m_xCertPathList->get_approximate_digit_width()
 * 70,
+    
m_xCertPathList->set_size_request(m_xCertPathList->get_approximate_digit_width()
 * 140,
                                       m_xCertPathList->get_height_rows(6));
 
     // needed for VLCPLUGIN != gtk3 (e.g. "gen")
diff --git a/cui/uiconfig/ui/certdialog.ui b/cui/uiconfig/ui/certdialog.ui
index 52740882ff3a..bb73bdc8cc80 100644
--- a/cui/uiconfig/ui/certdialog.ui
+++ b/cui/uiconfig/ui/certdialog.ui
@@ -116,15 +116,15 @@
             <property name="label-xalign">0</property>
             <property name="shadow-type">none</property>
             <child>
-              <!-- n-columns=1 n-rows=3 -->
-              <object class="GtkGrid" id="grid1">
+              <object class="GtkBox" id="box1">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
                 <property name="margin-start">12</property>
                 <property name="margin-top">6</property>
                 <property name="hexpand">True</property>
                 <property name="vexpand">True</property>
-                <property name="row-spacing">6</property>
+                <property name="orientation">vertical</property>
+                <property name="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
@@ -139,13 +139,14 @@
                     <property name="yalign">0</property>
                   </object>
                   <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">0</property>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <!-- n-columns=2 n-rows=1 -->
-                  <object class="GtkGrid" id="grid2">
+                  <object class="GtkGrid" id="grid1">
                     <property name="can-focus">False</property>
                     <property name="no-show-all">True</property>
                     <child>
@@ -173,8 +174,9 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">1</property>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
@@ -236,8 +238,9 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">2</property>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
               </object>
diff --git a/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui 
b/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui
index 7602a83d7858..1978a501daa2 100644
--- a/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui
+++ b/xmlsecurity/uiconfig/ui/digitalsignaturesdialog.ui
@@ -75,13 +75,13 @@
           </packing>
         </child>
         <child>
-          <!-- n-columns=1 n-rows=8 -->
-          <object class="GtkGrid" id="grid1">
+          <object class="GtkBox" id="box1">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
-            <property name="row-spacing">6</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">6</property>
             <child>
               <object class="GtkLabel" id="dochint">
                 <property name="can-focus">False</property>
@@ -90,8 +90,9 @@
                 <property name="xalign">0</property>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">0</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
@@ -200,8 +201,9 @@
                 </child>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">4</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
@@ -281,13 +283,14 @@
                 </child>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">7</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
               <!-- n-columns=5 n-rows=1 -->
-              <object class="GtkGrid" id="grid2">
+              <object class="GtkGrid" id="grid1">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
                 <property name="hexpand">True</property>
@@ -347,8 +350,9 @@
                 </child>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">3</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
               </packing>
             </child>
             <child>
@@ -359,8 +363,9 @@
                 <property name="xalign">0</property>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">1</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
               </packing>
             </child>
             <child>
@@ -371,13 +376,14 @@
                 <property name="xalign">0</property>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">2</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
               </packing>
             </child>
             <child>
               <!-- n-columns=2 n-rows=4 -->
-              <object class="GtkGrid" id="grid3">
+              <object class="GtkGrid" id="grid2">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
                 <property name="column-spacing">12</property>
@@ -479,8 +485,9 @@
                 </child>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">5</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">6</property>
               </packing>
             </child>
             <child>
diff --git a/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui 
b/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui
index c06ce07952d1..12e7754121a9 100644
--- a/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui
+++ b/xmlsecurity/uiconfig/ui/selectcertificatedialog.ui
@@ -22,7 +22,6 @@
     <property name="can-focus">False</property>
     <property name="border-width">6</property>
     <property name="title" translatable="yes" 
context="selectcertificatedialog|SelectCertificateDialog">Select 
Certificate</property>
-    <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="type-hint">dialog</property>
     <child internal-child="vbox">
@@ -88,34 +87,41 @@
           </packing>
         </child>
         <child>
-          <!-- n-columns=1 n-rows=6 -->
-          <object class="GtkGrid" id="grid1">
+          <object class="GtkBox" id="box1">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
             <property name="hexpand">True</property>
             <property name="vexpand">True</property>
-            <property name="row-spacing">12</property>
-            <property name="column-spacing">12</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">12</property>
             <child>
               <object class="GtkLabel" id="sign">
                 <property name="can-focus">False</property>
                 <property name="label" translatable="yes" 
context="selectcertificatedialog|sign">Select the certificate you want to use 
for signing:</property>
+                <property name="wrap">True</property>
+                <property name="width-chars">56</property>
+                <property name="max-width-chars">56</property>
                 <property name="xalign">0</property>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">0</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkLabel" id="encrypt">
                 <property name="can-focus">False</property>
                 <property name="label" translatable="yes" 
context="selectcertificatedialog|encrypt">Select the certificate you want to 
use for encryption:</property>
+                <property name="wrap">True</property>
+                <property name="width-chars">56</property>
+                <property name="max-width-chars">56</property>
                 <property name="xalign">0</property>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">1</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
               </packing>
             </child>
             <child>
@@ -222,8 +228,9 @@
                 </child>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">3</property>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
               </packing>
             </child>
             <child>
@@ -240,8 +247,9 @@
                 </child>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">2</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
               </packing>
             </child>
             <child>
@@ -274,15 +282,16 @@
                     </child>
                   </object>
                   <packing>
-                    <property name="expand">True</property>
+                    <property name="expand">False</property>
                     <property name="fill">True</property>
                     <property name="position">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">5</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
               </packing>
             </child>
             <child>
@@ -331,8 +340,9 @@
                 </child>
               </object>
               <packing>
-                <property name="left-attach">0</property>
-                <property name="top-attach">4</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">5</property>
               </packing>
             </child>
           </object>

Reply via email to