[gtk2] g_object_ref



Hello,

  I want to make a gui whith a hbox : on the left, a gtktreeview and on 
the right, a gtk_alignment, in which the widget changes when the user 
click on one of the row of the tree. I have succeeded and my algorithm is 
: I remove the right widget (gtk_container_remove) and I put the new one 
(gtk_container_add). I have two questions : 

 1) I find my method not elegant. Is there another (classical) way to do 
such things ?
 2) I have to use g_object_ref in order not to loose my widget (because of 
gtk_container_remove). But the  API is not clear about purpose of this 
function. Can someone explain me what this function does (especially the 
returned value).

thank you !

Vincent TORRI


-- 
TORRI Vincent
Mathematiques Appliquees Bordeaux                                                
Institut de Mathematiques                                                       
Universite Bordeaux 1                                                           
351 cours de la liberation                                                      
33 405 Talence cedex - France                                                   
                                                                                
Tel : 33 (0)5 40 00 21 42                                                       
Fax : 33 (0)5 40 00 26 26                                                       
--




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