]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
mathed31.diff
[lyx.git] / src / lyx_cb.C
index 17fddc5b186b91c06aba80b8269f15f3ff64fe19..610726769492fc95dfb931c9a6fe4de60f56ad3d 100644 (file)
@@ -61,10 +61,6 @@ extern BufferView * current_view; // called too many times in this file...
 
 extern void DeleteSimpleCutBuffer(); /* for the cleanup when exiting */
 
-#if 0
-extern bool send_fax(string const & fname, string const & sendcmd);
-#endif
-
 extern void MenuSendto();
 
 // this should be static, but I need it in buffer.C
@@ -300,32 +296,6 @@ int MenuRunChktex(Buffer * buffer)
 }
 
 
-#if 0
-void MenuFax(Buffer * buffer)
-{
-       // Generate postscript file
-       if (!Exporter::Export(buffer, "ps", true))
-               return;
-
-       // Send fax
-       string const ps = OnlyFilename(ChangeExtension(buffer->fileName(), 
-                                                      ".ps"));
-
-       string path = OnlyPath (buffer->fileName());
-       if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
-               path = buffer->tmppath;
-       }
-       Path p(path);
-       if (!lyxrc.fax_program.empty()) {
-                string help2 = subst(lyxrc.fax_program, "$$FName", ps);
-                help2 += " &";
-                Systemcalls one(Systemcalls::System, help2);
-       } else
-               send_fax(ps, lyxrc.fax_command);
-}
-#endif
-
-
 void QuitLyX()
 {
        lyxerr.debug() << "Running QuitLyX." << endl;
@@ -505,12 +475,12 @@ void InsertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
        bv->hideCursor();
        
        // clear the selection
-       bv->beforeChange();
+       bv->beforeChange(bv->text);
        if (!asParagraph)
                bv->text->InsertStringA(bv, tmpstr);
        else
                bv->text->InsertStringB(bv, tmpstr);
-       bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+       bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
 }
 
 
@@ -878,20 +848,20 @@ void FigureApplyCB(FL_OBJECT *, long)
        }
        
        current_view->hideCursor();
-       current_view->update(BufferView::SELECT|BufferView::FITCUR);
-       current_view->beforeChange();
+       current_view->update(current_view->text, BufferView::SELECT|BufferView::FITCUR);
+       current_view->beforeChange(current_view->text);
       
        current_view->text->SetCursorParUndo(current_view->buffer()); 
        current_view->text->FreezeUndo();
 
        current_view->text->BreakParagraph(current_view);
-       current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+       current_view->update(current_view->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
       
        if (current_view->text->cursor.par()->Last()) {
                current_view->text->CursorLeft(current_view);
         
                current_view->text->BreakParagraph(current_view);
-               current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+               current_view->update(current_view->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
        }
 
        // The standard layout should always be numer 0;
@@ -922,12 +892,12 @@ void FigureApplyCB(FL_OBJECT *, long)
        }
 #endif
        
-       current_view->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+       current_view->update(current_view->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
       
        Inset * new_inset = new InsetFig(100, 100, *buffer);
        current_view->insertInset(new_inset);
        new_inset->Edit(current_view, 0, 0, 0);
-       current_view->update(BufferView::SELECT|BufferView::FITCUR);
+       current_view->update(current_view->text, BufferView::SELECT|BufferView::FITCUR);
        current_view->owner()->getMiniBuffer()->Set(_("Figure inserted"));
        current_view->text->UnFreezeUndo();
        current_view->setState();