From 64321998dfa6329a3d1266d9562ab43cb9046d85 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 7 Sep 2006 13:24:08 +0000 Subject: [PATCH] Applied FRM's patch [ 1553958 ] Fix for invalid cast from 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/wx/gtk/filepicker.h b/include/wx/gtk/filepicker.h index 50e533f9ee..0030e4c61c 100644 --- a/include/wx/gtk/filepicker.h +++ b/include/wx/gtk/filepicker.h @@ -40,7 +40,17 @@ { \ 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; } //----------------------------------------------------------------------------- -- 2.45.2