Re: Get active text from GtkComboBox



On Mon, 2004-12-13 at 13:56 +0100, Stefan Kost wrote:
A followup question:

should there be a g_object_unref(model); at the end of the function ?

No.

You create a store with gtk_list_store_new (), or gtk_tree_store_new ()
and you have a reference on that object.  As soon as you assign the
store to the GtkTreeView it adds its reference to the store.  As a
result you must unreference it when you are finished.  With the
GtkTreeModel you are not creating a new object and so don't need to
unreference it, this is up to GTK.

For further information, might I suggest you refer to this tutorial:
http://scentric.net/tutorial/treeview-tutorial.html

-- 
Regards,
Martyn



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