Fix the disappearing minibuffer by don't pretending we are flexible.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21600 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-11-14 11:14:06 +00:00
parent dd0ff2d0f7
commit 0c6306060e
4 changed files with 10 additions and 13 deletions

View File

@ -272,7 +272,8 @@ docstring const GuiCommandBuffer::getCurrentState() const
void GuiCommandBuffer::hide() const
{
view_->showMiniBuffer(false);
FuncRequest cmd(LFUN_COMMAND_EXECUTE, "off");
view_->dispatch(cmd);
}

View File

@ -378,11 +378,13 @@ void GuiToolbars::showCommandBuffer(bool show_it)
if (!cb)
continue;
if (!show_it) {
it->second->hide();
// FIXME: this is a hack, "minibuffer" should not be
// hardcoded.
display("minibuffer", false);
return;
}
if (!it->second->isVisible())
it->second->show();
display("minibuffer", true);
cb->setFocus();
return;
}

View File

@ -952,12 +952,6 @@ void GuiView::removeWorkArea(GuiWorkArea * work_area)
}
void GuiView::showMiniBuffer(bool visible)
{
d.toolbars_->showCommandBuffer(visible);
}
void GuiView::updateLayoutChoice(bool force)
{
// Don't show any layouts without a buffer
@ -1178,10 +1172,11 @@ void GuiView::dispatch(FuncRequest const & cmd)
setBuffer(theBufferList().getBuffer(to_utf8(cmd.argument())));
break;
case LFUN_COMMAND_EXECUTE:
d.toolbars_->showCommandBuffer(true);
case LFUN_COMMAND_EXECUTE: {
bool const show_it = cmd.argument() != "off";
d.toolbars_->showCommandBuffer(show_it);
break;
}
case LFUN_DROP_LAYOUTS_CHOICE:
d.toolbars_->openLayoutList();
break;

View File

@ -82,7 +82,6 @@ public:
virtual void updateStatusBar();
virtual void message(docstring const & str);
virtual bool hasFocus() const;
void showMiniBuffer(bool);
void updateLayoutChoice(bool force);
bool isToolbarVisible(std::string const & id);
void updateToolbars();