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


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

bug #20236: Optionally suppress capitalization of appname in warnings

Submitted by:  Greg Chicares <chicares>
Submitted on:  Thu Jun 21 23:52:40 2007  
Category: NoneSeverity: 2 - Minor
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Vadim Zeitlin <zeitlin>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Fri Aug 9 15:24:05 2013, comment #6:

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

Kimberly Murphy <kmmurphy>
Project Member
Thu Aug 8 15:01:09 2013, 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 Aug 2 11:04:21 2008, 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 Aug 2 00:12:41 2008, 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 Aug 2 00:03:28 2008, 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 Aug 1 23:18:57 2008, 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 Jun 21 23:52:40 2007, 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
  • -unavailable- added by kmmurphy (Posted a comment)
  • -unavailable- added by chicares (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to 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 Aug 9 15:24:05 2013kmmurphyOpen/ClosedOpen=>Closed
    Thu Aug 8 15:01:09 2013kmmurphyStatusReady For Test=>Fixed
    Sat Aug 2 00:12:41 2008zeitlinStatusNone=>Ready For Test
    Mon Jun 25 09:59:51 2007etarassovCarbon-Copy-=>Added etarassov

    Back to the top

    Powered by Savane 3.1-cleanup