1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00

dtappbuilder: fix issues of property settings for spin box.

This commit is contained in:
Liang Chang 2021-02-17 20:22:00 +08:00 committed by Jon Trulson
parent 808ce58e3d
commit 8d6262ca3e

View file

@ -215,9 +215,10 @@ spinbox_prop_init(
DtbRevolvPropDialogInfo rpd = &(dtb_revolv_prop_dialog);
PropSpinboxSettingsRec *pss = &(prop_spinbox_settings_rec[type]);
Widget item[6];
int item_val[6];
XtArgVal item_val[6];
XtPointer item_ptr[6];
Widget item2[6];
int item2_val[6];
XtArgVal item2_val[6];
int i, n, j;
if (type == AB_PROP_REVOLVING)
@ -292,11 +293,11 @@ spinbox_prop_init(
/* Spinbox Type */
n = 0;
item[n] = cgen->spinboxtype_rbox_items.Numeric_item;
item_val[n] = AB_TEXT_NUMERIC; n++;
item_ptr[n] = AB_TEXT_NUMERIC; n++;
item[n] = cgen->spinboxtype_rbox_items.String_List_item;
item_val[n] = AB_TEXT_DEFINED_STRING; n++;
item_ptr[n] = AB_TEXT_DEFINED_STRING; n++;
prop_radiobox_init(&(pss->spinbox_type), cgen->spinboxtype_rbox_label,
cgen->spinboxtype_rbox, n, item, (XtPointer*)item_val,
cgen->spinboxtype_rbox, n, item, item_ptr,
cgen->spinboxtype_cb);
for(i=0; i < n; i++)
XtAddCallback(item[i], XmNvalueChangedCallback,
@ -305,12 +306,12 @@ spinbox_prop_init(
/* Label, Type, Position */
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(&(pss->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);
prop_field_init(&(pss->label), cgen->label_field_label,
@ -320,29 +321,29 @@ spinbox_prop_init(
n = 0;
item[n] = cgen->labelpos_rbox_items.Above_item;
item_val[n] = AB_CP_NORTH; n++;
item_ptr[n] = AB_CP_NORTH; n++;
item[n] = cgen->labelpos_rbox_items.Left_item;
item_val[n] = AB_CP_WEST; n++;
item_ptr[n] = AB_CP_WEST; n++;
prop_options_init(&(pss->label_pos), cgen->labeltype_rbox_label,
cgen->labelpos_rbox, cgen->labelpos_rbox_menu,
n, item, (XtPointer*)item_val,
n, item, item_ptr,
cgen->labeltype_cb);
/* Arrow Style */
n = 0;
item[n] = cgen->arrowstyle_opmenu_items.Flat_Beginning_item;
item_val[n] = AB_ARROW_FLAT_BEGIN; n++;
item_ptr[n] = AB_ARROW_FLAT_BEGIN; n++;
item[n] = cgen->arrowstyle_opmenu_items.Flat_End_item;
item_val[n] = AB_ARROW_FLAT_END; n++;
item_ptr[n] = AB_ARROW_FLAT_END; n++;
item[n] = cgen->arrowstyle_opmenu_items.Beginning_item;
item_val[n] = AB_ARROW_BEGIN; n++;
item_ptr[n] = AB_ARROW_BEGIN; n++;
item[n] = cgen->arrowstyle_opmenu_items.End_item;
item_val[n] = AB_ARROW_END; n++;
item_ptr[n] = AB_ARROW_END; n++;
item[n] = cgen->arrowstyle_opmenu_items.Split_item;
item_val[n] = AB_ARROW_SPLIT; n++;
item_ptr[n] = AB_ARROW_SPLIT; n++;
prop_options_init(&(pss->arrow_style), cgen->arrowstyle_opmenu_label,
cgen->arrowstyle_opmenu, cgen->arrowstyle_opmenu_menu,
n, item, (XtPointer*)item_val,
n, item, item_ptr,
cgen->arrowstyle_cb);
/* Min & Max & Incr */