]> git.lyx.org Git - lyx.git/blobdiff - src/support/Path.cpp
Reorder a bit status messages, but they are still cleared at the end of LyXFunc
[lyx.git] / src / support / Path.cpp
index 8b85471c979dd93f2726f37d4fa37c55293236ba..d6b048d7d2c4af9f071cd687babdaced5279e0ad 100644 (file)
@@ -3,20 +3,17 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  *
  * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-// Needed to prevent the definition of the unnamed_PathChanger macro
-// in the header file.
-
-#define PATHCHANGER_C
-
 #include "support/Path.h"
-#include "support/lyxlib.h"
+
+// undef PathChanger macro when building PathChanger
+#undef PathChanger
 
 
 namespace lyx {
@@ -26,7 +23,7 @@ PathChanger::PathChanger(FileName const & path)
        : popped_(false)
 {
        if (!path.empty()) {
-               pushedDir_ = getcwd();
+               pushedDir_ = FileName::getcwd();
 
                if (pushedDir_.empty() || !path.chdir()) {
                        /* FIXME: throw */
@@ -63,3 +60,7 @@ int PathChanger::pop()
 
 } // namespace support
 } // namespace lyx
+
+
+#define PathChanger(x) unnamed_PathChanger;
+// in merged builds this is not the last line.