]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/PreviewImage.C
* src/LaTeX.C
[lyx.git] / src / graphics / PreviewImage.C
index 4a3b9a1ee270b3b2b02977bc17fd8898c1d1f6b7..050ca62de8694efddff57a0096829c00081e374b 100644 (file)
 #include <config.h>
 
 #include "PreviewImage.h"
-#include "PreviewLoader.h"
 #include "GraphicsImage.h"
 #include "GraphicsLoader.h"
+#include "PreviewLoader.h"
 
+#include "support/filename.h"
 #include "support/lyxlib.h"
 
 #include <boost/bind.hpp>
-#include <boost/signals/trackable.hpp>
 
-using namespace lyx::support;
+using std::string;
+
 
 namespace lyx {
+
+using support::FileName;
+
 namespace graphics {
 
-struct PreviewImage::Impl : public boost::signals::trackable {
+class PreviewImage::Impl : public boost::signals::trackable {
+public:
        ///
        Impl(PreviewImage & p, PreviewLoader & l,
-            string const & s, string const & f, double af);
+            string const & s, FileName const & f, double af);
        ///
        ~Impl();
        ///
@@ -51,7 +56,7 @@ struct PreviewImage::Impl : public boost::signals::trackable {
 
 PreviewImage::PreviewImage(PreviewLoader & l,
                           string const & s,
-                          string const & f,
+                          FileName const & f,
                           double af)
        : pimpl_(new Impl(*this, l, s, f, af))
 {}
@@ -103,7 +108,7 @@ Image const * PreviewImage::image() const
 
 PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l,
                         string const & s,
-                        string const & bf,
+                        FileName const & bf,
                         double af)
        : parent_(p), ploader_(l), iloader_(bf),
          snippet_(s), ascent_frac_(af)
@@ -114,7 +119,7 @@ PreviewImage::Impl::Impl(PreviewImage & p, PreviewLoader & l,
 
 PreviewImage::Impl::~Impl()
 {
-       unlink(iloader_.filename());
+       support::unlink(iloader_.filename());
 }
 
 
@@ -147,10 +152,10 @@ void PreviewImage::Impl::statusChanged()
                break;
 
        case Ready:
-               unlink(iloader_.filename());
-               ploader_.emitSignal(parent_);
+               support::unlink(iloader_.filename());
                break;
        }
+       ploader_.emitSignal(parent_);
 }
 
 } // namespace graphics