include/svx/ClassificationDialog.hxx       |    1 
 svx/source/dialog/ClassificationDialog.cxx |   33 ++---
 svx/uiconfig/ui/classificationdialog.ui    |  165 +++++++++++++----------------
 3 files changed, 91 insertions(+), 108 deletions(-)

New commits:
commit 2373acbbb21dd6095d7bfc20b31bbfaa1d9bbad6
Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
Date:   Sat Dec 2 14:18:09 2017 +0900

    tdf#114901 TSCP various advanced TSCP dialog changes
    
    - change Markings from Combo to List box
    - minimize whitespace
    - move bold and sign paragraph under text area as it is fixed
    - remove bold in paragraph dialog
    
    Change-Id: I7ec20460d02d3611a1da325eb7d3de3aef10f03f
    Reviewed-on: https://gerrit.libreoffice.org/47632
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    Tested-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit 085852e2e2779de1712cf18b5e67740cb7a4bcb6)
    Reviewed-on: https://gerrit.libreoffice.org/47924
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/include/svx/ClassificationDialog.hxx 
b/include/svx/ClassificationDialog.hxx
index a9ec24c99d45..14b1607cf7b7 100644
--- a/include/svx/ClassificationDialog.hxx
+++ b/include/svx/ClassificationDialog.hxx
@@ -66,7 +66,6 @@ private:
     DECL_LINK(SelectToolboxHdl, ToolBox*, void);
     DECL_LINK(SelectClassificationHdl, ListBox&, void);
     DECL_LINK(SelectMarkingHdl, ListBox&, void);
-    DECL_LINK(LoseFocusMarkingHdl, Control&, void);
     DECL_LINK(SelectIPPartNumbersHdl, ListBox&, void);
     DECL_LINK(SelectRecentlyUsedHdl, ListBox&, void);
     DECL_LINK(SelectIPPartHdl, ListBox&, void);
diff --git a/svx/source/dialog/ClassificationDialog.cxx 
b/svx/source/dialog/ClassificationDialog.cxx
index fa5be8da164d..7e8097e7e120 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -180,7 +180,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* 
pParent, const bool bPer
     get(m_pClassificationListBox, "classificationCB");
     get(m_pInternationalClassificationListBox, 
"internationalClassificationCB");
     get(m_pMarkingLabel, "markingLabel");
-    get(m_pMarkingListBox, "markingCB");
+    get(m_pMarkingListBox, "markingLB");
     get(m_pIntellectualPropertyPartNumberListBox, 
"intellectualPropertyPartNumberLB");
     get(m_pIntellectualPropertyPartListBox, "intellectualPropertyPartLB");
     get(m_pIntellectualPropertyPartAddButton, 
"intellectualPropertyPartAddButton");
@@ -190,7 +190,15 @@ ClassificationDialog::ClassificationDialog(vcl::Window* 
pParent, const bool bPer
     m_pSignButton->SetClickHdl(LINK(this, ClassificationDialog, 
ButtonClicked));
     m_pSignButton->Show(m_bPerParagraph);
 
-    m_pToolBox->SetSelectHdl(LINK(this, ClassificationDialog, 
SelectToolboxHdl));
+    // no need for BOLD if we do paragraph classification
+    if (m_bPerParagraph)
+    {
+        m_pToolBox->Show(false);
+    }
+    else
+    {
+        m_pToolBox->SetSelectHdl(LINK(this, ClassificationDialog, 
SelectToolboxHdl));
+    }
 
     m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, 
ClassificationDialog, ButtonClicked));
 
@@ -206,9 +214,9 @@ ClassificationDialog::ClassificationDialog(vcl::Window* 
pParent, const bool bPer
 
     if (!maHelper.GetMarkings().empty())
     {
-        m_pMarkingListBox->setMaxWidthChars(20);
-        m_pMarkingListBox->SetSelectHdl(LINK(this, ClassificationDialog, 
SelectMarkingHdl));
-        m_pMarkingListBox->SetLoseFocusHdl(LINK(this, ClassificationDialog, 
LoseFocusMarkingHdl));
+        m_pMarkingListBox->setMaxWidthChars(10);
+        m_pMarkingListBox->SetDropDownLineCount(4);
+        m_pMarkingListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, 
SelectMarkingHdl));
 
         for (const OUString& rName : maHelper.GetMarkings())
             m_pMarkingListBox->InsertEntry(rName);
@@ -220,7 +228,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* 
pParent, const bool bPer
     }
 
     m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5);
-    m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20);
+    m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(10);
     m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, 
ClassificationDialog, SelectIPPartNumbersHdl));
     for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers())
         m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName);
@@ -621,22 +629,13 @@ IMPL_LINK(ClassificationDialog, SelectClassificationHdl, 
ListBox&, rBox, void)
     m_nCurrentSelectedCategory = nSelected;
 }
 
