]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/artgtk.cpp
don't try to paint hidden windows
[wxWidgets.git] / src / gtk / artgtk.cpp
index c31b1c8c8e169de986459500413b56107b4ac12b..9d4c51c768147556f7bd44c1bce88855ac09e7e5 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        artstd.cpp
+// Name:        src/gtk/artstd.cpp
 // Purpose:     stock wxArtProvider instance with native GTK+ stock icons
 // Author:      Vaclav Slavik
 // Modified by:
 // Purpose:     stock wxArtProvider instance with native GTK+ stock icons
 // Author:      Vaclav Slavik
 // Modified by:
 #if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
 
 #include "wx/artprov.h"
 #if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
 
 #include "wx/artprov.h"
-#include "wx/module.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/module.h"
+#endif
+
 #include "wx/gtk/private.h"
 
 #include <gtk/gtk.h>
 #include "wx/gtk/private.h"
 
 #include <gtk/gtk.h>
@@ -175,7 +179,7 @@ static GtkIconSize FindClosestIconSize(const wxSize& size)
         if (size.x > s_sizes[i].x || size.y > s_sizes[i].y)
             continue;
 
         if (size.x > s_sizes[i].x || size.y > s_sizes[i].y)
             continue;
 
-        unsigned dist = (size.x - s_sizes[i].x) * (size.x - s_sizes[i].x) + 
+        unsigned dist = (size.x - s_sizes[i].x) * (size.x - s_sizes[i].x) +
                         (size.y - s_sizes[i].y) * (size.y - s_sizes[i].y);
         if (dist == 0)
             return s_sizes[i].icon;
                         (size.y - s_sizes[i].y) * (size.y - s_sizes[i].y);
         if (dist == 0)
             return s_sizes[i].icon;
@@ -206,7 +210,7 @@ static GdkPixbuf *CreateStockIcon(const char *stockid, GtkIconSize size)
         GtkWidget *widget = gtk_button_new();
         gs_gtkStyle = gtk_rc_get_style(widget);
         wxASSERT( gs_gtkStyle != NULL );
         GtkWidget *widget = gtk_button_new();
         gs_gtkStyle = gtk_rc_get_style(widget);
         wxASSERT( gs_gtkStyle != NULL );
-        g_object_ref(G_OBJECT(gs_gtkStyle));
+        g_object_ref(gs_gtkStyle);
         gtk_widget_destroy(widget);
     }
 
         gtk_widget_destroy(widget);
     }
 
@@ -273,7 +277,7 @@ wxBitmap wxGTK2ArtProvider::CreateBitmap(const wxArtID& id,
                                                 GDK_INTERP_BILINEAR);
         if (p2)
         {
                                                 GDK_INTERP_BILINEAR);
         if (p2)
         {
-            g_object_unref (G_OBJECT (pixbuf));
+            g_object_unref (pixbuf);
             pixbuf = p2;
         }
     }
             pixbuf = p2;
         }
     }
@@ -301,7 +305,7 @@ public:
     {
         if (gs_gtkStyle)
         {
     {
         if (gs_gtkStyle)
         {
-            g_object_unref(G_OBJECT(gs_gtkStyle));
+            g_object_unref(gs_gtkStyle);
             gs_gtkStyle = NULL;
         }
     }
             gs_gtkStyle = NULL;
         }
     }