Commit Graph

24 Commits

Author SHA1 Message Date
Enrico Forestieri
5fb0ed491c Account for the weird case where p2 is longer than p1, such as p1 == "path"
and p2 == "Path/". This would be really weird, but one never knows...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29855 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-26 18:27:29 +00:00
Enrico Forestieri
70351330a0 Another tweak to account for when both paths end with '/'.
The problem here is making sure that path_prefix_is() behaves exactly
as would a case insensitive prefixIs(). Anyway, this is still better
than trying to fix the semantics of common_path().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29846 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-25 18:37:03 +00:00
Enrico Forestieri
2fb21c28b5 Simpler things are almost always better.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29843 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-25 17:30:02 +00:00
Enrico Forestieri
eb9151060d Account for the corner case p2.length() == 1.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29838 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-25 00:23:44 +00:00
Enrico Forestieri
e2c763d9f6 Avoid a string copy and a small tweak.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29837 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-24 21:09:41 +00:00
Enrico Forestieri
7ae4f6ac6f Avoid calling prefixIs() if not needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29824 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-23 13:16:13 +00:00
Enrico Forestieri
6d1d27eb90 Take into account file system case sensitivity when checking whether
a path starts with a given prefix.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29793 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-22 22:34:43 +00:00
Enrico Forestieri
8fe984090f Allow immediate output of spawned processes for all platforms.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29668 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-14 15:13:58 +00:00
Enrico Forestieri
0ed38ed1f4 Allow to separately redirect stdout and stderr.
Now "lyx > stdout.log" should produce the same output as before
the switch to QProcess.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29655 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-13 12:55:01 +00:00
Enrico Forestieri
97303baac2 Avoid #ifdef's and use OS specific code.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29652 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-13 09:48:11 +00:00
Enrico Forestieri
e0941bdb4b Revert r29444 (to be soon replaced by Georg's solution).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29497 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-02 16:39:14 +00:00
Enrico Forestieri
b0936fac4c When performing a reverse DVI search and the tmpdir is a symlink, the
DVI viewer passes back the resolved path, such that the search fails,
as internally LyX uses the unresolved path.
This patch fixes this bug by using the new method FileName::realPath
which resolves a path by getting rid of any '.', '..', or symlink
path components.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29476 a592a061-630c-0410-9148-cb99ea01b6c8
2009-05-01 15:18:11 +00:00
Enrico Forestieri
4053db1858 Speed up FileName operator==, such that working with child documents on
Windows and Solaris is again possible.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29444 a592a061-630c-0410-9148-cb99ea01b6c8
2009-04-29 22:42:26 +00:00
Jürgen Spitzmüller
5be56b517a Fix bug 5827 (validate date-insert argument):
* src/support/os*.{cpp,h}:
	- new function is_valid_strftime that validates strftime arguments, 
	  OS dependant (win32 differs here)

* src/Text3.cpp:
	- use is_valid_strftime in LFUN_DATE_INSERT status check.

* src/frontends/qt4/GuiPrefs.{cpp, h}:
	- new GUI validator for strftime.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28932 a592a061-630c-0410-9148-cb99ea01b6c8
2009-03-27 11:22:54 +00:00
Pavel Sanda
bba02237ea Typo from Bennett
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26751 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-05 18:09:51 +00:00
Peter Kümmel
cab745d661 Fix bug 2235: jpeg capital letters (.JPG) does not work with pdflatex
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26744 a592a061-630c-0410-9148-cb99ea01b6c8
2008-10-05 11:51:18 +00:00
Abdelrazak Younes
9439b6e6e0 * get rid of support::absolutePath()
* remove FileName.h inclusion from filetools.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22188 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 16:04:46 +00:00
Abdelrazak Younes
96ee270933 transfer os::is_absolute_path() to FileName::isAbsolute().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22187 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 15:15:37 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
André Pönitz
a5263e0f92 introduce a header to forward declare std::string.
hope there are only conforming implementaions out there ;-}


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21312 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-31 22:40:34 +00:00
Enrico Forestieri
92065820e5 Register math fonts with Qt 4.2 or higher. Using Qt 4.1, the old
xft-fonts package is still required. However, on *nix there seem
to be no way to tell fontconfig to prefer our fonts instead of
others matching the requirements, so, in case of conflict, the
fontconfig files should be manually adjusted, or some existing
font package used (note that the quality of the bakoma fonts is
better than that of the xft ones). There is no such problem on
Windows where our private fonts are always preferred over the
installed ones (and I hope the same holds true for Mac).

	* src/LyX.cpp
	(LyX::exec): don't call addFontResources() and restoreFontResources()
	anymore, as the frontend code will do the job.

	* src/frontends/qt4/GuiFontLoader.{cpp,h}
	(GuiFontLoader::GuiFontLoader): register math fonts with Qt.
	(GuiFontLoader::~GuiFontLoader): unregister math fonts.

	* src/support/os.h
	* src/support/os_unix.cpp
	* src/support/os_win32.cpp
	* src/support/os_cygwin.cpp:
	remove code dealing with fonts.

	* configure.ac: don't check for fontconfig headers anymore.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20128 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-07 16:22:05 +00:00
Enrico Forestieri
960af8f370 Register math fonts with fontconfig
* src/support/os_unix.cpp
	  (addFontResources): add the system fonts dir to the paths
	  scanned by fontconfig.
	  (restoreFontResources): remove the system fonts dir from the
	  fontconfig configuration.

	* configure.ac:
	  add check for the fontconfig devel headers.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20034 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-04 13:33:21 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
Bo Peng
f212b48335 Rename .C ==> .cpp for files in src/support, part two
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18025 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 05:13:44 +00:00