From 00e6b84182478dea5542b70f0519fe6bb775fb10 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 20 May 2008 14:07:26 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : Ricompilazione Demo : [ ] Commento : Corretta gestione radio button e checkbox git-svn-id: svn://10.65.10.50/trunk@16635 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xi/xiutils.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/xi/xiutils.c b/xi/xiutils.c index 94d7eeced..5c9052e7a 100755 --- a/xi/xiutils.c +++ b/xi/xiutils.c @@ -2874,25 +2874,28 @@ xi_check( XI_OBJ * xi_obj, BOOLEAN check ) case XIBT_TABBTN: { XinWindow wins[MAX_RADIO_BUTTONS]; - XI_BTN_TYPE type; + //XI_BTN_TYPE type; XI_OBJ *parent; - type = xi_obj->v.btn->type; + //type = xi_obj->v.btn->type; parent = xi_obj->parent; - if ( parent->type == XIT_CONTAINER && - ( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) ) + if ( parent->type == XIT_CONTAINER /* && + ( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) */) { - int i; + if (check) + { + int i; - if ( parent->nbr_children > MAX_RADIO_BUTTONS ) - XinError( 20089, XinSeverityFatal, 0L ); - for ( i = 0; i < parent->nbr_children; ++i ) - wins[i] = parent->children[i]->v.btn->btnctl; - XinWindowCheckRadioButton( btn->btnctl, wins, - parent->nbr_children ); - return; + if ( parent->nbr_children > MAX_RADIO_BUTTONS ) + XinError( 20089, XinSeverityFatal, 0L ); + for ( i = 0; i < parent->nbr_children; ++i ) + wins[i] = parent->children[i]->v.btn->btnctl; + XinWindowCheckRadioButton( btn->btnctl, wins, + parent->nbr_children ); + } + //return; } - if ( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) + else { XinWindowCheckBox( btn->btnctl, check ); return;