Resolves: tdf#146800 Linked libraries don't show shource path in Macro

Organizer for VCL plugins that use SalInstanceTreeView

Change-Id: Ide1ea8a14e956836573e8a3aacd2b289d76616ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172560
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Jim Raykowski 2024-08-28 17:54:34 -08:00
parent 044980edc4
commit 41ad19c719
3 changed files with 11 additions and 6 deletions

View file

@ -1229,6 +1229,8 @@ void LibPage::SetCurLib()
if (nEntry_ == -1 && m_xLibBox->n_children())
nEntry_ = 0;
m_xLibBox->set_cursor(nEntry_);
m_xLibBox->columns_autosize();
}
void LibPage::ImpInsertLibEntry( const OUString& rLibName, int nPos )

View file

@ -112,17 +112,18 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore1</property>
<property name="headers-visible">False</property>
<property name="headers-clickable">False</property>
<property name="search-column">1</property>
<property name="enable-tree-lines">True</property>
<property name="show-expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection1"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="spacing">6</property>
<property name="title" translatable="yes" context="libpage|treeviewcolumn1">Name</property>
<child>
<object class="GtkCellRendererPixbuf" id="cellrenderertext4"/>
<object class="GtkCellRendererPixbuf" id="cellrenderertext1"/>
<attributes>
<attribute name="pixbuf">0</attribute>
</attributes>
@ -138,8 +139,9 @@
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="spacing">6</property>
<property name="title" translatable="yes" context="libpage|treeviewcolumn2">Location</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext3"/>
<attributes>

View file

@ -3910,7 +3910,8 @@ void SalInstanceTreeView::columns_autosize()
if (aWidths.size() > 2)
{
std::vector<int> aColWidths;
for (size_t i = 1; i < aWidths.size() - 1; ++i)
aColWidths.push_back(aWidths[1] + aWidths[0]);
for (size_t i = 2; i < aWidths.size() - 1; ++i)
aColWidths.push_back(aWidths[i] - aWidths[i - 1]);
set_column_fixed_widths(aColWidths);
}