commit 24cc72266e62e2d9381d439091cfc9994825afe3
Author: Enrico Forestieri <[email protected]>
Date:   Fri Dec 29 19:20:25 2023 +0100

    Change the way a filepath is displayed
    
    Instead of displaying the complete path, display the file name
    first and then the path enclosed in parenthesis.
    
    In this way files with same name but different path can still be
    distinguished and, at the same time, files with different names
    but same path are more easily spotted in case the complete path
    is truncated by file managers.
---
 src/support/FileName.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp
index 7fbd2f4..864f387 100644
--- a/src/support/FileName.cpp
+++ b/src/support/FileName.cpp
@@ -748,7 +748,8 @@ docstring const FileName::absoluteFilePath() const
 
 docstring FileName::displayName(int threshold) const
 {
-       return makeDisplayPath(absFileName(), threshold);
+       return from_utf8(onlyFileName()) + " ("
+               +  makeDisplayPath(onlyPath().absFileName(), threshold) + ")";
 }
 
 
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to