]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormCopyright.C
try this for distinguishing inner and outer tabs
[lyx.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 "xform_helpers.h"
18
19 FormCopyright::FormCopyright( LyXView * lv, Dialogs * d )
20         : FormBaseBI(lv, d, _("Copyright and Warranty"), new OkCancelPolicy),
21           dialog_(0)
22 {
23         // let the dialog be shown
24         // This is a permanent connection so we won't bother
25         // storing a copy because we won't be disconnecting.
26         d->showCopyright.connect(slot(this, &FormCopyright::show));
27 }
28
29
30 FormCopyright::~FormCopyright()
31 {
32         delete dialog_;
33 }
34
35
36 FL_FORM * FormCopyright::form() const
37 {
38         if (dialog_ ) return dialog_->form;
39         return 0;
40 }
41
42
43 void FormCopyright::build()
44 {
45         dialog_ = build_copyright();
46
47         // Workaround dumb xforms sizing bug
48         minw_ = form()->w;
49         minh_ = form()->h;
50
51         string str = _("LyX is Copyright (C) 1995 by Matthias Ettrich, 1995-2000 LyX Team");
52         str = formatted(str, dialog_->text_copyright->w-10,
53                         FL_NORMAL_SIZE, FL_NORMAL_STYLE);
54         fl_set_object_label(dialog_->text_copyright, str.c_str());
55
56         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.");
57         str = formatted(str, dialog_->text_licence->w-10,
58                         FL_NORMAL_SIZE, FL_NORMAL_STYLE);
59         fl_set_object_label(dialog_->text_licence, str.c_str());
60
61         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.");
62         str = formatted(str, dialog_->text_disclaimer->w-10,
63                         FL_NORMAL_SIZE, FL_NORMAL_STYLE);
64         fl_set_object_label(dialog_->text_disclaimer, str.c_str());
65         
66         // Manage the cancel/close button
67         bc_.setCancel(dialog_->button_cancel);
68         bc_.refresh();
69 }