Jean-Marc Lasgouttes wrote:
What does the windows title look like now?

LyX: ~/Desktop/UserGuide.lyx (see attached user_guide_win32_v1.jpg).

This file is stored at
C:\Documents and Settings\Angus\Desktop\UserGuide.lyx

Would it be a good idea to change MakeDisplayPath to use os::external_path?

Weeelll, Windows users don't know what ~ means either... but, the attached patch (display_path.diff) results in no change at all.


That's because we'd also have to change os_win32.C's implementation of os::external_path:

 string os::external_path(string const & p)
 {
-    // No backslashes in LaTeX files
-    string const dos_path = subst(p, '\\', '/');
+    string const dos_path = subst(p, '/', '\\');

     lyxerr[Debug::LATEX]
         << "<Win32 path correction> ["
         << p << "]->>["
         << dos_path << ']' << std::endl;

     return dos_path;
}

So, the question is, is the comment correct or is it a left-over from the Cygwin port?

Angus

<<inline: user_guide_win32_v1.jpg>>

Index: src/support/filetools.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/support/filetools.C,v
retrieving revision 1.146.2.15
diff -u -a -u -r1.146.2.15 filetools.C
--- src/support/filetools.C     2005/02/15 18:56:13     1.146.2.15
+++ src/support/filetools.C     2005/03/30 11:37:02
@@ -1307,7 +1307,7 @@
                str = subst(str, home, "~");
 
        if (str.length() <= threshold)
-               return str;
+               return os::external_path(str);
 
        string const prefix = ".../";
        string temp;
@@ -1328,7 +1328,7 @@
                str = head + "..." + tail;
        }
 
-       return prefix + str;
+       return os::external_path(prefix + str);
 }
 
 

Reply via email to