Implemented run-time checks for the GTK version

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2004-12-05 23:03:09 +00:00
parent d7b995a497
commit 77f706726c
8 changed files with 420 additions and 334 deletions

View File

@@ -202,7 +202,7 @@ static GdkPixbuf *CreateStockIcon(const char *stockid, GtkIconSize size)
GTK_STATE_NORMAL, size, NULL, NULL);
}
#if GTK_CHECK_VERSION(2,4,0)
#ifdef __WXGTK24__
static GdkPixbuf *CreateThemeIcon(const char *iconname,
GtkIconSize iconsize, const wxSize& sz)
{
@@ -218,7 +218,7 @@ static GdkPixbuf *CreateThemeIcon(const char *iconname,
size.x,
(GtkIconLookupFlags)0, NULL);
}
#endif // GTK+ >= 2.4.0
#endif
wxBitmap wxGTK2ArtProvider::CreateBitmap(const wxArtID& id,
const wxArtClient& client,
@@ -235,9 +235,12 @@ wxBitmap wxGTK2ArtProvider::CreateBitmap(const wxArtID& id,
GdkPixbuf *pixbuf = CreateStockIcon(stockid, stocksize);
#if GTK_CHECK_VERSION(2,4,0)
if (!pixbuf)
pixbuf = CreateThemeIcon(stockid, stocksize, size);
#ifdef __WXGTK24__
if (!gtk_check_version(2,4,0))
{
if (!pixbuf)
pixbuf = CreateThemeIcon(stockid, stocksize, size);
}
#endif
if (pixbuf && size != wxDefaultSize &&