- wxSetIconsX11( (WXDisplay*)GDK_WINDOW_XDISPLAY( window ),
- (WXWindow)GDK_WINDOW_XWINDOW( window ), icons );
+ if (icons.m_icons[i].Ok())
+ {
+ list = g_list_prepend(list, icons.m_icons[i].GetPixbuf());
+ }
+ }
+ gtk_window_set_icon_list(GTK_WINDOW(m_widget), list);
+ g_list_free(list);
+
+#else // !__WXGTK20__
+ GdkWindow* window = m_widget->window;
+ if (!window)
+ return;
+
+ wxIcon icon = icons.GetIcon(-1);
+ if (icon.Ok())
+ {
+ wxMask *mask = icon.GetMask();
+ GdkBitmap *bm = (GdkBitmap *) NULL;
+ if (mask) bm = mask->GetBitmap();
+
+ gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );