Re: ICONS!!!



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







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