Author: vfr
Date: Sun Oct 30 20:52:33 2011
New Revision: 40100
URL: http://www.lyx.org/trac/changeset/40100

Log:
Use the format's pretty name in the statusmessages

Modified:
   lyx-devel/trunk/src/frontends/qt4/GuiView.cpp

Modified: lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiView.cpp       Sun Oct 30 20:52:27 
2011        (r40099)
+++ lyx-devel/trunk/src/frontends/qt4/GuiView.cpp       Sun Oct 30 20:52:33 
2011        (r40100)
@@ -531,10 +531,11 @@
 static void handleExportStatus(GuiView * view, Buffer::ExportStatus status,
        string const & format)
 {
+       docstring const fmt = formats.prettyName(format);
        docstring msg;
        switch (status) {
        case Buffer::ExportSuccess:
-               msg = bformat(_("Successful export to format: %1$s"), 
from_utf8(format));
+               msg = bformat(_("Successful export to format: %1$s"), fmt);
                break;
        case Buffer::ExportCancel:
                msg = _("Document export cancelled.");
@@ -543,13 +544,13 @@
        case Buffer::ExportNoPathToFormat:
        case Buffer::ExportTexPathHasSpaces:
        case Buffer::ExportConverterError:
-               msg = bformat(_("Error while exporting format: %1$s"), 
from_utf8(format));
+               msg = bformat(_("Error while exporting format: %1$s"), fmt);
                break;
        case Buffer::PreviewSuccess:
-               msg = bformat(_("Successful preview of format: %1$s"), 
from_utf8(format));
+               msg = bformat(_("Successful preview of format: %1$s"), fmt);
                break;
        case Buffer::PreviewError:
-               msg = bformat(_("Error while previewing format: %1$s"), 
from_utf8(format));
+               msg = bformat(_("Error while previewing format: %1$s"), fmt);
                break;
        }
        view->message(msg);

Reply via email to