Add return value to wxSafeShowMessage()

This allows the caller to log the message to the console in addition to
showing the message box, for example. Previously, this would be
impossible to do without getting the duplicates if the message box was
not shown, but now it is.
This commit is contained in:
Vadim Zeitlin
2021-03-14 13:18:36 +01:00
parent e00d5e131b
commit 77593c5996
3 changed files with 12 additions and 3 deletions

View File

@@ -1268,12 +1268,17 @@ public:
message string.
@param text
The text to show to the user.
@return
@true If a message box was actually shown or @false if the message was
logged to the console because there is no safe to show it currently
(the return value is only available since wxWidgets 3.1.5, the function
doesn't return anything in the previous versions).
@see wxLogFatalError()
@header{wx/log.h}
*/
void wxSafeShowMessage(const wxString& title, const wxString& text);
bool wxSafeShowMessage(const wxString& title, const wxString& text);
/**
Returns the error code from the last system call. This function uses