]> git.lyx.org Git - lyx.git/blobdiff - src/LyXSendto.C
Small fix.
[lyx.git] / src / LyXSendto.C
index 80baa6b0319b45639b4db8b6fd927443ea285e12..2730d26663dd2d7cc62a13dd03ffae6a1756b0d1 100644 (file)
@@ -11,7 +11,8 @@
 #include "lyx_gui_misc.h"
 #include "support/syscall.h"
 #include "gettext.h"
-#include "lyx_cb.h"
+//#include "lyx_cb.h"
+#include "bufferview_funcs.h"
 
 extern FD_form_sendto * fd_form_sendto;
 extern BufferView * current_view;
@@ -56,13 +57,13 @@ void SendtoApplyCB(FL_OBJECT *, long)
     Buffer * buffer = current_view->buffer();
     if (fl_get_button(fd_form_sendto->radio_ftype_dvi) ||
         fl_get_button(fd_form_sendto->radio_ftype_ps)) {
-        ProhibitInput();
+        ProhibitInput(current_view);
         // Generate dvi file and check if there are errors in the .lyx file
         if (MakeLaTeXOutput(buffer) > 0) {
-            AllowInput();
+            AllowInput(current_view);
             return;
         }
-        AllowInput();
+        AllowInput(current_view);
     }
     string ftypeext;
     if (fl_get_button(fd_form_sendto->radio_ftype_lyx))
@@ -80,7 +81,7 @@ void SendtoApplyCB(FL_OBJECT *, long)
        }
     }
 
-    string fname = ChangeExtension(buffer->getLatexName(), ftypeext, true);
+    string fname = OnlyFilename(ChangeExtension(buffer->getLatexName(), ftypeext));
     if (!contains(command, "$$FName"))
         command = "( " + command + " ) <$$FName";
     command = subst(command, "$$FName", fname);