]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormCopyright.C
try this for distinguishing inner and outer tabs
[lyx.git] / src / frontends / xforms / FormCopyright.C
index 9d0bef431dbea2a7826bef89a519226201fee27e..edfe5acc4a78dc4b0b275b34abb7ff247aed9a2d 100644 (file)
 
 #include "Dialogs.h"
 #include "LyXView.h"
-#include "gettext.h"
 #include "form_copyright.h"
 #include "FormCopyright.h"
+#include "xform_helpers.h"
 
 FormCopyright::FormCopyright( LyXView * lv, Dialogs * d        )
-       : FormBase( lv, d, BUFFER_INDEPENDENT, _("Copyright and Warranty") ),
+       : FormBaseBI(lv, d, _("Copyright and Warranty"), new OkCancelPolicy),
          dialog_(0)
 {
        // let the dialog be shown
@@ -33,16 +33,37 @@ FormCopyright::~FormCopyright()
 }
 
 
-void FormCopyright::build()
+FL_FORM * FormCopyright::form() const
 {
-       dialog_ = build_copyright();
+       if (dialog_ ) return dialog_->form;
+       return 0;
 }
 
 
-FL_FORM * const FormCopyright::form() const
+void FormCopyright::build()
 {
-       if( dialog_ ) // no need to test for dialog_->form
-               return dialog_->form;
-       else
-               return 0;
+       dialog_ = build_copyright();
+
+       // Workaround dumb xforms sizing bug
+       minw_ = form()->w;
+       minh_ = form()->h;
+
+       string str = _("LyX is Copyright (C) 1995 by Matthias Ettrich, 1995-2000 LyX Team");
+       str = formatted(str, dialog_->text_copyright->w-10,
+                       FL_NORMAL_SIZE, FL_NORMAL_STYLE);
+       fl_set_object_label(dialog_->text_copyright, str.c_str());
+
+       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.");
+       str = formatted(str, dialog_->text_licence->w-10,
+                       FL_NORMAL_SIZE, FL_NORMAL_STYLE);
+       fl_set_object_label(dialog_->text_licence, str.c_str());
+
+       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.");
+       str = formatted(str, dialog_->text_disclaimer->w-10,
+                       FL_NORMAL_SIZE, FL_NORMAL_STYLE);
+       fl_set_object_label(dialog_->text_disclaimer, str.c_str());
+       
+        // Manage the cancel/close button
+       bc_.setCancel(dialog_->button_cancel);
+       bc_.refresh();
 }