]> git.lyx.org Git - features.git/blob - src/frontends/xforms/FormCopyright.C
071cca1eec1cf787b16be63522ff9e51c6d36fc0
[features.git] / src / frontends / xforms / FormCopyright.C
1 /* FormCopyright.C
2  * FormCopyright Interface Class Implementation
3  */
4
5 #include <config.h>
6
7 #include FORMS_H_LOCATION
8
9 #ifdef __GNUG__
10 #pragma implementation
11 #endif
12
13 #include "Dialogs.h"
14 #include "LyXView.h"
15 #include "form_copyright.h"
16 #include "FormCopyright.h"
17 #include "xforms_helpers.h"
18
19 FormCopyright::FormCopyright( LyXView * lv, Dialogs * d )
20         : FormBaseBI(lv, d, _("Copyright and Warranty"))
21 {
22         // let the dialog be shown
23         // This is a permanent connection so we won't bother
24         // storing a copy because we won't be disconnecting.
25         d->showCopyright.connect(slot(this, &FormCopyright::show));
26 }
27
28
29 FL_FORM * FormCopyright::form() const
30 {
31         if (dialog_.get()) return dialog_->form;
32         return 0;
33 }
34
35
36 void FormCopyright::build()
37 {
38         dialog_.reset(build_copyright());
39
40         // Workaround dumb xforms sizing bug
41         minw_ = form()->w;
42         minh_ = form()->h;
43
44         string str = _("LyX is Copyright (C) 1995 by Matthias Ettrich, 1995-2001 LyX Team");
45         str = formatted(str, dialog_->text_copyright->w-10,
46                         FL_NORMAL_SIZE, FL_NORMAL_STYLE);
47         fl_set_object_label(dialog_->text_copyright, str.c_str());
48
49         str = _("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
50         str = formatted(str, dialog_->text_licence->w-10,
51                         FL_NORMAL_SIZE, FL_NORMAL_STYLE);
52         fl_set_object_label(dialog_->text_licence, str.c_str());
53
54         str = _("LyX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.");
55         str = formatted(str, dialog_->text_disclaimer->w-10,
56                         FL_NORMAL_SIZE, FL_NORMAL_STYLE);
57         fl_set_object_label(dialog_->text_disclaimer, str.c_str());
58         
59         // Manage the cancel/close button
60         bc().setCancel(dialog_->button_cancel);
61         bc().refresh();
62 }