Re: stock icon themes



On 27 Jul 2000, Havoc Pennington wrote:

> 
> Tim Janik <timj@gtk.org> writes:
> > > 
> > > How would you refer to a specific C variable from an RC file?
> > > 
> > > All I can think of is to register the C variable in advance under some
> > > name, but that's the same as just adding the inline pixbuf to the
> > > default icon factory as the default icon for a given stock ID.
> > 
> > hm ok, i see. could you give an example on how code like
> > that would look like for the application programmer?
> > 
> 
> Something like:

> static void
> setup_icons (void)
> {
> 
>   GtkIconFactory *factory;
> 
>   factory = gtk_icon_factory_new ();
>   gtk_push_default_icon_factory (factory);
>   g_object_unref (G_OBJECT (factory));
> 
>   add_inline (factory, "my-stock-id", my_inline_data);
>   add_inline (factory, "other-stock-id", my_other_data);

ok i see. gtk_push_default_icon_factory() builds up the stack
to look for icons not specified in rc files then, right?
i guess you'd do another g_objet_unref (G_OBJECT (factory)); here
though?
we need a gtk_pop_default_icon_factory() btw, think plugins here.

> }
> 
> Havoc
> 

---
ciaoTJ





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