]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormVCLog.C
fix crash with "save as"
[lyx.git] / src / frontends / xforms / FormVCLog.C
index b58b93ac65db7ddc89aeb3599706b956669e01ea..2c6be8eeb7bd570ac8cface9a308b9340e9c169e 100644 (file)
@@ -1,21 +1,30 @@
-/* FormVCLog.C
- * (C) 2001 LyX Team
- * John Levon, moz@compsoc.man.ac.uk
+/**
+ * \file FormVCLog.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
+#include <config.h>
+#include "Lsstream.h"
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include <config.h>
 #include "xformsBC.h"
 #include "ControlVCLog.h"
 #include "FormVCLog.h"
-#include "form_browser.h"
+#include "forms/form_browser.h"
 #include "gettext.h"
+#include FORMS_H_LOCATION
 
-FormVCLog::FormVCLog(ControlVCLog & c)
-       : FormCB<ControlVCLog, FormBrowser>(c, _("Version Control Log"))
+
+FormVCLog::FormVCLog()
+       : FormCB<ControlVCLog, FormBrowser>(_("Version Control Log"))
 {}
 
 
@@ -23,8 +32,8 @@ void FormVCLog::update()
 {
        fl_clear_browser(dialog_->browser);
 
-       if (controller().logfile().empty() ||
-           !fl_load_browser(dialog_->browser, controller().logfile().c_str()))
-               fl_add_browser_line(dialog_->browser,
-                                   _("No version control log file available"));
+       ostringstream ss;
+       controller().getVCLogFile(ss);
+
+       fl_add_browser_line(dialog_->browser, ss.str().c_str());
 }