]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormLog.C
remove defaults stuff, let Qt handle no toolbar
[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
14 #include "xformsBC.h"
15 #include "ControlLog.h"
16 #include "FormLog.h"
17 #include "forms/form_browser.h"
18 #include "gettext.h"
19 #include FORMS_H_LOCATION
20
21 FormLog::FormLog(Dialog & parent)
22         : FormController<ControlLog, FormBrowser>(parent, _("LaTeX Log"))
23 {}
24
25
26 void FormLog::update()
27 {
28         bool const buildlog = controller().logfile().first == Buffer::buildlog;
29
30         string const title = buildlog ?
31                 _("LyX: LaTeX Log") :
32                 _("LyX: Literate Programming Build Log");
33         fl_set_form_title(dialog_->form, title.c_str());
34
35         fl_clear_browser(dialog_->browser);
36         int const valid = fl_load_browser(dialog_->browser,
37                                           controller().logfile().second.c_str());
38         if (!valid) {
39                 string const error = buildlog ?
40                         _("No LaTeX log file found.") :
41                         _("No Literate Programming build log file found.");
42                 fl_add_browser_line(dialog_->browser, error.c_str());
43         }
44 }