lmi
[Top][All Lists]
Advanced

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

Re: [lmi] [PATCH] Add --gui_test_path command line option to the GUI tes


From: Vadim Zeitlin
Subject: Re: [lmi] [PATCH] Add --gui_test_path command line option to the GUI test.
Date: Tue, 3 Feb 2015 22:00:39 +0100

On Tue, 03 Feb 2015 20:25:17 +0000 Greg Chicares <address@hidden> wrote:

GC> >  This is actually exactly what wxSafeShowMessage() itself does under
GC> > non-MSW platforms currently, so to achieve this behaviour it would be
GC> > enough to just wxSafeShowMessage() instead of warning() in
GC> > application_test::process_command_line().
GC> 
GC> Doesn't warning() delegate to wxSafeShowMessage()? Oh--I guess
GC> it doesn't do so any longer since this revision:
GC>   
http://svn.savannah.nongnu.org/viewvc/lmi/trunk/alert_wx.cpp?root=lmi&r1=5853&r2=6051
GC> discussed here:
GC>   http://lists.nongnu.org/archive/html/lmi/2014-12/msg00028.html
GC> 
GC> Should that be reverted, at least in the GTK case?

 I don't think it's a good idea to use wxSafeShowMessage() under non-MSW
currently: in normal use, i.e. when the GUI program is launched from the
file manager or applications menu, the messages won't be seen at all then.

 In fact, even right now I see messages such as

        Data directory '/opt/lmi/share/lmi' contains no product files.
        [file .../product_names.cpp, line 68]

only in the console and there is absolutely no indication that an error has
occurred in the GUI because fatal_error() ends up using wxSafeShowMessage()
(why the program doesn't terminate after the exception is yet another
problem...).

GC> Or can wxGTK be changed in the way that (AIUI) wxMSW was?

 I'm not sure but I'd like to at least try (i.e. spend some short amount of
time on this if only to convince myself that it can't be done).


GC> >  Thinking more about this, do we actually need to use any of warning(),
GC> > wxMessageBox() or wxSafeShowMessage() here? As this function deals with 
the
GC> > command line parsing, it seems reasonable to suppose that the program was
GC> > launched from some kind of a terminal and so perhaps we should just show
GC> > all output from it on standard output or error streams? Should I make the
GC> > (trivial) patch implementing this?
GC> 
GC> For wxMSW at least, I think a messagebox is indispensable (and perhaps
GC> for wxGTK if any of our end users ever switch to that). The reason is
GC> that end users launch lmi from a shortcut, never from a terminal. If the
GC> parameters hidden in the shortcut become invalid for any reason, then lmi
GC> will fail silently, discomfiting the user.

 I understand and completely agree with it for the main lmi application
itself. But please notice that I was only proposing this change for
application_test::process_command_line() (== "here" in the paragraph
above). And this code is only executed as part of wx_test which should be
only launched from a terminal.

 Regards,
VZ

reply via email to

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