lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 28b655c6 3/5: Show help output of wx_test und


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 28b655c6 3/5: Show help output of wx_test under non-MSW systems
Date: Wed, 22 Feb 2023 18:09:53 -0500 (EST)

branch: master
commit 28b655c636d1ab0a5eacda531f6a5cd1c7f704f2
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Show help output of wx_test under non-MSW systems
    
    wxMessageBox() cannot be used here under the non-MSW systems as the GUI
    is not initialized yet, so calling it resulted in output similar to the
    following when "wx_test --help" was executed:
    
    ...wx/src/gtk/msgdlg.cpp(278): assert ""m_widget"" failed in
    ShowModal(): failed to create GtkMessageDialog
    
    GLib-GObject-WARNING **: invalid (NULL) pointer instance
    
    GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched:
    assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
    
    and no useful output.
    
    With this change, the expected message is shown on stderr instead.
---
 main_wx_test.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index ca529dcd..0172bbc4 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -388,7 +388,7 @@ bool application_test::process_command_line(int& argc, 
char* argv[])
                    "Additionally, all command line options supported by the\n"
                    "main lmi executable are also supported."
                 ;
-            wxMessageBox(oss.str(), "Command-line options");
+            wxSafeShowMessage("Command-line options", oss.str());
             return false;
             }
         else



reply via email to

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