From 04debb805678a4d8090ca18819fa97143485686e Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Mon, 29 Jan 2007 18:37:13 +0000 Subject: [PATCH] Revert unwanted stuff from last commit git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16932 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/qt4.m4 | 11 ++--------- lib/syntax.default | 2 -- src/frontends/qt4/QLPainter.C | 7 ------- src/support/filetools.C | 28 +++++++++++----------------- 4 files changed, 13 insertions(+), 35 deletions(-) diff --git a/config/qt4.m4 b/config/qt4.m4 index 7a73a9de16..40a3658199 100644 --- a/config/qt4.m4 +++ b/config/qt4.m4 @@ -136,13 +136,8 @@ AC_DEFUN([QT4_DO_IT_ALL], dnl Check if it possible to do a pkg-config QT4_DO_PKG_CONFIG - if test -n "$qt4_cv_dir" -o -n "$qt4_cv_includes" -o -n "$qt4_cv_libraries"; then - dnl The user gave commandline arguments, override pkg-config + if test "$pkg_failed" != "no" ; then QT4_DO_MANUAL_CONFIG - else - if test "$pkg_failed" != "no" ; then - QT4_DO_MANUAL_CONFIG - fi fi AC_PATH_PROGS(MOC4, [moc-qt4 moc],[],$qt4_cv_bin:$PATH) AC_PATH_PROGS(UIC4, [uic-qt4 uic],[],$qt4_cv_bin:$PATH) @@ -205,9 +200,7 @@ AC_DEFUN([QT4_DO_MANUAL_CONFIG], QT4_CHECK_COMPILE - if test -n "$qt4_cv_libname"; then - QT4_LIB=$qt4_cv_libname; - fi + QT4_LIB=$qt4_cv_libname; AC_SUBST(QT4_LIB) AC_SUBST(QT4_CORE_LIB) diff --git a/lib/syntax.default b/lib/syntax.default index 0ddbfe2a01..9d8a9d9ef0 100644 --- a/lib/syntax.default +++ b/lib/syntax.default @@ -416,7 +416,6 @@ $$ \definecolor{}{}{,,} \DescribeMacro{} \discretionary{}{}{} -\email[]{} \encl{} \enclname \enlargethispage{} @@ -448,7 +447,6 @@ $$ \glossaryentry{}{} %only in .glo file (JMarc) % \graphpaper[](,)(,) %picture \headtoname -\homepage[]{} \href{}{translate} % from the hyperref package \hspace{} \hspace*{} diff --git a/src/frontends/qt4/QLPainter.C b/src/frontends/qt4/QLPainter.C index 52a6a1313d..d16525fc65 100644 --- a/src/frontends/qt4/QLPainter.C +++ b/src/frontends/qt4/QLPainter.C @@ -229,13 +229,6 @@ int QLPainter::text(int x, int y, char_type const * s, size_t ls, int textwidth; - if (f.family() == LyXFont::ESINT_FAMILY) { - if (ls != 1) - lyxerr << "draw should not happen\n"; - else - lyxerr << "draw " << s[0] << " at " << x << "," << y << " color: " << f.realColor() << std::endl; - } - if (f.realShape() != LyXFont::SMALLCAPS_SHAPE) { setQPainterPen(f.realColor()); if (font() != fi.font) diff --git a/src/support/filetools.C b/src/support/filetools.C index 62eaa52d14..7a8448df49 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -256,26 +256,20 @@ FileName const fileSearch(string const & path, string const & name, // if `name' is an absolute path, we ignore the setting of `path' // Expand Environmentvariables in 'name' string const tmpname = replaceEnvironmentPath(name); - lyxerr << "path: '" << path << "' name: '" << name << "' ext: '" << ext << "' tmpname: '" << tmpname << "'" << std::endl; FileName fullname(makeAbsPath(tmpname, path)); - lyxerr << "fullname: '" << fullname << "'"; // search first without extension, then with it. - if (isFileReadable(fullname)) { - lyxerr << " return fullname " << std::endl; - return fullname; - } - if (ext.empty()) { - // We are done. - lyxerr << " return FileName " << std::endl; - return FileName(); - } - fullname = FileName(changeExtension(fullname.absFilename(), ext)); - lyxerr << " fullname: '" << fullname << "'"; if (isFileReadable(fullname)) - lyxerr << " return fullname " << std::endl; - else - lyxerr << " return FileName " << std::endl; - return isFileReadable(fullname) ? fullname : FileName(); + return fullname; + if (ext.empty()) + // We are done. + return mode == allow_unreadable ? fullname : FileName(); + // Only add the extension if it is not already the extension of + // fullname. + if (getExtension(fullname.absFilename()) != ext) + fullname = FileName(addExtension(fullname.absFilename(), ext)); + if (isFileReadable(fullname) || mode == allow_unreadable) + return fullname; + return FileName(); }