Re: [gtk-list] window icon




Leonardo Zide <leonardo@centroin.com.br> writes: 
>   I'm using gdk_window_set_icon to set the icon for a window but the
> icon doesn't look very good when it's scaled down to fit in the top left
> corner of the window, is there a way to set 2 icons with different sizes
> (like MS Windows does) ?
> 

The way it works under X is that you ask the window manager what size
icon it wants to have, then provide that. Unfortunately GTK doesn't
export the functions you need to do this. It would be a nice addition
to 1.4 (in my opinion) if someone wrote code to let you do it
properly, maybe using GdkPixbuf.

KDE adds special window manager hints for setting a "mini icon" to go
in the window titlebar, and then hints are in the process of being
standardized with GNOME.

>   Also, when I set the icon for a window, the reference count of the
> GdkPixmap is not increased. Shouldn't this behavior be consistent with
> other functions like gtk_pixmap_set () ?
> 

The X server holds a reference to the server-side object, so GDK
doesn't bother to keep a client-side reference.

In any case it shouldn't matter to you - if you're going to use the
pixmap again _you_ must hold a reference, even if you think someone
else already does. Them's the rules in a refcounted world.

>   I'm writing a C++ program and I have to include gdkx.h from a file but
> I saw that it doesn't have #ifdef __cplusplus extern "C"... like the
> other include files. That's not a big problem, I can do it from my
> program but it would be nice to have it added in future versions.
> 

Yeah that sounds like a bug, you might submit to bugs.gnome.org so it
doesn't get forgotten.

Havoc



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