Re: About gtk_object_set_data()



hi,

chao yeaj wrote:
Hello  everyone

        I have a check button
       and the check button may have an associated data,which is an
source id returned by g_timeout_add()  function
        I do this,because,the check button may be need a function
periodically  changing its attributes

       to manage the   source id returned by g_timeout_add()
       i use gtk_object_set_data() function to set the id to the
object's data filed

        during the check button's life time, i may remove the data
using g_source_remove,and may create the data again  using
g_timeout_add()

        What I am not clear is that: when the check button is
destroying ,how gtk  manage the  data i set to the object?
  
When an object gets destroyed, its qdata list gets freed.
g_object_{s|g}et_data are convinience functions for
g_object_{s|g}et_qdata. Both work on the same data-list.

Stefan




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