diff --git a/src/add-ons/translators/bmptranslator/BMPMain.cpp b/src/add-ons/translators/bmptranslator/BMPMain.cpp index 9d8170fd41..d4466451d4 100644 --- a/src/add-ons/translators/bmptranslator/BMPMain.cpp +++ b/src/add-ons/translators/bmptranslator/BMPMain.cpp @@ -54,7 +54,7 @@ main() BApplication app("application/x-vnd.obos-bmp-translator"); status_t result; result = LaunchTranslatorWindow(new BMPTranslator, - "BMPTranslator", BRect(0, 0, 225, 175)); + "BMP Settings", BRect(0, 0, 225, 175)); if (result == B_OK) { app.Run(); return 0; diff --git a/src/add-ons/translators/bmptranslator/BMPTranslator.cpp b/src/add-ons/translators/bmptranslator/BMPTranslator.cpp index 813bfac263..3d026c147c 100644 --- a/src/add-ons/translators/bmptranslator/BMPTranslator.cpp +++ b/src/add-ons/translators/bmptranslator/BMPTranslator.cpp @@ -1002,42 +1002,9 @@ BMPTranslator::translate_from_bits(BPositionIO *inSource, uint32 outType, result = identify_bits_header(inSource, NULL, &bitsHeader); if (result != B_OK) return result; - - // Translate B_TRANSLATOR_BITMAP to B_TRANSLATOR_BITMAP, easy enough :) - if (outType == B_TRANSLATOR_BITMAP) { - // write out bitsHeader (only if configured to) - if (bheaderonly || (!bheaderonly && !bdataonly)) { - if (swap_data(B_UINT32_TYPE, &bitsHeader, - sizeof(TranslatorBitmap), B_SWAP_HOST_TO_BENDIAN) != B_OK) - return B_ERROR; - if (outDestination->Write(&bitsHeader, - sizeof(TranslatorBitmap)) != sizeof(TranslatorBitmap)) - return B_ERROR; - } - - // write out the data (only if configured to) - if (bdataonly || (!bheaderonly && !bdataonly)) { - uint8 buf[1024]; - uint32 remaining = B_BENDIAN_TO_HOST_INT32(bitsHeader.dataSize); - ssize_t rd, writ; - rd = inSource->Read(buf, 1024); - while (rd > 0) { - writ = outDestination->Write(buf, rd); - if (writ < 0) - break; - remaining -= static_cast(writ); - rd = inSource->Read(buf, min(1024, remaining)); - } - - if (remaining > 0) - return B_ERROR; - else - return B_OK; - } else - return B_OK; - + // Translate B_TRANSLATOR_BITMAP to B_BMP_FORMAT - } else if (outType == B_BMP_FORMAT) { + if (outType == B_BMP_FORMAT) { // Set up BMP header BMPFileHeader fileHeader; fileHeader.magic = 'MB'; diff --git a/src/add-ons/translators/bmptranslator/BMPView.cpp b/src/add-ons/translators/bmptranslator/BMPView.cpp index 05c5853beb..5791b16a6d 100644 --- a/src/add-ons/translators/bmptranslator/BMPView.cpp +++ b/src/add-ons/translators/bmptranslator/BMPView.cpp @@ -50,7 +50,7 @@ BMPView::BMPView(const BRect &frame, const char *name, { fSettings = settings; - SetViewColor(220,220,220,0); + SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); } // ---------------------------------------------------------------