]> git.lyx.org Git - lyx.git/blobdiff - src/LyXSendto.C
removed a warning from screen and added CFLAGS in lyx.spec.in.
[lyx.git] / src / LyXSendto.C
index 4c987c636631fe1236e78baeaf6741def835e555..2c95a3089b9a8782e0995ed59699723d46bc9042 100644 (file)
@@ -6,7 +6,7 @@
 #include "lyxrc.h"
 #include "LString.h"
 #include "support/filetools.h"
-#include "pathstack.h"
+#include "support/path.h"
 #include "buffer.h"
 #include "lyx_gui_misc.h"
 #include "support/syscall.h"
@@ -23,6 +23,8 @@ extern bool MenuRunDvips(Buffer *buffer, bool wait);
 
 void MenuSendto()
 {
+    static int ow = -1, oh;
+
     // do this only if the command is empty
     if (!fl_get_input(fd_form_sendto->input_cmd) &&
         !lyxrc->custom_export_command.empty())
@@ -34,6 +36,11 @@ void MenuSendto()
         fl_show_form(fd_form_sendto->form_sendto,
                      FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER,
                      _("Send Document to Command"));
+       if (ow < 0) {
+               ow = fd_form_sendto->form_sendto->w;
+               oh = fd_form_sendto->form_sendto->h;
+       }
+       fl_set_form_minsize(fd_form_sendto->form_sendto, ow, oh);
     }
 }
 
@@ -82,7 +89,7 @@ void SendtoApplyCB(FL_OBJECT *, long)
     if (lyxrc->use_tempdir || (IsDirWriteable(path) < 1)){
         path = buffer->tmppath;
     }
-    PathPush(path);
+    Path p(path);
     // save the .lyx file in tmp_dir if this filetype is requested
     if (fl_get_button(fd_form_sendto->radio_ftype_lyx))
         buffer->writeFile(fname,true);
@@ -94,7 +101,6 @@ void SendtoApplyCB(FL_OBJECT *, long)
     if (fl_get_button(fd_form_sendto->radio_ftype_ascii))
         buffer->writeFileAscii(fname, lyxrc->ascii_linelen);
     Systemcalls one(Systemcalls::System, command);    
-    PathPop();
 }
 
 void SendtoCancelCB(FL_OBJECT *, long)