//lyxerr << "LyXFunc::getStatus: cmd: " << cmd << endl;
FuncStatus flag;
- /* In LyX/Mac, when a dialog is open, the menus of the
- application can still be accessed without giving focus to
- the main window. In this case, we want to disable the menu
- entries that are buffer-related.
-
- Note that this code is not perfect, as bug 1941 attests:
- http://bugzilla.lyx.org/show_bug.cgi?id=1941#c4
- */
Buffer * buf = lyx_view_? lyx_view_->buffer() : 0;
- if (lyx_view_ && cmd.origin == FuncRequest::MENU && !lyx_view_->hasFocus())
- buf = 0;
if (cmd.action == LFUN_NOACTION) {
flag.message(from_utf8(N_("Nothing to do")));
case LFUN_DIALOG_TOGGLE:
case LFUN_DIALOG_DISCONNECT_INSET:
case LFUN_DIALOG_HIDE:
+ case LFUN_DIALOG_SHOW:
BOOST_ASSERT(lyx_view_);
lyx_view_->dispatch(cmd);
break;
case LFUN_BUFFER_EXPORT:
BOOST_ASSERT(lyx_view_ && lyx_view_->buffer());
if (argument == "custom")
- lyx_view_->showDialog("sendto", string());
+ dispatch(FuncRequest(LFUN_DIALOG_SHOW, "sendto"));
else
lyx_view_->buffer()->doExport(argument, false);
break;
break;
} // end switch(code)
if (insetCodeOK)
- lyx_view_->showDialog(name, data, 0);
+ dispatch(FuncRequest(LFUN_DIALOG_SHOW, name + " " + data));
break;
}
actOnUpdatedPrefs(lyxrc_orig, lyxrc);
- if (lyx_view_ && lyx_view_->buffer())
- lyx_view_->updateLayoutChoice(true);
+ theApp()->resetGui();
/// We force the redraw in any case because there might be
/// some screen font changes.
// (at least partially) visible top-level paragraphs.
// We will redraw the screen only if needed.
view()->processUpdateFlags(updateFlags);
- lyx_view_->updateStatusBar();
// if we executed a mutating lfun, mark the buffer as dirty
if (flag.enabled()
theSelection().haveSelection(view()->cursor().selection());
if (view()->cursor().inTexted()) {
- lyx_view_->updateLayoutChoice(false);
}
}
}
if (!quitting && lyx_view_) {
- lyx_view_->updateToolbars();
// Some messages may already be translated, so we cannot use _()
sendDispatchMessage(translateIfPossible(getMessage()), cmd);
}
if (!newBuffer) {
lyx_view_->message(_("Document not loaded."));
- lyx_view_->updateStatusBar();
lyx_view_->setBusy(false);
return 0;
}