[Libreoffice-commits] core.git: cui/source cui/uiconfig

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 16 12:55:54 UTC 2021


 cui/source/customize/cfgutil.cxx       |    7 -
 cui/source/inc/cfgutil.hxx             |    2 
 cui/uiconfig/ui/macroselectordialog.ui |  124 +++------------------------------
 3 files changed, 16 insertions(+), 117 deletions(-)

New commits:
commit 748ef40304e523135108905e902655abdf3c5d23
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Mar 11 09:11:38 2021 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Apr 16 14:55:16 2021 +0200

    Remove unused code from Macro Selector dialog
    
    Change-Id: I9930fd7eaf2410447f84aa4798478a10915ea738
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112316
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114205
    Tested-by: Jenkins

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 0d9491c7ddac..84540dd8d7f6 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1077,9 +1077,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
     , m_xCategories(new CuiConfigGroupListBox(m_xBuilder->weld_tree_view("categories")))
     , m_xCommands(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view("commands")))
     , m_xLibraryFT(m_xBuilder->weld_label("libraryft"))
-    , m_xCategoryFT(m_xBuilder->weld_label("categoryft"))
     , m_xMacronameFT(m_xBuilder->weld_label("macronameft"))
-    , m_xCommandsFT(m_xBuilder->weld_label("commandsft"))
     , m_xOKButton(m_xBuilder->weld_button("ok"))
     , m_xCancelButton(m_xBuilder->weld_button("cancel"))
     , m_xDescriptionText(m_xBuilder->weld_text_view("description"))
@@ -1089,9 +1087,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
     m_xOKButton->show();
 
     m_xLibraryFT->set_visible(true);
-    m_xCategoryFT->set_visible(false);
     m_xMacronameFT->set_visible(true);
-    m_xCommandsFT->set_visible(false);
 
     const OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
     m_xCategories->SetFunctionListBox(m_xCommands.get());
@@ -1120,6 +1116,9 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
     m_xCategories->SetStylesInfo(&m_aStylesInfo);
 
     UpdateUI();
+
+    if (comphelper::LibreOfficeKit::isActive())
+        m_xDescriptionText->hide();
 }
 
 SvxScriptSelectorDialog::~SvxScriptSelectorDialog()
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 66ffe4809659..0d6a8c1ee4be 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -238,9 +238,7 @@ class SvxScriptSelectorDialog : public weld::GenericDialogController
     std::unique_ptr<CuiConfigGroupListBox> m_xCategories;
     std::unique_ptr<CuiConfigFunctionListBox> m_xCommands;
     std::unique_ptr<weld::Label> m_xLibraryFT;
-    std::unique_ptr<weld::Label> m_xCategoryFT;
     std::unique_ptr<weld::Label> m_xMacronameFT;
-    std::unique_ptr<weld::Label> m_xCommandsFT;
     std::unique_ptr<weld::Button> m_xOKButton;
     std::unique_ptr<weld::Button> m_xCancelButton;
     std::unique_ptr<weld::TextView> m_xDescriptionText;
diff --git a/cui/uiconfig/ui/macroselectordialog.ui b/cui/uiconfig/ui/macroselectordialog.ui
index 7756c141c052..5403437ab8f6 100644
--- a/cui/uiconfig/ui/macroselectordialog.ui
+++ b/cui/uiconfig/ui/macroselectordialog.ui
@@ -37,24 +37,10 @@
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="add">
-                <property name="label" translatable="yes" context="macroselectordialog|add">Add</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="no_show_all">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
             <child>
               <object class="GtkButton" id="ok">
                 <property name="label" translatable="yes" context="stock">_OK</property>
+                <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
@@ -71,6 +57,7 @@
             <child>
               <object class="GtkButton" id="cancel">
                 <property name="label" translatable="yes" context="stock">_Cancel</property>
+                <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="no_show_all">True</property>
@@ -82,20 +69,6 @@
                 <property name="position">2</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkButton" id="close">
-                <property name="label" translatable="yes" context="stock">_Close</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="no_show_all">True</property>
-                <property name="use-underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">3</property>
-              </packing>
-            </child>
             <child>
               <object class="GtkButton" id="help">
                 <property name="label" translatable="yes" context="stock">_Help</property>
@@ -143,22 +116,6 @@
                 <property name="position">0</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkLabel" id="helptoolbar">
-                <property name="can_focus">False</property>
-                <property name="no_show_all">True</property>
-                <property name="hexpand">True</property>
-                <property name="label" translatable="yes" context="macroselectordialog|helptoolbar">To add a command to a toolbar, select the category and then the command. Then drag the command to the Commands list of the Toolbars tab page in the Customize dialog.</property>
-                <property name="wrap">True</property>
-                <property name="max_width_chars">60</property>
-                <property name="xalign">0</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
             <child>
               <object class="GtkBox" id="box2">
                 <property name="visible">True</property>
@@ -219,39 +176,13 @@
                       </object>
                     </child>
                     <child type="label">
-                      <object class="GtkBox" id="box3">
+                      <object class="GtkLabel" id="libraryft">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <child>
-                          <object class="GtkLabel" id="libraryft">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes" context="macroselectordialog|libraryft">Library</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="categoryft">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes" context="macroselectordialog|categoryft">Category</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
+                        <property name="label" translatable="yes" context="macroselectordialog|libraryft">Library</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
@@ -306,41 +237,14 @@
                       </object>
                     </child>
                     <child type="label">
-                      <object class="GtkBox" id="box4">
+                      <object class="GtkLabel" id="macronameft">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <child>
-                          <object class="GtkLabel" id="macronameft">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes" context="macroselectordialog|macronameft">Macro Name</property>
-                            <property name="track_visited_links">False</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel" id="commandsft">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes" context="macroselectordialog|commandsft">Commands</property>
-                            <property name="track_visited_links">False</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
+                        <property name="label" translatable="yes" context="macroselectordialog|macronameft">Macro Name</property>
+                        <property name="track_visited_links">False</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
@@ -413,10 +317,8 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="101">add</action-widget>
       <action-widget response="-5">ok</action-widget>
       <action-widget response="-6">cancel</action-widget>
-      <action-widget response="-7">close</action-widget>
       <action-widget response="-11">help</action-widget>
     </action-widgets>
     <child type="titlebar">


More information about the Libreoffice-commits mailing list