1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtinfo: ensure the print setup dialog initializing properly.

This commit is contained in:
Liang Chang 2022-03-03 06:33:11 +00:00
parent 342386bfab
commit a84595bf03

View file

@ -306,7 +306,6 @@ customizePrintSetupBox(AppPrintData *p)
f_selected_field = selected_field = XtVaCreateManagedWidget("selected_field",
xmLabelWidgetClass,
how_many_form,
XmNlabelString, label,
XmNalignment, XmALIGNMENT_END,
XmNrightAttachment, XmATTACH_FORM,
XmNrightOffset, 2,
@ -582,6 +581,21 @@ CancelCB(Widget print_dialog, XtPointer client_data, XtPointer call_data)
}
/*
* ------------------------------------------------------------------------
* Name: DestroyCB
*
* Description:
*
* Called when the Print Setup dialog is destroyed.
*
*/
static void
DestroyCB(Widget print_dialog, XtPointer client_data, XtPointer call_data)
{
((AppPrintData*)client_data)->f_print_dialog = NULL;
}
/*
* ------------------------------------------------------------------------
* Name: CreatePrintSetup
@ -676,6 +690,7 @@ CreatePrintSetup(Widget parent, AppPrintData* p)
XtAddCallback(p->f_print_dialog, DtNprintCallback, PrintCB, (XtPointer)p);
XtAddCallback(p->f_print_dialog, DtNcancelCallback, CancelCB, (XtPointer)p);
XtAddCallback(p->f_print_dialog, XmNdestroyCallback, DestroyCB, (XtPointer)p);
// add context help for dialog