Re: Key-value file parser, howto get all groups and create loop from them



On Sat, Aug 05, 2006 at 10:18:24AM +0200, rupert wrote:

Change the pixbuf in the model:

   pixbuf = gdk_pixbuf_new_from_file(...);
   gtk_tree_store_set(treestore, &iter, column_id, pixbuf, -1);
   g_object_unref(pixbuf);


but how can I pass all the Information like the treestore, itert.., with the
g_timeout_add(), because it only allows me one filed for data to pass.

You can pass an arbitrary pointer.  For example a pointer to
an arbitrarily complex data structure created for this
purpose.

Alternatively, you can make use of g_object_set_data() and
g_object_get_data() to attach data to objects and pick them
later, although there doesn't seem to be a suitable involved
object for that.

register them as stock icons or load the pixbufs only once
and reuse them.


I have no idea how to do this.
Could you please link me to an example,
from reading the reference i dont get is how to use it correctly:

While registration of stock icons is a bit convoluted
I don't understand what further explanation is needed for
`load the pixbufs only once and reuse them':

    pixbuf_foo = gdk_pixbuf_new_from_file("foo.png", ...);

keep pixbuf_foo around and use it every time you need the
foo image.

Yeti


--
Anonyms eat their boogers.



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