Jürgen Spitzmüller wrote: > For the time being, we could also do this: > > list only the most relevant formats in the menu and all formats in the > "Custom export" dialog. Change that dialog so that it will only export to > the selected format if the command field is empty.
The GuiSendto part would look as simple as the attached. Jürgen
Index: src/frontends/qt4/GuiSendto.cpp =================================================================== --- src/frontends/qt4/GuiSendto.cpp (Revision 37566) +++ src/frontends/qt4/GuiSendto.cpp (Arbeitskopie) @@ -33,7 +33,7 @@ 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 @@ return false; return (formatLW->selectedItems().size() > 0 - && formatLW->count() != 0 - && !commandCO->currentText().isEmpty()); + && formatLW->count() != 0); } @@ -155,11 +154,17 @@ 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); }