]> git.lyx.org Git - features.git/commitdiff
* GuiSendto: allow to simply export from this dialog if no command is given.
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 10 Feb 2011 14:06:53 +0000 (14:06 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 10 Feb 2011 14:06:53 +0000 (14:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37582 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiSendto.cpp
src/frontends/qt4/ui/SendtoUi.ui

index 0bfb1de465f0051536ce5a13dcabfa18f54c40df..18694b28e28cb4f304f3d015e2716093ff678b98 100644 (file)
@@ -33,7 +33,7 @@ namespace frontend {
 
 
 GuiSendTo::GuiSendTo(GuiView & lv)
-       : GuiDialog(lv, "sendto", qt_("Send Document to Command"))
+       : GuiDialog(lv, "sendto", qt_("Export or Send Document"))
 {
        setupUi(this);
 
@@ -131,8 +131,7 @@ bool GuiSendTo::isValid()
                return false;
 
        return (formatLW->selectedItems().size() > 0
-               && formatLW->count() != 0
-               && !commandCO->currentText().isEmpty());
+               && formatLW->count() != 0);
 }
 
 
@@ -155,11 +154,17 @@ void GuiSendTo::paramsToDialog(Format const * /*format*/, QString const & comman
 
 void GuiSendTo::dispatchParams()
 {
-       if (command_.isEmpty() || !format_ || format_->name().empty())
+       if (!format_ || format_->name().empty())
                return;
 
-       string const data = format_->name() + " " + fromqstr(command_);
-       dispatch(FuncRequest(getLfun(), data));
+       string data = format_->name();
+       if (!command_.isEmpty())
+               data += " " + fromqstr(command_);
+
+       FuncCode const lfun = command_.isEmpty() ?
+               LFUN_BUFFER_EXPORT : getLfun();
+
+       dispatch(FuncRequest(lfun, data));
 }
 
 Dialog * createGuiSendTo(GuiView & lv) { return new GuiSendTo(lv); }
index 111ce46ae8322fff7ea97991022f14400ef4b492..7626a855caae4fe832db22dc6b4d516f26b651ac 100644 (file)
    <item row="2" column="0" >
     <widget class="QLabel" name="commandLA" >
      <property name="text" >
-      <string>&amp;Command:</string>
+      <string>&amp;Send exported file to command:</string>
      </property>
      <property name="buddy" >
       <cstring>commandCO</cstring>