]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied FRM's patch [ 1553958 ] Fix for invalid cast from
authorRobert Roebling <robert@roebling.de>
Thu, 7 Sep 2006 13:24:08 +0000 (13:24 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 7 Sep 2006 13:24:08 +0000 (13:24 +0000)
      GtkFileChooserButton to GtkButton

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/filepicker.h

index 50e533f9eed2e16ada722e5d1cd482bf0bff18ef..0030e4c61cc4bb3a869e755158a95a30eaad3724 100644 (file)
     {                                                                         \
         m_dialog->Destroy();                                                  \
         return wxButton::Destroy();                                           \
-    }
+    }                                                                         \
+                                                                              \
+    /* even if wx derive from wxGenericFileButton, i.e. from wxButton, our */ \
+    /* native GTK+ widget does not derive from GtkButton thus *all* uses   */ \
+    /* GTK_BUTTON(m_widget) macro done by wxButton must be bypassed to     */ \
+    /* avoid bunch of GTK+ warnings like:                                  */ \
+    /*      invalid cast from `GtkFileChooserButton' to  `GtkButton'       */ \
+    /* so, override wxButton::GTKGetWindow and return NULL as GTK+ doesn't */ \
+    /* give us access to the internal GdkWindow of a GtkFileChooserButton  */ \
+    virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const         \
+        { return NULL; }
 
 
 //-----------------------------------------------------------------------------