]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormLog.C
Move LaTeX and VC logs to GUI-I on xforms
[lyx.git] / src / frontends / xforms / FormLog.C
1 /* FormLog.C
2  * (C) 2001 LyX Team
3  * John Levon, moz@compsoc.man.ac.uk
4  */
5
6 #include <config.h>
7
8 #include FORMS_H_LOCATION
9
10 #ifdef __GNUG__
11 #pragma implementation
12 #endif
13
14 #include "gettext.h" 
15 #include "FormLog.h"
16 #include "form_browser.h"
17 #include "LyXView.h"
18 #include "Dialogs.h"
19 #include "lyxrc.h"
20 #include "buffer.h"
21
22 #ifdef SIGC_CXX_NAMESPACES
23 using SigC::slot;
24 #endif
25
26 FormLog::FormLog(LyXView * lv, Dialogs * d)
27         : FormBrowser(lv, d, _("LaTeX Log"))
28 {
29         // let the dialog be shown
30         // This is a permanent connection so we won't bother
31         // storing a copy because we won't be disconnecting.
32         d->showLogFile.connect(slot(this, &FormLog::show));
33 }
34
35 FormLog::~FormLog()
36 {
37 }
38
39 void FormLog::update()
40 {
41         if (!dialog_ || !lv_->view()->available())
42                 return;
43  
44         string const logfile = lv_->view()->buffer()->getLatexLogName();
45
46         fl_clear_browser(dialog_->browser);
47
48         if (!fl_load_browser(dialog_->browser, logfile.c_str()))
49                 fl_add_browser_line(dialog_->browser, _("No LaTeX log file found"));
50 }