3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
6 * \author Edwin Leuven, leuven@fee.uva.nl
7 * \author Angus Leeming, a.leeming@ic.ac.uk
13 #pragma implementation
17 #include "ControlAboutlyx.h"
18 #include "FormAboutlyx.h"
19 #include "form_aboutlyx.h"
20 #include "xforms_helpers.h"
25 typedef FormCB<ControlAboutlyx, FormDB<FD_form_aboutlyx> > base_class;
27 FormAboutlyx::FormAboutlyx(ControlAboutlyx & c)
28 : base_class(c, _("About LyX"), false)
32 void FormAboutlyx::build()
34 dialog_.reset(build_aboutlyx());
37 version_.reset(build_tab_version());
38 fl_set_object_label(version_->text_version,
39 controller().getVersion().c_str());
40 fl_set_object_label(version_->text_copyright,
41 controller().getCopyright().c_str());
43 // create license and warranty tab
44 license_.reset(build_tab_license());
46 string str = formatted(controller().getLicense(),
47 license_->text_license->w-10);
48 fl_set_object_label(license_->text_license, str.c_str());
50 str = formatted(controller().getDisclaimer(),
51 license_->text_warranty->w-10);
52 fl_set_object_label(license_->text_warranty, str.c_str());
55 credits_.reset(build_tab_credits());
57 fl_add_browser_line(credits_->browser_credits,
58 controller().getCredits(ss).str().c_str());
61 fl_addto_tabfolder(dialog_->tabfolder,_("Copyright and Version"),
63 fl_addto_tabfolder(dialog_->tabfolder,_("License and Warranty"),
65 fl_addto_tabfolder(dialog_->tabfolder,_("Credits"),
68 // Manage the cancel/close button
69 bc().setCancel(dialog_->button_close);