summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-12-03 15:32:46 +0300
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2020-12-14 10:31:11 +0100
commit1f066313218449cac494a887eb209311efbaa405 (patch)
treec343725b530961adceddd634e9e19a9d83eb54c1 /sw
parent64f1445cdb5ac66eef161e1e333cc9d2e2bcb6e4 (diff)
tdf#82802 sw page-style UI: remove pointless makeConditional CB
There is no point in having a tick-box to enable the bottom panel. If anyone assigns anything, then the style automatically becomes a conditional style, and reverts back when all are removed, regardless of the status of that checkbox. So it was just a UI element - probably a remnant of a long-ago design that was phased out. Change-Id: I318f7d8061a938c24c97d5b718f3d328e66f8ff1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107162 Tested-by: Jenkins Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx24
-rw-r--r--sw/source/uibase/inc/swuiccoll.hxx1
-rw-r--r--sw/uiconfig/swriter/ui/conditionpage.ui120
3 files changed, 48 insertions, 97 deletions
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index b4b722f6374b..4265daae8c31 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -43,7 +43,6 @@ SwCondCollPage::SwCondCollPage(weld::Container* pPage, weld::DialogController* p
, m_pCmds(SwCondCollItem::GetCmds())
, m_pFormat(nullptr)
, m_bNewTemplate(false)
- , m_xConditionCB(m_xBuilder->weld_check_button("condstyle"))
, m_xTbLinks(m_xBuilder->weld_tree_view("links"))
, m_xStyleLB(m_xBuilder->weld_tree_view("styles"))
, m_xFilterLB(m_xBuilder->weld_combo_box("filter"))
@@ -66,7 +65,6 @@ SwCondCollPage::SwCondCollPage(weld::Container* pPage, weld::DialogController* p
SetExchangeSupport();
// Install handlers
- m_xConditionCB->connect_toggled(LINK(this, SwCondCollPage, OnOffHdl));
m_xTbLinks->connect_row_activated(LINK(this, SwCondCollPage, AssignRemoveTreeListBoxHdl));
m_xStyleLB->connect_row_activated(LINK(this, SwCondCollPage, AssignRemoveTreeListBoxHdl));
m_xRemovePB->connect_clicked(LINK(this, SwCondCollPage, AssignRemoveClickHdl));
@@ -124,12 +122,6 @@ bool SwCondCollPage::FillItemSet(SfxItemSet *rSet)
void SwCondCollPage::Reset(const SfxItemSet *)
{
- if (m_bNewTemplate)
- m_xConditionCB->set_sensitive(true);
- if (RES_CONDTXTFMTCOLL == m_pFormat->Which())
- m_xConditionCB->set_active(true);
- OnOffHdl(*m_xConditionCB);
-
m_xTbLinks->clear();
SfxStyleSheetBasePool* pPool = m_rSh.GetView().GetDocShell()->GetStyleSheetPool();
@@ -164,18 +156,6 @@ void SwCondCollPage::Reset(const SfxItemSet *)
}
}
-IMPL_LINK(SwCondCollPage, OnOffHdl, weld::ToggleButton&, rBox, void)
-{
- const bool bEnable = rBox.get_active();
- m_xTbLinks->set_sensitive(bEnable);
- m_xStyleLB->set_sensitive(bEnable);
- m_xFilterLB->set_sensitive(bEnable);
- m_xRemovePB->set_sensitive(bEnable);
- m_xAssignPB->set_sensitive(bEnable);
- if (bEnable)
- SelectHdl(nullptr);
-}
-
IMPL_LINK(SwCondCollPage, AssignRemoveClickHdl, weld::Button&, rBtn, void)
{
AssignRemove(&rBtn);
@@ -245,10 +225,10 @@ void SwCondCollPage::SelectHdl(const weld::Widget* pBox)
: OUString();
const OUString sStyle = m_xStyleLB->get_selected_text();
- m_xAssignPB->set_sensitive(sStyle != sTbEntry && m_xConditionCB->get_active());
+ m_xAssignPB->set_sensitive(sStyle != sTbEntry);
if (pBox != m_xStyleLB.get())
- m_xRemovePB->set_sensitive(m_xConditionCB->get_active() && !sTbEntry.isEmpty());
+ m_xRemovePB->set_sensitive(!sTbEntry.isEmpty());
}
}
diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx
index 4e0f5c2b2e3d..4e1c00dd10bd 100644
--- a/sw/source/uibase/inc/swuiccoll.hxx
+++ b/sw/source/uibase/inc/swuiccoll.hxx
@@ -36,7 +36,6 @@ class SwCondCollPage : public SfxTabPage
bool m_bNewTemplate;
- std::unique_ptr<weld::CheckButton> m_xConditionCB;
std::unique_ptr<weld::TreeView> m_xTbLinks;
std::unique_ptr<weld::TreeView> m_xStyleLB;
std::unique_ptr<weld::ComboBox> m_xFilterLB;
diff --git a/sw/uiconfig/swriter/ui/conditionpage.ui b/sw/uiconfig/swriter/ui/conditionpage.ui
index 5bc7f190cfed..8b298c5d8f0c 100644
--- a/sw/uiconfig/swriter/ui/conditionpage.ui
+++ b/sw/uiconfig/swriter/ui/conditionpage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="sw">
<requires lib="gtk+" version="3.20"/>
<object class="GtkTreeStore" id="liststore1">
@@ -23,79 +23,54 @@
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="ConditionPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">6</property>
- <property name="row_spacing">18</property>
+ <property name="border-width">6</property>
+ <property name="row-spacing">18</property>
<child>
<object class="GtkFrame" id="frame4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
- <!-- n-columns=1 n-rows=1 -->
+ <!-- n-columns=3 n-rows=2 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</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="column_spacing">12</property>
- <property name="column_homogeneous">True</property>
- <child>
- <object class="GtkCheckButton" id="condstyle">
- <property name="label" translatable="yes" context="conditionpage|condstyle">_Conditional Style</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <accessibility>
- <relation type="label-for" target="links"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="condstyle-atkobject">
- <property name="AtkObject::accessible-description" translatable="yes" context="conditionpage|extended_tip|condstyle">Check this box to define a new style as a conditional style.</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">3</property>
- </packing>
- </child>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
+ <property name="column-homogeneous">True</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="links">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore1</property>
- <property name="search_column">0</property>
- <property name="show_expanders">False</property>
+ <property name="search-column">0</property>
+ <property name="show-expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection1"/>
</child>
@@ -125,9 +100,6 @@
</child>
</object>
</child>
- <accessibility>
- <relation type="labelled-by" target="condstyle"/>
- </accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="links-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="conditionpage|extended_tip|links">Here you can see the %PRODUCTNAME predefined contexts, including outline levels 1 to 10, numbering/bullets levels 1 to 10, table header, table contents, section, border, footnote, header and footer.</property>
@@ -137,26 +109,26 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkButtonBox" id="buttonbox1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="spacing">12</property>
- <property name="layout_style">start</property>
+ <property name="layout-style">start</property>
<child>
<object class="GtkButton" id="remove">
<property name="label">gtk-remove</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="remove-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="conditionpage|extended_tip|remove">Click here to remove the current context assigned to the selected style.</property>
@@ -174,9 +146,9 @@
<property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="apply-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="conditionpage|extended_tip|apply">Click Apply to apply the selected Paragraph Style to the defined context.</property>
@@ -191,15 +163,15 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">False</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
@@ -207,20 +179,20 @@
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="shadow_type">in</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="styles">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore2</property>
- <property name="search_column">0</property>
- <property name="show_expanders">False</property>
+ <property name="search-column">0</property>
+ <property name="show-expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection2"/>
</child>
@@ -254,7 +226,7 @@
<object class="GtkComboBoxText" id="filter">
<property name="visible">True</property>
<property name="sensitive">False</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item translatable="yes" context="conditionpage|filter">Table Header</item>
<item translatable="yes" context="conditionpage|filter">Table</item>
@@ -294,8 +266,8 @@
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>
@@ -305,7 +277,7 @@
<child type="label">
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="conditionpage|label11">Options</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -314,8 +286,8 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
</object>