Re: Does gnumeric have an icon?



The code I use to set the icon is a little different.  You only have to
give the window argument to gdk_window_set_icon if you want to have more
control over the icon than just a static pixmap.  Also, I don't think you
are supposed to specify the background colour to
gdk_pixmap_create_from_xpm_d if you want a transparent icon.

The code I use in gnorpm is this:

void set_icon(GtkWidget *w) {
  GdkWindow *win;
  GdkPixmap *icon;
  GdkBitmap *mask;

  gtk_widget_realize(w);
  win = w->window;
  if (!win) return;

  icon = gdk_pixmap_create_from_xpm_d(win, &mask, NULL, rpm_icon);
  gdk_window_set_icon(win, NULL, icon, mask);
}

And yes, this works fine with fvwm2 :)

James Henstridge.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On Wed, 3 Feb 1999, Miguel de Icaza wrote:

> 
> > Here is how I do it, copied from a tutorial or doc somewhere:
> 
> Well, I will have to trust the sample code as at least with fvwm2 it
> did not work.
> 
> Miguel.
> 
> 
> -- 
>         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.
> 



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