]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormShowFile.C
fix crash with "save as"
[lyx.git] / src / frontends / xforms / FormShowFile.C
index ec45f27fd769912bc19aee01951d800d7dd42f4e..bd492978b4542c9ae8c62e33149af94b0c484f1f 100644 (file)
@@ -1,6 +1,7 @@
 /**
  * \file FormShowFile.C
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author Herbert Voss
  *
@@ -22,7 +23,7 @@
 
 
 FormShowFile::FormShowFile()
-       : FormCB<ControlShowFile, FormBrowser>(string())
+       : FormCB<ControlShowFile, FormBrowser>(_("Show File"))
 {}
 
 
@@ -30,9 +31,12 @@ void FormShowFile::update()
 {
        fl_hide_object(dialog_->button_update);
        fl_clear_browser(dialog_->browser);
+
        // courier medium
        fl_set_browser_fontstyle(dialog_->browser,FL_FIXED_STYLE);
-       fl_set_form_title(dialog_->form, controller().getFileName().c_str());
+
+       string const title = "LyX: " + controller().getFileName();
+       fl_set_form_title(dialog_->form, title.c_str());
 
        string const contents = controller().getFileContents();
        if (contents.empty())