diff --git a/docs/changes.txt b/docs/changes.txt index ffe6a762ed..c5f6110fb7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -195,6 +195,10 @@ Unix: - added --basename and --release flags to wx-config (Robert O'Connor) - added support for GNU/Hurd in configure +wxGTK + +- fixed compilation with --disable-compat-22 + wxMSW: - compilation fix for VC++ command line build (missing version.mak) diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 745649473a..ff0072e84c 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -1268,7 +1268,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) case wxITEM_NORMAL: item_type = ""; -#ifdef __WXGTK20__ +#if defined(__WXGTK20__) && wxUSE_IMAGE if (mitem->GetBitmap().Ok()) { item_type = ""; @@ -1276,7 +1276,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) // get a GdkPixbuf structure, which we need to create on the fly. // This Pixbuf structure needs to be static so we create it and // just make it a memory leak... - wxImage image( mitem->GetBitmap() ); + wxImage image( mitem->GetBitmap().ConvertToImage() ); size_t size = 4 + // magic 20 + // header image.GetHeight() * image.GetWidth() * 4; // RGBA @@ -1324,7 +1324,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) } break; } -#endif +#endif // GTK 2.0+ break; } diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 745649473a..ff0072e84c 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -1268,7 +1268,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) case wxITEM_NORMAL: item_type = ""; -#ifdef __WXGTK20__ +#if defined(__WXGTK20__) && wxUSE_IMAGE if (mitem->GetBitmap().Ok()) { item_type = ""; @@ -1276,7 +1276,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) // get a GdkPixbuf structure, which we need to create on the fly. // This Pixbuf structure needs to be static so we create it and // just make it a memory leak... - wxImage image( mitem->GetBitmap() ); + wxImage image( mitem->GetBitmap().ConvertToImage() ); size_t size = 4 + // magic 20 + // header image.GetHeight() * image.GetWidth() * 4; // RGBA @@ -1324,7 +1324,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem) } break; } -#endif +#endif // GTK 2.0+ break; }