Add-ons: Add alert warning to PNGTranslator
Change-Id: I148fb44055f6e0fc6f68307df04a4ad4ebb660fa Reviewed-on: https://review.haiku-os.org/c/haiku/+/2097 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
093e83638d
commit
450208975b
@@ -36,6 +36,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Catalog.h>
|
||||
#include <OS.h>
|
||||
#define PNG_NO_PEDANTIC_WARNINGS
|
||||
@@ -299,8 +300,11 @@ void throw_error(png_structp ppng, png_const_charp error_msg)
|
||||
|
||||
void alert_warning(png_structp ppng, png_const_charp error_msg)
|
||||
{
|
||||
// Ignore
|
||||
// TODO show a BAlert?
|
||||
BAlert* alert = new BAlert("alert", error_msg,
|
||||
B_TRANSLATE("OK"), NULL, NULL, B_WIDTH_FROM_LABEL,
|
||||
B_WARNING_ALERT);
|
||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||
alert->Go();
|
||||
}
|
||||
|
||||
status_t
|
||||
|
||||
Reference in New Issue
Block a user