]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlExternal.C
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlExternal.C
index 2258afdd68ecaa7f3084bc953e797906b159e899..73e5433df1b66a6d4c16f7390908d221bfa1b249 100644 (file)
 #include "Liason.h"
 #include "LyXView.h"
 #include "support/filetools.h"
+#include "support/lstrings.h"
 #include "frontends/FileDialog.h"
 #include "lyx_gui_misc.h" // WriteAlert
 #include "gettext.h"
+#include "BufferView.h"
 
 using std::make_pair;
 using std::vector;
@@ -71,7 +73,7 @@ void ControlExternal::editExternal()
        // Create a local copy of the inset and initialise it with this
        // params struct.
        boost::scoped_ptr<InsetExternal> ie;
-       ie.reset(static_cast<InsetExternal *>(inset()->Clone(*lv_.buffer())));
+       ie.reset(static_cast<InsetExternal *>(inset()->clone(*lv_.buffer())));
        ie->setFromParams(params());
 
        ie->editExternal();
@@ -82,7 +84,7 @@ void ControlExternal::viewExternal()
        view().apply();
 
        boost::scoped_ptr<InsetExternal> ie;
-       ie.reset(static_cast<InsetExternal *>(inset()->Clone(*lv_.buffer())));
+       ie.reset(static_cast<InsetExternal *>(inset()->clone(*lv_.buffer())));
        ie->setFromParams(params());
 
        ie->viewExternal();
@@ -93,7 +95,7 @@ void ControlExternal::updateExternal()
        view().apply();
 
        boost::scoped_ptr<InsetExternal> ie;
-       ie.reset(static_cast<InsetExternal *>(inset()->Clone(*lv_.buffer())));
+       ie.reset(static_cast<InsetExternal *>(inset()->clone(*lv_.buffer())));
        ie->setFromParams(params());
 
        ie->updateExternal();
@@ -140,7 +142,7 @@ ExternalTemplate ControlExternal::getTemplate(int i) const
        for (int n = 1; n < i; ++n)
                ++i1;
 
-       return (*i1).second;
+       return i1->second;
 }
 
 
@@ -171,7 +173,7 @@ string const ControlExternal::Browse(string const & input) const
        // FIXME: a temporary hack until the FileDialog interface is updated
        regexp += "|";
 
-       static int once = 0;
+       static int once;
        string current_path;
 
        while (1) {