Re: gtk_window_set_icon_name() does not work?



Wang HJ writes:
 > I write "gtk_window_set_ico_name(GTK_WINDOW(mainwindow),"gtk-open")" in my 
 > code and also sucessfully built my code. But as soon as I run it, an error 
 > message given " The procedure point gtk_window_set_ico_name could not be 
 > located in the dynamic link liberary libgtk-win32-2.0-0.dll.

Do you have an older (2.4.x) version of libgtk-win32-2.0-0.dll in the
Windows system32 folder, or somewhere in your PATH that gets found
before the one you think you are using? gtk_window_set_icon_name() was
added in GTK+ 2.6.

That said, setting the icon name doesn't do anything on Win32
anyway... The function gdk_window_set_icon_name() in GTK+ 2.8 has the
below code snippet:

#if 0
  /* This is not the correct thing to do. We should keep both the
   * "normal" window title, and the icon name. When the window is
   * minimized, call SetWindowText() with the icon name, and when the
   * window is restored, with the normal window title. Also, the name
   * is in UTF-8, so we should do the normal conversion to either wide
   * chars or system codepage, and use either the W or A version of
   * SetWindowText(), depending on Windows version.
   */
  API_CALL (SetWindowText, (GDK_WINDOW_HWND (window), name));
#endif

And actually the above comment is also a misunderstanding, isn't it?
"icon name" here doesn't mean a title to be displayed for an iconified
window, but it's a reference to an icon by name. Icon naming is not
implemented in gdk/win32, as far as I can recall.

In GTK+ 2.6 gdk_window_set_icon_name() called SetWindowText() (the
above code snippet was not ifdeffed out), but that meant that setting
the icon name actually set the window title, which is not what it is
supposed to do.

--tml




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