bugLet me illustrate... - Bugs: bug #20236, Optionally suppress capitalization...


You are not allowed to post comments on this tracker with your current authentication level.

bug #20236: Optionally suppress capitalization of appname in warnings

Submitted by:  Greg Chicares <chicares>
Submitted on:  Thu 21 Jun 2007 11:52:40 PM UTC  
Category:  None Severity:  2 - Minor
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Vadim Zeitlin <zeitlin>
Open/Closed:  Closed

( Jump to the original submission)

Fri 09 Aug 2013 03:24:05 PM UTC, comment #6:

Behavior is no longer observed with lmi-20130719T1951Z and wx-2.9.3.

Kimberly Murphy <kmmurphy>
Project Member
Thu 08 Aug 2013 03:01:09 PM UTC, comment #5:

Tested and confirmed this defect is corrected. The error now reflects 'lmi...' instead of its predecessor 'lmi_wx'.

Kimberly Murphy <kmmurphy>
Project Member
Sat 02 Aug 2008 11:04:21 AM UTC, comment #4:

On 20080802T0347Z I committed a change equivalent to the
patch in comment #3. It'll be ready to test once we upgrade
to wx-2.9 .

Greg Chicares <chicares>
Project Administrator
Sat 02 Aug 2008 12:12:41 AM UTC, comment #3:

We still need to use SetAppDisplayName(), of course, but this is trivial and the following patch is enough:

--- main_wx.cpp 2008-06-28 02:00:43 +0000
+++ main_wx.cpp 2008-08-02 00:10:01 +0000
@@ -267,6 +267,15 @@
,timer_ (this)
+#if wxCHECK_VERSION(2,9,0)
+ // by default the displayed application name is the same as the internal
+ // name set by SetAppName() above except that it is capitalized, but we
+ // want to avoid capitalizing it improperly so set it explicitly even if
+ // it's the same string
+ SetAppDisplayName("lmi_wx");
+#endif // wx >= 2.9.0
config_ = wxConfigBase::Get();

Of course, maybe it would actually be better to use just "LMI" as displayable application name now that wx actually allows setting it separately from the internal application name.

Vadim Zeitlin <zeitlin>
Project MemberIn charge of this item.
Sat 02 Aug 2008 12:03:28 AM UTC, comment #2:

This option is perfectly okay:

> 0. Do nothing and wait until LMI starts using wx 2.9

Greg Chicares <chicares>
Project Administrator
Fri 01 Aug 2008 11:18:57 PM UTC, comment #1:

This problem is solved in a clean way in the current wxWidgets svn trunk where there is a new wxApp::SetDisplayName() function which can be used to set the name of the application such as it should appear to the user. E.g. to reuse the example from the comments in wx/app.h, GetAppName() typically returns something like "myapp" while SetAppDisplayName() allows using "My Application" in the user-visible contexts.

Solving it in 2.8 risks to be not so trivial as the relevant code is in wxLogGui implementation and can't be customized. So we'd need to define our entire new logger just to change this which seems like too much trouble, especially considering that the problem doesn't exist in later wx versions.

So I'd like to have your opinion about what to do with this bug:

0. Do nothing and wait until LMI starts using wx 2.9 and it's fixed on its own.
1. Find some way to backport SetAppDisplayName() to 2.8 branch (we need to preserve the ABI there so it's not obvious but could be done), knowing that this will still require upgrading to the next wx release (2.8.9) before the bug is really fixed.
2. Fix this at purely LMI level, spending much more efforts on this than with (1).


I think that (1) is probably the most reasonable thing to do but I'm not sure, what do you think?


Vadim Zeitlin <zeitlin>
Project MemberIn charge of this item.
Thu 21 Jun 2007 11:52:40 PM UTC, original submission:

Apparently the argument of wxApp::SetAppName() is
capitalized by default when used for the caption in
wxLogWarning(). It would be good to permit that
capitalization to be overridden, for applications
(like ours) that do not desire it.


/cygdrive/c/lmi/src/lmi[0]$grep mi_wx *.?pp
main_wx.cpp: SetAppName("lmi_wx");

Sample error message:

Lmi_wx Warning
Error formatting ledger values [...]

Greg Chicares <chicares>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by kmmurphy (Posted a comment)
  • -email is unavailable- added by chicares (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Fri 09 Aug 2013 03:24:05 PM UTC kmmurphy Open/ClosedOpen => Closed
    Thu 08 Aug 2013 03:01:09 PM UTC kmmurphy StatusReady For Test => Fixed
    Sat 02 Aug 2008 12:12:41 AM UTC zeitlin StatusNone => Ready For Test
    Mon 25 Jun 2007 09:59:51 AM UTC etarassov Carbon-Copy- => Added etarassov

    Back to the top

    Powered by Savane 3.3