]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/accel.cpp
fix for non precomp
[wxWidgets.git] / src / os2 / accel.cpp
index e21a611fe03f6e979f0745f720e2a2c3e1121da5..bcc71c83dbfe636c98ecaf51d5b2dc8e26d94929 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        accel.cpp
+// Name:        src/os2/accel.cpp
 // Purpose:     wxAcceleratorTable
 // Author:      David Webster
 // Modified by:
@@ -14,7 +14,6 @@
 
 #ifndef WX_PRECOMP
 #include <stdio.h>
-#include "wx/setup.h"
 #include "wx/window.h"
 #include "wx/app.h"
 #include "wx/frame.h"
@@ -135,20 +134,19 @@ wxAcceleratorTable::wxAcceleratorTable(
             uVirt |= AF_VIRTUALKEY;
         }
 
-        bool                        bIsVirtual;
-        USHORT                      uKey = wxCharCodeWXToOS2( vaEntries[i].GetKeyCode()
-                                                             ,&bIsVirtual
-                                                            );
+        bool bIsVirtual;
+        USHORT uKey = (USHORT)wxCharCodeWXToOS2( vaEntries[i].GetKeyCode(),
+                                                 &bIsVirtual);
         if (bIsVirtual)
             uVirt = AF_CHAR | AF_VIRTUALKEY;
 
-        USHORT                      uCmd = vaEntries[i].GetCommand();
+        USHORT uCmd = (USHORT)vaEntries[i].GetCommand();
 
         pArr->aaccel[i].fs  = uVirt;
         pArr->aaccel[i].key = uKey;
         pArr->aaccel[i].cmd = uCmd;
     }
-    pArr->codepage = ::WinQueryCp(wxTheApp->m_hMq);
+    pArr->codepage = (USHORT)::WinQueryCp(wxTheApp->m_hMq);
     pArr->cAccel = (USHORT)n;
     M_ACCELDATA->m_hAccel = ::WinCreateAccelTable( vHabmain
                                                   ,pArr
@@ -158,7 +156,7 @@ wxAcceleratorTable::wxAcceleratorTable(
         //
         // If we have accelerators the top window is the frame
         //
-        wxFrame*                    pFrame = (wxFrame*)wxTheApp->GetTopWindow();
+        wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow();
 
         ::WinSetAccelTable( vHabmain
                            ,M_ACCELDATA->m_hAccel
@@ -203,10 +201,6 @@ bool wxAcceleratorTable::Translate(
                              ,GetHaccel()
                              ,pMsg
                             );
-    if (rc)
-    {
-        int x = 1;
-    }
     return (Ok() && rc);
 } // end of wxAcceleratorTable::Translate
 
@@ -214,14 +208,12 @@ bool wxAcceleratorTable::Translate(
 // function for translating labels
 // ---------------------------------------------------------------------------
 
-wxString wxPMTextToLabel(
-  const wxString&                   rsTitle
-)
+wxString wxPMTextToLabel( const wxString& rsTitle )
 {
-    wxString                        sTitle;
-    const wxChar*                   zPc;
+    wxString      sTitle;
+    const wxChar* zPc;
 
-    if (rsTitle.IsEmpty())
+    if (rsTitle.empty())
         return(sTitle);
 
     for (zPc = rsTitle.c_str(); *zPc != wxT('\0'); zPc++)
@@ -251,4 +243,3 @@ wxString wxPMTextToLabel(
     }
     return(sTitle);
 } // end of wxPMTextToLabel
-