]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
move definition of variables to the main cmake file
[lyx.git] / src / lyx_cb.C
index df07a860902e4ef183d0953384e7158124348b2b..4d108c860bc9d733b6da8d12b6ac089e563ec0e9 100644 (file)
@@ -67,7 +67,6 @@ using lyx::support::makeAbsPath;
 using lyx::support::makeDisplayPath;
 using lyx::support::onlyFilename;
 using lyx::support::onlyPath;
-using lyx::support::Path;
 using lyx::support::package;
 using lyx::support::removeAutosaveFile;
 using lyx::support::rename;
@@ -303,7 +302,7 @@ void autoSave(BufferView * bv)
        // should probably be moved into BufferList (Lgb)
        // Perfect target for a thread...
 {
-       if (!bv->available())
+       if (!bv->buffer())
                return;
 
        if (bv->buffer()->isBakClean() || bv->buffer()->isReadonly()) {
@@ -354,7 +353,7 @@ void newFile(BufferView * bv, string const & filename)
 // Insert ascii file (if filename is empty, prompt for one)
 void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
 {
-       if (!bv->available())
+       if (!bv->buffer())
                return;
 
        // FIXME: We don't know the encoding of the file
@@ -363,7 +362,8 @@ void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
                return;
 
        // clear the selection
-       if (bv->text() == bv->getLyXText())
+       LyXText const & text = bv->buffer()->text();
+       if (&text == bv->getLyXText())
                bv->cursor().clearSelection();
        if (asParagraph)
                bv->getLyXText()->insertStringAsParagraphs(bv->cursor(), tmpstr);
@@ -443,7 +443,7 @@ void reconfigure(BufferView * bv)
        bv->buffer()->message(_("Running configure..."));
 
        // Run configure in user lyx directory
-       Path p(package().user_support());
+       lyx::support::Path p(package().user_support());
        string const configure_command = package().configure_command();
        Systemcall one;
        one.startscript(Systemcall::Wait, configure_command);