2002-03-11 17:00:41 +00:00
|
|
|
/**
|
|
|
|
* \file FormLog.C
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-11 17:00:41 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-02-06 17:41:42 +00:00
|
|
|
*/
|
|
|
|
|
2002-03-11 17:00:41 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2001-02-06 17:41:42 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2001-03-20 10:14:03 +00:00
|
|
|
#include "xformsBC.h"
|
|
|
|
#include "ControlLog.h"
|
2001-02-06 17:41:42 +00:00
|
|
|
#include "FormLog.h"
|
2002-06-13 13:43:51 +00:00
|
|
|
#include "forms/form_browser.h"
|
2001-03-20 10:14:03 +00:00
|
|
|
#include "gettext.h"
|
2002-06-13 13:43:51 +00:00
|
|
|
#include FORMS_H_LOCATION
|
2001-02-06 17:41:42 +00:00
|
|
|
|
2002-08-12 14:28:43 +00:00
|
|
|
FormLog::FormLog()
|
|
|
|
: FormCB<ControlLog, FormBrowser>( _("LaTeX Log"))
|
2001-03-20 10:14:03 +00:00
|
|
|
{}
|
2001-02-06 17:41:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
void FormLog::update()
|
|
|
|
{
|
2002-10-24 12:56:44 +00:00
|
|
|
bool const buildlog = controller().logfile().first == Buffer::buildlog;
|
2001-02-06 17:41:42 +00:00
|
|
|
|
2002-10-24 12:56:44 +00:00
|
|
|
string const title = buildlog ?
|
|
|
|
_("LyX: LaTeX Log") :
|
|
|
|
_("LyX: Literate Programming Build Log");
|
|
|
|
fl_set_form_title(dialog_->form, title.c_str());
|
2002-10-21 17:38:09 +00:00
|
|
|
|
2002-10-24 12:56:44 +00:00
|
|
|
fl_clear_browser(dialog_->browser);
|
|
|
|
int const valid = fl_load_browser(dialog_->browser,
|
|
|
|
controller().logfile().second.c_str());
|
|
|
|
if (!valid) {
|
|
|
|
string const error = buildlog ?
|
|
|
|
_("No LaTeX log file found.") :
|
|
|
|
_("No Literate Programming build log file found.");
|
|
|
|
fl_add_browser_line(dialog_->browser, error.c_str());
|
|
|
|
}
|
2001-02-06 17:41:42 +00:00
|
|
|
}
|