]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormLog.C
Tiny clean-ups.
[lyx.git] / src / frontends / xforms / FormLog.C
1 /**
2  * \file FormLog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "FormLog.h"
14 #include "ControlLog.h"
15 #include "forms/form_browser.h"
16
17 #include "xformsBC.h"
18
19 #include "lyx_forms.h"
20
21
22 using std::string;
23
24
25 FormLog::FormLog(Dialog & parent)
26         : FormController<ControlLog, FormBrowser>(parent, _("LaTeX Log"))
27 {}
28
29
30 void FormLog::update()
31 {
32         bool const buildlog = controller().logfile().first == Buffer::buildlog;
33
34         string const title = buildlog ?
35                 _("LyX: LaTeX Log") :
36                 _("LyX: Literate Programming Build Log");
37         setTitle(title);
38
39         fl_clear_browser(dialog_->browser);
40         int const valid = fl_load_browser(dialog_->browser,
41                                           controller().logfile().second.c_str());
42         if (!valid) {
43                 string const error = buildlog ?
44                         _("No LaTeX log file found.") :
45                         _("No Literate Programming build log file found.");
46                 fl_add_browser_line(dialog_->browser, error.c_str());
47         }
48 }