From 897ffb58b0b96582891c8cb207a2f81f98f7e41c Mon Sep 17 00:00:00 2001 From: Kolya Kosenko Date: Thu, 8 Sep 2016 00:48:41 +0200 Subject: [PATCH] Use native MIME and display classes in wxGTK/Win32 build Use Windows file associations when running under this OS, even when using wxGTK, because this is the right thing to do. Also use native wxDisplay implementation because it works better than the GTK+ one under this platform. Closes #17651. --- build/bakefiles/common.bkl | 4 ++-- include/wx/gtk/mimetype.h | 6 ++++++ src/gtk/display.cpp | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build/bakefiles/common.bkl b/build/bakefiles/common.bkl index 151c555063..f026e04973 100644 --- a/build/bakefiles/common.bkl +++ b/build/bakefiles/common.bkl @@ -573,8 +573,8 @@ $(TAB)cl /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h" - gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib glib-2.0.lib - libgtk-3.dll.a libgdk-3.dll.a pangocairo-1.0.lib gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib glib-2.0.lib + gtk-win32-2.0.lib gdk-win32-2.0.lib gio-2.0.lib pangocairo-1.0.lib gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib glib-2.0.lib + libgtk-3.dll.a libgdk-3.dll.a gio-2.0.lib pangocairo-1.0.lib gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib glib-2.0.lib diff --git a/include/wx/gtk/mimetype.h b/include/wx/gtk/mimetype.h index 4e5f144b35..9d08613aa3 100644 --- a/include/wx/gtk/mimetype.h +++ b/include/wx/gtk/mimetype.h @@ -10,7 +10,13 @@ #ifndef _WX_GTK_MIMETYPE_IMPL_H #define _WX_GTK_MIMETYPE_IMPL_H +#include "wx/defs.h" + +#if defined(__UNIX__) #include "wx/unix/mimetype.h" +#elif defined(__WINDOWS__) +#include "wx/msw/mimetype.h" +#endif #if wxUSE_MIMETYPE diff --git a/src/gtk/display.cpp b/src/gtk/display.cpp index f30e2037f7..d6562511b8 100644 --- a/src/gtk/display.cpp +++ b/src/gtk/display.cpp @@ -20,6 +20,8 @@ #endif #include "wx/gtk/private/gtk2-compat.h" +#if !defined(GDK_WINDOWING_WIN32) + GdkWindow* wxGetTopLevelGDK(); //----------------------------------------------------------------------------- @@ -237,3 +239,5 @@ wxDisplayFactory* wxDisplay::CreateFactory() return new wxDisplayFactoryGTK; } #endif // wxUSE_DISPLAY + +#endif // !defined(GDK_WINDOWING_WIN32)