]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormLog.C
ws fixes, formatting and some other small changes
[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 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "xformsBC.h"
18 #include "ControlLog.h"
19 #include "FormLog.h"
20 #include "forms/form_browser.h"
21 #include "gettext.h"
22 #include FORMS_H_LOCATION
23
24 FormLog::FormLog()
25         : FormCB<ControlLog, FormBrowser>( _("LaTeX Log"))
26 {}
27
28
29 void FormLog::update()
30 {
31         fl_clear_browser(dialog_->browser);
32
33         bool buildlog = (controller().logfile().first == Buffer::buildlog);
34
35         fl_set_form_title(dialog_->form,
36                           buildlog ? _("Build log") : _("LaTeX Log"));
37         if (!fl_load_browser(dialog_->browser,
38                              controller().logfile().second.c_str()))
39                 fl_add_browser_line(dialog_->browser,
40                                     buildlog ? _("No build log file found")
41                                     : _("No LaTeX log file found"));
42 }