+2001-02-26 Juergen Vigna <jug@sad.it>
+
+ * ui/default.ui: added Custom-Export to export menu.
+
2001-02-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* bind/emacs.bind:
Menu "file_export"
ExportFormats
+ Item "Custom...|C" "buffer-export custom"
End
#
+2001-02-26 Juergen Vigna <jug@sad.it>
+
+ * lyxfunc.C (getStatus): added a string argument override function so
+ that this is correctly called from LyXFunc::Dispatch if it contains a
+ do_not_use_argument which is used!
+ (Dispatch): added check for "custom" export and call appropriate func.
+
2001-02-23 Dekel Tsur <dekelts@tau.ac.il>
* lyxrc.C: Add language_command_local, language_use_babel and
void InsetText::SetFont(BufferView * bv, LyXFont const & font, bool toggleall)
{
- bv->text->SetUndo(bv->buffer(), Undo::EDIT,
+ if (TEXT(bv)->selection) {
+ bv->text->SetUndo(bv->buffer(), Undo::EDIT,
#ifndef NEW_INSETS
- bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous,
- bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next
+ bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous,
+ bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next
#else
- bv->text->cursor.par()->previous,
- bv->text->cursor.par()->next
+ bv->text->cursor.par()->previous,
+ bv->text->cursor.par()->next
#endif
);
+ }
TEXT(bv)->SetFont(bv, font, toggleall);
bv->fitCursor(TEXT(bv));
UpdateLocal(bv, CURSOR_PAR, true);
extern LyXServer * lyxserver;
extern int greek_kb_flag;
extern bool selection_possible;
+extern void MenuSendto();
extern kb_keymap * toplevel_keymap;
return 0;
}
-
LyXFunc::func_status LyXFunc::getStatus(int ac) const
+{
+ return getStatus(ac, string());
+}
+
+LyXFunc::func_status LyXFunc::getStatus(int ac, string const & not_to_use_arg) const
{
kb_action action;
func_status flag = LyXFunc::OK;
if (lyxaction.isPseudoAction(ac))
action = lyxaction.retrieveActionArg(ac, argument);
- else
+ else {
action = static_cast<kb_action>(ac);
+ if (!not_to_use_arg.empty())
+ argument = not_to_use_arg; // exept here
+ }
if (action == LFUN_UNKNOWN_ACTION) {
setErrorMessage(N_("Unknown action"));
|| lyxrc.print_command == "none";
break;
case LFUN_EXPORT:
- disable = argument == "fax" &&
- !Exporter::IsExportable(buf, argument);
+ disable = (argument != "custom") ||
+ (argument == "fax" &&
+ !Exporter::IsExportable(buf, argument));
break;
case LFUN_UNDO:
disable = buf->undostack.empty();
owner->view()->hideCursor();
// We cannot use this function here
- if (getStatus(ac) & Disabled)
+ if (getStatus(ac, do_not_use_this_arg) & Disabled)
goto exit_with_message;
commandshortcut.erase();
break;
case LFUN_EXPORT:
- Exporter::Export(owner->buffer(), argument, false);
+ if (argument == "custom")
+ MenuSendto();
+ else
+ Exporter::Export(owner->buffer(), argument, false);
break;
case LFUN_IMPORT:
///
int processKeySym(KeySym k, unsigned int state);
- ///
+ /// we need one internall which is called from inside LyXAction and
+ /// can contain the string argument.
func_status getStatus(int ac) const;
+ func_status getStatus(int ac, string const & not_to_use_arg) const;
/// The last key was meta
bool wasMetaKey() const;