]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed Vadim's removal of XPM handler
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 8 Dec 2002 13:20:49 +0000 (13:20 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 8 Dec 2002 13:20:49 +0000 (13:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/imagall.cpp
src/common/image.cpp

index ca44263ad6b496586331a873f8f8ad537e850b86..aaf6d459c78a3868eef60279aba8a9312a0d90a3 100644 (file)
@@ -60,6 +60,13 @@ void wxInitAllImageHandlers()
   wxImage::AddHandler( new wxCURHandler );
   wxImage::AddHandler( new wxANIHandler );
 #endif
+#if wxUSE_XPM && (defined(__WXGTK__) || defined(__WXMOTIF__))
+  // NB: keep this #ifdef in sync with the one in image.cpp
+  //     (wxImage::InitStandardHandlers) - they must complement each other
+  //     so that there's always exactly one XPM handler added after calling
+  //     wxInitAllImageHandlers()
+  wxImage::AddHandler( new wxXPMHandler );
+#endif
 }
 
 #endif // wxUSE_IMAGE
index 3e922fad22a8300f29bd981bd7a405e46b067837..f26ae138557973610262b0c5753dd24b9e4a6cba 100644 (file)
@@ -1269,6 +1269,9 @@ void wxImage::InitStandardHandlers()
 #endif // wxUSE_STREAMS
 
 #if wxUSE_XPM && !defined(__WXGTK__) && !defined(__WXMOTIF__)
+    // NB: keep this #ifdef in sync with the one in imagall.cpp -
+    //     they must complement each other so that there's always exactly
+    //     one XPM handler added after calling wxInitAllImageHandlers()
     AddHandler(new wxXPMHandler);
 #endif
 }