summaryrefslogtreecommitdiffstats
path: root/cui
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-07-01 12:35:43 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-04-09 23:21:09 +0200
commitf8cfbb6b9f3b753e2886895571a24c67416c32ed (patch)
tree4e4b73d6beff8e0d643f4d29b1bc7929fa143655 /cui
parentDisable CrashReportUI (diff)
downloadcore-f8cfbb6b9f3b753e2886895571a24c67416c32ed.tar.gz
core-f8cfbb6b9f3b753e2886895571a24c67416c32ed.zip
tdf#126088 Display InternalPaths in UI
Reviewed-on: https://gerrit.libreoffice.org/74952 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit ed7e547e1241cf913e138436fa3d7bca8319ec1d) Conflicts: cui/source/options/optpath.cxx cui/uiconfig/ui/optpathspage.ui Change-Id: Ib729be9ff79a3e43d7ec838646b530be8beff2d8 (cherry picked from commit d2c2ca6832b1ae18597c9c7e4b29effe630ee4cd)
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optpath.cxx24
-rw-r--r--cui/uiconfig/ui/optpathspage.ui32
2 files changed, 39 insertions, 17 deletions
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 4e53c34fdb3a..7f9b0475f7a4 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -65,7 +65,8 @@ using namespace svx;
#define TAB_WIDTH_MIN 10
#define ITEMID_TYPE 1
-#define ITEMID_PATH 2
+#define ITEMID_USER_PATHS 2
+#define ITEMID_INTERNAL_PATHS 3
#define POSTFIX_INTERNAL "_internal"
#define POSTFIX_USER "_user"
@@ -96,6 +97,7 @@ struct PathUserData_Impl
sal_uInt16 nRealId;
SfxItemState eState;
OUString sUserPath;
+ OUString sInternalPath;
OUString sWritablePath;
explicit PathUserData_Impl( sal_uInt16 nId ) :
@@ -217,16 +219,21 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
rBar.InsertItem( ITEMID_TYPE, get<FixedText>("type")->GetText(),
0,
HeaderBarItemBits::LEFT | HeaderBarItemBits::CLICKABLE | HeaderBarItemBits::UPARROW );
- rBar.InsertItem( ITEMID_PATH, get<FixedText>("path")->GetText(),
+ rBar.InsertItem( ITEMID_USER_PATHS, get<FixedText>("user_paths")->GetText(),
+ 0,
+ HeaderBarItemBits::LEFT );
+ rBar.InsertItem( ITEMID_INTERNAL_PATHS, get<FixedText>("internal_paths")->GetText(),
0,
HeaderBarItemBits::LEFT );
long nWidth1 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_TYPE));
- long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_PATH));
+ long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_USER_PATHS));
+ long nWidth3 = rBar.GetTextWidth(rBar.GetItemText(ITEMID_INTERNAL_PATHS));
- long aTabs[] = {0, 0, 0};
+ long aTabs[] = {0, 0, 0, 0};
aTabs[1] = nWidth1 + 12;
aTabs[2] = aTabs[1] + nWidth2 + 12;
+ aTabs[3] = aTabs[2] + nWidth3 + 12;
pPathBox->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs, MapUnit::MapPixel);
pPathBox->SetDoubleClickHdl( LINK( this, SvxPathTabPage, DoubleClickPathHdl_Impl ) );
@@ -283,6 +290,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
HeaderBar &rBar = pPathBox->GetTheHeaderBar();
long nWidth1 = rBar.GetTextWidth(rBar.GetItemText(1));
long nWidth2 = rBar.GetTextWidth(rBar.GetItemText(2));
+ long nWidth3 = rBar.GetTextWidth(rBar.GetItemText(3));
for( sal_uInt16 i = 0; i <= sal_uInt16(SvtPathOptions::PATH_CLASSIFICATION); ++i )
{
@@ -348,6 +356,11 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
const OUString aValue = Convert_Impl( sTmpPath );
nWidth2 = std::max(nWidth2, pPathBox->GetTextWidth(aValue));
aStr += aValue;
+ aStr += "\t";
+ const OUString aValueInternal = Convert_Impl( sInternal );
+ nWidth3 = std::max(nWidth3, pPathBox->GetTextWidth(aValueInternal));
+ aStr += aValueInternal;
+
SvTreeListEntry* pEntry = pPathBox->InsertEntry( aStr );
if ( bReadOnly )
{
@@ -361,9 +374,10 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
}
- long aTabs[] = {0, 0, 0};
+ long aTabs[] = {0, 0, 0, 0};
aTabs[1] = nWidth1 + 12;
aTabs[2] = aTabs[1] + nWidth2 + 12;
+ aTabs[3] = aTabs[2] + nWidth3 + 12;
pPathBox->SetTabs(SAL_N_ELEMENTS(aTabs), aTabs, MapUnit::MapPixel);
PathSelect_Impl( nullptr );
diff --git a/cui/uiconfig/ui/optpathspage.ui b/cui/uiconfig/ui/optpathspage.ui
index 9b42e041f74a..383cdf4c6ab3 100644
--- a/cui/uiconfig/ui/optpathspage.ui
+++ b/cui/uiconfig/ui/optpathspage.ui
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
+ <requires lib="LibreOffice" version="1.0"/>
<object class="GtkBox" id="OptPathsPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -42,21 +44,17 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="path">
+ <object class="GtkLabel" id="user_paths">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="optpathspage|path">Path</property>
+ <property name="label" translatable="yes" context="optpathspage|user_paths">User Paths</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -66,10 +64,8 @@
<property name="label" translatable="yes" context="optpathspage|editpaths">Edit Paths: %1</property>
</object>
<packing>
- <property name="left_attach">2</property>
+ <property name="left_attach">3</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -79,10 +75,19 @@
<property name="pixbuf">res/lock.png</property>
</object>
<packing>
- <property name="left_attach">3</property>
+ <property name="left_attach">4</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="internal_paths">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes" context="optpathspage|internal_paths&#10;">Internal Paths</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
@@ -98,6 +103,9 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection"/>
+ </child>
</object>
<packing>
<property name="expand">True</property>