Update the toolbars when the GuiView is shown

This will disable the layout box if no document is open, and it will set the correct state of the toolbar toggling buttons.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39694 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2011-09-17 10:58:01 +00:00
parent 40d4d94b01
commit 08f909ef05

View File

@ -801,6 +801,7 @@ void GuiView::showEvent(QShowEvent * e)
// No work area, switch to the background widget.
d.setBackground();
updateToolbars();
QMainWindow::showEvent(e);
}
@ -897,7 +898,7 @@ void GuiView::dropEvent(QDropEvent * event)
= theConverters().importableFormats();
vector<const Format *>::const_iterator it = import_formats.begin();
for (; it != import_formats.end(); ++it)
if ((*it)->hasExtension(ext))
if ((*it)->extension() == ext)
found_formats.push_back(*it);
FuncRequest cmd;
@ -2066,10 +2067,10 @@ void GuiView::importDocument(string const & argument)
toqstr(addPath(package().system_support().absFileName(), "examples")));
docstring filter = formats.prettyName(format);
filter += " (*.{";
filter += " (*.";
// FIXME UNICODE
filter += from_utf8(formats.extensions(format));
filter += "})";
filter += from_utf8(formats.extension(format));
filter += ')';
FileDialog::Result result =
dlg.open(toqstr(initpath), fileFilters(toqstr(filter)));