X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormPrint.C;h=29f5126949444b9f429e09079be3a23149f47757;hb=eba67bc3120dc301bf193c3f3b570f51f00a4654;hp=71c68c7aee026b40e5db4890b61185426a8958ec;hpb=82ef1fd1de271e0dcadbed01ba5e4e2fd0f91c72;p=lyx.git diff --git a/src/frontends/xforms/FormPrint.C b/src/frontends/xforms/FormPrint.C index 71c68c7aee..29f5126949 100644 --- a/src/frontends/xforms/FormPrint.C +++ b/src/frontends/xforms/FormPrint.C @@ -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(order_.getButton()), - static_cast(fl_get_button(dialog_-> - radio_unsorted)), + !static_cast(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(); } } @@ -206,7 +202,7 @@ void FormPrint::update() // It would be nice if we checked for cases like: // Print only-odd-pages and from_page == an even number // -bool FormPrint::input(long) +bool FormPrint::input(FL_OBJECT *, long) { bool activate = true;