small cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2365667381
commit
3a7af48f21
@ -20,7 +20,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#if !defined(__WXUNIVERSAL__)
|
||||
|
||||
#include "wx/artprov.h"
|
||||
|
||||
@ -54,7 +54,7 @@ protected:
|
||||
|
||||
/*static*/ void wxArtProvider::InitNativeProvider()
|
||||
{
|
||||
wxArtProvider::Push(new wxGTK2ArtProvider);
|
||||
Push(new wxGTK2ArtProvider);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -262,9 +262,8 @@ wxBitmap wxGTK2ArtProvider::CreateBitmap(const wxArtID& id,
|
||||
GdkPixbuf *pixbuf = CreateStockIcon(stockid, stocksize);
|
||||
|
||||
#ifdef __WXGTK24__
|
||||
if (!gtk_check_version(2,4,0))
|
||||
if (!pixbuf && !gtk_check_version(2,4,0))
|
||||
{
|
||||
if (!pixbuf)
|
||||
pixbuf = CreateThemeIcon(stockid, stocksize, size);
|
||||
}
|
||||
#endif
|
||||
@ -282,12 +281,8 @@ wxBitmap wxGTK2ArtProvider::CreateBitmap(const wxArtID& id,
|
||||
}
|
||||
}
|
||||
|
||||
if (!pixbuf)
|
||||
return wxNullBitmap;
|
||||
|
||||
wxBitmap bmp;
|
||||
bmp.SetWidth(gdk_pixbuf_get_width(pixbuf));
|
||||
bmp.SetHeight(gdk_pixbuf_get_height(pixbuf));
|
||||
if (pixbuf != NULL)
|
||||
bmp.SetPixbuf(pixbuf);
|
||||
|
||||
return bmp;
|
||||
@ -315,4 +310,4 @@ public:
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxArtGtkModule, wxModule)
|
||||
|
||||
#endif // defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
|
||||
#endif // !defined(__WXUNIVERSAL__)
|
||||
|
Loading…
Reference in New Issue
Block a user