From f2667897033a7e23eb19c806892f022ed11a48a6 Mon Sep 17 00:00:00 2001 From: Liang Chang Date: Wed, 17 Feb 2021 18:41:35 +0800 Subject: [PATCH] dtappbuilder: fix issues of property settings for label. --- cde/programs/dtappbuilder/src/ab/pal_label.c | 23 ++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/cde/programs/dtappbuilder/src/ab/pal_label.c b/cde/programs/dtappbuilder/src/ab/pal_label.c index 820db8326..a51d14353 100644 --- a/cde/programs/dtappbuilder/src/ab/pal_label.c +++ b/cde/programs/dtappbuilder/src/ab/pal_label.c @@ -184,7 +184,8 @@ label_prop_init( DtbRevolvPropDialogInfo rpd = &(dtb_revolv_prop_dialog); PropLabelSettingsRec *pls = &(prop_label_settings_rec[type]); Widget item[6]; - int item_val[6]; + XtArgVal item_val[6]; + XtPointer item_ptr[6]; int n; int i; @@ -256,12 +257,12 @@ label_prop_init( /* Label Type */ n = 0; item[n] = cgen->labeltype_rbox_items.String_item; - item_val[n] = AB_LABEL_STRING; n++; + item_ptr[n] = AB_LABEL_STRING; n++; item[n] = cgen->labeltype_rbox_items.Graphic_item; - item_val[n] = AB_LABEL_GLYPH; n++; + item_ptr[n] = AB_LABEL_GLYPH; n++; prop_options_init(&(pls->label_type), cgen->labeltype_rbox_label, cgen->labeltype_rbox, cgen->labeltype_rbox_menu, - n, item, (XtPointer*)item_val, + n, item, item_ptr, cgen->labeltype_cb); /* Label */ @@ -273,24 +274,24 @@ label_prop_init( /* Label Align */ n = 0; item[n] = cgen->labelalign_opmenu_items.Left_item; - item_val[n] = AB_ALIGN_LEFT; n++; + item_ptr[n] = AB_ALIGN_LEFT; n++; item[n] = cgen->labelalign_opmenu_items.Centered_item; - item_val[n] = AB_ALIGN_CENTER; n++; + item_ptr[n] = AB_ALIGN_CENTER; n++; item[n] = cgen->labelalign_opmenu_items.Right_item; - item_val[n] = AB_ALIGN_RIGHT; n++; + item_ptr[n] = AB_ALIGN_RIGHT; n++; prop_options_init(&(pls->label_align), cgen->labelalign_opmenu_label, cgen->labelalign_opmenu, cgen->labelalign_opmenu_menu, - n, item, (XtPointer*)item_val, + n, item, item_ptr, cgen->labelalign_cb); /* Size Policy */ n = 0; item[n] = cgen->szpolicy_rbox_items.Size_of_Label_item; - item_val[n] = SIZE_OF_CONTENTS_KEY; n++; + item_ptr[n] = SIZE_OF_CONTENTS_KEY; n++; item[n] = cgen->szpolicy_rbox_items.Fixed_item; - item_val[n] = SIZE_FIXED_KEY; n++; + item_ptr[n] = SIZE_FIXED_KEY; n++; prop_radiobox_init(&(pls->size_policy), cgen->szpolicy_rbox_label, - cgen->szpolicy_rbox, n, item, (XtPointer*)item_val, + cgen->szpolicy_rbox, n, item, item_ptr, cgen->szpolicy_cb); for(i=0; i < n; i++)