]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSendto.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiSendto.cpp
index c6cc0d62b26c70ea563d3756827cb83b0fea967a..1d744fcae0772913111855ae3069dfdf9bf4c16f 100644 (file)
 
 #include <QListWidget>
 #include <QPushButton>
-#include <QCloseEvent>
-
-using std::vector;
-using std::string;
 
+using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 namespace frontend {
 
-using support::trim;
 
 GuiSendTo::GuiSendTo(GuiView & lv)
-       : GuiDialog(lv, "sendto")
+       : GuiDialog(lv, "sendto", qt_("Send Document to Command"))
 {
        setupUi(this);
-       setViewTitle(_("Send Document to Command"));
 
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
@@ -68,13 +64,6 @@ void GuiSendTo::changed_adaptor()
 }
 
 
-void GuiSendTo::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       e->accept();
-}
-
-
 void GuiSendTo::updateContents()
 {
        all_formats_ = allFormats();
@@ -126,7 +115,7 @@ bool GuiSendTo::isValid()
 }
 
 
-bool GuiSendTo::initialiseParams(std::string const &)
+bool GuiSendTo::initialiseParams(string const &)
 {
        format_ = 0;
        command_ = lyxrc.custom_export_command;
@@ -151,8 +140,10 @@ vector<Format const *> GuiSendTo::allFormats() const
        exports.push_back("lyx");
        exports.push_back("text");
 
-       if (buffer().isLatex())
+       if (buffer().isLatex()) {
                exports.push_back("latex");
+               exports.push_back("pdflatex");
+       }
        else if (buffer().isDocBook())
                exports.push_back("docbook");
        else if (buffer().isLiterate())
@@ -183,8 +174,8 @@ vector<Format const *> GuiSendTo::allFormats() const
        }
 
        // Remove repeated formats.
-       std::sort(to.begin(), to.end());
-       to.erase(std::unique(to.begin(), to.end()), to.end());
+       sort(to.begin(), to.end());
+       to.erase(unique(to.begin(), to.end()), to.end());
 
        return to;
 }