]> git.lyx.org Git - features.git/blobdiff - src/frontends/xforms/FormLog.C
change "support/std_sstream.h" to <sstream>
[features.git] / src / frontends / xforms / FormLog.C
index 7c174c5ab555dfd0dcbd086f552319e23a56313f..685d6aca7ad7b9855f3a6f30984d0ba5bf4bcf84 100644 (file)
@@ -1,44 +1,41 @@
 /**
  * \file FormLog.C
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author John Levon, moz@compsoc.man.ac.uk
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "xformsBC.h"
-#include "ControlLog.h"
 #include "FormLog.h"
-#include "form_browser.h"
-#include "gettext.h"
+#include "ControlLog.h"
+#include "forms/form_browser.h"
+
+#include "lyx_forms.h"
+
+#include <sstream>
 
-FormLog::FormLog(ControlLog & c)
-       : FormCB<ControlLog, FormBrowser>(c, _("LaTeX Log"))
+namespace lyx {
+namespace frontend {
+
+FormLog::FormLog(Dialog & parent)
+       : FormController<ControlLog, FormBrowser>(parent, "")
 {}
 
 
 void FormLog::update()
 {
-       fl_clear_browser(dialog_->browser);
+       setTitle(controller().title());
+
+       std::ostringstream ss;
+       controller().getContents(ss);
 
-       if (controller().logfile().first == Buffer::buildlog) {
-               fl_set_form_title(dialog_->form, _("Build log"));
-               if (!fl_load_browser(dialog_->browser,
-                                    controller().logfile().second.c_str()))
-                       fl_add_browser_line(dialog_->browser,
-                                           _("No build log file found"));
-               return;
-       }
-
-       fl_set_form_title(dialog_->form, _("LaTeX Log"));
-       if (!fl_load_browser(dialog_->browser,
-                            controller().logfile().second.c_str()))
-               fl_add_browser_line(dialog_->browser,
-                                   _("No LaTeX log file found"));
+       fl_clear_browser(dialog_->browser);
+       fl_add_browser_line(dialog_->browser, ss.str().c_str());
 }
+
+} // namespace frontend
+} // namespace lyx