2001-07-13 14:03:48 +00:00
|
|
|
/**
|
|
|
|
* \file FormAboutlyx.C
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
* See the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven, leuven@fee.uva.nl
|
2002-03-11 17:00:41 +00:00
|
|
|
* \author Angus Leeming, a.leeming@ic.ac.uk
|
2001-07-13 14:03:48 +00:00
|
|
|
*/
|
|
|
|
|
2002-03-11 17:00:41 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
2001-07-13 14:03:48 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2002-06-24 20:28:12 +00:00
|
|
|
#include "FormAboutlyx.h"
|
2001-07-13 14:03:48 +00:00
|
|
|
#include "xformsBC.h"
|
|
|
|
#include "ControlAboutlyx.h"
|
2002-06-13 13:43:51 +00:00
|
|
|
#include "forms/form_aboutlyx.h"
|
2001-07-13 14:03:48 +00:00
|
|
|
#include "xforms_helpers.h"
|
2002-06-13 13:43:51 +00:00
|
|
|
#include FORMS_H_LOCATION
|
2001-07-13 14:03:48 +00:00
|
|
|
#include "Lsstream.h"
|
|
|
|
|
|
|
|
using std::getline;
|
|
|
|
|
2002-06-13 13:43:51 +00:00
|
|
|
typedef FormCB<ControlAboutlyx, FormDB<FD_aboutlyx> > base_class;
|
2001-07-13 14:03:48 +00:00
|
|
|
|
2002-07-02 19:23:10 +00:00
|
|
|
FormAboutlyx::FormAboutlyx(ControlAboutlyx & c, Dialogs & d)
|
|
|
|
: base_class(c, d, _("About LyX"), false)
|
2001-07-13 14:03:48 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
void FormAboutlyx::build()
|
|
|
|
{
|
2002-06-13 13:43:51 +00:00
|
|
|
dialog_.reset(build_aboutlyx(this));
|
2001-07-13 14:03:48 +00:00
|
|
|
|
|
|
|
// create version tab
|
2002-06-13 13:43:51 +00:00
|
|
|
version_.reset(build_aboutlyx_version(this));
|
2002-03-21 21:21:28 +00:00
|
|
|
fl_set_object_label(version_->text_version,
|
2001-07-13 14:03:48 +00:00
|
|
|
controller().getVersion().c_str());
|
2002-03-21 21:21:28 +00:00
|
|
|
fl_set_object_label(version_->text_copyright,
|
2001-07-13 14:03:48 +00:00
|
|
|
controller().getCopyright().c_str());
|
|
|
|
|
|
|
|
// create license and warranty tab
|
2002-06-13 13:43:51 +00:00
|
|
|
license_.reset(build_aboutlyx_license(this));
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-07-13 14:03:48 +00:00
|
|
|
string str = formatted(controller().getLicense(),
|
|
|
|
license_->text_license->w-10);
|
|
|
|
fl_set_object_label(license_->text_license, str.c_str());
|
|
|
|
|
|
|
|
str = formatted(controller().getDisclaimer(),
|
|
|
|
license_->text_warranty->w-10);
|
|
|
|
fl_set_object_label(license_->text_warranty, str.c_str());
|
|
|
|
|
|
|
|
// create credits
|
2002-06-13 13:43:51 +00:00
|
|
|
credits_.reset(build_aboutlyx_credits(this));
|
2001-07-13 14:03:48 +00:00
|
|
|
stringstream ss;
|
2002-03-21 21:21:28 +00:00
|
|
|
fl_add_browser_line(credits_->browser_credits,
|
2001-07-13 14:03:48 +00:00
|
|
|
controller().getCredits(ss).str().c_str());
|
|
|
|
|
|
|
|
// stack tabs
|
2002-03-12 14:11:15 +00:00
|
|
|
fl_addto_tabfolder(dialog_->tabfolder,_("Copyright and Version"),
|
2002-03-21 16:59:12 +00:00
|
|
|
version_->form);
|
2002-03-12 14:11:15 +00:00
|
|
|
fl_addto_tabfolder(dialog_->tabfolder,_("License and Warranty"),
|
2002-03-21 16:59:12 +00:00
|
|
|
license_->form);
|
2002-03-12 14:11:15 +00:00
|
|
|
fl_addto_tabfolder(dialog_->tabfolder,_("Credits"),
|
2002-03-21 16:59:12 +00:00
|
|
|
credits_->form);
|
2001-07-13 14:03:48 +00:00
|
|
|
|
|
|
|
// Manage the cancel/close button
|
2002-03-12 14:11:15 +00:00
|
|
|
bc().setCancel(dialog_->button_close);
|
2001-07-13 14:03:48 +00:00
|
|
|
}
|