lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Use wxWidgets support for safely showing message boxes


From: Vadim Zeitlin
Subject: [lmi] Use wxWidgets support for safely showing message boxes
Date: Fri, 17 Feb 2023 19:29:03 +0100

 Hello,

 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.

 This change consists of 3 commits that I'd like to briefly discuss in
their order:

1. First one, changing main_wx_test.cpp, should be uncontroversial as it
   fixes a bug: as the commit message explains, using "wx_test -h" right
   now results in a bunch of scary errors under Linux, while with this
   change you get more or less the expected output (formatting is still
   not great due to "Command-line options" not actually being a good title
   nor prefix to the message logged to stderr, but I didn't change this).

2. Second one is pretty similar, so I hope it won't be very controversial
   neither, but I don't have such a simple test case reproducing the
   problem for it as "wx_test -h" provides. I seem to remember that there
   was some situation in which warning_alert() ended up being called before
   the GUI was initialized under Linux and this resulted in the same kind
   of errors, but I don't remember how to reproduce it. However I believe
   that in any case, using the safer function is warranted here.

3. Third and last commit is probably the most questionable one, even though
   I still don't have many doubts about it. But, unlike the previous ones,
   it doesn't actually change the behaviour under MSW but only simplifies
   the code. It does improve the behaviour under Linux, as this function
   will now show a message box if possible there, whereas previously it
   never did. And it also removes a lot of outdated information from the
   comment which should, IMHO, be done anyhow, even if the changes to the
   code are not applied, just because this comment is not correct any more.
 

 To summarize, nothing here is critical, but all of the changes above seem
like nice improvements to me and the last one also removes some conditional
compilation guards, which is always good.

 Thanks in advance for looking at this!
VZ

[1]: https://github.com/let-me-illustrate/lmi/pull/228

Attachment: pgpGPgAJ56q7r.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]