Re: windows_icon .. how to?



Hi,
I found the function:
iconw = gdk_image_new_from_file ("icon.xpm");

but it still don't work.
Well actually I make the program in MSWindows..maybe this is the reason..it should work now, isn it?

great thanks
calmar


Ruben Porras wrote:
El dom, 20-10-2002 a las 21:26, calmar escribió:
  
Hi, actually my last attempt was this:

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    iconw = gtk_image_new_from_file ("icon.xpm");
    pixbuf = gtk_image_get_pixbuf( GTK_IMAGE(iconw) );
    gtk_window_set__icon (GTK_WINDOW (window),GDK_PIXBUF(pixbuf));

The windows still have the same standart 'gtk' icon..
I guess the 'icon.xpm' file should be ok, (i tried with 16x16 and 32x32).
Where is the mistake (probaly big one) by my site .. how to setup the 
icon for the main window?

    
¿why you don't use gdk_pixbuf_new_from_file?

GdkPixbuf *pixbuf;

window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
pixbuf = gtk_pixbuf_new_from_file("icon.xpm", NULL);
gtk_window_set__icon (GTK_WINDOW (window),pixbuf);
  


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