]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imaggif.cpp
Make wxSpinCtrlGeneric usable as wxDVC editor control.
[wxWidgets.git] / src / common / imaggif.cpp
index b33ac24dab6f46568a8637660588fc715951423d..b90bd8fb99502b18b5f49bccb86a4131dc0d2cd2 100644 (file)
@@ -92,8 +92,7 @@ static bool wxGIFHandler_Write(wxOutputStream *, const void *buf, size_t len);
 static bool wxGIFHandler_WriteByte(wxOutputStream *, wxUint8);
 static bool wxGIFHandler_WriteWord(wxOutputStream *, wxUint16);
 static bool wxGIFHandler_WriteHeader(wxOutputStream *, int width, int height,
-    bool loop, const wxRGB *pal, int palCount,
-    const wxString& comment = wxEmptyString);
+    bool loop, const wxRGB *pal, int palCount);
 static bool wxGIFHandler_WriteRect(wxOutputStream *, int width, int height);
 #if wxUSE_PALETTE
 static bool wxGIFHandler_WriteTerm(wxOutputStream *);
@@ -225,10 +224,13 @@ bool wxGIFHandler::DoSaveFile(const wxImage& image, wxOutputStream *stream,
     if (first)
     {
         ok = wxGIFHandler_WriteHeader(stream, width, height, loop,
-            pal, palCount, image.GetOption(wxIMAGE_OPTION_GIF_COMMENT));
+            pal, palCount);
     }
 
-    ok = ok && wxGIFHandler_WriteControl(stream, maskIndex, delayMilliSecs)
+    ok = ok
+        && wxGIFHandler_WriteComment(stream,
+            image.GetOption(wxIMAGE_OPTION_GIF_COMMENT))
+        && wxGIFHandler_WriteControl(stream, maskIndex, delayMilliSecs)
         && wxGIFHandler_WriteByte(stream, GIF_MARKER_SEP)
         && wxGIFHandler_WriteRect(stream, width, height);
 
@@ -645,7 +647,7 @@ bool wxGIFHandler_WriteWord(wxOutputStream *stream, wxUint16 word)
 }
 
 bool wxGIFHandler_WriteHeader(wxOutputStream *stream, int width, int height,
-    bool loop, const wxRGB *pal, int palCount, const wxString& comment)
+    bool loop, const wxRGB *pal, int palCount)
 {
     const int bpp = wxGIFHandler_BitSize(palCount);
     wxUint8 buf[3];
@@ -667,7 +669,7 @@ bool wxGIFHandler_WriteHeader(wxOutputStream *stream, int width, int height,
        ok = ok && wxGIFHandler_WriteLoop(stream);
     }
 
-    return ok && wxGIFHandler_WriteComment(stream, comment);
+    return ok;
 }
 
 bool wxGIFHandler_WriteRect(wxOutputStream *stream, int width, int height)