summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-06-05 16:11:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-06-08 20:21:35 +0200
commitcd384e2d31f74223948ea70d8aa3c318d3ceeb50 (patch)
tree49ae5191c2bd4b13c3cd547951933fbc37cda0fa /desktop
parentadd TreeView::set_show_expanders (diff)
downloadcore-cd384e2d31f74223948ea70d8aa3c318d3ceeb50.tar.gz
core-cd384e2d31f74223948ea70d8aa3c318d3ceeb50.zip
rework treeview initial toggle button col to be like expander col
cause this assumption is baked into the vcl one making it hard to adapt remaining cases Change-Id: I75dd5264c65b1ffbf4d26c9a86f6d4d08b400d90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index cb161d631809..5d65f4e7c618 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -455,9 +455,7 @@ UpdateDialog::UpdateDialog(
m_xDescriptions->set_size_request(nWidth, nHeight);
m_xUpdates->set_size_request(nWidth, nHeight);
- std::vector<int> aWidths;
- aWidths.push_back(m_xUpdates->get_checkbox_column_width());
- m_xUpdates->set_column_fixed_widths(aWidths);
+ m_xUpdates->enable_toggle_buttons(weld::ColumnToggleType::Check);
OSL_ASSERT(updateData != nullptr);
@@ -492,7 +490,7 @@ IMPL_LINK(UpdateDialog, entryToggled, const weld::TreeView::iter_col&, rRowCol,
// error's can't be enabled
const UpdateDialog::Index* p = reinterpret_cast<UpdateDialog::Index const *>(m_xUpdates->get_id(rRowCol.first).toInt64());
if (p->m_eKind == SPECIFIC_ERROR)
- m_xUpdates->set_toggle(rRowCol.first, TRISTATE_FALSE, 0);
+ m_xUpdates->set_toggle(rRowCol.first, TRISTATE_FALSE);
enableOk();
}
@@ -501,8 +499,8 @@ void UpdateDialog::insertItem(UpdateDialog::Index *pEntry, bool bEnabledCheckBox
{
int nEntry = m_xUpdates->n_children();
m_xUpdates->append();
- m_xUpdates->set_toggle(nEntry, bEnabledCheckBox ? TRISTATE_TRUE : TRISTATE_FALSE, 0);
- m_xUpdates->set_text(nEntry, pEntry->m_aName, 1);
+ m_xUpdates->set_toggle(nEntry, bEnabledCheckBox ? TRISTATE_TRUE : TRISTATE_FALSE);
+ m_xUpdates->set_text(nEntry, pEntry->m_aName, 0);
m_xUpdates->set_id(nEntry, OUString::number(reinterpret_cast<sal_Int64>(pEntry)));
}
@@ -587,7 +585,7 @@ void UpdateDialog::enableOk() {
if (!m_xChecking->get_visible()) {
int nChecked = 0;
for (int i = 0, nCount = m_xUpdates->n_children(); i < nCount; ++i) {
- if (m_xUpdates->get_toggle(i, 0) == TRISTATE_TRUE)
+ if (m_xUpdates->get_toggle(i) == TRISTATE_TRUE)
++nChecked;
}
m_xOk->set_sensitive(nChecked != 0);
@@ -987,7 +985,7 @@ IMPL_LINK_NOARG(UpdateDialog, okHandler, weld::Button&, void)
UpdateDialog::Index const * p =
reinterpret_cast< UpdateDialog::Index const * >(
m_xUpdates->get_id(i).toInt64());
- if (p->m_eKind == ENABLED_UPDATE && m_xUpdates->get_toggle(i, 0) == TRISTATE_TRUE) {
+ if (p->m_eKind == ENABLED_UPDATE && m_xUpdates->get_toggle(i) == TRISTATE_TRUE) {
m_updateData.push_back( m_enabledUpdates[ p->m_nIndex ] );
}
}