Re: ICONS!!!



On 30 Jun 2001 21:13:43 -0400, Havoc Pennington wrote:
> 
> Chris Hansen <popeofpop softhome net> writes:
> > >
> > >Subject: Re: ICONS!!!
> > >   From: Stephen Witkop <switk yahoo com>
> > >   Date: 30 Jun 2001 19:15:17 -0400
> > >     To: gtk-list gnome org
> > >
> > >Luckily we have:
> > >
> > >void        gdk_window_set_icon (GdkWindow *window,
> > >                                             GdkWindow *icon_window,
> > >                                             GdkPixmap *pixmap,
> > >                                             GdkBitmap *mask);
> > 
> > But how do we use this function with a window created as GtkWidget *window; ?
> > Does anyone have some sample code?
> > 
> 
> Ideally you would gtk_signal_connect_after() to the "realize" signal
> and set the icon on widget->window. (widget is a GtkWindow).
> 
> You can also cheat like this:
>  gtk_widget_realize (widget);
>  gdk_window_set_icon (widget->window, ...)
> 
> Though that is somewhat conceptually wrong.
> 
> GTK 2 adds gtk_window_set_icon() which is much simpler to deal with.
> 
> Havoc
> 

I've been calling it after gtk_widget_show (window); and before
gtk_main();

The only problem I've seen with using this function has been with icewm.
It doesn's use the icon set here however gnome, kde and netscape 4.x
icons do work. I assume icewm is using icons set somewhere else.

Stephen





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