]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
Change to use preffered calling of Boost.Function
[lyx.git] / src / lyx_cb.C
index bdfe5e83f86ef72a3ae719976d93fb78fbad6627..6988a430e707ba0d934820dcf5b6c7f586ca5c31 100644 (file)
@@ -44,6 +44,8 @@
 #include "support/path_defines.h"
 #include "support/systemcall.h"
 
+#include <boost/shared_ptr.hpp>
+
 #include <cerrno>
 #include <fstream>
 
@@ -60,6 +62,7 @@ using lyx::support::MakeDisplayPath;
 using lyx::support::OnlyFilename;
 using lyx::support::OnlyPath;
 using lyx::support::Path;
+using lyx::support::QuoteName;
 using lyx::support::removeAutosaveFile;
 using lyx::support::rename;
 using lyx::support::split;
@@ -71,7 +74,8 @@ using lyx::support::user_lyxdir;
 
 namespace os = lyx::support::os;
 
-using std::auto_ptr;
+using boost::shared_ptr;
+
 using std::back_inserter;
 using std::copy;
 using std::endl;
@@ -221,8 +225,9 @@ public:
        AutoSaveBuffer(BufferView & bv, string const & fname)
                : bv_(bv), fname_(fname) {}
        ///
-       virtual auto_ptr<ForkedProcess> clone() const {
-               return auto_ptr<ForkedProcess>(new AutoSaveBuffer(*this));
+       virtual shared_ptr<ForkedProcess> clone() const
+       {
+               return shared_ptr<ForkedProcess>(new AutoSaveBuffer(*this));
        }
        ///
        int start();
@@ -238,7 +243,7 @@ private:
 int AutoSaveBuffer::start()
 {
        command_ = bformat(_("Auto-saving %1$s"), fname_);
-       return runNonBlocking();
+       return run(DontWait);
 }
 
 
@@ -442,13 +447,13 @@ void Reconfigure(BufferView * bv)
        Path p(user_lyxdir());
        Systemcall one;
        one.startscript(Systemcall::Wait,
-                       AddName(system_lyxdir(), "configure"));
+                       QuoteName(AddName(system_lyxdir(), "configure")));
        p.pop();
        bv->owner()->message(_("Reloading configuration..."));
        lyxrc.read(LibFileSearch(string(), "lyxrc.defaults"));
 
        Alert::information(_("System reconfigured"),
                _("The system has been reconfigured.\n"
-               "You need to restart LyX to make use of any \n"
+               "You need to restart LyX to make use of any\n"
                "updated document class specifications."));
 }