SF.net SVN: mahogany: [7260] trunk/M/src/gui

[email protected]
Newsgroups gmane.mail.mahogany.cvs
Message-ID <[email protected]>
Revision: 7260
          http://svn.sourceforge.net/mahogany/?rev=7260&view=rev
Author:   vadz
Date:     2007-04-30 09:45:56 -0700 (Mon, 30 Apr 2007)

Log Message:
-----------
temporary fix for wxGetTranslation() returning a junk pointer in the current cvs HEAD (this will be fixed later in wx but in the meanwhile make M work)

Modified Paths:
--------------
    trunk/M/src/gui/wxFolderView.cpp
    trunk/M/src/gui/wxMenuDefs.cpp

Modified: trunk/M/src/gui/wxFolderView.cpp
===================================================================
--- trunk/M/src/gui/wxFolderView.cpp	2007-04-30 14:48:48 UTC (rev 7259)
+++ trunk/M/src/gui/wxFolderView.cpp	2007-04-30 16:45:56 UTC (rev 7260)
@@ -4457,13 +4457,13 @@
                 View, Group reply (== followup), List reply, Next match
             */
             static const wxChar keycodes_en[] = gettext_noop("DUXCSMRFOPHGLN");
-            static const wxChar *keycodes = wxGetTranslation(keycodes_en);
+            static const wxString keycodes(wxGetTranslation(keycodes_en));
 
             long keyOrig = key;
             key = toupper(key);
 
             int idx = 0;
-            for ( ; keycodes[idx] && keycodes[idx] != key; idx++ )
+            for ( ; keycodes[idx] && keycodes[idx] != (char)key; idx++ )
                ;
 
             key = keycodes[idx] ? keycodes_en[idx] : 0;

Modified: trunk/M/src/gui/wxMenuDefs.cpp
===================================================================
--- trunk/M/src/gui/wxMenuDefs.cpp	2007-04-30 14:48:48 UTC (rev 7259)
+++ trunk/M/src/gui/wxMenuDefs.cpp	2007-04-30 16:45:56 UTC (rev 7260)
@@ -657,8 +657,8 @@
 
    for ( int n = nFirst; n <= nLast; n++ ) {
 #ifdef DEBUG
-      const wxChar *label = wxGetTranslation(GetMenuItem(n).label);
-      if ( !wxIsEmpty(wxConvertWX2MB(label)) ) {
+      const wxString label(wxGetTranslation(GetMenuItem(n).label));
+      if ( !label.empty() ) {
          const wxChar *p = wxStrchr(label, '&');
          if ( p == NULL ) {
             wxLogWarning(_T("Menu label '%s' doesn't have keyboard accelerator."),


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.