diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-03-11 09:11:38 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-04-16 14:55:16 +0200 |
commit | 748ef40304e523135108905e902655abdf3c5d23 (patch) | |
tree | afb60ebe8d1b578cfb99cb1cba7ccc32c06e7186 /cui | |
parent | ebeb1d1ae554e8301d876b19afc05f454acdfc1c (diff) |
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.cxx | 7 | ||||
-rw-r--r-- | cui/source/inc/cfgutil.hxx | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/macroselectordialog.ui | 124 |
3 files changed, 16 insertions, 117 deletions
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 @@ -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" 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> @@ -83,20 +70,6 @@ </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> <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> @@ -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"> |