]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/artgtk.cpp
fix warnings about unreachable return statements
[wxWidgets.git] / src / gtk / artgtk.cpp
index 99142b5f156fb3941769eaf414b4b85d6103f00a..c90d9609cbde5c5893f1c4ee7c3325062c5c1356 100644 (file)
@@ -47,7 +47,7 @@ protected:
 
 /*static*/ void wxArtProvider::InitNativeProvider()
 {
-    Push(new wxGTK2ArtProvider);
+    PushBack(new wxGTK2ArtProvider);
 }
 
 // ----------------------------------------------------------------------------
@@ -203,7 +203,7 @@ GdkPixbuf *CreateStockIcon(const char *stockid, GtkIconSize size)
     //        with "stock-id" representation (in addition to pixmap and pixbuf
     //        ones) and would convert it to pixbuf when rendered.
 
-    GtkStyle* style = wxGTKPrivate::GetButtonWidget()->style;
+    GtkStyle* style = gtk_widget_get_style(wxGTKPrivate::GetButtonWidget());
     GtkIconSet* iconset = gtk_style_lookup_icon_set(style, stockid);
 
     if (!iconset)
@@ -259,7 +259,7 @@ wxIconBundle DoCreateIconBundle(const char *stockid,
             continue;
 
         wxIcon icon;
-        icon.SetPixbuf(pixbuf);
+        icon.CopyFromBitmap(wxBitmap(pixbuf));
         bundle.AddIcon(icon);
     }
 
@@ -296,11 +296,7 @@ wxBitmap wxGTK2ArtProvider::CreateBitmap(const wxArtID& id,
         }
     }
 
-    wxBitmap bmp;
-    if (pixbuf != NULL)
-        bmp.SetPixbuf(pixbuf);
-
-    return bmp;
+    return wxBitmap(pixbuf);
 }
 
 wxIconBundle
@@ -310,7 +306,7 @@ wxGTK2ArtProvider::CreateIconBundle(const wxArtID& id,
     const wxString stockid = wxArtIDToStock(id);
 
     // try to load the bundle as stock icon first
-    GtkStyle* style = wxGTKPrivate::GetButtonWidget()->style;
+    GtkStyle* style = gtk_widget_get_style(wxGTKPrivate::GetButtonWidget());
     GtkIconSet* iconset = gtk_style_lookup_icon_set(style, stockid.utf8_str());
     if ( iconset )
     {