[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Use wxWidgets support for safely showing message boxes
From: |
Greg Chicares |
Subject: |
Re: [lmi] Use wxWidgets support for safely showing message boxes |
Date: |
Wed, 22 Feb 2023 22:33:43 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 |
On 2/17/23 18:29, Vadim Zeitlin wrote:
>
> PR 228[1], corresponding to xanadu/safe-show-message branch, contains
> another proposed change, which can be applied even to the current master,
> as the required functionality is already part of the version of wxWidgets
> currently being used, but which I've tested with wx 3.2.2.1, i.e. as if the
> PR 226 and/or 227 were already applied.
Applying these all together and running the pc-linux-gnu binary
with '--ash_nazg', I try:
Test | Test alerts from shared library | Test catastrophe report
Result: "Test catastrophe report." prints on the console, and no
message box appears. Is that the intention?
IOW, in this function:
void report_catastrophe(char const* message)
{
safely_show_on_stderr(message);
#if defined LMI_MSW
::MessageBoxA
(nullptr
,message
,"Catastrophic error"
,MB_OK | MB_SETFOREGROUND | MB_ICONHAND | MB_SYSTEMMODAL
);
#endif // defined LMI_MSW
}
can we write an "#else if defined LMI_POSIX && defined __WXGTK__"
clause that pops up a GUI message box even if wx or GTK has
not yet been initialized?