summaryrefslogtreecommitdiffstats
path: root/cui
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-03-11 09:11:38 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2021-04-19 15:10:49 +0200
commit8431d7900668fa3ecb76bfcf66df0a54ed86f4fc (patch)
tree8b6a823081cdd1589a1f7cf48a05ab0b68532b38 /cui
parentjsdialog: uitest: handle click for drawing area (diff)
downloadcore-8431d7900668fa3ecb76bfcf66df0a54ed86f4fc.tar.gz
core-8431d7900668fa3ecb76bfcf66df0a54ed86f4fc.zip
Remove unused code from Macro Selector dialog
Change-Id: I9930fd7eaf2410447f84aa4798478a10915ea738 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112316 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114205 Tested-by: Jenkins
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfgutil.cxx7
-rw-r--r--cui/source/inc/cfgutil.hxx2
-rw-r--r--cui/uiconfig/ui/macroselectordialog.ui124
3 files changed, 16 insertions, 117 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 2c53feab0c30..67ea10c2ee97 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1076,9 +1076,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"))
@@ -1088,9 +1086,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());
@@ -1119,6 +1115,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 5959658e84a5..04bbbb2e83f6 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -236,9 +236,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 ec3f0014ef2a..9968da4cbe50 100644
--- a/cui/uiconfig/ui/macroselectordialog.ui
+++ b/cui/uiconfig/ui/macroselectordialog.ui
@@ -38,23 +38,9 @@
<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">gtk-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">gtk-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>
@@ -83,20 +70,6 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="close">
- <property name="label">gtk-close</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="no_show_all">True</property>
- <property name="use_stock">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">gtk-help</property>
<property name="visible">True</property>
@@ -144,22 +117,6 @@
</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>
<property name="can_focus">False</property>
@@ -225,39 +182,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>
@@ -318,41 +249,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>
@@ -431,10 +335,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">