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

Submitter:  Greg Chicares <chicares>
Submitted:  Thu 21 Jun 2007 11:52:40 PM UTC
   
 
Category:  None Severity:  2 - Minor
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  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>
Group 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>
Group 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>
Group 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)
 {
     SetAppName("lmi_wx");
+
+#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
+
     SetVendorName("lmi");
     config_ = wxConfigBase::Get();
     timer_.Start(100);


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>
Group Member
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>
Group 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?

Thanks!

Vadim Zeitlin <zeitlin>
Group Member
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.

Code:

  /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>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-09 kmmurphy Open/ClosedOpen Closed
    2013-08-08 kmmurphy StatusReady For Test Fixed
    2008-08-02 zeitlin StatusNone Ready For Test
    2007-06-25 etarassov Carbon-Copy- Added etarassov

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code