-IMPL_LINK_NOARG(ClassificationDialog, LoseFocusMarkingHdl, Control&, void)
-{
-    if (m_nInsertMarkings >= 0)
-    {
-        const OUString aString = maHelper.GetMarkings()[m_nInsertMarkings];
-        insertField(ClassificationType::MARKING, aString, aString);
-        m_nInsertMarkings = -1;
-    }
-}
-
 IMPL_LINK(ClassificationDialog, SelectMarkingHdl, ListBox&, rBox, void)
 {
     sal_Int32 nSelected = rBox.GetSelectedEntryPos();
     if (nSelected >= 0)
     {
-        m_nInsertMarkings = nSelected;
+        const OUString aString = maHelper.GetMarkings()[nSelected];
+        insertField(ClassificationType::MARKING, aString, aString);
     }
 }
 
diff --git a/svx/uiconfig/ui/classificationdialog.ui 
b/svx/uiconfig/ui/classificationdialog.ui
index bfc3d78d8f7e..ef3548c8db42 100644
--- a/svx/uiconfig/ui/classificationdialog.ui
+++ b/svx/uiconfig/ui/classificationdialog.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.1 -->
+<!-- Generated with glade 3.20.2 -->
 <interface domain="sfx">
   <requires lib="gtk+" version="3.4"/>
   <requires lib="LibreOffice" version="1.0"/>
@@ -74,38 +74,14 @@
           <object class="GtkGrid">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="row_spacing">12</property>
-            <property name="column_spacing">12</property>
-            <child>
-              <object class="svxlo-ClassificationEditView" 
id="classificationEditWindow">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="hexpand">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes" 
context="classificationdialog|label-Content">Content</property>
-                <property name="xalign">0</property>
-                <property name="yalign">0</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
-              </packing>
-            </child>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">6</property>
             <child>
               <object class="GtkGrid">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="row_spacing">12</property>
-                <property name="column_spacing">12</property>
+                <property name="row_spacing">6</property>
+                <property name="column_spacing">6</property>
                 <child>
                   <object class="GtkLabel">
                     <property name="visible">True</property>
@@ -152,47 +128,49 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBoxText" id="markingCB">
+                  <object class="GtkLabel" id="markingLabel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="label" translatable="yes" 
context="classificationdialog|label-Marking">Marking:</property>
+                    <property name="xalign">0</property>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
+                    <property name="left_attach">0</property>
                     <property name="top_attach">3</property>
+                    <property name="width">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="markingLabel">
+                  <object class="GtkComboBoxText" id="recentlyUsedCB">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="label" translatable="yes" 
context="classificationdialog|label-Marking">Marking:</property>
+                    <property name="hexpand">True</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes" 
context="classificationdialog|label-Classification">Recently Used:</property>
                     <property name="xalign">0</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">3</property>
+                    <property name="top_attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkBox">
+                  <object class="GtkTreeView" id="markingLB">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="valign">end</property>
+                    <property name="can_focus">True</property>
+                    <property name="hexpand">True</property>
                     <property name="vexpand">True</property>
-                    <property name="spacing">6</property>
-                    <property name="homogeneous">True</property>
-                    <child>
-                      <object class="GtkButton" id="signButton">
-                        <property name="label" translatable="yes" 
context="classificationdialog|signButton">Sign Paragraph</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">0</property>
-                      </packing>
+                    <child internal-child="selection">
+                      <object class="GtkTreeSelection"/>
                     </child>
                   </object>
                   <packing>
@@ -201,18 +179,40 @@
                     <property name="width">2</property>
                   </packing>
                 </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes" 
context="classificationdialog|label-Content">Content</property>
+                    <property name="xalign">0</property>
+                    <property name="yalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
                 <child>
                   <object class="GtkBox">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="valign">end</property>
-                    <property name="vexpand">True</property>
-                    <property name="spacing">6</property>
-                    <property name="homogeneous">True</property>
                     <child>
                       <object class="GtkToolbar" id="toolbox">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="show_arrow">False</property>
                         <child>
                           <object class="GtkToolButton" id="bold">
                             <property name="visible">True</property>
@@ -234,47 +234,47 @@
                         <property name="position">0</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkButton" id="signButton">
+                        <property name="label" translatable="yes" 
context="classificationdialog|signButton">Sign Paragraph</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                      </object>
+                      <packing>
+                        <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="width">2</property>
+                    <property name="top_attach">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkComboBoxText" id="recentlyUsedCB">
+                  <object class="svxlo-ClassificationEditView" 
id="classificationEditWindow">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
                   </object>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="top_attach">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkLabel">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes" 
context="classificationdialog|label-Classification">Recently Used:</property>
-                    <property name="xalign">0</property>
-                  </object>
-                  <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
+                    <property name="top_attach">1</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="left_attach">1</property>
+                <property name="left_attach">0</property>
                 <property name="top_attach">0</property>
-                <property name="height">3</property>
               </packing>
             </child>
             <child>
               <object class="GtkExpander" id="intellectualPropertyExpander">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="hexpand">True</property>
                 <child>
                   <object class="GtkGrid">
                     <property name="visible">True</property>
@@ -376,25 +376,10 @@
               </object>
               <packing>
                 <property name="left_attach">0</property>
-                <property name="top_attach">3</property>
+                <property name="top_attach">1</property>
                 <property name="width">2</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkGrid">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-                <property name="vexpand">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="expand">True</property>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to