setting defaults with radio buttons in an item factory...



I honestly searched all the documentation I could find but still the 
following stumps me: I have the following in my code:


  gtk_check_menu_item_set_state(GTK_CHECK_MENU_ITEM(widget1),FALSE);
  gtk_check_menu_item_set_state(GTK_CHECK_MENU_ITEM(widget2),FALSE);
  gtk_check_menu_item_set_state(GTK_CHECK_MENU_ITEM(widget3),TRUE);


Now, the above _works_. The problem is if I substitute the booleans with
(integer valued ) flags, say, 

flag_1, 
flag_2 and 
flag_3

only one of which is equal to 1 at any given time (the other two are equal to 
zero).  So even if initially I set  

flag_1=0,
flag_2=0,
flag_3=1,

not only does the _wrong_ button  get selected,  but I get 

flag_1=1, 
flag_2=0 ,
flag_3=0 

right after!

What's going on? 

Cevat. 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]