]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormPrint.C
Swap two printer related help messages.
[lyx.git] / src / frontends / xforms / FormPrint.C
index 4e307c010d34b6b997c90008ce53b301900c3bb0..29f5126949444b9f429e09079be3a23149f47757 100644 (file)
@@ -34,7 +34,7 @@ using Liason::getPrinterParams;
 
 
 FormPrint::FormPrint(LyXView * lv, Dialogs * d)
-       : FormBase(lv, d, BUFFER_DEPENDENT, _("Print"), new OkApplyCancelPolicy),
+       : FormBaseBD(lv, d, _("Print"), new OkApplyCancelPolicy),
          dialog_(0), target_(2), order_(2), which_(3)
 {
        // let the dialog be shown
@@ -54,7 +54,11 @@ void FormPrint::build()
 {
        dialog_ = build_print();
 
-       // manage the ok, apply and cancel/close buttons
+       // Workaround dumb xforms sizing bug
+       minw_ = form()->w;
+       minh_ = form()->h;
+
+       // Manage the ok, apply and cancel/close buttons
        bc_.setOK(dialog_->button_ok);
        bc_.setApply(dialog_->button_apply);
        bc_.setCancel(dialog_->button_cancel);
@@ -107,15 +111,6 @@ void FormPrint::build()
 }
 
 
-void FormPrint::connect()
-{
-       FormBase::connect();
-       fl_set_form_minsize(dialog_->form,
-                           dialog_->form->w,
-                           dialog_->form->h);
-}
-
-
 FL_FORM * FormPrint::form() const
 {
        if (dialog_) return dialog_->form;
@@ -153,8 +148,8 @@ void FormPrint::apply()
                                       string(fl_get_input(dialog_->input_file)),
                                       wp, from, to,
                                       static_cast<bool>(order_.getButton()),
-                                      static_cast<bool>(fl_get_button(dialog_->
-                                                                      radio_unsorted)),
+                                      !static_cast<bool>(fl_get_button(dialog_->
+                                                                       radio_collated)),
                                       strToInt(fl_get_input(dialog_->input_count))))) {
                WriteAlert(_("Error:"),
                           _("Unable to print"),
@@ -199,6 +194,7 @@ void FormPrint::update()
 
                fl_set_input(dialog_->input_count,
                             tostr(pp.count_copies).c_str());
+               bc_.valid();
        }
 }