#define TurnOnFlag(x) flags |= ToolbarInfo::x
#define TurnOffFlag(x) flags &= ~ToolbarInfo::x
-GuiToolbars::GuiToolbars(GuiViewBase & owner)
+GuiToolbars::GuiToolbars(GuiView & owner)
: owner_(owner),
layout_(0),
last_textclass_(TextClassPtr())
int last_posx = 0;
int last_posy = 0;
for (; tb != te; ++tb) {
- LYXERR(Debug::INIT) << "Adding " << tb->key << " at position "
- << tb->info.posx << " " << tb->info.posy << endl;
+ LYXERR(Debug::INIT, "Adding " << tb->key << " at position "
+ << tb->info.posx << " " << tb->info.posy);
// add toolbar break if posx or posy changes
bool newline = tb->info.location == last_loc && (
// if two toolbars at the same location, assume uninitialized and add toolbar break
}
}
- LYXERR(Debug::GUI) << "Toolbar::display: no toolbar named "
- << name << endl;
+ LYXERR(Debug::GUI, "Toolbar::display: no toolbar named " << name);
}
ToolbarInfo * tbi = toolbarbackend.getUsedToolbarInfo(name);
if (!tbi) {
- LYXERR(Debug::GUI) << "Toolbar::display: no toolbar named "
- << name << endl;
+ LYXERR(Debug::GUI, "Toolbar::display: no toolbar named " << name);
return;
}
}
-bool GuiToolbars::updateLayoutList(TextClassPtr textclass)
+bool GuiToolbars::updateLayoutList(TextClassPtr textclass, bool force)
{
// update the layout display
- if (last_textclass_ != textclass) {
+ if (last_textclass_ != textclass || force) {
if (layout_)
layout_->updateContents();
last_textclass_ = textclass;
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;
}