From 08f909ef0537d6c3ee87d38ef9464a18e6d3d548 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sat, 17 Sep 2011 10:58:01 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiView.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 225033b10a..00334dc2a8 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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_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))); -- 2.39.2