]> git.saurik.com Git - wxWidgets.git/commitdiff
'[1219035] cleanup: miscellaneous' and minor source cleaning.
authorWłodzimierz Skiba <abx@abx.art.pl>
Mon, 13 Jun 2005 12:19:33 +0000 (12:19 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Mon, 13 Jun 2005 12:19:33 +0000 (12:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

31 files changed:
include/wx/longlong.h
include/wx/prntbase.h
include/wx/ptr_scpd.h
include/wx/rawbmp.h
include/wx/textctrl.h
include/wx/version.h
samples/image/image.cpp
src/common/cmndata.cpp
src/common/init.cpp
src/common/matrix.cpp
src/common/rendcmn.cpp
src/common/stockitem.cpp
src/common/strconv.cpp
src/gtk/bitmap.cpp
src/gtk/colordlg.cpp
src/gtk1/bitmap.cpp
src/gtk1/colordlg.cpp
src/mac/carbon/bitmap.cpp
src/mac/carbon/display.cpp
src/mac/carbon/mediactrl.cpp
src/mac/carbon/mimetmac.cpp
src/mac/carbon/timer.cpp
src/motif/frame.cpp
src/msw/bitmap.cpp
src/msw/gsocket.cpp
src/msw/printdlg.cpp
src/os2/bitmap.cpp
src/os2/dc.cpp
src/os2/dnd.cpp
src/os2/radiobox.cpp
src/unix/mimetype.cpp

index 066f7a5b67f490248bac9810d38cc438cf4673b6..3adf4335b8b1c7961dd2f4fdc73d47cbafa6f1e0 100644 (file)
@@ -215,13 +215,13 @@ public:
     // shifts
         // left shift
     wxLongLongNative operator<<(int shift) const
     // shifts
         // left shift
     wxLongLongNative operator<<(int shift) const
-        { return wxLongLongNative(m_ll << shift);; }
+        { return wxLongLongNative(m_ll << shift); }
     wxLongLongNative& operator<<=(int shift)
         { m_ll <<= shift; return *this; }
 
         // right shift
     wxLongLongNative operator>>(int shift) const
     wxLongLongNative& operator<<=(int shift)
         { m_ll <<= shift; return *this; }
 
         // right shift
     wxLongLongNative operator>>(int shift) const
-        { return wxLongLongNative(m_ll >> shift);; }
+        { return wxLongLongNative(m_ll >> shift); }
     wxLongLongNative& operator>>=(int shift)
         { m_ll >>= shift; return *this; }
 
     wxLongLongNative& operator>>=(int shift)
         { m_ll >>= shift; return *this; }
 
@@ -402,13 +402,13 @@ public:
     // shifts
         // left shift
     wxULongLongNative operator<<(int shift) const
     // shifts
         // left shift
     wxULongLongNative operator<<(int shift) const
-        { return wxULongLongNative(m_ll << shift);; }
+        { return wxULongLongNative(m_ll << shift); }
     wxULongLongNative& operator<<=(int shift)
         { m_ll <<= shift; return *this; }
 
         // right shift
     wxULongLongNative operator>>(int shift) const
     wxULongLongNative& operator<<=(int shift)
         { m_ll <<= shift; return *this; }
 
         // right shift
     wxULongLongNative operator>>(int shift) const
-        { return wxULongLongNative(m_ll >> shift);; }
+        { return wxULongLongNative(m_ll >> shift); }
     wxULongLongNative& operator>>=(int shift)
         { m_ll >>= shift; return *this; }
 
     wxULongLongNative& operator>>=(int shift)
         { m_ll >>= shift; return *this; }
 
index 3307ba26af44dd8ec5dec2726adc1a215d19e8f5..43b6c7cf9e8a143484483a11895ce63f0ea75a3e 100644 (file)
@@ -63,24 +63,24 @@ class WXDLLEXPORT wxPrintFactory
 public:
     wxPrintFactory() {}
     virtual ~wxPrintFactory() {}
 public:
     wxPrintFactory() {}
     virtual ~wxPrintFactory() {}
-    
+
     virtual wxPrinterBase *CreatePrinter( wxPrintDialogData* data ) = 0;
     virtual wxPrinterBase *CreatePrinter( wxPrintDialogData* data ) = 0;
-    
-    virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, 
-                                                    wxPrintout *printout = NULL, 
+
+    virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
+                                                    wxPrintout *printout = NULL,
                                                     wxPrintDialogData *data = NULL ) = 0;
                                                     wxPrintDialogData *data = NULL ) = 0;
-    virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, 
-                                                    wxPrintout *printout, 
+    virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
+                                                    wxPrintout *printout,
                                                     wxPrintData *data ) = 0;
 
                                                     wxPrintData *data ) = 0;
 
-    virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, 
+    virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
                                                   wxPrintDialogData *data = NULL ) = 0;
                                                   wxPrintDialogData *data = NULL ) = 0;
-    virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, 
+    virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
                                                   wxPrintData *data ) = 0;
                                                   wxPrintData *data ) = 0;
-                                                  
+
     virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
                                                           wxPageSetupDialogData * data = NULL ) = 0;
     virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
                                                           wxPageSetupDialogData * data = NULL ) = 0;
-                                                  
+
     // What to do and what to show in the wxPrintDialog
     // a) Use the generic print setup dialog or a native one?
     virtual bool HasPrintSetupDialog() = 0;
     // What to do and what to show in the wxPrintDialog
     // a) Use the generic print setup dialog or a native one?
     virtual bool HasPrintSetupDialog() = 0;
@@ -94,9 +94,9 @@ public:
     virtual bool HasStatusLine() = 0;
     virtual wxString CreateStatusLine() = 0;
 
     virtual bool HasStatusLine() = 0;
     virtual wxString CreateStatusLine() = 0;
 
-                                                  
+
     virtual wxPrintNativeDataBase *CreatePrintNativeData() = 0;
     virtual wxPrintNativeDataBase *CreatePrintNativeData() = 0;
-    
+
     static void SetPrintFactory( wxPrintFactory *factory );
     static wxPrintFactory *GetFactory();
     static wxPrintFactory *m_factory;
     static void SetPrintFactory( wxPrintFactory *factory );
     static wxPrintFactory *GetFactory();
     static wxPrintFactory *m_factory;
@@ -106,22 +106,22 @@ class WXDLLEXPORT wxNativePrintFactory: public wxPrintFactory
 {
 public:
     virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
 {
 public:
     virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
-    
-    virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, 
-                                                    wxPrintout *printout = NULL, 
+
+    virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
+                                                    wxPrintout *printout = NULL,
                                                     wxPrintDialogData *data = NULL );
                                                     wxPrintDialogData *data = NULL );
-    virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, 
+    virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
                                                     wxPrintout *printout,
                                                     wxPrintData *data );
                                                     wxPrintout *printout,
                                                     wxPrintData *data );
-                                                    
-    virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, 
+
+    virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
                                                   wxPrintDialogData *data = NULL );
                                                   wxPrintDialogData *data = NULL );
-    virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, 
+    virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
                                                   wxPrintData *data );
                                                   wxPrintData *data );
-                                                  
+
     virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
                                                           wxPageSetupDialogData * data = NULL );
     virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
                                                           wxPageSetupDialogData * data = NULL );
-                                                  
+
     virtual bool HasPrintSetupDialog();
     virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
     virtual bool HasOwnPrintToFile();
     virtual bool HasPrintSetupDialog();
     virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
     virtual bool HasOwnPrintToFile();
@@ -129,7 +129,7 @@ public:
     virtual wxString CreatePrinterLine();
     virtual bool HasStatusLine();
     virtual wxString CreateStatusLine();
     virtual wxString CreatePrinterLine();
     virtual bool HasStatusLine();
     virtual wxString CreateStatusLine();
-    
+
     virtual wxPrintNativeDataBase *CreatePrintNativeData();
 };
 
     virtual wxPrintNativeDataBase *CreatePrintNativeData();
 };
 
@@ -142,14 +142,14 @@ class WXDLLEXPORT wxPrintNativeDataBase: public wxObject
 public:
     wxPrintNativeDataBase();
     virtual ~wxPrintNativeDataBase() {}
 public:
     wxPrintNativeDataBase();
     virtual ~wxPrintNativeDataBase() {}
-    
+
     virtual bool TransferTo( wxPrintData &data ) = 0;
     virtual bool TransferTo( wxPrintData &data ) = 0;
-    virtual bool TransferFrom( const wxPrintData &data ) = 0; 
-    
+    virtual bool TransferFrom( const wxPrintData &data ) = 0;
+
     virtual bool Ok() const = 0;
     virtual bool Ok() const = 0;
-    
+
     int  m_ref;
     int  m_ref;
-    
+
 private:
     DECLARE_CLASS(wxPrintNativeDataBase)
     DECLARE_NO_COPY_CLASS(wxPrintNativeDataBase)
 private:
     DECLARE_CLASS(wxPrintNativeDataBase)
     DECLARE_NO_COPY_CLASS(wxPrintNativeDataBase)
@@ -215,12 +215,12 @@ public:
     virtual bool Setup(wxWindow *parent);
     virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true);
     virtual wxDC* PrintDialog(wxWindow *parent);
     virtual bool Setup(wxWindow *parent);
     virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true);
     virtual wxDC* PrintDialog(wxWindow *parent);
-    
+
     virtual wxPrintDialogData& GetPrintDialogData() const;
 
 protected:
     wxPrinterBase    *m_pimpl;
     virtual wxPrintDialogData& GetPrintDialogData() const;
 
 protected:
     wxPrinterBase    *m_pimpl;
-    
+
 private:
     DECLARE_CLASS(wxPrinter)
     DECLARE_NO_COPY_CLASS(wxPrinter)
 private:
     DECLARE_CLASS(wxPrinter)
     DECLARE_NO_COPY_CLASS(wxPrinter)
@@ -376,8 +376,8 @@ private:
 #define wxPREVIEW_LAST        32
 #define wxPREVIEW_GOTO        64
 
 #define wxPREVIEW_LAST        32
 #define wxPREVIEW_GOTO        64
 
-#define wxPREVIEW_DEFAULT  wxPREVIEW_PREVIOUS|wxPREVIEW_NEXT|wxPREVIEW_ZOOM\
-                          |wxPREVIEW_FIRST|wxPREVIEW_GOTO|wxPREVIEW_LAST
+#define wxPREVIEW_DEFAULT  (wxPREVIEW_PREVIOUS|wxPREVIEW_NEXT|wxPREVIEW_ZOOM\
+                            |wxPREVIEW_FIRST|wxPREVIEW_GOTO|wxPREVIEW_LAST)
 
 // Ids for controls
 #define wxID_PREVIEW_CLOSE      1
 
 // Ids for controls
 #define wxID_PREVIEW_CLOSE      1
@@ -491,7 +491,7 @@ public:
     virtual int GetZoom() const;
 
     virtual wxPrintDialogData& GetPrintDialogData();
     virtual int GetZoom() const;
 
     virtual wxPrintDialogData& GetPrintDialogData();
-    
+
     virtual int GetMaxPage() const;
     virtual int GetMinPage() const;
 
     virtual int GetMaxPage() const;
     virtual int GetMinPage() const;
 
@@ -571,15 +571,15 @@ public:
 
     virtual bool Print(bool interactive);
     virtual void DetermineScaling();
 
     virtual bool Print(bool interactive);
     virtual void DetermineScaling();
-    
+
     virtual wxPrintDialogData& GetPrintDialogData();
     virtual wxPrintDialogData& GetPrintDialogData();
-    
+
     virtual int GetMaxPage() const;
     virtual int GetMinPage() const;
 
     virtual bool Ok() const;
     virtual void SetOk(bool ok);
     virtual int GetMaxPage() const;
     virtual int GetMinPage() const;
 
     virtual bool Ok() const;
     virtual void SetOk(bool ok);
-    
+
 private:
     wxPrintPreviewBase *m_pimpl;
 
 private:
     wxPrintPreviewBase *m_pimpl;
 
index 85427a13cfcfbef4bb9d06e6e5ceec99dad802e4..9f7c88de4bb8002da80d20c354b92abe2177d79f 100644 (file)
@@ -138,8 +138,8 @@ name::~name()                       \
 // this macro can be used for the most common case when you want to declare and
 // define the scoped pointer at the same time and want to use the standard
 // naming convention: auto pointer to Foo is called FooPtr
 // this macro can be used for the most common case when you want to declare and
 // define the scoped pointer at the same time and want to use the standard
 // naming convention: auto pointer to Foo is called FooPtr
-#define wxDEFINE_SCOPED_PTR_TYPE(T)                                           \
-    wxDECLARE_SCOPED_PTR(T, T ## Ptr);                                        \
+#define wxDEFINE_SCOPED_PTR_TYPE(T)    \
+    wxDECLARE_SCOPED_PTR(T, T ## Ptr)  \
     wxDEFINE_SCOPED_PTR(T, T ## Ptr)
 
 // the same but for arrays instead of simple pointers
     wxDEFINE_SCOPED_PTR(T, T ## Ptr)
 
 // the same but for arrays instead of simple pointers
index 8901f1b2f3ed3fe95f5cb3880c06a776f996f88d..1595183e51a05d72ae6003d6df9f584fdb2f0e01 100644 (file)
@@ -713,7 +713,7 @@ typedef wxPixelData<wxBitmap, wxAlphaPixelFormat> wxAlphaPixelData;
     partial template specialization then and neither VC6 nor VC7 provide it.
  */
 template < class Image, class PixelFormat = wxPixelFormatFor<Image> >
     partial template specialization then and neither VC6 nor VC7 provide it.
  */
 template < class Image, class PixelFormat = wxPixelFormatFor<Image> >
-struct wxPixelIterator : wxPixelData<Image, PixelFormat>::Iterator
+struct wxPixelIterator : public wxPixelData<Image, PixelFormat>::Iterator
 {
 };
 
 {
 };
 
index 6471019d16bab24d758d5c4e4e3e4c045d767eb0..4da4e1a9f0c080fabee865e8dd60a4ab3df8cf42 100644 (file)
@@ -175,7 +175,8 @@ enum wxTextAttrAlignment
 #define wxTEXT_ATTR_FONT_ITALIC             0x0020
 #define wxTEXT_ATTR_FONT_UNDERLINE          0x0040
 #define wxTEXT_ATTR_FONT \
 #define wxTEXT_ATTR_FONT_ITALIC             0x0020
 #define wxTEXT_ATTR_FONT_UNDERLINE          0x0040
 #define wxTEXT_ATTR_FONT \
-  wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT | wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE
+  ( wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT | \
+    wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE )
 #define wxTEXT_ATTR_ALIGNMENT               0x0080
 #define wxTEXT_ATTR_LEFT_INDENT             0x0100
 #define wxTEXT_ATTR_RIGHT_INDENT            0x0200
 #define wxTEXT_ATTR_ALIGNMENT               0x0080
 #define wxTEXT_ATTR_LEFT_INDENT             0x0100
 #define wxTEXT_ATTR_RIGHT_INDENT            0x0200
index 7d50d1bca8c0d79eb2599f914fe121b32201765c..0eb62becaf6b5f5fb801cbfb95c620e480262157 100644 (file)
@@ -42,9 +42,9 @@
   wxMAKE_VERSION_DOT_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
 
 /*  some more defines, not really sure if they're [still] useful */
   wxMAKE_VERSION_DOT_STRING(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER)
 
 /*  some more defines, not really sure if they're [still] useful */
-#define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER
+#define wxVERSION_NUMBER ( (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER )
 #define wxBETA_NUMBER      0
 #define wxBETA_NUMBER      0
-#define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)
+#define wxVERSION_FLOAT ( wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0) )
 
 /*  check if the current version is at least major.minor.release */
 #define wxCHECK_VERSION(major,minor,release) \
 
 /*  check if the current version is at least major.minor.release */
 #define wxCHECK_VERSION(major,minor,release) \
 
 /* the same but check the subrelease also */
 #define wxCHECK_VERSION_FULL(major,minor,release,subrel) \
 
 /* the same but check the subrelease also */
 #define wxCHECK_VERSION_FULL(major,minor,release,subrel) \
-    wxCHECK_VERSION(major, minor, release) && \
+    (wxCHECK_VERSION(major, minor, release) && \
         ((major) != wxMAJOR_VERSION || \
             (minor) != wxMINOR_VERSION || \
                 (release) != wxRELEASE_NUMBER || \
         ((major) != wxMAJOR_VERSION || \
             (minor) != wxMINOR_VERSION || \
                 (release) != wxRELEASE_NUMBER || \
-                    (subrel) <= wxSUBRELEASE_NUMBER)
+                    (subrel) <= wxSUBRELEASE_NUMBER))
 
 #endif /*  _WX_VERSION_H_ */
 
 
 #endif /*  _WX_VERSION_H_ */
 
index a0f10192d22a0523f89f5ebc33b596da2a4f855e..159f7fe26b450386455258542cdeae303eb4928b 100644 (file)
@@ -155,14 +155,14 @@ public:
                                                 wxT(""),
                                                 wxT(""),
                                                 (const wxChar *)NULL,
                                                 wxT(""),
                                                 wxT(""),
                                                 (const wxChar *)NULL,
-                                            wxT("BMP files (*.bmp)|*.bmp|")
-                                            wxT("PNG files (*.png)|*.png|")
-                                            wxT("JPEG files (*.jpg)|*.jpg|")
-                                            wxT("GIF files (*.gif)|*.gif|")
-                                            wxT("TIFF files (*.tif)|*.tif|")
-                                            wxT("PCX files (*.pcx)|*.pcx|")
-                                            wxT("ICO files (*.ico)|*.ico|")
-                                            wxT("CUR files (*.cur)|*.cur"),
+                                                wxT("BMP files (*.bmp)|*.bmp|")
+                                                wxT("PNG files (*.png)|*.png|")
+                                                wxT("JPEG files (*.jpg)|*.jpg|")
+                                                wxT("GIF files (*.gif)|*.gif|")
+                                                wxT("TIFF files (*.tif)|*.tif|")
+                                                wxT("PCX files (*.pcx)|*.pcx|")
+                                                wxT("ICO files (*.ico)|*.ico|")
+                                                wxT("CUR files (*.cur)|*.cur"),
                                                 wxSAVE,
                                                 this);
 
                                                 wxSAVE,
                                                 this);
 
@@ -216,7 +216,7 @@ public:
                         cmap[i] = (unsigned char)i;
                     image.SetPalette(wxPalette(256, cmap, cmap, cmap));
 
                         cmap[i] = (unsigned char)i;
                     image.SetPalette(wxPalette(256, cmap, cmap, cmap));
 
-                    delete cmap;
+                    delete[] cmap;
                 }
             }
         }
                 }
             }
         }
@@ -697,7 +697,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
     dc.DrawText( _T("PNM handler"), 30, 1285 );
     if (my_horse_pnm && my_horse_pnm->Ok())
         dc.DrawBitmap( *my_horse_pnm, 30, 1300 );
     dc.DrawText( _T("PNM handler"), 30, 1285 );
     if (my_horse_pnm && my_horse_pnm->Ok())
         dc.DrawBitmap( *my_horse_pnm, 30, 1300 );
-    
+
     dc.DrawText( _T("PNM handler (ascii grey)"), 280, 1285 );
     if (my_horse_asciigrey_pnm && my_horse_asciigrey_pnm->Ok())
         dc.DrawBitmap( *my_horse_asciigrey_pnm, 280, 1300 );
     dc.DrawText( _T("PNM handler (ascii grey)"), 280, 1285 );
     if (my_horse_asciigrey_pnm && my_horse_asciigrey_pnm->Ok())
         dc.DrawBitmap( *my_horse_asciigrey_pnm, 280, 1300 );
index bfdc4e971b722591c0a01512f64293d0a479eb14..9347d203c528582690bec69c8230e5f7ae0656f1 100644 (file)
@@ -584,7 +584,7 @@ wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPageSetupDialogD
     m_enableOrientation = data.m_enableOrientation;
     m_enablePaper = data.m_enablePaper;
     m_enablePrinter = data.m_enablePrinter;
     m_enableOrientation = data.m_enableOrientation;
     m_enablePaper = data.m_enablePaper;
     m_enablePrinter = data.m_enablePrinter;
-    m_getDefaultInfo = data.m_getDefaultInfo;;
+    m_getDefaultInfo = data.m_getDefaultInfo;
     m_enableHelp = data.m_enableHelp;
 
     m_printData = data.m_printData;
     m_enableHelp = data.m_enableHelp;
 
     m_printData = data.m_printData;
index aaeec98204efee2bf87b15a2996358d4b423578a..f6cc91b3503328e4d75f2412bb97d574d8fb6ae9 100644 (file)
@@ -70,8 +70,8 @@ public:
 
 // we need a special kind of auto pointer to wxApp which not only deletes the
 // pointer it holds in its dtor but also resets the global application pointer
 
 // we need a special kind of auto pointer to wxApp which not only deletes the
 // pointer it holds in its dtor but also resets the global application pointer
-wxDECLARE_SCOPED_PTR(wxAppConsole, wxAppPtrBase);
-wxDEFINE_SCOPED_PTR(wxAppConsole, wxAppPtrBase);
+wxDECLARE_SCOPED_PTR(wxAppConsole, wxAppPtrBase)
+wxDEFINE_SCOPED_PTR(wxAppConsole, wxAppPtrBase)
 
 class wxAppPtr : public wxAppPtrBase
 {
 
 class wxAppPtr : public wxAppPtrBase
 {
index d324a852dd0dc696d1fc2f836616743894b0d884..66cad04fe593f6aa87e1a2f216cfb69d7cd8ff1e 100644 (file)
@@ -77,7 +77,7 @@ void wxTransformMatrix::operator = (const wxTransformMatrix& mat)
 
 bool wxTransformMatrix::operator == (const wxTransformMatrix& mat)
 {
 
 bool wxTransformMatrix::operator == (const wxTransformMatrix& mat)
 {
-    if (m_isIdentity==true && mat.m_isIdentity==true)
+    if (m_isIdentity && mat.m_isIdentity)
         return true;
 
     int i, j;
         return true;
 
     int i, j;
index 323b7b4fb0b525beebc463d458faf06946aeac69..572600a9bdfea58890ffbdc5fab99426e4cf1225 100644 (file)
@@ -42,8 +42,8 @@
 // wxRendererPtr: auto pointer holding the global renderer
 // ----------------------------------------------------------------------------
 
 // wxRendererPtr: auto pointer holding the global renderer
 // ----------------------------------------------------------------------------
 
-wxDECLARE_SCOPED_PTR(wxRendererNative, wxRendererPtrBase);
-wxDEFINE_SCOPED_PTR(wxRendererNative, wxRendererPtrBase);
+wxDECLARE_SCOPED_PTR(wxRendererNative, wxRendererPtrBase)
+wxDEFINE_SCOPED_PTR(wxRendererNative, wxRendererPtrBase)
 
 class wxRendererPtr : public wxRendererPtrBase
 {
 
 class wxRendererPtr : public wxRendererPtrBase
 {
index 1946b288aed0355ea5eea4d0cb049604c579fe36..2838320cb864d9f25b0985b2de6e6bd130188263 100644 (file)
@@ -90,7 +90,7 @@ bool wxIsStockID(wxWindowID id)
 
         default:
             return false;
 
         default:
             return false;
-    };
+    }
 }
 
 wxString wxGetStockLabel(wxWindowID id, bool withCodes, wxString accelerator)
 }
 
 wxString wxGetStockLabel(wxWindowID id, bool withCodes, wxString accelerator)
index 5c75db40983c10e9ef7bc5f76f91e15ae521258a..40bc93d8716be48732e200d33fc2425bc5123e4f 100644 (file)
@@ -2513,7 +2513,7 @@ wxMBConv *wxCSConv::DoCreate() const
 
 #if wxUSE_FONTMAP
         if ( name.empty() )
 
 #if wxUSE_FONTMAP
         if ( name.empty() )
-            name = wxFontMapperBase::Get()->GetEncodingName(m_encoding);
+            name = wxFontMapperBase::GetEncodingName(m_encoding);
 #endif // wxUSE_FONTMAP
 
         wxMBConv_iconv *conv = new wxMBConv_iconv(name);
 #endif // wxUSE_FONTMAP
 
         wxMBConv_iconv *conv = new wxMBConv_iconv(name);
index 6bbf68cd474ad612e61e121f3db68c013a0a7e54..88230c8a35ce94785cf16e954c5cdae29b9b2574 100644 (file)
@@ -474,7 +474,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
                     if (!pixval)
                     {
                         char bit=1;
                     if (!pixval)
                     {
                         char bit=1;
-                        char shift = bit << w % 8;
+                        char shift = bit << (w % 8);
                         outbyte |= shift;
                     }
 
                         outbyte |= shift;
                     }
 
@@ -537,7 +537,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
                     if (pixval)
                     {
                         char bit=1;
                     if (pixval)
                     {
                         char bit=1;
-                        char shift = bit << w % 8;
+                        char shift = bit << (w % 8);
                         outbyte |= shift;
                     }
 
                         outbyte |= shift;
                     }
 
index 9e676a6fa8d5ae18c28dc63b73efa5cf91568704..26e3b9199f7fbbbc70f87f5f1e7d5441ac8eafbc 100644 (file)
@@ -44,25 +44,25 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
 
     wxString title(_("Choose colour"));
     m_widget = gtk_color_selection_dialog_new(wxGTK_CONV(title));
 
     wxString title(_("Choose colour"));
     m_widget = gtk_color_selection_dialog_new(wxGTK_CONV(title));
-    
+
     if (parent)
         gtk_window_set_transient_for(GTK_WINDOW(m_widget),
                                      GTK_WINDOW(parent->m_widget));
     if (parent)
         gtk_window_set_transient_for(GTK_WINDOW(m_widget),
                                      GTK_WINDOW(parent->m_widget));
-    
-    GtkColorSelection *sel = 
+
+    GtkColorSelection *sel =
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
     gtk_color_selection_set_has_palette(sel, true);
 
     return true;
 }
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
     gtk_color_selection_set_has_palette(sel, true);
 
     return true;
 }
-    
+
 int wxColourDialog::ShowModal()
 {
     ColourDataToDialog();
 int wxColourDialog::ShowModal()
 {
     ColourDataToDialog();
-    
+
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
     gtk_widget_hide(m_widget);
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
     gtk_widget_hide(m_widget);
-    
+
     switch (result)
     {
         default:
     switch (result)
     {
         default:
@@ -73,18 +73,18 @@ int wxColourDialog::ShowModal()
         case GTK_RESPONSE_DELETE_EVENT:
         case GTK_RESPONSE_CLOSE:
             return wxID_CANCEL;
         case GTK_RESPONSE_DELETE_EVENT:
         case GTK_RESPONSE_CLOSE:
             return wxID_CANCEL;
-     
+
         case GTK_RESPONSE_OK:
             DialogToColourData();
             return wxID_OK;
         case GTK_RESPONSE_OK:
             DialogToColourData();
             return wxID_OK;
-    };
+    }
 }
 
 void wxColourDialog::ColourDataToDialog()
 {
 }
 
 void wxColourDialog::ColourDataToDialog()
 {
-    GtkColorSelection *sel = 
+    GtkColorSelection *sel =
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
-                
+
     if (m_data.GetColour().Ok())
     {
         gtk_color_selection_set_current_color(sel,
     if (m_data.GetColour().Ok())
     {
         gtk_color_selection_set_current_color(sel,
@@ -115,13 +115,13 @@ void wxColourDialog::ColourDataToDialog()
 
 void wxColourDialog::DialogToColourData()
 {
 
 void wxColourDialog::DialogToColourData()
 {
-    GtkColorSelection *sel = 
+    GtkColorSelection *sel =
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
 
     GdkColor clr;
     gtk_color_selection_get_current_color(sel, &clr);
     m_data.SetColour(wxColour(clr.red >> 8, clr.green >> 8, clr.blue >> 8));
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
 
     GdkColor clr;
     gtk_color_selection_get_current_color(sel, &clr);
     m_data.SetColour(wxColour(clr.red >> 8, clr.green >> 8, clr.blue >> 8));
-    
+
     // Extract custom palette:
 
     GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(sel));
     // Extract custom palette:
 
     GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(sel));
@@ -140,7 +140,7 @@ void wxColourDialog::DialogToColourData()
         }
         g_free(colors);
     }
         }
         g_free(colors);
     }
-    
+
     g_free(pal);
 }
 
     g_free(pal);
 }
 
index 6bbf68cd474ad612e61e121f3db68c013a0a7e54..88230c8a35ce94785cf16e954c5cdae29b9b2574 100644 (file)
@@ -474,7 +474,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
                     if (!pixval)
                     {
                         char bit=1;
                     if (!pixval)
                     {
                         char bit=1;
-                        char shift = bit << w % 8;
+                        char shift = bit << (w % 8);
                         outbyte |= shift;
                     }
 
                         outbyte |= shift;
                     }
 
@@ -537,7 +537,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
                     if (pixval)
                     {
                         char bit=1;
                     if (pixval)
                     {
                         char bit=1;
-                        char shift = bit << w % 8;
+                        char shift = bit << (w % 8);
                         outbyte |= shift;
                     }
 
                         outbyte |= shift;
                     }
 
index 9e676a6fa8d5ae18c28dc63b73efa5cf91568704..26e3b9199f7fbbbc70f87f5f1e7d5441ac8eafbc 100644 (file)
@@ -44,25 +44,25 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
 
     wxString title(_("Choose colour"));
     m_widget = gtk_color_selection_dialog_new(wxGTK_CONV(title));
 
     wxString title(_("Choose colour"));
     m_widget = gtk_color_selection_dialog_new(wxGTK_CONV(title));
-    
+
     if (parent)
         gtk_window_set_transient_for(GTK_WINDOW(m_widget),
                                      GTK_WINDOW(parent->m_widget));
     if (parent)
         gtk_window_set_transient_for(GTK_WINDOW(m_widget),
                                      GTK_WINDOW(parent->m_widget));
-    
-    GtkColorSelection *sel = 
+
+    GtkColorSelection *sel =
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
     gtk_color_selection_set_has_palette(sel, true);
 
     return true;
 }
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
     gtk_color_selection_set_has_palette(sel, true);
 
     return true;
 }
-    
+
 int wxColourDialog::ShowModal()
 {
     ColourDataToDialog();
 int wxColourDialog::ShowModal()
 {
     ColourDataToDialog();
-    
+
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
     gtk_widget_hide(m_widget);
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
     gtk_widget_hide(m_widget);
-    
+
     switch (result)
     {
         default:
     switch (result)
     {
         default:
@@ -73,18 +73,18 @@ int wxColourDialog::ShowModal()
         case GTK_RESPONSE_DELETE_EVENT:
         case GTK_RESPONSE_CLOSE:
             return wxID_CANCEL;
         case GTK_RESPONSE_DELETE_EVENT:
         case GTK_RESPONSE_CLOSE:
             return wxID_CANCEL;
-     
+
         case GTK_RESPONSE_OK:
             DialogToColourData();
             return wxID_OK;
         case GTK_RESPONSE_OK:
             DialogToColourData();
             return wxID_OK;
-    };
+    }
 }
 
 void wxColourDialog::ColourDataToDialog()
 {
 }
 
 void wxColourDialog::ColourDataToDialog()
 {
-    GtkColorSelection *sel = 
+    GtkColorSelection *sel =
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
-                
+
     if (m_data.GetColour().Ok())
     {
         gtk_color_selection_set_current_color(sel,
     if (m_data.GetColour().Ok())
     {
         gtk_color_selection_set_current_color(sel,
@@ -115,13 +115,13 @@ void wxColourDialog::ColourDataToDialog()
 
 void wxColourDialog::DialogToColourData()
 {
 
 void wxColourDialog::DialogToColourData()
 {
-    GtkColorSelection *sel = 
+    GtkColorSelection *sel =
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
 
     GdkColor clr;
     gtk_color_selection_get_current_color(sel, &clr);
     m_data.SetColour(wxColour(clr.red >> 8, clr.green >> 8, clr.blue >> 8));
         GTK_COLOR_SELECTION(GTK_COLOR_SELECTION_DIALOG(m_widget)->colorsel);
 
     GdkColor clr;
     gtk_color_selection_get_current_color(sel, &clr);
     m_data.SetColour(wxColour(clr.red >> 8, clr.green >> 8, clr.blue >> 8));
-    
+
     // Extract custom palette:
 
     GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(sel));
     // Extract custom palette:
 
     GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET(sel));
@@ -140,7 +140,7 @@ void wxColourDialog::DialogToColourData()
         }
         g_free(colors);
     }
         }
         g_free(colors);
     }
-    
+
     g_free(pal);
 }
 
     g_free(pal);
 }
 
index f15aa10143bfe792ff758e4f56e31de38065acc2..bb3247be561ee3746ba9f31b9cc09df223eb0e07 100644 (file)
@@ -964,7 +964,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth)
     int width = image.GetWidth();
     int height = image.GetHeight();
 
     int width = image.GetWidth();
     int height = image.GetHeight();
 
-    m_refData = new wxBitmapRefData( width , height , depth ) ;;
+    m_refData = new wxBitmapRefData( width , height , depth ) ;
 
     // Create picture
 
 
     // Create picture
 
index f09d7b1f7547101322faa89d0ef0b4d29e074925..7dc8cf8c9a7005b4955cd99df2935b4a73709c0b 100644 (file)
@@ -2,7 +2,7 @@
 // Name:        display.cpp
 // Purpose:     Mac implementation of wxDisplay class
 // Author:      Ryan Norton & Brian Victor
 // Name:        display.cpp
 // Purpose:     Mac implementation of wxDisplay class
 // Author:      Ryan Norton & Brian Victor
-// Modified by: Royce Mitchell III 
+// Modified by: Royce Mitchell III
 // Created:     06/21/02
 // RCS-ID:      $Id$
 // Copyright:   (c) wxWidgets team
 // Created:     06/21/02
 // RCS-ID:      $Id$
 // Copyright:   (c) wxWidgets team
@@ -58,7 +58,7 @@ size_t wxDisplayBase::GetCount()
 {
     CGDisplayCount count;
 #ifdef __WXDEBUG__
 {
     CGDisplayCount count;
 #ifdef __WXDEBUG__
-    CGDisplayErr err = 
+    CGDisplayErr err =
 #endif
     CGGetActiveDisplayList(0, NULL, &count);
 
 #endif
     CGGetActiveDisplayList(0, NULL, &count);
 
@@ -67,14 +67,14 @@ size_t wxDisplayBase::GetCount()
 }
 
 int wxDisplayBase::GetFromPoint(const wxPoint &p)
 }
 
 int wxDisplayBase::GetFromPoint(const wxPoint &p)
-{   
+{
     CGPoint thePoint = {(float)p.x, (float)p.y};
     CGDirectDisplayID theID;
     CGDisplayCount theCount;
     CGDisplayErr err = CGGetDisplaysWithPoint(thePoint, 1, &theID, &theCount);
     wxASSERT(err == CGDisplayNoErr);
     int nWhich = -1;
     CGPoint thePoint = {(float)p.x, (float)p.y};
     CGDirectDisplayID theID;
     CGDisplayCount theCount;
     CGDisplayErr err = CGGetDisplaysWithPoint(thePoint, 1, &theID, &theCount);
     wxASSERT(err == CGDisplayNoErr);
     int nWhich = -1;
-    
+
     if (theCount)
     {
         theCount = GetCount();
     if (theCount)
     {
         theCount = GetCount();
@@ -87,16 +87,16 @@ int wxDisplayBase::GetFromPoint(const wxPoint &p)
             if(theIDs[nWhich] == theID)
                 break;
         }
             if(theIDs[nWhich] == theID)
                 break;
         }
-        
+
         delete[] theIDs;
         delete[] theIDs;
-        
+
         if(nWhich == (int) theCount)
         {
             wxFAIL_MSG(wxT("Failed to find display in display list"));
             nWhich = -1;
         }
     }
         if(nWhich == (int) theCount)
         {
             wxFAIL_MSG(wxT("Failed to find display in display list"));
             nWhich = -1;
         }
     }
-    
+
     return nWhich;
 }//CFUserNotification[NSBundle bundleForClass:[self class]]
 
     return nWhich;
 }//CFUserNotification[NSBundle bundleForClass:[self class]]
 
@@ -106,25 +106,25 @@ wxDisplay::wxDisplay(size_t index) : wxDisplayBase ( index ) ,
     CGDisplayCount theCount = GetCount();
     CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
 #ifdef __WXDEBUG__
     CGDisplayCount theCount = GetCount();
     CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
 #ifdef __WXDEBUG__
-    CGDisplayErr err = 
+    CGDisplayErr err =
 #endif
     CGGetActiveDisplayList(theCount, theIDs, &theCount);
 
     wxASSERT(err == CGDisplayNoErr);
     wxASSERT(index < theCount);
 #endif
     CGGetActiveDisplayList(theCount, theIDs, &theCount);
 
     wxASSERT(err == CGDisplayNoErr);
     wxASSERT(index < theCount);
-    
+
     m_priv->m_id = theIDs[index];
     m_priv->m_id = theIDs[index];
-    
+
     delete[] theIDs;
 }
 
 wxRect wxDisplay::GetGeometry() const
 {
     CGRect theRect = CGDisplayBounds(m_priv->m_id);
     delete[] theIDs;
 }
 
 wxRect wxDisplay::GetGeometry() const
 {
     CGRect theRect = CGDisplayBounds(m_priv->m_id);
-    return wxRect(     (int)theRect.origin.x,
-                    (int)theRect.origin.y,
-                    (int)theRect.size.width,
-                    (int)theRect.size.height  ); //floats
+    return wxRect( (int)theRect.origin.x,
+                   (int)theRect.origin.y,
+                   (int)theRect.size.width,
+                   (int)theRect.size.height  ); //floats
 }
 
 int wxDisplay::GetDepth() const
 }
 
 int wxDisplay::GetDepth() const
@@ -153,29 +153,29 @@ wxArrayVideoModes
     wxDisplay::GetModes(const wxVideoMode& mode) const
 {
     wxArrayVideoModes Modes;
     wxDisplay::GetModes(const wxVideoMode& mode) const
 {
     wxArrayVideoModes Modes;
-    
+
     CFArrayRef theArray = CGDisplayAvailableModes(m_priv->m_id);
 
     for(CFIndex i = 0; i < CFArrayGetCount(theArray); ++i)
     {
         CFDictionaryRef theValue = (CFDictionaryRef) CFArrayGetValueAtIndex(theArray, i);
     CFArrayRef theArray = CGDisplayAvailableModes(m_priv->m_id);
 
     for(CFIndex i = 0; i < CFArrayGetCount(theArray); ++i)
     {
         CFDictionaryRef theValue = (CFDictionaryRef) CFArrayGetValueAtIndex(theArray, i);
-        
+
         wxVideoMode theMode(wxCFDictKeyToInt(theValue, kCGDisplayWidth),
                             wxCFDictKeyToInt(theValue, kCGDisplayHeight),
                             wxCFDictKeyToInt(theValue, kCGDisplayBitsPerPixel),
                             wxCFDictKeyToInt(theValue, kCGDisplayRefreshRate));
         wxVideoMode theMode(wxCFDictKeyToInt(theValue, kCGDisplayWidth),
                             wxCFDictKeyToInt(theValue, kCGDisplayHeight),
                             wxCFDictKeyToInt(theValue, kCGDisplayBitsPerPixel),
                             wxCFDictKeyToInt(theValue, kCGDisplayRefreshRate));
-        
+
         if (theMode.Matches(mode))
             Modes.Add(theMode);
     }
         if (theMode.Matches(mode))
             Modes.Add(theMode);
     }
-    
+
     return Modes;
 }
 
 wxVideoMode wxDisplay::GetCurrentMode() const
 {
     CFDictionaryRef theValue = CGDisplayCurrentMode (m_priv->m_id);
     return Modes;
 }
 
 wxVideoMode wxDisplay::GetCurrentMode() const
 {
     CFDictionaryRef theValue = CGDisplayCurrentMode (m_priv->m_id);
-    
+
     return wxVideoMode(wxCFDictKeyToInt(theValue, kCGDisplayWidth),
                             wxCFDictKeyToInt(theValue, kCGDisplayHeight),
                             wxCFDictKeyToInt(theValue, kCGDisplayBitsPerPixel),
     return wxVideoMode(wxCFDictKeyToInt(theValue, kCGDisplayWidth),
                             wxCFDictKeyToInt(theValue, kCGDisplayHeight),
                             wxCFDictKeyToInt(theValue, kCGDisplayBitsPerPixel),
@@ -196,9 +196,9 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode)
                                         (size_t)mode.h,
                                         (double)mode.refresh,
                                         &bExactMatch);
                                         (size_t)mode.h,
                                         (double)mode.refresh,
                                         &bExactMatch);
-    
+
     bool bOK = bExactMatch;
     bool bOK = bExactMatch;
-    
+
     if(bOK)
         bOK = CGDisplaySwitchToMode(m_priv->m_id, theCGMode) == CGDisplayNoErr;
 
     if(bOK)
         bOK = CGDisplaySwitchToMode(m_priv->m_id, theCGMode) == CGDisplayNoErr;
 
@@ -278,7 +278,7 @@ wxRect wxDisplay::GetGeometry() const
     if (!(m_priv)) return wxRect(0, 0, 0, 0);
     if (!(m_priv->m_hndl)) return wxRect(0, 0, 0, 0);
     Rect screenrect = (*(m_priv->m_hndl))->gdRect;
     if (!(m_priv)) return wxRect(0, 0, 0, 0);
     if (!(m_priv->m_hndl)) return wxRect(0, 0, 0, 0);
     Rect screenrect = (*(m_priv->m_hndl))->gdRect;
-    return wxRect( screenrect.left, screenrect.top, 
+    return wxRect( screenrect.left, screenrect.top,
                    screenrect.right - screenrect.left, screenrect.bottom - screenrect.top);
 }
 
                    screenrect.right - screenrect.left, screenrect.bottom - screenrect.top);
 }
 
@@ -291,9 +291,9 @@ int wxDisplay::GetDepth() const
     // http://developer.apple.com/samplecode/Sample_Code/Graphics_2D/GDevVideo/Gen.cp.htm
 
     //RN - according to the docs
     // http://developer.apple.com/samplecode/Sample_Code/Graphics_2D/GDevVideo/Gen.cp.htm
 
     //RN - according to the docs
-       //gdPMap is a bitmap-type representation of the GDevice, and all
-       //0x0000FFFF does is get the lower 16 bits of pixelSize.  However,
-       //since pixelSize is only 16 bits (a short)...
+    //gdPMap is a bitmap-type representation of the GDevice, and all
+    //0x0000FFFF does is get the lower 16 bits of pixelSize.  However,
+    //since pixelSize is only 16 bits (a short)...
     return ((*(*(m_priv->m_hndl))->gdPMap)->pixelSize) & 0x0000FFFF;
 }
 
     return ((*(*(m_priv->m_hndl))->gdPMap)->pixelSize) & 0x0000FFFF;
 }
 
@@ -305,96 +305,96 @@ wxString wxDisplay::GetName() const
 
 struct DMModeIteratorRec
 {
 
 struct DMModeIteratorRec
 {
-       wxArrayVideoModes* pModes;
-       const wxVideoMode* pMatchMode;
+    wxArrayVideoModes* pModes;
+    const wxVideoMode* pMatchMode;
 };
 
 };
 
-pascal void DMModeListIteratorProc (   void* pData,
-                             DMListIndexType nIndex,
-                             DMDisplayModeListEntryPtr pInfo)
+pascal void DMModeListIteratorProc ( void* pData,
+                                     DMListIndexType nIndex,
+                                     DMDisplayModeListEntryPtr pInfo)
 {
     DMModeIteratorRec* pInfoData = (DMModeIteratorRec*) pData;
 
 {
     DMModeIteratorRec* pInfoData = (DMModeIteratorRec*) pData;
 
-       //Note that in testing the refresh rate is always 0 on my ibook - RN
+    //Note that in testing the refresh rate is always 0 on my ibook - RN
     int refresh = (int) Fix2Long(pInfo->displayModeResolutionInfo->csRefreshRate);
 
     int refresh = (int) Fix2Long(pInfo->displayModeResolutionInfo->csRefreshRate);
 
-       for(unsigned long i = 0; i < pInfo->displayModeDepthBlockInfo->depthBlockCount; ++i)
-       {
+    for(unsigned long i = 0; i < pInfo->displayModeDepthBlockInfo->depthBlockCount; ++i)
+    {
 #define pDBI pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthVPBlock
 
 #define pDBI pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthVPBlock
 
-               if (wxVideoMode((int) pInfo->displayModeResolutionInfo->csHorizontalPixels,
-                                 (int) pInfo->displayModeResolutionInfo->csVerticalLines,
-                                 (int) pDBI->vpPixelSize,
-                                 refresh).Matches(*pInfoData->pMatchMode) )
-                       {
-                       pInfoData->pModes->Add(wxVideoMode((int) pInfo->displayModeResolutionInfo->csHorizontalPixels,
-                                                  (int) pInfo->displayModeResolutionInfo->csVerticalLines,
-                                                  (int) pDBI->vpPixelSize,
-                                                  refresh));                   
-                       }
+        if (wxVideoMode((int) pInfo->displayModeResolutionInfo->csHorizontalPixels,
+                        (int) pInfo->displayModeResolutionInfo->csVerticalLines,
+                        (int) pDBI->vpPixelSize,
+                        refresh).Matches(*pInfoData->pMatchMode) )
+        {
+            pInfoData->pModes->Add(wxVideoMode((int) pInfo->displayModeResolutionInfo->csHorizontalPixels,
+                                               (int) pInfo->displayModeResolutionInfo->csVerticalLines,
+                                               (int) pDBI->vpPixelSize,
+                                               refresh));
+        }
 #undef pDBI
 #undef pDBI
-       }
+    }
 }
 
 struct DMModeInfoRec
 {
 }
 
 struct DMModeInfoRec
 {
-       const wxVideoMode* pMode;
-       VDSwitchInfoRec sMode;
-       bool bMatched;
+    const wxVideoMode* pMode;
+    VDSwitchInfoRec sMode;
+    bool bMatched;
 };
 
 };
 
-pascal void DMModeInfoProc (   void* pData,
-                                                         DMListIndexType nIndex,
-                                                         DMDisplayModeListEntryPtr pInfo)
+pascal void DMModeInfoProc ( void* pData,
+                             DMListIndexType nIndex,
+                             DMDisplayModeListEntryPtr pInfo)
 {
 {
-       DMModeInfoRec* pInfoData = (DMModeInfoRec*) pData;
-       Fixed refresh = Long2Fix(pInfoData->pMode->refresh);
+    DMModeInfoRec* pInfoData = (DMModeInfoRec*) pData;
+    Fixed refresh = Long2Fix(pInfoData->pMode->refresh);
 
 
-       for(unsigned long i = 0; i < pInfo->displayModeDepthBlockInfo->depthBlockCount; ++i)
-               {
+    for(unsigned long i = 0; i < pInfo->displayModeDepthBlockInfo->depthBlockCount; ++i)
+    {
 #define pDBI pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthVPBlock
 #define pDBI pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthVPBlock
-                   if (pInfoData->pMode->w == (int&) pInfo->displayModeResolutionInfo->csHorizontalPixels &&
-                       pInfoData->pMode->h == (int&) pInfo->displayModeResolutionInfo->csVerticalLines &&
-                       pInfoData->pMode->bpp == (int) pDBI->vpPixelSize &&
-                       refresh == pInfo->displayModeResolutionInfo->csRefreshRate)
-                       {
-                               memcpy(&pInfoData->sMode, pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthSwitchInfo,
-                                      sizeof(VDSwitchInfoRec));
-                               pInfoData->sMode.csMode = pDBI->vpPixelSize;
-                               pInfoData->bMatched = true;
-                               break;
-                       }
+        if (pInfoData->pMode->w == (int&) pInfo->displayModeResolutionInfo->csHorizontalPixels &&
+            pInfoData->pMode->h == (int&) pInfo->displayModeResolutionInfo->csVerticalLines &&
+            pInfoData->pMode->bpp == (int) pDBI->vpPixelSize &&
+            refresh == pInfo->displayModeResolutionInfo->csRefreshRate)
+        {
+            memcpy(&pInfoData->sMode, pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthSwitchInfo,
+                   sizeof(VDSwitchInfoRec));
+            pInfoData->sMode.csMode = pDBI->vpPixelSize;
+            pInfoData->bMatched = true;
+            break;
+        }
 #undef pDBI
 #undef pDBI
-               }               
+    }
 }
 
 struct DMModeTransRec
 {
 }
 
 struct DMModeTransRec
 {
-       wxVideoMode Mode;
-       const VDSwitchInfoRec* psMode;
-       bool bMatched;
+    wxVideoMode Mode;
+    const VDSwitchInfoRec* psMode;
+    bool bMatched;
 };
 
 };
 
-pascal void DMModeTransProc (  void* pData,
-                                         DMListIndexType nIndex,
-                                         DMDisplayModeListEntryPtr pInfo)
+pascal void DMModeTransProc ( void* pData,
+                              DMListIndexType nIndex,
+                              DMDisplayModeListEntryPtr pInfo)
 {
 {
-       DMModeTransRec* pInfoData = (DMModeTransRec*) pData;
+    DMModeTransRec* pInfoData = (DMModeTransRec*) pData;
 
 
-       for(unsigned long i = 0; i < pInfo->displayModeDepthBlockInfo->depthBlockCount; ++i)
-               {
+    for(unsigned long i = 0; i < pInfo->displayModeDepthBlockInfo->depthBlockCount; ++i)
+    {
 #define pDBI pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthVPBlock
 #define pDBI pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthVPBlock
-               if (pInfoData->psMode->csData == pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthSwitchInfo->csData)
-                       {
-                       pInfoData->Mode = wxVideoMode((int) pInfo->displayModeResolutionInfo->csHorizontalPixels,
-                                                                (int) pInfo->displayModeResolutionInfo->csVerticalLines,
-                                                                (int) pDBI->vpPixelSize,
-                                                                (int) Fix2Long(pInfo->displayModeResolutionInfo->csRefreshRate) );
-                       pInfoData->bMatched = true;
-                       break;
-                       }
+        if (pInfoData->psMode->csData == pInfo->displayModeDepthBlockInfo->depthVPBlock[i].depthSwitchInfo->csData)
+        {
+            pInfoData->Mode = wxVideoMode((int) pInfo->displayModeResolutionInfo->csHorizontalPixels,
+                                          (int) pInfo->displayModeResolutionInfo->csVerticalLines,
+                                          (int) pDBI->vpPixelSize,
+                                          (int) Fix2Long(pInfo->displayModeResolutionInfo->csRefreshRate) );
+            pInfoData->bMatched = true;
+            break;
+        }
 #undef pDBI
 #undef pDBI
-               }
+    }
 }
 
 wxArrayVideoModes
 }
 
 wxArrayVideoModes
@@ -410,41 +410,41 @@ wxArrayVideoModes
     if (dwDMVer >= 0x020000) //version 2?
     {
 
     if (dwDMVer >= 0x020000) //version 2?
     {
 
-       DMListIndexType nNumModes;
-       DMListType pModes;
-       DMDisplayModeListIteratorUPP uppMLI;
-       DisplayIDType nDisplayID;
+        DMListIndexType nNumModes;
+        DMListType pModes;
+        DMDisplayModeListIteratorUPP uppMLI;
+        DisplayIDType nDisplayID;
         OSErr err;
 
         err = DMGetDisplayIDByGDevice(m_priv->m_hndl, &nDisplayID, false);
         OSErr err;
 
         err = DMGetDisplayIDByGDevice(m_priv->m_hndl, &nDisplayID, false);
-       wxASSERT(err == noErr); 
-        
-       //Create a new list...
+        wxASSERT(err == noErr);
+
+        //Create a new list...
         err = DMNewDisplayModeList(nDisplayID, NULL, NULL, &nNumModes, &pModes);
         err = DMNewDisplayModeList(nDisplayID, NULL, NULL, &nNumModes, &pModes);
-       wxASSERT_MSG(err == noErr, wxT("Could not create a new display mode list") );
+        wxASSERT_MSG(err == noErr, wxT("Could not create a new display mode list") );
 
 
-       uppMLI = NewDMDisplayModeListIteratorUPP(DMModeListIteratorProc);
-       wxASSERT(uppMLI);
+        uppMLI = NewDMDisplayModeListIteratorUPP(DMModeListIteratorProc);
+        wxASSERT(uppMLI);
 
 
-       DMModeIteratorRec sModeInfo;
-       sModeInfo.pModes = &Modes;
-       sModeInfo.pMatchMode = &mode;
-       for (DMListIndexType i = 0; i < nNumModes; ++i)
-       {
+        DMModeIteratorRec sModeInfo;
+        sModeInfo.pModes = &Modes;
+        sModeInfo.pMatchMode = &mode;
+        for (DMListIndexType i = 0; i < nNumModes; ++i)
+        {
             err = DMGetIndexedDisplayModeFromList(pModes, i, NULL, uppMLI, &sModeInfo);
             err = DMGetIndexedDisplayModeFromList(pModes, i, NULL, uppMLI, &sModeInfo);
-           wxASSERT(err == noErr);
-       }
-       DisposeDMDisplayModeListIteratorUPP(uppMLI);
-        
+            wxASSERT(err == noErr);
+        }
+        DisposeDMDisplayModeListIteratorUPP(uppMLI);
+
         err = DMDisposeList(pModes);
         err = DMDisposeList(pModes);
-       wxASSERT(err == noErr); 
+        wxASSERT(err == noErr);
     }
     else //DM 1.0, 1.2, 1.x
     {
     }
     else //DM 1.0, 1.2, 1.x
     {
-       wxLogSysError(wxString::Format(wxT("Display Manager Version %u Not Supported!  Present? %s"),
-                               (unsigned int) dwDMVer / 0x10000,
-                               (dwDMVer & (1 << gestaltDisplayMgrPresent) ? wxT("Yes") : wxT("No"))  )
-                    );
+        wxLogSysError(wxString::Format(wxT("Display Manager Version %u Not Supported!  Present? %s"),
+                      (unsigned int) dwDMVer / 0x10000,
+                      (dwDMVer & (1 << gestaltDisplayMgrPresent) ? wxT("Yes") : wxT("No"))  )
+                     );
     }
 
     return Modes;
     }
 
     return Modes;
@@ -454,64 +454,64 @@ wxVideoMode wxDisplay::GetCurrentMode() const
 {
     unsigned long dwDMVer;
     wxVideoMode RetMode;
 {
     unsigned long dwDMVer;
     wxVideoMode RetMode;
-    
-    Gestalt(gestaltDisplayMgrVers, (long*) &dwDMVer);    
+
+    Gestalt(gestaltDisplayMgrVers, (long*) &dwDMVer);
     //Check DM version (for backward compatibility only - 7.5.3+ use 2.0)
     if (dwDMVer >= 0x020000) //version 2?
     {
     //Check DM version (for backward compatibility only - 7.5.3+ use 2.0)
     if (dwDMVer >= 0x020000) //version 2?
     {
-       VDSwitchInfoRec sMode; //Note - csMode member also contains the bit depth
-       if (DMGetDisplayMode(m_priv->m_hndl, &sMode) == noErr) 
-       {
-           DMListIndexType nNumModes;
-           DMListType pModes;
-               DMDisplayModeListIteratorUPP uppMLI;
-           DisplayIDType nDisplayID;
+        VDSwitchInfoRec sMode; //Note - csMode member also contains the bit depth
+        if (DMGetDisplayMode(m_priv->m_hndl, &sMode) == noErr)
+        {
+            DMListIndexType nNumModes;
+            DMListType pModes;
+            DMDisplayModeListIteratorUPP uppMLI;
+            DisplayIDType nDisplayID;
             OSErr err;
 
             err = DMGetDisplayIDByGDevice(m_priv->m_hndl, &nDisplayID, false);
             OSErr err;
 
             err = DMGetDisplayIDByGDevice(m_priv->m_hndl, &nDisplayID, false);
-           wxASSERT(err == noErr);
-            
-           //Create a new list...
+            wxASSERT(err == noErr);
+
+            //Create a new list...
             err = DMNewDisplayModeList(nDisplayID, NULL, NULL, &nNumModes, &pModes);
             err = DMNewDisplayModeList(nDisplayID, NULL, NULL, &nNumModes, &pModes);
-           wxASSERT_MSG(err == noErr, wxT("Could not create a new display mode list") );
-               
-               uppMLI = NewDMDisplayModeListIteratorUPP(DMModeTransProc);
-               wxASSERT(uppMLI);
-
-               DMModeTransRec sModeInfo;
-               sModeInfo.bMatched = false;
-               sModeInfo.psMode = &sMode;
-               for (DMListIndexType i = 0; i < nNumModes; ++i)
-               {
+            wxASSERT_MSG(err == noErr, wxT("Could not create a new display mode list") );
+
+            uppMLI = NewDMDisplayModeListIteratorUPP(DMModeTransProc);
+            wxASSERT(uppMLI);
+
+            DMModeTransRec sModeInfo;
+            sModeInfo.bMatched = false;
+            sModeInfo.psMode = &sMode;
+            for (DMListIndexType i = 0; i < nNumModes; ++i)
+            {
                 err = DMGetIndexedDisplayModeFromList(pModes, i, NULL, uppMLI, &sModeInfo);
                 err = DMGetIndexedDisplayModeFromList(pModes, i, NULL, uppMLI, &sModeInfo);
-                       wxASSERT(err == noErr);
+                wxASSERT(err == noErr);
 
 
-                       if ( sModeInfo.bMatched == true )
-                       {
-                               RetMode = sModeInfo.Mode;
-                               break;
-                       }
-               }
+                if ( sModeInfo.bMatched )
+                {
+                    RetMode = sModeInfo.Mode;
+                    break;
+                }
+            }
+
+            DisposeDMDisplayModeListIteratorUPP(uppMLI);
 
 
-           DisposeDMDisplayModeListIteratorUPP(uppMLI);
-            
             err = DMDisposeList(pModes);
             err = DMDisposeList(pModes);
-           wxASSERT(err == noErr);
-       }
-       else //Can't get current mode?
-       {
-               wxLogSysError(wxString::Format(wxT("Couldn't obtain current display mode!!!\ndwDMVer:%u"),
-                                                               (unsigned int) dwDMVer));
-       }
+            wxASSERT(err == noErr);
+        }
+        else //Can't get current mode?
+        {
+            wxLogSysError(wxString::Format(wxT("Couldn't obtain current display mode!!!\ndwDMVer:%u"),
+                                           (unsigned int) dwDMVer));
+        }
     }
     else //DM ver 1
     {
     }
     else //DM ver 1
     {
-       wxLogSysError(wxString::Format(wxT("Display Manager Version %u Not Supported!  Present? %s"),
-                               (unsigned int) dwDMVer / 0x10000,
-                               (dwDMVer & (1 << gestaltDisplayMgrPresent) ? wxT("Yes") : wxT("No")) )
-                    );
+        wxLogSysError(wxString::Format(wxT("Display Manager Version %u Not Supported!  Present? %s"),
+                      (unsigned int) dwDMVer / 0x10000,
+                      (dwDMVer & (1 << gestaltDisplayMgrPresent) ? wxT("Yes") : wxT("No")) )
+                     );
     }
     }
-        
+
     return RetMode;
 }
 
     return RetMode;
 }
 
@@ -521,103 +521,103 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode)
     Gestalt(gestaltDisplayMgrVers, (long*)&dwDMVer);
     if (GetCount() == 1 || dwDMVer >= 0x020000)
     {
     Gestalt(gestaltDisplayMgrVers, (long*)&dwDMVer);
     if (GetCount() == 1 || dwDMVer >= 0x020000)
     {
-               if (mode == wxDefaultVideoMode)
-               {
+        if (mode == wxDefaultVideoMode)
+        {
 //#ifndef __DARWIN__
 //#ifndef __DARWIN__
-//                     Handle hDisplayState;
-//                     if (DMBeginConfigureDisplays(&hDisplayState) != noErr)
-//                             {
-//                             wxLogSysError(wxT("Could not lock display for display mode changing!"));
-//                             return false;
-//                             }
-//                     wxASSERT( DMUseScreenPrefs(true, hDisplayState) == noErr);
-//                     DMEndConfigureDisplays(hDisplayState);
-//                     return true;
+//            Handle hDisplayState;
+//            if (DMBeginConfigureDisplays(&hDisplayState) != noErr)
+//            {
+//                wxLogSysError(wxT("Could not lock display for display mode changing!"));
+//                return false;
+//            }
+//            wxASSERT( DMUseScreenPrefs(true, hDisplayState) == noErr);
+//            DMEndConfigureDisplays(hDisplayState);
+//            return true;
 //#else
 //#else
-                       //hmmmmm....
-                       return true;
+             //hmmmmm....
+             return true;
 //#endif
 //#endif
-               }
-               
-       //0 & NULL for params 2 & 3 of DMSetVideoMode signal it to use defaults (current mode)
-       //DM 2.0+ doesn't use params 2 & 3 of DMSetDisplayMode
-       //so we have to use this icky structure
-       VDSwitchInfoRec sMode;
-       memset(&sMode, 0, sizeof(VDSwitchInfoRec) );
-
-       DMListIndexType nNumModes;
-       DMListType pModes;
-       DMDisplayModeListIteratorUPP uppMLI;
-       DisplayIDType nDisplayID;
+        }
+
+        //0 & NULL for params 2 & 3 of DMSetVideoMode signal it to use defaults (current mode)
+        //DM 2.0+ doesn't use params 2 & 3 of DMSetDisplayMode
+        //so we have to use this icky structure
+        VDSwitchInfoRec sMode;
+        memset(&sMode, 0, sizeof(VDSwitchInfoRec) );
+
+        DMListIndexType nNumModes;
+        DMListType pModes;
+        DMDisplayModeListIteratorUPP uppMLI;
+        DisplayIDType nDisplayID;
         OSErr err;
 
         err = DMGetDisplayIDByGDevice(m_priv->m_hndl, &nDisplayID, false);
         OSErr err;
 
         err = DMGetDisplayIDByGDevice(m_priv->m_hndl, &nDisplayID, false);
-       wxASSERT(err == noErr);
-        
-       //Create a new list...
+        wxASSERT(err == noErr);
+
+        //Create a new list...
         err = DMNewDisplayModeList(nDisplayID, NULL, NULL, &nNumModes, &pModes);
         err = DMNewDisplayModeList(nDisplayID, NULL, NULL, &nNumModes, &pModes);
-       wxASSERT_MSG(err == noErr, wxT("Could not create a new display mode list") );
+        wxASSERT_MSG(err == noErr, wxT("Could not create a new display mode list") );
 
 
-       uppMLI = NewDMDisplayModeListIteratorUPP(DMModeInfoProc);
-       wxASSERT(uppMLI);
+        uppMLI = NewDMDisplayModeListIteratorUPP(DMModeInfoProc);
+        wxASSERT(uppMLI);
 
 
-       DMModeInfoRec sModeInfo;
-       sModeInfo.bMatched = false;
-       sModeInfo.pMode = &mode;
-       unsigned int i;
-       for(i = 0; i < nNumModes; ++i)
-       {
+        DMModeInfoRec sModeInfo;
+        sModeInfo.bMatched = false;
+        sModeInfo.pMode = &mode;
+        unsigned int i;
+        for(i = 0; i < nNumModes; ++i)
+        {
             err = DMGetIndexedDisplayModeFromList(pModes, i, NULL, uppMLI, &sModeInfo);
             err = DMGetIndexedDisplayModeFromList(pModes, i, NULL, uppMLI, &sModeInfo);
-               wxASSERT(err == noErr);
-            
-               if (sModeInfo.bMatched == true)
-               {
-                       sMode = sModeInfo.sMode;
-                       break;
-               }
-       }
-       if(i == nNumModes)
-               return false;
-
-       DisposeDMDisplayModeListIteratorUPP(uppMLI);
-       
+            wxASSERT(err == noErr);
+
+            if (sModeInfo.bMatched)
+            {
+                sMode = sModeInfo.sMode;
+                break;
+            }
+        }
+        if(i == nNumModes)
+            return false;
+
+        DisposeDMDisplayModeListIteratorUPP(uppMLI);
+
         err = DMDisposeList(pModes);
         wxASSERT(err == noErr);
 
         err = DMDisposeList(pModes);
         wxASSERT(err == noErr);
 
-       // For the really paranoid -
-       //          unsigned long flags;
-       //      Boolean bok;
-       //     wxASSERT(noErr == DMCheckDisplayMode(m_priv->m_hndl, sMode.csData,
-       //                                                                sMode.csMode, &flags, NULL, &bok));
-       //     wxASSERT(bok);
-
-       Handle hDisplayState;
-       if (DMBeginConfigureDisplays(&hDisplayState) != noErr)
-       {
-           wxLogSysError(wxT("Could not lock display for display mode changing!"));
-           return false;
-       }
-
-       unsigned long dwBPP = (unsigned long) mode.bpp;
-       if (DMSetDisplayMode(m_priv->m_hndl, sMode.csData,
-                                           (unsigned long*) &(dwBPP), NULL
-                                          //(unsigned long) &sMode
-                                          , hDisplayState
-                                          )  != noErr)
-       {
-               DMEndConfigureDisplays(hDisplayState);
-               wxMessageBox(wxString::Format(wxT("Could not set the display mode")));
+        // For the really paranoid -
+        //     unsigned long flags;
+        //      Boolean bok;
+        //     wxASSERT(noErr == DMCheckDisplayMode(m_priv->m_hndl, sMode.csData,
+        //                                          sMode.csMode, &flags, NULL, &bok));
+        //     wxASSERT(bok);
+
+        Handle hDisplayState;
+        if (DMBeginConfigureDisplays(&hDisplayState) != noErr)
+        {
+            wxLogSysError(wxT("Could not lock display for display mode changing!"));
+            return false;
+        }
+
+        unsigned long dwBPP = (unsigned long) mode.bpp;
+        if (DMSetDisplayMode(m_priv->m_hndl, sMode.csData,
+                             (unsigned long*) &(dwBPP), NULL
+                             //(unsigned long) &sMode
+                             , hDisplayState
+                            )  != noErr)
+        {
+            DMEndConfigureDisplays(hDisplayState);
+            wxMessageBox(wxString::Format(wxT("Could not set the display mode")));
             return false;
             return false;
-       }
-       DMEndConfigureDisplays(hDisplayState);
+        }
+        DMEndConfigureDisplays(hDisplayState);
     }
     else  //DM 1.0, 1.2, 1.x
     {
     }
     else  //DM 1.0, 1.2, 1.x
     {
-       wxLogSysError(wxString::Format(wxT("Monitor gravitation not supported yet.  dwDMVer:%u"),
-                               (unsigned int) dwDMVer));
-               return false;
+        wxLogSysError(wxString::Format(wxT("Monitor gravitation not supported yet.  dwDMVer:%u"),
+                      (unsigned int) dwDMVer));
+        return false;
     }
     }
-    
+
     return true;
 }
 
     return true;
 }
 
index 7a1dd947f75e4c81305e231d6ab1e39a3acdfd27..7bfdb8b1fbc3324e224b4b0673e1c94542900eab 100644 (file)
 // control - i.e. native positioning and event handling etc..
 //---------------------------------------------------------------------------
 #ifndef wxUSE_CREATEMOVIECONTROL
 // control - i.e. native positioning and event handling etc..
 //---------------------------------------------------------------------------
 #ifndef wxUSE_CREATEMOVIECONTROL
-#      if defined( __WXMAC_OSX__ ) && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
-#              define wxUSE_CREATEMOVIECONTROL 1
-#      else
-#              define wxUSE_CREATEMOVIECONTROL 0
-#      endif
+#    if defined( __WXMAC_OSX__ ) && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 )
+#        define wxUSE_CREATEMOVIECONTROL 1
+#    else
+#        define wxUSE_CREATEMOVIECONTROL 0
+#    endif
 #endif
 
 //===========================================================================
 #endif
 
 //===========================================================================
@@ -87,11 +87,11 @@ public:
     wxQTMediaBackend();
     ~wxQTMediaBackend();
 
     wxQTMediaBackend();
     ~wxQTMediaBackend();
 
-    virtual bool CreateControl(wxControl* ctrl, wxWindow* parent, 
+    virtual bool CreateControl(wxControl* ctrl, wxWindow* parent,
                                      wxWindowID id,
                                      wxWindowID id,
-                                     const wxPoint& pos, 
+                                     const wxPoint& pos,
                                      const wxSize& size,
                                      const wxSize& size,
-                                     long style, 
+                                     long style,
                                      const wxValidator& validator,
                                      const wxString& name);
 
                                      const wxValidator& validator,
                                      const wxString& name);
 
@@ -127,14 +127,14 @@ public:
     bool m_bVideo;                  //Whether or not we have video
     class _wxQTTimer* m_timer;      //Timer for streaming the movie
 
     bool m_bVideo;                  //Whether or not we have video
     class _wxQTTimer* m_timer;      //Timer for streaming the movie
 
-    DECLARE_DYNAMIC_CLASS(wxQTMediaBackend);
+    DECLARE_DYNAMIC_CLASS(wxQTMediaBackend)
 };
 
 
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 //
 // wxQTMediaBackend
 };
 
 
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 //
 // wxQTMediaBackend
-// 
+//
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend);
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend);
@@ -173,10 +173,10 @@ public:
         if (!m_bPaused)
         {
             if(!IsMovieDone(m_movie))
         if (!m_bPaused)
         {
             if(!IsMovieDone(m_movie))
-                MoviesTask(m_movie, MOVIE_DELAY); 
+                MoviesTask(m_movie, MOVIE_DELAY);
             else
             {
             else
             {
-                wxMediaEvent theEvent(wxEVT_MEDIA_STOP, 
+                wxMediaEvent theEvent(wxEVT_MEDIA_STOP,
                                       m_parent->m_ctrl->GetId());
                 m_parent->m_ctrl->ProcessEvent(theEvent);
 
                                       m_parent->m_ctrl->GetId());
                 m_parent->m_ctrl->ProcessEvent(theEvent);
 
@@ -187,7 +187,7 @@ public:
                     wxASSERT(::GetMoviesError() == noErr);
 
                     //send the event to our child
                     wxASSERT(::GetMoviesError() == noErr);
 
                     //send the event to our child
-                    wxMediaEvent theEvent(wxEVT_MEDIA_FINISHED, 
+                    wxMediaEvent theEvent(wxEVT_MEDIA_FINISHED,
                                           m_parent->m_ctrl->GetId());
                     m_parent->m_ctrl->ProcessEvent(theEvent);
                 }
                                           m_parent->m_ctrl->GetId());
                     m_parent->m_ctrl->ProcessEvent(theEvent);
                 }
@@ -234,16 +234,16 @@ wxQTMediaBackend::~wxQTMediaBackend()
 // 1) Intializes QuickTime
 // 2) Creates the control window
 //---------------------------------------------------------------------------
 // 1) Intializes QuickTime
 // 2) Creates the control window
 //---------------------------------------------------------------------------
-bool wxQTMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, 
+bool wxQTMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
                                      wxWindowID id,
                                      wxWindowID id,
-                                     const wxPoint& pos, 
+                                     const wxPoint& pos,
                                      const wxSize& size,
                                      const wxSize& size,
-                                     long style, 
+                                     long style,
                                      const wxValidator& validator,
                                      const wxString& name)
 {
     //Don't bother in Native control mode
                                      const wxValidator& validator,
                                      const wxString& name)
 {
     //Don't bother in Native control mode
-#if defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2 )    
+#if defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2 )
     if (!_wxIsQuickTime4Installed())
         return false;
 #endif
     if (!_wxIsQuickTime4Installed())
         return false;
 #endif
@@ -259,16 +259,16 @@ bool wxQTMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
     // backends, we don't need wxCLIP_CHILDREN
     //
     if ( !
     // backends, we don't need wxCLIP_CHILDREN
     //
     if ( !
-    
-#if wxUSE_CREATEMOVIECONTROL    
+
+#if wxUSE_CREATEMOVIECONTROL
     ctrl->wxWindow::Create(parent, id, pos, size,
     ctrl->wxWindow::Create(parent, id, pos, size,
-                            m_ctrl->MacRemoveBordersFromStyle(style),
+                            wxWindow::MacRemoveBordersFromStyle(style),
                             name)
 #else
     ctrl->wxControl::Create(parent, id, pos, size,
                             name)
 #else
     ctrl->wxControl::Create(parent, id, pos, size,
-                            m_ctrl->MacRemoveBordersFromStyle(style),
+                            wxWindow::MacRemoveBordersFromStyle(style),
                             validator, name)
                             validator, name)
-#endif                            
+#endif
         )
         return false;
 
         )
         return false;
 
@@ -297,15 +297,15 @@ bool wxQTMediaBackend::Load(const wxString& fileName)
     OSErr err = noErr;
     short movieResFile;
     FSSpec sfFile;
     OSErr err = noErr;
     short movieResFile;
     FSSpec sfFile;
-    
-    //FIXME:wxMacFilename2FSSpec crashes on empty string - 
+
+    //FIXME:wxMacFilename2FSSpec crashes on empty string -
     //does it crash on other strings too and should this
     //"fix" be put in the carbon wxSound?
     if (fileName.empty())
         return false;
     //does it crash on other strings too and should this
     //"fix" be put in the carbon wxSound?
     if (fileName.empty())
         return false;
-    
+
     wxMacFilename2FSSpec( fileName , &sfFile );
     wxMacFilename2FSSpec( fileName , &sfFile );
-    
+
     if (OpenMovieFile (&sfFile, &movieResFile, fsRdPerm) != noErr)
         return false;
 
     if (OpenMovieFile (&sfFile, &movieResFile, fsRdPerm) != noErr)
         return false;
 
@@ -356,8 +356,8 @@ bool wxQTMediaBackend::Load(const wxURI& location)
     BlockMove(theURI.mb_str(), *theHandle, theURI.length() + 1);
 
     //create the movie from the handle that refers to the URI
     BlockMove(theURI.mb_str(), *theHandle, theURI.length() + 1);
 
     //create the movie from the handle that refers to the URI
-    err = NewMovieFromDataRef(&m_movie, newMovieActive, 
-                                NULL, theHandle, 
+    err = NewMovieFromDataRef(&m_movie, newMovieActive,
+                                NULL, theHandle,
                                 URLDataHandlerSubType);
 
     DisposeHandle(theHandle);
                                 URLDataHandlerSubType);
 
     DisposeHandle(theHandle);
@@ -405,26 +405,26 @@ void wxQTMediaBackend::FinishLoad()
     m_bestSize.y = outRect.bottom - outRect.top;
 
     //reparent movie/*AudioMediaCharacteristic*/
     m_bestSize.y = outRect.bottom - outRect.top;
 
     //reparent movie/*AudioMediaCharacteristic*/
-    if(GetMovieIndTrackType(m_movie, 1, 
-                            VisualMediaCharacteristic, 
-                            movieTrackCharacteristic | 
+    if(GetMovieIndTrackType(m_movie, 1,
+                            VisualMediaCharacteristic,
+                            movieTrackCharacteristic |
                                 movieTrackEnabledOnly) != NULL)
                                 movieTrackEnabledOnly) != NULL)
-    {        
-#if wxUSE_CREATEMOVIECONTROL    
+    {
+#if wxUSE_CREATEMOVIECONTROL
     //
     //Native CreateMovieControl QT control (Thanks to Kevin Olliver's
     //wxQTMovie for some of this).
     //
     #define GetControlPeer(whatever) ctrl->m_peer
     wxMediaCtrl* ctrl = (wxMediaCtrl*) m_ctrl;
     //
     //Native CreateMovieControl QT control (Thanks to Kevin Olliver's
     //wxQTMovie for some of this).
     //
     #define GetControlPeer(whatever) ctrl->m_peer
     wxMediaCtrl* ctrl = (wxMediaCtrl*) m_ctrl;
-        Rect bounds = wxMacGetBoundsForControl(m_ctrl, 
+        Rect bounds = wxMacGetBoundsForControl(m_ctrl,
                                                m_ctrl->GetPosition(),
                                                m_ctrl->GetSize());
                                                m_ctrl->GetPosition(),
                                                m_ctrl->GetSize());
-                                               
+
     //Dispose of old control for new one
     if (GetControlPeer(m_ctrl) && GetControlPeer(m_ctrl)->Ok() )
         GetControlPeer(m_ctrl)->Dispose();
     //Dispose of old control for new one
     if (GetControlPeer(m_ctrl) && GetControlPeer(m_ctrl)->Ok() )
         GetControlPeer(m_ctrl)->Dispose();
-        
+
     //Options-
     //kMovieControlOptionXXX
     //HideController - hide the movie controller
     //Options-
     //kMovieControlOptionXXX
     //HideController - hide the movie controller
@@ -433,29 +433,29 @@ void wxQTMediaBackend::FinishLoad()
     //HandleEditingHI- Installs event stuff for edit menu - forces EnableEditing also
     //SetKeysEnabled - Allows keyboard input
     //ManuallyIdled - app handles movie idling rather than internal timer event loop
     //HandleEditingHI- Installs event stuff for edit menu - forces EnableEditing also
     //SetKeysEnabled - Allows keyboard input
     //ManuallyIdled - app handles movie idling rather than internal timer event loop
-        ::CreateMovieControl( 
+        ::CreateMovieControl(
                     (WindowRef)
                     (WindowRef)
-                       ctrl->MacGetTopLevelWindowRef(),        //parent
-                       &bounds,                                                        //control bounds
-                       m_movie,                                                                //movie handle
-                       kMovieControlOptionHideController 
-                       | kMovieControlOptionLocateTopLeft  
-                       | kMovieControlOptionSetKeysEnabled 
+                       ctrl->MacGetTopLevelWindowRef(), //parent
+                       &bounds,                         //control bounds
+                       m_movie,                         //movie handle
+                       kMovieControlOptionHideController
+                       | kMovieControlOptionLocateTopLeft
+                       | kMovieControlOptionSetKeysEnabled
 //                       | kMovieControlOptionManuallyIdled
 //                       | kMovieControlOptionManuallyIdled
-                       ,                                                                       //flags
+                       ,                                //flags
                        ctrl->m_peer->GetControlRefAddr() );
                        ctrl->m_peer->GetControlRefAddr() );
-                       
+
         ::EmbedControl(ctrl->m_peer->GetControlRef(), (ControlRef)ctrl->GetParent()->GetHandle());
 #else
     //
     //"Emulation"
     //
         ::EmbedControl(ctrl->m_peer->GetControlRef(), (ControlRef)ctrl->GetParent()->GetHandle());
 #else
     //
     //"Emulation"
     //
-        SetMovieGWorld(m_movie, 
-                       (CGrafPtr) 
+        SetMovieGWorld(m_movie,
+                       (CGrafPtr)
                        GetWindowPort(
                        (WindowRef)
                        m_ctrl->MacGetTopLevelWindowRef()
                        GetWindowPort(
                        (WindowRef)
                        m_ctrl->MacGetTopLevelWindowRef()
-                       ), 
+                       ),
                        nil);
 #endif
     }
                        nil);
 #endif
     }
@@ -518,7 +518,7 @@ bool wxQTMediaBackend::Stop()
     ::StopMovie(m_movie);
     if(::GetMoviesError() != noErr)
         return false;
     ::StopMovie(m_movie);
     if(::GetMoviesError() != noErr)
         return false;
-    
+
     ::GoToBeginningOfMovie(m_movie);
     return ::GetMoviesError() == noErr;
 }
     ::GoToBeginningOfMovie(m_movie);
     return ::GetMoviesError() == noErr;
 }
@@ -593,11 +593,11 @@ wxLongLong wxQTMediaBackend::GetDuration()
 //---------------------------------------------------------------------------
 wxMediaState wxQTMediaBackend::GetState()
 {
 //---------------------------------------------------------------------------
 wxMediaState wxQTMediaBackend::GetState()
 {
-    if ( !m_timer || (m_timer->IsRunning() == false && 
+    if ( !m_timer || (m_timer->IsRunning() == false &&
                       m_timer->GetPaused() == false) )
         return wxMEDIASTATE_STOPPED;
 
                       m_timer->GetPaused() == false) )
         return wxMEDIASTATE_STOPPED;
 
-    if( m_timer->IsRunning() == true )
+    if( m_timer->IsRunning() )
         return wxMEDIASTATE_PLAYING;
     else
         return wxMEDIASTATE_PAUSED;
         return wxMEDIASTATE_PLAYING;
     else
         return wxMEDIASTATE_PAUSED;
@@ -613,8 +613,8 @@ void wxQTMediaBackend::Cleanup()
 {
     delete m_timer;
     m_timer = NULL;
 {
     delete m_timer;
     m_timer = NULL;
-    
-#if wxUSE_CREATEMOVIECONTROL    
+
+#if wxUSE_CREATEMOVIECONTROL
     DisposeControl(((wxMediaCtrl*)m_ctrl)->m_peer->GetControlRef());
 #endif
 
     DisposeControl(((wxMediaCtrl*)m_ctrl)->m_peer->GetControlRef());
 #endif
 
@@ -635,19 +635,19 @@ wxSize wxQTMediaBackend::GetVideoSize() const
 //---------------------------------------------------------------------------
 // wxQTMediaBackend::Move
 //
 //---------------------------------------------------------------------------
 // wxQTMediaBackend::Move
 //
-// We need to do this even when using native qt control because 
+// We need to do this even when using native qt control because
 // CreateMovieControl is broken in this regard...
 //---------------------------------------------------------------------------
 void wxQTMediaBackend::Move(int x, int y, int w, int h)
 {
 // CreateMovieControl is broken in this regard...
 //---------------------------------------------------------------------------
 void wxQTMediaBackend::Move(int x, int y, int w, int h)
 {
-#if !wxUSE_CREATEMOVIECONTROL    
+#if !wxUSE_CREATEMOVIECONTROL
     if(m_timer)
     {
         if ( m_ctrl )
         {
             m_ctrl->GetParent()->MacWindowToRootWindow(&x, &y);
         }
     if(m_timer)
     {
         if ( m_ctrl )
         {
             m_ctrl->GetParent()->MacWindowToRootWindow(&x, &y);
         }
-        
+
         Rect theRect = {y, x, y+h, x+w};
 
         ::SetMovieBox(m_movie, &theRect);
         Rect theRect = {y, x, y+h, x+w};
 
         ::SetMovieBox(m_movie, &theRect);
index 5516810999446ec809db52a26c5e0482ea98ce4c..0ff7a6c09d2414b2bd8f147ab350491fcecfde95 100644 (file)
@@ -906,7 +906,7 @@ public:
     bool Exists(CFTypeRef cftKey) const
     {
         wxASSERT(IsValid());
     bool Exists(CFTypeRef cftKey) const
     {
         wxASSERT(IsValid());
-        return CFDictionaryContainsKey((CFDictionaryRef)m_cfmdRef, cftKey) == true;
+        return CFDictionaryContainsKey((CFDictionaryRef)m_cfmdRef, cftKey);
     }
 
     bool IsOk() const {return m_cfmdRef != NULL; }
     }
 
     bool IsOk() const {return m_cfmdRef != NULL; }
@@ -1359,9 +1359,9 @@ void wxCFDictionary::MakeValidXML()
                 cfdCurrent.MakeValidXML();
                 Set(pKeys[i], cfdCurrent);
             }
                 cfdCurrent.MakeValidXML();
                 Set(pKeys[i], cfdCurrent);
             }
-            else if( ( CFGetTypeID(cfRef) == CFStringGetTypeID() ||
-                       CFGetTypeID(cfRef) == CFNumberGetTypeID() ||
-                       CFGetTypeID(cfRef) == CFBooleanGetTypeID() ) == false )
+            else if ( CFGetTypeID(cfRef) != CFStringGetTypeID() &&
+                      CFGetTypeID(cfRef) != CFNumberGetTypeID() &&
+                      CFGetTypeID(cfRef) != CFBooleanGetTypeID() )
             {
                 Remove(pKeys[i]);
                 --i;
             {
                 Remove(pKeys[i]);
                 --i;
@@ -1406,9 +1406,9 @@ void wxCFArray::MakeValidXML()
                 cfdCurrent.MakeValidXML();
                 Set(i, cfdCurrent);
             }
                 cfdCurrent.MakeValidXML();
                 Set(i, cfdCurrent);
             }
-            else if( ( CFGetTypeID(cfRef) == CFStringGetTypeID() ||
-                       CFGetTypeID(cfRef) == CFNumberGetTypeID() ||
-                       CFGetTypeID(cfRef) == CFBooleanGetTypeID() ) == false )
+            else if ( CFGetTypeID(cfRef) != CFStringGetTypeID() &&
+                      CFGetTypeID(cfRef) != CFNumberGetTypeID() &&
+                      CFGetTypeID(cfRef) != CFBooleanGetTypeID() )
             {
                 Remove(i);
                 --i;
             {
                 Remove(i);
                 --i;
@@ -2006,4 +2006,4 @@ wxMimeTypesManagerImpl::Unassociate(wxFileType *pFileType)
                             CFWriteStreamClose(cfwsInfo);
 
 */
                             CFWriteStreamClose(cfwsInfo);
 
 */
-#endif //wxUSE_MIMETYPE
\ No newline at end of file
+#endif //wxUSE_MIMETYPE
index f7a1a01fd847063bb1d7ad221963fcce229ea505..185020da1e01d99d9321aea9db9652aa96000fe4 100644 (file)
@@ -32,7 +32,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxEvtHandler)
 
 #if wxMAC_USE_CARBON_TIMER
 
 
 #if wxMAC_USE_CARBON_TIMER
 
-typedef struct MacTimerInfo
+struct MacTimerInfo
 {
     wxTimer* m_timer ;
     EventLoopTimerUPP m_proc ;
 {
     wxTimer* m_timer ;
     EventLoopTimerUPP m_proc ;
@@ -44,9 +44,9 @@ static pascal void wxProcessTimer( EventLoopTimerRef theTimer , void *data )
 {
     if ( !data )
         return ;
 {
     if ( !data )
         return ;
-        
+
     wxTimer* timer = (wxTimer*) data ;
     wxTimer* timer = (wxTimer*) data ;
-    
+
     if ( timer->IsOneShot() )
         timer->Stop() ;
 
     if ( timer->IsOneShot() )
         timer->Stop() ;
 
@@ -61,7 +61,7 @@ void wxTimer::Init()
     m_info->m_timerRef = kInvalidID ;
 }
 
     m_info->m_timerRef = kInvalidID ;
 }
 
-bool wxTimer::IsRunning() const 
+bool wxTimer::IsRunning() const
 {
     return ( m_info->m_timerRef != kInvalidID ) ;
 }
 {
     return ( m_info->m_timerRef != kInvalidID ) ;
 }
@@ -79,8 +79,8 @@ bool wxTimer::Start(int milliseconds,bool mode)
 {
     (void)wxTimerBase::Start(milliseconds, mode);
 
 {
     (void)wxTimerBase::Start(milliseconds, mode);
 
-    wxCHECK_MSG( m_milli > 0, FALSE, wxT("invalid value for timer timeout") );
-    wxCHECK_MSG( m_info->m_timerRef == NULL , FALSE, wxT("attempting to restart a timer") );
+    wxCHECK_MSG( m_milli > 0, false, wxT("invalid value for timer timeout") );
+    wxCHECK_MSG( m_info->m_timerRef == NULL , false, wxT("attempting to restart a timer") );
 
     m_info->m_timer = this ;
     m_info->m_proc = NewEventLoopTimerUPP( &wxProcessTimer);
 
     m_info->m_timer = this ;
     m_info->m_proc = NewEventLoopTimerUPP( &wxProcessTimer);
@@ -91,13 +91,13 @@ bool wxTimer::Start(int milliseconds,bool mode)
         m_info->m_proc,
         this,
         &m_info->m_timerRef) ) ;
         m_info->m_proc,
         this,
         &m_info->m_timerRef) ) ;
-    return TRUE;
+    return true;
 }
 
 void wxTimer::Stop()
 {
     if (m_info->m_timerRef)
 }
 
 void wxTimer::Stop()
 {
     if (m_info->m_timerRef)
-        RemoveEventLoopTimer( m_info->m_timerRef ) ; 
+        RemoveEventLoopTimer( m_info->m_timerRef ) ;
     if (m_info->m_proc)
         DisposeEventLoopTimerUPP(m_info->m_proc) ;
     m_info->m_proc = NULL ;
     if (m_info->m_proc)
         DisposeEventLoopTimerUPP(m_info->m_proc) ;
     m_info->m_proc = NULL ;
@@ -122,7 +122,7 @@ static pascal void MacTimerProc( TMTask * t )
 }
 
 // we need this array to track timers that are being deleted within the Notify procedure
 }
 
 // we need this array to track timers that are being deleted within the Notify procedure
-// adding the timer before the Notify call and checking after whether it still is in there 
+// adding the timer before the Notify call and checking after whether it still is in there
 // as the destructor would have removed it from the array
 
 wxArrayPtrVoid gTimersInProcess ;
 // as the destructor would have removed it from the array
 
 wxArrayPtrVoid gTimersInProcess ;
@@ -131,27 +131,27 @@ static void wxProcessTimer( unsigned long event , void *data )
 {
     if ( !data )
         return ;
 {
     if ( !data )
         return ;
-        
+
     wxTimer* timer = (wxTimer*) data ;
     wxTimer* timer = (wxTimer*) data ;
-    
+
     if ( timer->IsOneShot() )
         timer->Stop() ;
     if ( timer->IsOneShot() )
         timer->Stop() ;
-        
+
     gTimersInProcess.Add( timer ) ;
     gTimersInProcess.Add( timer ) ;
-     
+
     timer->Notify();
 
     int index = gTimersInProcess.Index( timer ) ;
     timer->Notify();
 
     int index = gTimersInProcess.Index( timer ) ;
-    
+
     if ( index != wxNOT_FOUND )
     {
         gTimersInProcess.RemoveAt( index ) ;
     if ( index != wxNOT_FOUND )
     {
         gTimersInProcess.RemoveAt( index ) ;
-        
+
         if ( !timer->IsOneShot() && timer->m_info->m_task.tmAddr )
         {
             PrimeTime( (QElemPtr)  &timer->m_info->m_task , timer->GetInterval() ) ;
         }
         if ( !timer->IsOneShot() && timer->m_info->m_task.tmAddr )
         {
             PrimeTime( (QElemPtr)  &timer->m_info->m_task , timer->GetInterval() ) ;
         }
-    
+
     }
 }
 
     }
 }
 
@@ -166,7 +166,7 @@ void wxTimer::Init()
     m_info->m_timer = this ;
 }
 
     m_info->m_timer = this ;
 }
 
-bool wxTimer::IsRunning() const 
+bool wxTimer::IsRunning() const
 {
     // as the qType may already indicate it is elapsed, but it
     // was not handled internally yet
 {
     // as the qType may already indicate it is elapsed, but it
     // was not handled internally yet
@@ -182,15 +182,15 @@ wxTimer::~wxTimer()
     }
     int index = gTimersInProcess.Index( this ) ;
     if ( index != wxNOT_FOUND )
     }
     int index = gTimersInProcess.Index( this ) ;
     if ( index != wxNOT_FOUND )
-        gTimersInProcess.RemoveAt( index ) ;  
+        gTimersInProcess.RemoveAt( index ) ;
 }
 
 bool wxTimer::Start(int milliseconds,bool mode)
 {
     (void)wxTimerBase::Start(milliseconds, mode);
 
 }
 
 bool wxTimer::Start(int milliseconds,bool mode)
 {
     (void)wxTimerBase::Start(milliseconds, mode);
 
-    wxCHECK_MSG( m_milli > 0, FALSE, wxT("invalid value for timer timeout") );
-    wxCHECK_MSG( m_info->m_task.tmAddr == NULL , FALSE, wxT("attempting to restart a timer") );
+    wxCHECK_MSG( m_milli > 0, false, wxT("invalid value for timer timeout") );
+    wxCHECK_MSG( m_info->m_task.tmAddr == NULL , false, wxT("attempting to restart a timer") );
 
     m_info->m_task.tmAddr = NewTimerUPP( MacTimerProc ) ;
     m_info->m_task.tmWakeUp = 0 ;
 
     m_info->m_task.tmAddr = NewTimerUPP( MacTimerProc ) ;
     m_info->m_task.tmWakeUp = 0 ;
@@ -199,7 +199,7 @@ bool wxTimer::Start(int milliseconds,bool mode)
     m_info->m_timer = this ;
     InsXTime((QElemPtr) &m_info->m_task ) ;
     PrimeTime( (QElemPtr) &m_info->m_task , m_milli ) ;
     m_info->m_timer = this ;
     InsXTime((QElemPtr) &m_info->m_task ) ;
     PrimeTime( (QElemPtr) &m_info->m_task , m_milli ) ;
-    return TRUE;
+    return true;
 }
 
 void wxTimer::Stop()
 }
 
 void wxTimer::Stop()
index b7f1899e08d6556940b6d220934ed16be08ceb42..6622d42bd1f22c0cbc189dea666115e80ac8bf50 100644 (file)
@@ -115,9 +115,9 @@ void wxFrame::Init()
 
     //// Motif-specific
     m_frameShell = (WXWidget) NULL;
 
     //// Motif-specific
     m_frameShell = (WXWidget) NULL;
-    m_mainWidget = (WXWidget) NULL;;
-    m_workArea = (WXWidget) NULL;;
-    m_clientArea = (WXWidget) NULL;;
+    m_mainWidget = (WXWidget) NULL;
+    m_workArea = (WXWidget) NULL;
+    m_clientArea = (WXWidget) NULL;
 }
 
 bool wxFrame::Create(wxWindow *parent,
 }
 
 bool wxFrame::Create(wxWindow *parent,
@@ -132,7 +132,7 @@ bool wxFrame::Create(wxWindow *parent,
                                    name ) )
         return false;
 
                                    name ) )
         return false;
 
-    m_backgroundColour = 
+    m_backgroundColour =
         wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
     m_foregroundColour = *wxBLACK;
     m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
         wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
     m_foregroundColour = *wxBLACK;
     m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
@@ -358,7 +358,7 @@ void wxFrame::DoGetClientSize(int *x, int *y) const
 
 //CE found a call here with NULL y pointer
     if (x)
 
 //CE found a call here with NULL y pointer
     if (x)
-        *x = xx; 
+        *x = xx;
     if (y)
         *y = yy;
 }
     if (y)
         *y = yy;
 }
index f4681af5eafde14da03c3f8a05cf841152c7fc9d..e41a8cf1974d437ebafdeb74f59762905e266818 100644 (file)
@@ -324,7 +324,7 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon)
             unsigned char* pixels = dib.GetData();
             for (int idx=0; idx<w*h*4; idx+=4)
             {
             unsigned char* pixels = dib.GetData();
             for (int idx=0; idx<w*h*4; idx+=4)
             {
-                if (pixels[idx+3] != 0) 
+                if (pixels[idx+3] != 0)
                 {
                     // If there is an alpha byte that is non-zero then set the
                     // alpha flag and bail out of the loop.
                 {
                     // If there is an alpha byte that is non-zero then set the
                     // alpha flag and bail out of the loop.
@@ -341,7 +341,7 @@ bool wxBitmap::CopyFromIconOrCursor(const wxGDIImage& icon)
         // wxWin convention
         refData->SetMask(wxInvertMask(iconInfo.hbmMask, w, h));
     }
         // wxWin convention
         refData->SetMask(wxInvertMask(iconInfo.hbmMask, w, h));
     }
-    
+
     // delete the old one now as we don't need it any more
     ::DeleteObject(iconInfo.hbmMask);
 
     // delete the old one now as we don't need it any more
     ::DeleteObject(iconInfo.hbmMask);
 
@@ -905,7 +905,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc)
             SetMask(new wxMask((WXHBITMAP)hbitmap));
         }
 
             SetMask(new wxMask((WXHBITMAP)hbitmap));
         }
 
-        delete data;
+        delete[] data;
     }
 
     return true;
     }
 
     return true;
@@ -1250,7 +1250,7 @@ void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp)
     HBITMAP hDIB;
     if ( !GetBitmapData()->m_isDIB )
     {
     HBITMAP hDIB;
     if ( !GetBitmapData()->m_isDIB )
     {
-        wxCHECK_MSG( !GetBitmapData()->m_dib, FALSE,
+        wxCHECK_MSG( !GetBitmapData()->m_dib, NULL,
                         _T("GetRawData() may be called only once") );
 
         wxDIB *dib = new wxDIB(*this);
                         _T("GetRawData() may be called only once") );
 
         wxDIB *dib = new wxDIB(*this);
@@ -1599,7 +1599,7 @@ bool wxCreateDIB(long xSize, long ySize, long bitsPerPixel,
    // this value must be 1, 4, 8 or 24 so PixelDepth can only be
    lpDIBheader->bmiHeader.biBitCount = (WORD)(bitsPerPixel);
    lpDIBheader->bmiHeader.biCompression = BI_RGB;
    // this value must be 1, 4, 8 or 24 so PixelDepth can only be
    lpDIBheader->bmiHeader.biBitCount = (WORD)(bitsPerPixel);
    lpDIBheader->bmiHeader.biCompression = BI_RGB;
-   lpDIBheader->bmiHeader.biSizeImage = xSize * abs(ySize) * bitsPerPixel >> 3;
+   lpDIBheader->bmiHeader.biSizeImage = (xSize * abs(ySize) * bitsPerPixel) >> 3;
    lpDIBheader->bmiHeader.biClrUsed = 256;
 
 
    lpDIBheader->bmiHeader.biClrUsed = 256;
 
 
@@ -1655,7 +1655,7 @@ HICON wxBitmapToIconOrCursor(const wxBitmap& bmp,
     {
         mask = bmp.GetMask();
     }
     {
         mask = bmp.GetMask();
     }
-    
+
     if ( !mask )
     {
         // we must have a mask for an icon, so even if it's probably incorrect,
     if ( !mask )
     {
         // we must have a mask for an icon, so even if it's probably incorrect,
index 19138f1f81028704e36e3a011994a05d5b51f692..5992a1db63e0877daf0b78f6eba75d89b51d3eb7 100644 (file)
@@ -1420,7 +1420,7 @@ GSocketError GAddress_INET_SetHostAddress(GAddress *address,
   CHECK_ADDRESS(address, INET);
 
   addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr);
   CHECK_ADDRESS(address, INET);
 
   addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr);
-  addr->s_addr = htonl(hostaddr);;
+  addr->s_addr = htonl(hostaddr);
 
   return GSOCK_NOERROR;
 }
 
   return GSOCK_NOERROR;
 }
index 378044bb5e681182fc5cc2ae39e2a9b4ad0115bc..2818820a0ae822a43cc7fdadaba49af40f46d447 100644 (file)
@@ -603,7 +603,7 @@ int wxWindowsPrintDialog::ShowModal()
 
     pd->hwndOwner = 0;
 
 
     pd->hwndOwner = 0;
 
-    if ( ret != false && (pd->hDC) )
+    if ( ret && (pd->hDC) )
     {
         wxPrinterDC *pdc = new wxPrinterDC( (WXHDC) pd->hDC );
         m_printerDC = pdc;
     {
         wxPrinterDC *pdc = new wxPrinterDC( (WXHDC) pd->hDC );
         m_printerDC = pdc;
index 341a87887f1956c206737847e35735c531186c63..a5d4955403539763dcee9e93756c4879e55e2913 100644 (file)
@@ -88,7 +88,7 @@ void wxBitmapRefData::Free()
 // this function should be called from all wxBitmap ctors
 void wxBitmap::Init()
 {
 // this function should be called from all wxBitmap ctors
 void wxBitmap::Init()
 {
-    m_bIsMono = FALSE;
+    m_bIsMono = false;
     //
     // True for all bitmaps created from bits, wxImages, Xpms
     //
     //
     // True for all bitmaps created from bits, wxImages, Xpms
     //
@@ -104,7 +104,7 @@ bool wxBitmap::CopyFromIconOrCursor(
     if (!::WinQueryPointerInfo(hIcon, &SIconInfo))
     {
         wxLogLastError(wxT("WinQueryPointerInfo"));
     if (!::WinQueryPointerInfo(hIcon, &SIconInfo))
     {
         wxLogLastError(wxT("WinQueryPointerInfo"));
-        return FALSE;
+        return false;
     }
     wxBitmapRefData*                pRefData = new wxBitmapRefData;
 
     }
     wxBitmapRefData*                pRefData = new wxBitmapRefData;
 
@@ -124,7 +124,7 @@ bool wxBitmap::CopyFromIconOrCursor(
     pMask->SetMaskBitmap(GetHBITMAP());
     SetMask(pMask);
 
     pMask->SetMaskBitmap(GetHBITMAP());
     SetMask(pMask);
 
-    return(TRUE);
+    return true;
 } // end of wxBitmap::CopyFromIconOrCursor
 
 bool wxBitmap::CopyFromCursor(
 } // end of wxBitmap::CopyFromIconOrCursor
 
 bool wxBitmap::CopyFromCursor(
@@ -134,7 +134,7 @@ bool wxBitmap::CopyFromCursor(
     UnRef();
 
     if (!rCursor.Ok())
     UnRef();
 
     if (!rCursor.Ok())
-        return(FALSE);
+        return(false);
     return(CopyFromIconOrCursor(rCursor));
 } // end of wxBitmap::CopyFromCursor
 
     return(CopyFromIconOrCursor(rCursor));
 } // end of wxBitmap::CopyFromCursor
 
@@ -145,7 +145,7 @@ bool wxBitmap::CopyFromIcon(
     UnRef();
 
     if (!rIcon.Ok())
     UnRef();
 
     if (!rIcon.Ok())
-        return(FALSE);
+        return(false);
 
     return CopyFromIconOrCursor(rIcon);
 } // end of wxBitmap::CopyFromIcon
 
     return CopyFromIconOrCursor(rIcon);
 } // end of wxBitmap::CopyFromIcon
@@ -334,7 +334,7 @@ bool wxBitmap::Create(
         HPS                         hPS   = ::GpiCreatePS(vHabmain, hDC, &vSize, PU_PELS | GPIA_ASSOC);
 
         if (nD == 1)
         HPS                         hPS   = ::GpiCreatePS(vHabmain, hDC, &vSize, PU_PELS | GPIA_ASSOC);
 
         if (nD == 1)
-            m_bIsMono = TRUE;
+            m_bIsMono = true;
         memset(&vHeader, '\0', 16);
         vHeader.cbFix     =  16;
         vHeader.cx        = nW;
         memset(&vHeader, '\0', 16);
         vHeader.cbFix     =  16;
         vHeader.cx        = nW;
@@ -393,17 +393,17 @@ bool wxBitmap::CreateFromXpm(
 #if wxUSE_IMAGE && wxUSE_XPM
     Init();
 
 #if wxUSE_IMAGE && wxUSE_XPM
     Init();
 
-    wxCHECK_MSG(ppData != NULL, FALSE, wxT("invalid bitmap data"))
+    wxCHECK_MSG(ppData != NULL, false, wxT("invalid bitmap data"))
 
     wxXPMDecoder                    vDecoder;
     wxImage                         vImg = vDecoder.ReadData(ppData);
 
 
     wxXPMDecoder                    vDecoder;
     wxImage                         vImg = vDecoder.ReadData(ppData);
 
-    wxCHECK_MSG(vImg.Ok(), FALSE, wxT("invalid bitmap data"))
+    wxCHECK_MSG(vImg.Ok(), false, wxT("invalid bitmap data"))
 
     *this = wxBitmap(vImg);
 
     *this = wxBitmap(vImg);
-    return TRUE;
+    return true;
 #else
 #else
-    return FALSE;
+    return false;
 #endif
 } // end of wxBitmap::CreateFromXpm
 
 #endif
 } // end of wxBitmap::CreateFromXpm
 
@@ -431,7 +431,7 @@ bool wxBitmap::LoadFile(
     }
     else
     {
     }
     else
     {
-        return(FALSE);
+        return false;
     }
 } // end of wxBitmap::LoadFile
 
     }
 } // end of wxBitmap::LoadFile
 
@@ -453,7 +453,7 @@ bool wxBitmap::Create(
     {
         wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), lType);
 
     {
         wxLogDebug(wxT("Failed to create bitmap: no bitmap handler for type %ld defined."), lType);
 
-        return(FALSE);
+        return false;
     }
 
     m_refData = new wxBitmapRefData;
     }
 
     m_refData = new wxBitmapRefData;
@@ -491,7 +491,7 @@ bool wxBitmap::SaveFile(
         wxImage                     vImage = ConvertToImage();
 
         if (!vImage.Ok())
         wxImage                     vImage = ConvertToImage();
 
         if (!vImage.Ok())
-            return(FALSE);
+            return false;
 
         return(vImage.SaveFile( rFilename
                                ,lType
 
         return(vImage.SaveFile( rFilename
                                ,lType
@@ -509,7 +509,7 @@ bool wxBitmap::CreateFromImage (
 , int                               nDepth
 )
 {
 , int                               nDepth
 )
 {
-    wxCHECK_MSG(rImage.Ok(), FALSE, wxT("invalid image"));
+    wxCHECK_MSG(rImage.Ok(), false, wxT("invalid image"));
     m_refData = new wxBitmapRefData();
 
     int                             nSizeLimit = 1024 * 768 * 3;
     m_refData = new wxBitmapRefData();
 
     int                             nSizeLimit = 1024 * 768 * 3;
@@ -546,13 +546,13 @@ bool wxBitmap::CreateFromImage (
     //
     // Set bitmap parameters
     //
     //
     // Set bitmap parameters
     //
-    wxCHECK_MSG(rImage.Ok(), FALSE, wxT("invalid image"));
+    wxCHECK_MSG(rImage.Ok(), false, wxT("invalid image"));
     SetWidth(nWidth);
     SetHeight(nBmpHeight);
     if (nDepth == 1)
     SetWidth(nWidth);
     SetHeight(nBmpHeight);
     if (nDepth == 1)
-        m_bIsMono = TRUE;
+        m_bIsMono = true;
     else
     else
-        m_bIsMono = FALSE;
+        m_bIsMono = false;
     if (nDepth == -1)
         nDepth = wxDisplayDepth();
     SetDepth(nDepth);
     if (nDepth == -1)
         nDepth = wxDisplayDepth();
     SetDepth(nDepth);
@@ -589,7 +589,7 @@ bool wxBitmap::CreateFromImage (
     if(!pucBits)
     {
         wxFAIL_MSG(wxT("could not allocate memory for DIB"));
     if(!pucBits)
     {
         wxFAIL_MSG(wxT("could not allocate memory for DIB"));
-        return FALSE;
+        return false;
     }
     memset(pucBits, '\0', (nBytePerLine * nHeight));
 
     }
     memset(pucBits, '\0', (nBytePerLine * nHeight));
 
@@ -829,7 +829,7 @@ bool wxBitmap::CreateFromImage (
     ::DevCloseDC(hDCScreen);
     ::DevCloseDC(hDC);
     free(pucBits);
     ::DevCloseDC(hDCScreen);
     ::DevCloseDC(hDC);
     free(pucBits);
-    return TRUE;
+    return true;
 } // end of wxBitmap::CreateFromImage
 
 wxImage wxBitmap::ConvertToImage() const
 } // end of wxBitmap::CreateFromImage
 
 wxImage wxBitmap::ConvertToImage() const
@@ -860,7 +860,7 @@ wxImage wxBitmap::ConvertToImage() const
     HBITMAP                         hOldBitmap;
     DEVOPENSTRUC                    vDop  = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
     SIZEL                           vSizlPage = {0,0};
     HBITMAP                         hOldBitmap;
     DEVOPENSTRUC                    vDop  = {0L, "DISPLAY", NULL, 0L, 0L, 0L, 0L, 0L, 0L};
     SIZEL                           vSizlPage = {0,0};
-    HDC                             hDCMem = NULLHANDLE;;
+    HDC                             hDCMem = NULLHANDLE;
 
     vImage.Create( nWidth
                   ,nHeight
 
     vImage.Create( nWidth
                   ,nHeight
@@ -1044,11 +1044,11 @@ wxImage wxBitmap::ConvertToImage() const
                              ,ucGreen
                              ,ucBlue
                             );
                              ,ucGreen
                              ,ucBlue
                             );
-        vImage.SetMask(TRUE);
+        vImage.SetMask(true);
     }
     else
     {
     }
     else
     {
-        vImage.SetMask(FALSE);
+        vImage.SetMask(false);
     }
 
     //
     }
 
     //
@@ -1261,7 +1261,7 @@ bool wxMask::Create(
     }
     if (!rBitmap.Ok() || rBitmap.GetDepth() != 1)
     {
     }
     if (!rBitmap.Ok() || rBitmap.GetDepth() != 1)
     {
-        return(FALSE);
+        return false;
     }
 
     memset(&vBmih, '\0', sizeof(BITMAPINFOHEADER2));
     }
 
     memset(&vBmih, '\0', sizeof(BITMAPINFOHEADER2));
@@ -1292,7 +1292,7 @@ bool wxMask::Create(
     ::GpiDestroyPS(hPSDst);
     ::DevCloseDC(hDCSrc);
     ::DevCloseDC(hDCDst);
     ::GpiDestroyPS(hPSDst);
     ::DevCloseDC(hDCSrc);
     ::DevCloseDC(hDCDst);
-    return(TRUE);
+    return true;
 } // end of wxMask::Create
 
 // Create a mask from a bitmap and a palette index indicating
 } // end of wxMask::Create
 
 // Create a mask from a bitmap and a palette index indicating
@@ -1329,7 +1329,7 @@ bool wxMask::Create(
                           ));
         }
     }
                           ));
         }
     }
-    return(FALSE);
+    return false;
 } // end of wxMask::Create
 
 // Create a mask from a bitmap and a colour indicating
 } // end of wxMask::Create
 
 // Create a mask from a bitmap and a colour indicating
@@ -1339,7 +1339,7 @@ bool wxMask::Create(
 , const wxColour&                   rColour
 )
 {
 , const wxColour&                   rColour
 )
 {
-    bool                            bOk = TRUE;
+    bool                            bOk = true;
     COLORREF                        vMaskColour = OS2RGB( rColour.Red()
                                                          ,rColour.Green()
                                                          ,rColour.Blue()
     COLORREF                        vMaskColour = OS2RGB( rColour.Red()
                                                          ,rColour.Green()
                                                          ,rColour.Blue()
@@ -1359,7 +1359,7 @@ bool wxMask::Create(
     }
     if (!rBitmap.Ok())
     {
     }
     if (!rBitmap.Ok())
     {
-        return(FALSE);
+        return false;
     }
 
     //
     }
 
     //
@@ -1400,7 +1400,7 @@ bool wxMask::Create(
                 //
                 // Doesn't make sense to continue
                 //
                 //
                 // Doesn't make sense to continue
                 //
-                bOk = FALSE;
+                bOk = false;
                 break;
             }
 
                 break;
             }
 
@@ -1422,7 +1422,7 @@ bool wxMask::Create(
     ::GpiDestroyPS(hPSDst);
     ::DevCloseDC(hDCSrc);
     ::DevCloseDC(hDCDst);
     ::GpiDestroyPS(hPSDst);
     ::DevCloseDC(hDCSrc);
     ::DevCloseDC(hDCDst);
-    return(TRUE);
+    return true;
 } // end of wxMask::Create
 
 // ----------------------------------------------------------------------------
 } // end of wxMask::Create
 
 // ----------------------------------------------------------------------------
@@ -1447,7 +1447,7 @@ bool wxBitmapHandler::Create(
                             ,nWidth
                             ,nHeight
                             ,nDepth
                             ,nWidth
                             ,nHeight
                             ,nDepth
-                           ) : FALSE);
+                           ) : false);
 }
 
 bool wxBitmapHandler::Load(
 }
 
 bool wxBitmapHandler::Load(
@@ -1467,7 +1467,7 @@ bool wxBitmapHandler::Load(
                               ,lFlags
                               ,nWidth
                               ,nHeight
                               ,lFlags
                               ,nWidth
                               ,nHeight
-                             ) : FALSE);
+                             ) : false);
 }
 
 bool wxBitmapHandler::Save(
 }
 
 bool wxBitmapHandler::Save(
@@ -1483,7 +1483,7 @@ bool wxBitmapHandler::Save(
     return(pBitmap ? SaveFile( pBitmap
                               ,rName
                               ,lType
     return(pBitmap ? SaveFile( pBitmap
                               ,rName
                               ,lType
-                             ) : FALSE);
+                             ) : false);
 }
 
 bool wxBitmapHandler::Create(
 }
 
 bool wxBitmapHandler::Create(
@@ -1495,7 +1495,7 @@ bool wxBitmapHandler::Create(
 , int                               WXUNUSED(nDepth)
 )
 {
 , int                               WXUNUSED(nDepth)
 )
 {
-    return(FALSE);
+    return false;
 }
 
 bool wxBitmapHandler::LoadFile(
 }
 
 bool wxBitmapHandler::LoadFile(
@@ -1506,7 +1506,7 @@ bool wxBitmapHandler::LoadFile(
 , int                               WXUNUSED(nDesiredHeight)
 )
 {
 , int                               WXUNUSED(nDesiredHeight)
 )
 {
-    return(FALSE);
+    return false;
 }
 
 bool wxBitmapHandler::SaveFile(
 }
 
 bool wxBitmapHandler::SaveFile(
@@ -1516,7 +1516,7 @@ bool wxBitmapHandler::SaveFile(
 , const wxPalette*                  WXUNUSED(pPalette)
 )
 {
 , const wxPalette*                  WXUNUSED(pPalette)
 )
 {
-    return(FALSE);
+    return false;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
index 55670b238d0d7c52f0857ffdd7bf9587235f9aa1..c433083e44f6fc8bafa3a38b7d1d95268a162617 100644 (file)
@@ -1294,7 +1294,7 @@ void wxDC::DoDrawBitmap(
     if (!IsKindOf(CLASSINFO(wxPrinterDC)))
     {
         HBITMAP                         hBitmap =  (HBITMAP)rBmp.GetHBITMAP();
     if (!IsKindOf(CLASSINFO(wxPrinterDC)))
     {
         HBITMAP                         hBitmap =  (HBITMAP)rBmp.GetHBITMAP();
-        HBITMAP                         hBitmapOld = NULLHANDLE;;
+        HBITMAP                         hBitmapOld = NULLHANDLE;
         POINTL                          vPoint[4];
 
         vY = OS2Y(vY,rBmp.GetHeight());
         POINTL                          vPoint[4];
 
         vY = OS2Y(vY,rBmp.GetHeight());
index 1dddfa4b66f5da84e1c65691979e3d26a0fffa08..d4f18cc8099c8d2983a611bbe78ec794740523e5 100644 (file)
@@ -120,7 +120,7 @@ bool CIDropTarget::DragLeave()
     // Release the held object
     //
     Free();
     // Release the held object
     //
     Free();
-    return TRUE;
+    return true;
 } // end of CIDropTarget::DragLeave
 
 MRESULT CIDropTarget::DragOver ()
 } // end of CIDropTarget::DragLeave
 
 MRESULT CIDropTarget::DragOver ()
@@ -250,7 +250,7 @@ MRESULT CIDropTarget::Drop ()
                           ,m_pDragInfo->yDrop
                          ))
     {
                           ,m_pDragInfo->yDrop
                          ))
     {
-        wxDragResult                 eRc = wxDragNone;;
+        wxDragResult                 eRc = wxDragNone;
 
         //
         // And now it has the data
 
         //
         // And now it has the data
@@ -260,7 +260,7 @@ MRESULT CIDropTarget::Drop ()
                                 ,eRc
                                );
     }
                                 ,eRc
                                );
     }
-    //else: OnDrop() returned FALSE, no need to copy data
+    //else: OnDrop() returned false, no need to copy data
 
     //
     // Release the held object
 
     //
     // Release the held object
@@ -292,12 +292,12 @@ bool wxDropTarget::GetData ()
 
     if (vFormat == wxDF_INVALID)
     {
 
     if (vFormat == wxDF_INVALID)
     {
-        return FALSE;
+        return false;
     }
     //
     // Under OS/2 we already have the data via the attached DRAGITEM's
     //
     }
     //
     // Under OS/2 we already have the data via the attached DRAGITEM's
     //
-    return TRUE;
+    return true;
 } // end of wxDropTarget::GetData
 
 wxDataFormat wxDropTarget::GetSupportedFormat (
 } // end of wxDropTarget::GetData
 
 wxDataFormat wxDropTarget::GetSupportedFormat (
@@ -313,7 +313,7 @@ wxDataFormat wxDropTarget::GetSupportedFormat (
     ULONG                           n;
     wxString                        sMechanism;
     wxString                        sFormat;
     ULONG                           n;
     wxString                        sMechanism;
     wxString                        sFormat;
-    bool                            bValid = FALSE;
+    bool                            bValid = false;
 
     pFormats = ulFormats == 1 ? &vFormat :  new wxDataFormat[ulFormats];
     m_dataObject->GetAllFormats( pFormats
 
     pFormats = ulFormats == 1 ? &vFormat :  new wxDataFormat[ulFormats];
     m_dataObject->GetAllFormats( pFormats
@@ -387,7 +387,7 @@ wxDataFormat wxDropTarget::GetSupportedFormat (
             pDragItem = ::DrgQueryDragitemPtr(pDataSource, i);
             if (::DrgVerifyRMF(pDragItem, (PSZ)sMechanism.c_str(), (PSZ)sFormat.c_str()))
             {
             pDragItem = ::DrgQueryDragitemPtr(pDataSource, i);
             if (::DrgVerifyRMF(pDragItem, (PSZ)sMechanism.c_str(), (PSZ)sFormat.c_str()))
             {
-                bValid = TRUE;
+                bValid = true;
                 break;
             }
         }
                 break;
             }
         }
@@ -434,7 +434,7 @@ bool wxDropTarget::OnDrop (
 , wxCoord                           WXUNUSED(y)
 )
 {
 , wxCoord                           WXUNUSED(y)
 )
 {
-    return TRUE;
+    return true;
 } // end of wxDropTarget::OnDrop
 
 //-------------------------------------------------------------------------
 } // end of wxDropTarget::OnDrop
 
 //-------------------------------------------------------------------------
@@ -525,11 +525,11 @@ bool wxDropSource::GiveFeedback (
             case wxDragError:
                 break;
         }
             case wxDragError:
                 break;
         }
-        return TRUE;
+        return true;
     }
     else
     {
     }
     else
     {
-        return FALSE;
+        return false;
     }
 } // end of GuiAdvDnd_CDropSource::GiveFeedback
 
     }
 } // end of GuiAdvDnd_CDropSource::GiveFeedback
 
index fe73e0207019e2243a4761c8cfe1f128e4292867..ec7d210b61c3fbd5af7c4d907e19a75b9935031c 100644 (file)
@@ -790,7 +790,7 @@ void wxRadioBox::GetPosition(
 ) const
 {
     wxWindowOS2*                    pParent = GetParent();
 ) const
 {
     wxWindowOS2*                    pParent = GetParent();
-    RECT                            vRect = { -1, -1, -1, -1 };;
+    RECT                            vRect = { -1, -1, -1, -1 };
     POINTL                          vPoint;
     int                             i;
 
     POINTL                          vPoint;
     int                             i;
 
index e38775b6718748e1676099cd70bd6c3e6f823379..e4f6d941013784e54aaecad9bfe98100823a6606 100644 (file)
@@ -103,7 +103,7 @@ public:
     // add a new verb with the command or replace the old value
     void AddOrReplaceVerb(const wxString& verb, const wxString& cmd)
     {
     // add a new verb with the command or replace the old value
     void AddOrReplaceVerb(const wxString& verb, const wxString& cmd)
     {
-        int n = m_verbs.Index(verb, FALSE /* ignore case */);
+        int n = m_verbs.Index(verb, false /* ignore case */);
         if ( n == wxNOT_FOUND )
         {
             m_verbs.Add(verb);
         if ( n == wxNOT_FOUND )
         {
             m_verbs.Add(verb);
@@ -165,7 +165,7 @@ public:
     wxMimeTextFile () : wxTextFile () {};
     wxMimeTextFile (const wxString& strFile) : wxTextFile (strFile)  {  };
 
     wxMimeTextFile () : wxTextFile () {};
     wxMimeTextFile (const wxString& strFile) : wxTextFile (strFile)  {  };
 
-    int pIndexOf(const wxString & sSearch, bool bIncludeComments = FALSE, int iStart = 0)
+    int pIndexOf(const wxString & sSearch, bool bIncludeComments = false, int iStart = 0)
     {
         size_t i = iStart;
         int nResult = wxNOT_FOUND;
     {
         size_t i = iStart;
         int nResult = wxNOT_FOUND;
@@ -203,19 +203,19 @@ public:
 
     bool CommentLine(int nIndex)
     {
 
     bool CommentLine(int nIndex)
     {
-        if (nIndex <0) return FALSE;
-        if (nIndex >= (int)GetLineCount() ) return FALSE;
+        if (nIndex <0) return false;
+        if (nIndex >= (int)GetLineCount() ) return false;
         GetLine(nIndex) = GetLine(nIndex).Prepend(wxT("#"));
         GetLine(nIndex) = GetLine(nIndex).Prepend(wxT("#"));
-        return TRUE;
+        return true;
     }
 
     bool CommentLine(const wxString & sTest)
     {
         int nIndex = pIndexOf(sTest);
     }
 
     bool CommentLine(const wxString & sTest)
     {
         int nIndex = pIndexOf(sTest);
-        if (nIndex <0) return FALSE;
-        if (nIndex >= (int)GetLineCount() ) return FALSE;
+        if (nIndex <0) return false;
+        if (nIndex >= (int)GetLineCount() ) return false;
         GetLine(nIndex) = GetLine(nIndex).Prepend(wxT("#"));
         GetLine(nIndex) = GetLine(nIndex).Prepend(wxT("#"));
-        return TRUE;
+        return true;
     }
 
     wxString GetVerb (size_t i)
     }
 
     wxString GetVerb (size_t i)
@@ -368,7 +368,7 @@ bool wxMimeTypesManagerImpl::CheckGnomeDirsExist ()
         if (!wxMkdir ( sTmp ))
         {
             wxLogError(_("Failed to create directory %s/.gnome."), sTmp.c_str());
         if (!wxMkdir ( sTmp ))
         {
             wxLogError(_("Failed to create directory %s/.gnome."), sTmp.c_str());
-            return FALSE;
+            return false;
         }
     }
     sTmp = sTmp + wxT("/mime-info");
         }
     }
     sTmp = sTmp + wxT("/mime-info");
@@ -377,10 +377,10 @@ bool wxMimeTypesManagerImpl::CheckGnomeDirsExist ()
         if (!wxMkdir ( sTmp ))
         {
             wxLogError(_("Failed to create directory %s/mime-info."), sTmp.c_str());
         if (!wxMkdir ( sTmp ))
         {
             wxLogError(_("Failed to create directory %s/mime-info."), sTmp.c_str());
-            return FALSE;
+            return false;
         }
     }
         }
     }
-    return TRUE;
+    return true;
 
 }
 
 
 }
 
@@ -401,8 +401,8 @@ bool wxMimeTypesManagerImpl::WriteGnomeKeyFile(int index, bool delete_index)
     if (! outfile.Open () )
 #endif
     {
     if (! outfile.Open () )
 #endif
     {
-        if (delete_index) return FALSE;
-        if (!CheckGnomeDirsExist() ) return FALSE;
+        if (delete_index) return false;
+        if (!CheckGnomeDirsExist() ) return false;
         outfile.Create ();
     }
 
         outfile.Create ();
     }
 
@@ -434,8 +434,8 @@ bool wxMimeTypesManagerImpl::WriteGnomeKeyFile(int index, bool delete_index)
 
         wxMimeTypeCommands sOld;
         size_t nOld = nIndex + 1;
 
         wxMimeTypeCommands sOld;
         size_t nOld = nIndex + 1;
-        bool oldEntryEnd = FALSE;
-        while ( (nOld < outfile.GetLineCount() )&& (oldEntryEnd == FALSE ))
+        bool oldEntryEnd = false;
+        while ( (nOld < outfile.GetLineCount() )&& (!oldEntryEnd))
         {
             sTmp = outfile.GetLine(nOld);
             if ( (sTmp[0u] == wxT('\t')) || (sTmp[0u] == wxT('#')) )
         {
             sTmp = outfile.GetLine(nOld);
             if ( (sTmp[0u] == wxT('\t')) || (sTmp[0u] == wxT('#')) )
@@ -449,7 +449,7 @@ bool wxMimeTypesManagerImpl::WriteGnomeKeyFile(int index, bool delete_index)
             }
             // next mimetpye ??or blank line
             else
             }
             // next mimetpye ??or blank line
             else
-                oldEntryEnd = TRUE;
+                oldEntryEnd = true;
         }
         // list of entries in our data; these should all be in sOld,
         // though sOld may also contain other entries , eg flags
         }
         // list of entries in our data; these should all be in sOld,
         // though sOld may also contain other entries , eg flags
@@ -491,8 +491,8 @@ bool wxMimeTypesManagerImpl::WriteGnomeMimeFile(int index, bool delete_index)
     // create it anyway as a private mime store
     if (! outfile.Open () )
     {
     // create it anyway as a private mime store
     if (! outfile.Open () )
     {
-        if (delete_index) return FALSE;
-        if (!CheckGnomeDirsExist() ) return FALSE;
+        if (delete_index) return false;
+        if (!CheckGnomeDirsExist() ) return false;
         outfile.Create ();
     }
     wxString strType = m_aTypes[index];
         outfile.Create ();
     }
     wxString strType = m_aTypes[index];
@@ -572,7 +572,7 @@ void wxMimeTypesManagerImpl::LoadGnomeDataFromKeyFile(const wxString& filename,
                 else if (sTmp.Contains( wxT("icon_filename=") ) )
                 {
                     curIconFile = sTmp.AfterFirst(wxT('='));
                 else if (sTmp.Contains( wxT("icon_filename=") ) )
                 {
                     curIconFile = sTmp.AfterFirst(wxT('='));
-            
+
                     if (!wxFileExists(curIconFile))
                     {
                         size_t nDirs = dirs.GetCount();
                     if (!wxFileExists(curIconFile))
                     {
                         size_t nDirs = dirs.GetCount();
@@ -603,7 +603,7 @@ void wxMimeTypesManagerImpl::LoadGnomeDataFromKeyFile(const wxString& filename,
                     // for now ignore lines with flags in...FIX
                     sTmp = sTmp.AfterLast(wxT(']'));
                     sTmp = sTmp.AfterLast(wxT('\t'));
                     // for now ignore lines with flags in...FIX
                     sTmp = sTmp.AfterLast(wxT(']'));
                     sTmp = sTmp.AfterLast(wxT('\t'));
-                    sTmp.Trim(FALSE).Trim();
+                    sTmp.Trim(false).Trim();
                     if (0 == sTmp.Replace ( wxT("%f"), wxT("%s") )) sTmp = sTmp + wxT(" %s");
                     entry->Add(sTmp);
 
                     if (0 == sTmp.Replace ( wxT("%f"), wxT("%s") )) sTmp = sTmp + wxT(" %s");
                     entry->Add(sTmp);
 
@@ -631,7 +631,7 @@ void wxMimeTypesManagerImpl::LoadGnomeDataFromKeyFile(const wxString& filename,
         // ignore blank lines
         nLine ++;
     } // end of while, save any data
         // ignore blank lines
         nLine ++;
     } // end of while, save any data
-    
+
     if (! curMimeType.empty())
         AddToMimeData ( curMimeType, curIconFile, entry, strExtensions, strDesc);
 }
     if (! curMimeType.empty())
         AddToMimeData ( curMimeType, curIconFile, entry, strExtensions, strDesc);
 }
@@ -673,12 +673,12 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeTypesFromMimeFile(const wxString& file
         if ( !pc || !*pc )
         {
             // end of the entry
         if ( !pc || !*pc )
         {
             // end of the entry
-            if ( !!curMimeType && !!curExtList )
+            if ( !curMimeType.empty() && !curExtList.empty() )
             {
                  wxLogTrace(TRACE_MIME,
                             wxT("--- At end of Gnome file  finding mimetype %s  ---"),
                             curMimeType.c_str());
             {
                  wxLogTrace(TRACE_MIME,
                             wxT("--- At end of Gnome file  finding mimetype %s  ---"),
                             curMimeType.c_str());
-                
+
                  AddMimeTypeInfo(curMimeType, curExtList, wxEmptyString);
             }
 
                  AddMimeTypeInfo(curMimeType, curExtList, wxEmptyString);
             }
 
@@ -731,12 +731,12 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeTypesFromMimeFile(const wxString& file
 void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir(
                       const wxString& dirbase, const wxArrayString& dirs)
 {
 void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir(
                       const wxString& dirbase, const wxArrayString& dirs)
 {
-    wxASSERT_MSG( !!dirbase && !wxEndsWithPathSeparator(dirbase),
+    wxASSERT_MSG( !dirbase.empty() && !wxEndsWithPathSeparator(dirbase),
                   _T("base directory shouldn't end with a slash") );
 
     wxString dirname = dirbase;
     dirname << wxT("/mime-info");
                   _T("base directory shouldn't end with a slash") );
 
     wxString dirname = dirbase;
     dirname << wxT("/mime-info");
-    
+
     if ( !wxDir::Exists(dirname) )
         return;
 
     if ( !wxDir::Exists(dirname) )
         return;
 
@@ -769,16 +769,16 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir(
     //             mime-type from the file name.
     dirname = dirbase;
     dirname << wxT("/pixmaps/document-icons");
     //             mime-type from the file name.
     dirname = dirbase;
     dirname << wxT("/pixmaps/document-icons");
-    
+
     // these are always empty in this file
     wxArrayString strExtensions;
     wxString strDesc;
     // these are always empty in this file
     wxArrayString strExtensions;
     wxString strDesc;
-    
+
     if ( !wxDir::Exists(dirname) )
     {
         // Jst test for default GPE dir also
         dirname = wxT("/usr/share/gpe/pixmaps/default/filemanager/document-icons");
     if ( !wxDir::Exists(dirname) )
     {
         // Jst test for default GPE dir also
         dirname = wxT("/usr/share/gpe/pixmaps/default/filemanager/document-icons");
-        
+
         if ( !wxDir::Exists(dirname) )
            return;
     }
         if ( !wxDir::Exists(dirname) )
            return;
     }
@@ -798,7 +798,7 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir(
             wxString iconFile = dirname;
             iconFile << wxT("/");
             iconFile << filename;
             wxString iconFile = dirname;
             iconFile << wxT("/");
             iconFile << filename;
-            AddToMimeData ( mimeType, iconFile, NULL, strExtensions, strDesc, TRUE );
+            AddToMimeData ( mimeType, iconFile, NULL, strExtensions, strDesc, true );
         }
 
         cont = dir2.GetNext(&filename);
         }
 
         cont = dir2.GetNext(&filename);
@@ -808,7 +808,7 @@ void wxMimeTypesManagerImpl::LoadGnomeMimeFilesFromDir(
 void wxMimeTypesManagerImpl::GetGnomeMimeInfo(const wxString& sExtraDir)
 {
     wxArrayString dirs;
 void wxMimeTypesManagerImpl::GetGnomeMimeInfo(const wxString& sExtraDir)
 {
     wxArrayString dirs;
-    
+
     wxString gnomedir = wxGetenv( wxT("GNOMEDIR") );;
     if (!gnomedir.empty())
     {
     wxString gnomedir = wxGetenv( wxT("GNOMEDIR") );;
     if (!gnomedir.empty())
     {
@@ -818,11 +818,11 @@ void wxMimeTypesManagerImpl::GetGnomeMimeInfo(const wxString& sExtraDir)
 
     dirs.Add(wxT("/usr/share"));
     dirs.Add(wxT("/usr/local/share"));
 
     dirs.Add(wxT("/usr/share"));
     dirs.Add(wxT("/usr/local/share"));
-    
+
     gnomedir = wxGetHomeDir();
     gnomedir << wxT("/.gnome");
     dirs.Add( gnomedir );
     gnomedir = wxGetHomeDir();
     gnomedir << wxT("/.gnome");
     dirs.Add( gnomedir );
-    
+
     if (!sExtraDir.empty()) dirs.Add( sExtraDir );
 
     size_t nDirs = dirs.GetCount();
     if (!sExtraDir.empty()) dirs.Add( sExtraDir );
 
     size_t nDirs = dirs.GetCount();
@@ -855,9 +855,9 @@ bool wxMimeTypesManagerImpl::CheckKDEDirsExist ( const wxString &sOK, const wxSt
     if (sTest.empty())
     {
         if (wxDir::Exists(sOK))
     if (sTest.empty())
     {
         if (wxDir::Exists(sOK))
-            return TRUE;
+            return true;
         else
         else
-            return FALSE;
+            return false;
     }
     else
     {
     }
     else
     {
@@ -883,7 +883,7 @@ bool wxMimeTypesManagerImpl::WriteKDEMimeFile(int index, bool delete_index)
     {
         bTemp = mimeoutfile.Create (sTmp);
         // some unknown error eg out of disk space
     {
         bTemp = mimeoutfile.Create (sTmp);
         // some unknown error eg out of disk space
-        if (!bTemp) return FALSE;
+        if (!bTemp) return false;
     }
 
     sTmp = wxT(".kde/share/applnk/");
     }
 
     sTmp = wxT(".kde/share/applnk/");
@@ -896,7 +896,7 @@ bool wxMimeTypesManagerImpl::WriteKDEMimeFile(int index, bool delete_index)
     {
         bTemp = appoutfile.Create (sTmp);
         // some unknown error eg out of disk space
     {
         bTemp = appoutfile.Create (sTmp);
         // some unknown error eg out of disk space
-        if (!bTemp) return FALSE;
+        if (!bTemp) return false;
     }
 
     // fixed data; write if new file
     }
 
     // fixed data; write if new file
@@ -965,10 +965,10 @@ bool wxMimeTypesManagerImpl::WriteKDEMimeFile(int index, bool delete_index)
         //other actions as well as open
 
     }
         //other actions as well as open
 
     }
-    bTemp = FALSE;
-    if (mimeoutfile.Write ()) bTemp = TRUE;
+    bTemp = false;
+    if (mimeoutfile.Write ()) bTemp = true;
     mimeoutfile.Close ();
     mimeoutfile.Close ();
-    if (appoutfile.Write ()) bTemp = TRUE;
+    if (appoutfile.Write ()) bTemp = true;
     appoutfile.Close ();
 
     return bTemp;
     appoutfile.Close ();
 
     return bTemp;
@@ -984,7 +984,7 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeSubtype(const wxString& dirbase,
 
     wxLogTrace(TRACE_MIME, wxT("loading KDE file %s"),
                            (dirbase+filename).c_str());
 
     wxLogTrace(TRACE_MIME, wxT("loading KDE file %s"),
                            (dirbase+filename).c_str());
-    
+
     wxMimeTypeCommands * entry = new wxMimeTypeCommands;
     wxArrayString sExts;
     wxString mimetype, mime_desc, strIcon;
     wxMimeTypeCommands * entry = new wxMimeTypeCommands;
     wxArrayString sExts;
     wxString mimetype, mime_desc, strIcon;
@@ -1028,7 +1028,7 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeSubtype(const wxString& dirbase,
     nIndex = file.pIndexOf(_T("Patterns="));
     if ( nIndex != wxNOT_FOUND )
     {
     nIndex = file.pIndexOf(_T("Patterns="));
     if ( nIndex != wxNOT_FOUND )
     {
-        wxString exts = file.GetCmd (nIndex);;
+        wxString exts = file.GetCmd (nIndex);
 
         wxStringTokenizer tokenizer(exts, _T(";"));
         while ( tokenizer.HasMoreTokens() )
 
         wxStringTokenizer tokenizer(exts, _T(";"));
         while ( tokenizer.HasMoreTokens() )
@@ -1056,8 +1056,8 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeSubtype(const wxString& dirbase,
         strIcon = file.GetCmd(nIndex);
         wxLogTrace(TRACE_MIME, wxT("  icon %s"), strIcon.c_str());
         //it could be the real path, but more often a short name
         strIcon = file.GetCmd(nIndex);
         wxLogTrace(TRACE_MIME, wxT("  icon %s"), strIcon.c_str());
         //it could be the real path, but more often a short name
-    
-    
+
+
         if (!wxFileExists(strIcon))
         {
             // icon is just the short name
         if (!wxFileExists(strIcon))
         {
             // icon is just the short name
@@ -1116,7 +1116,7 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeType(const wxString& dirbase,
 
     wxLogTrace(TRACE_MIME, wxT("--- Loading from KDE directory %s  ---"),
                            dirname.c_str());
 
     wxLogTrace(TRACE_MIME, wxT("--- Loading from KDE directory %s  ---"),
                            dirname.c_str());
-    
+
     dirname += _T('/');
 
     wxString filename;
     dirname += _T('/');
 
     wxString filename;
@@ -1140,7 +1140,7 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeType(const wxString& dirbase,
 void wxMimeTypesManagerImpl::LoadKDELinkFilesFromDir(const wxString& dirbase,
                                             const wxArrayString& icondirs)
 {
 void wxMimeTypesManagerImpl::LoadKDELinkFilesFromDir(const wxString& dirbase,
                                             const wxArrayString& icondirs)
 {
-    wxASSERT_MSG( !!dirbase && !wxEndsWithPathSeparator(dirbase),
+    wxASSERT_MSG( !dirbase.empty() && !wxEndsWithPathSeparator(dirbase),
                   _T("base directory shouldn't end with a slash") );
 
     wxString dirname = dirbase;
                   _T("base directory shouldn't end with a slash") );
 
     wxString dirname = dirbase;
@@ -1183,10 +1183,10 @@ void wxMimeTypesManagerImpl::GetKDEMimeInfo(const wxString& sExtraDir)
     //           code should give up if KDEDIR(S) is not set and/or the icon
     //           theme cannot be determined, because it means that the user is
     //           not using KDE (and thus is not interested in KDE icons anyway)
     //           code should give up if KDEDIR(S) is not set and/or the icon
     //           theme cannot be determined, because it means that the user is
     //           not using KDE (and thus is not interested in KDE icons anyway)
-    
+
     // the variable $KDEDIR is set when KDE is running
     wxString kdedir = wxGetenv( wxT("KDEDIR") );
     // the variable $KDEDIR is set when KDE is running
     wxString kdedir = wxGetenv( wxT("KDEDIR") );
-    
+
     if (!kdedir.empty())
     {
         // $(KDEDIR)/share/config/kdeglobals holds info
     if (!kdedir.empty())
     {
         // $(KDEDIR)/share/config/kdeglobals holds info
@@ -1195,7 +1195,7 @@ void wxMimeTypesManagerImpl::GetKDEMimeInfo(const wxString& sExtraDir)
         configFile.AppendDir( wxT("share") );
         configFile.AppendDir( wxT("config") );
         configFile.SetName( wxT("kdeglobals") );
         configFile.AppendDir( wxT("share") );
         configFile.AppendDir( wxT("config") );
         configFile.SetName( wxT("kdeglobals") );
-           
+
         wxTextFile config;
         if (configFile.FileExists() && config.Open(configFile.GetFullPath()))
         {
         wxTextFile config;
         if (configFile.FileExists() && config.Open(configFile.GetFullPath()))
         {
@@ -1223,39 +1223,39 @@ void wxMimeTypesManagerImpl::GetKDEMimeInfo(const wxString& sExtraDir)
             // $(KDEDIR)/share/icons -> $(KDEDIR)/share/icons/default.kde
             configFile.AppendDir( wxT("default.kde") );
         }
             // $(KDEDIR)/share/icons -> $(KDEDIR)/share/icons/default.kde
             configFile.AppendDir( wxT("default.kde") );
         }
-        
+
         configFile.SetName( wxEmptyString );
         configFile.AppendDir( wxT("32x32") );
         configFile.AppendDir( wxT("mimetypes") );
         configFile.SetName( wxEmptyString );
         configFile.AppendDir( wxT("32x32") );
         configFile.AppendDir( wxT("mimetypes") );
-        
+
         // Just try a few likely icons theme names
         // Just try a few likely icons theme names
-        
+
         int pos = configFile.GetDirCount()-3;
         int pos = configFile.GetDirCount()-3;
-        
+
         if (!wxDir::Exists(configFile.GetPath()))
         {
             configFile.RemoveDir( pos );
             configFile.InsertDir( pos, wxT("default.kde") );
         }
         if (!wxDir::Exists(configFile.GetPath()))
         {
             configFile.RemoveDir( pos );
             configFile.InsertDir( pos, wxT("default.kde") );
         }
-        
+
         if (!wxDir::Exists(configFile.GetPath()))
         {
             configFile.RemoveDir( pos );
             configFile.InsertDir( pos, wxT("default") );
         }
         if (!wxDir::Exists(configFile.GetPath()))
         {
             configFile.RemoveDir( pos );
             configFile.InsertDir( pos, wxT("default") );
         }
-        
+
         if (!wxDir::Exists(configFile.GetPath()))
         {
             configFile.RemoveDir( pos );
             configFile.InsertDir( pos, wxT("crystalsvg") );
         }
         if (!wxDir::Exists(configFile.GetPath()))
         {
             configFile.RemoveDir( pos );
             configFile.InsertDir( pos, wxT("crystalsvg") );
         }
-        
+
         if (!wxDir::Exists(configFile.GetPath()))
         {
             configFile.RemoveDir( pos );
             configFile.InsertDir( pos, wxT("crystal") );
         }
         if (!wxDir::Exists(configFile.GetPath()))
         {
             configFile.RemoveDir( pos );
             configFile.InsertDir( pos, wxT("crystal") );
         }
-        
+
         if (wxDir::Exists(configFile.GetPath()))
             icondirs.Add( configFile.GetFullPath() );
     }
         if (wxDir::Exists(configFile.GetPath()))
             icondirs.Add( configFile.GetFullPath() );
     }
@@ -1317,14 +1317,14 @@ bool wxFileTypeImpl::GetIcon(wxIconLocation *iconLoc) const
         i ++;
     }
     if ( sTmp.empty () )
         i ++;
     }
     if ( sTmp.empty () )
-        return FALSE;
+        return false;
 
     if ( iconLoc )
     {
         iconLoc->SetFileName(sTmp);
     }
 
 
     if ( iconLoc )
     {
         iconLoc->SetFileName(sTmp);
     }
 
-    return TRUE;
+    return true;
 }
 
 
 }
 
 
@@ -1334,7 +1334,7 @@ wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
     mimeTypes.Clear();
     for (size_t i = 0; i < m_index.GetCount(); i++)
         mimeTypes.Add(m_manager->m_aTypes[m_index[i]]);
     mimeTypes.Clear();
     for (size_t i = 0; i < m_index.GetCount(); i++)
         mimeTypes.Add(m_manager->m_aTypes[m_index[i]]);
-    return TRUE;
+    return true;
 }
 
 
 }
 
 
@@ -1414,14 +1414,14 @@ bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions)
         }
     }
 
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 // set an arbitrary command,
 // could adjust the code to ask confirmation if it already exists and
 }
 
 // set an arbitrary command,
 // could adjust the code to ask confirmation if it already exists and
-// overwriteprompt is TRUE, but this is currently ignored as *Associate* has
+// overwriteprompt is true, but this is currently ignored as *Associate* has
 // no overwrite prompt
 // no overwrite prompt
-bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt /*= TRUE*/)
+bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt /*= true*/)
 {
     wxArrayString strExtensions;
     wxString strDesc, strIcon;
 {
     wxArrayString strExtensions;
     wxString strDesc, strIcon;
@@ -1431,14 +1431,14 @@ bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool
 
     wxArrayString strTypes;
     GetMimeTypes (strTypes);
 
     wxArrayString strTypes;
     GetMimeTypes (strTypes);
-    if (strTypes.GetCount() < 1) return FALSE;
+    if (strTypes.GetCount() < 1) return false;
 
     size_t i;
 
     size_t i;
-    bool Ok = TRUE;
+    bool Ok = true;
     for (i = 0; i < strTypes.GetCount(); i++)
     {
         if (!m_manager->DoAssociation (strTypes[i], strIcon, entry, strExtensions, strDesc))
     for (i = 0; i < strTypes.GetCount(); i++)
     {
         if (!m_manager->DoAssociation (strTypes[i], strIcon, entry, strExtensions, strDesc))
-            Ok = FALSE;
+            Ok = false;
     }
 
     return Ok;
     }
 
     return Ok;
@@ -1447,7 +1447,7 @@ bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool
 // ignore index on the grouds that we only have one icon in a Unix file
 bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon /*= wxEmptyString*/, int /*index = 0*/)
 {
 // ignore index on the grouds that we only have one icon in a Unix file
 bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon /*= wxEmptyString*/, int /*index = 0*/)
 {
-    if (strIcon.empty()) return FALSE;
+    if (strIcon.empty()) return false;
     wxArrayString strExtensions;
     wxString strDesc;
 
     wxArrayString strExtensions;
     wxString strDesc;
 
@@ -1455,14 +1455,14 @@ bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon /*= wxEmptyString*/,
 
     wxArrayString strTypes;
     GetMimeTypes (strTypes);
 
     wxArrayString strTypes;
     GetMimeTypes (strTypes);
-    if (strTypes.GetCount() < 1) return FALSE;
+    if (strTypes.GetCount() < 1) return false;
 
     size_t i;
 
     size_t i;
-    bool Ok = TRUE;
+    bool Ok = true;
     for (i = 0; i < strTypes.GetCount(); i++)
     {
         if (!m_manager->DoAssociation (strTypes[i], strIcon, entry, strExtensions, strDesc))
     for (i = 0; i < strTypes.GetCount(); i++)
     {
         if (!m_manager->DoAssociation (strTypes[i], strIcon, entry, strExtensions, strDesc))
-            Ok = FALSE;
+            Ok = false;
     }
 
     return Ok;
     }
 
     return Ok;
@@ -1475,7 +1475,7 @@ bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon /*= wxEmptyString*/,
 
 wxMimeTypesManagerImpl::wxMimeTypesManagerImpl()
 {
 
 wxMimeTypesManagerImpl::wxMimeTypesManagerImpl()
 {
-    m_initialized = FALSE;
+    m_initialized = false;
     m_mailcapStylesInited = 0;
 }
 
     m_mailcapStylesInited = 0;
 }
 
@@ -1484,11 +1484,11 @@ void wxMimeTypesManagerImpl::InitIfNeeded()
     if ( !m_initialized )
     {
         // set the flag first to prevent recursion
     if ( !m_initialized )
     {
         // set the flag first to prevent recursion
-        m_initialized = TRUE;
-    
+        m_initialized = true;
+
 #if 0
     wxString wm = wxGetenv( wxT("WINDOWMANAGER") );
 #if 0
     wxString wm = wxGetenv( wxT("WINDOWMANAGER") );
-    
+
     if (wm.Find( wxT("kde") ) != wxNOT_FOUND)
         Initialize( wxMAILCAP_KDE|wxMAILCAP_STANDARD );
     else if (wm.Find( wxT("gnome") ) != wxNOT_FOUND)
     if (wm.Find( wxT("kde") ) != wxNOT_FOUND)
         Initialize( wxMAILCAP_KDE|wxMAILCAP_STANDARD );
     else if (wm.Find( wxT("gnome") ) != wxNOT_FOUND)
@@ -1585,7 +1585,7 @@ bool wxMimeTypesManagerImpl::WriteToMimeTypes (int index, bool delete_index)
 {
     // check we have the right manager
     if (! ( m_mailcapStylesInited & wxMAILCAP_STANDARD) )
 {
     // check we have the right manager
     if (! ( m_mailcapStylesInited & wxMAILCAP_STANDARD) )
-        return FALSE;
+        return false;
 
     bool bTemp;
     wxString strHome = wxGetenv(wxT("HOME"));
 
     bool bTemp;
     wxString strHome = wxGetenv(wxT("HOME"));
@@ -1600,18 +1600,18 @@ bool wxMimeTypesManagerImpl::WriteToMimeTypes (int index, bool delete_index)
     }
     else
     {
     }
     else
     {
-        if (delete_index) return FALSE;
+        if (delete_index) return false;
         bTemp = file.Create(strUserMailcap);
     }
     if (bTemp)
     {
         int nIndex;
         bTemp = file.Create(strUserMailcap);
     }
     if (bTemp)
     {
         int nIndex;
-        // test for netscape's header and return FALSE if its found
+        // test for netscape's header and return false if its found
         nIndex = file.pIndexOf (wxT("#--Netscape"));
         if (nIndex != wxNOT_FOUND)
         {
         nIndex = file.pIndexOf (wxT("#--Netscape"));
         if (nIndex != wxNOT_FOUND)
         {
-            wxASSERT_MSG(FALSE,wxT("Error in .mime.types \nTrying to mix Netscape and Metamail formats\nFile not modiifed"));
-            return FALSE;
+            wxASSERT_MSG(false,wxT("Error in .mime.types \nTrying to mix Netscape and Metamail formats\nFile not modiifed"));
+            return false;
         }
         // write it in alternative format
         // get rid of unwanted entries
         }
         // write it in alternative format
         // get rid of unwanted entries
@@ -1639,7 +1639,7 @@ bool wxMimeTypesManagerImpl::WriteToNSMimeTypes (int index, bool delete_index)
 {
     //check we have the right managers
     if (! ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) )
 {
     //check we have the right managers
     if (! ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) )
-        return FALSE;
+        return false;
 
     bool bTemp;
     wxString strHome = wxGetenv(wxT("HOME"));
 
     bool bTemp;
     wxString strHome = wxGetenv(wxT("HOME"));
@@ -1654,7 +1654,7 @@ bool wxMimeTypesManagerImpl::WriteToNSMimeTypes (int index, bool delete_index)
     }
     else
     {
     }
     else
     {
-        if (delete_index) return FALSE;
+        if (delete_index) return false;
         bTemp = file.Create(strUserMailcap);
     }
     if (bTemp)
         bTemp = file.Create(strUserMailcap);
     }
     if (bTemp)
@@ -1663,8 +1663,8 @@ bool wxMimeTypesManagerImpl::WriteToNSMimeTypes (int index, bool delete_index)
         // write it in the format that Netscape uses
         int nIndex;
         // test for netscape's header and insert if required...
         // write it in the format that Netscape uses
         int nIndex;
         // test for netscape's header and insert if required...
-        // this is a comment so use TRUE
-        nIndex = file.pIndexOf (wxT("#--Netscape"), TRUE);
+        // this is a comment so use true
+        nIndex = file.pIndexOf (wxT("#--Netscape"), true);
         if (nIndex == wxNOT_FOUND)
         {
             // either empty file or metamail format
         if (nIndex == wxNOT_FOUND)
         {
             // either empty file or metamail format
@@ -1672,8 +1672,8 @@ bool wxMimeTypesManagerImpl::WriteToNSMimeTypes (int index, bool delete_index)
             // metamail entreies
             if (file.GetLineCount () > 0)
             {
             // metamail entreies
             if (file.GetLineCount () > 0)
             {
-                wxASSERT_MSG(FALSE, wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap"));
-                return FALSE;
+                wxASSERT_MSG(false, wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap"));
+                return false;
             }
             file.InsertLine (wxT( "#--Netscape Communications Corporation MIME Information" ), 0);
             nIndex = 0;
             }
             file.InsertLine (wxT( "#--Netscape Communications Corporation MIME Information" ), 0);
             nIndex = 0;
@@ -1708,7 +1708,7 @@ bool wxMimeTypesManagerImpl::WriteToNSMimeTypes (int index, bool delete_index)
             }
         }
         wxString sExts =  m_aExtensions.Item(index);
             }
         }
         wxString sExts =  m_aExtensions.Item(index);
-        sTmp =     wxT("exts=\"") + sExts.Trim(FALSE).Trim() + wxT("\"");
+        sTmp =     wxT("exts=\"") + sExts.Trim(false).Trim() + wxT("\"");
         if (!delete_index)
         {
             nIndex ++;
         if (!delete_index)
         {
             nIndex ++;
@@ -1727,7 +1727,7 @@ bool wxMimeTypesManagerImpl::WriteToMailCap (int index, bool delete_index)
     //check we have the right managers
     if ( !( ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) ||
             ( m_mailcapStylesInited & wxMAILCAP_STANDARD) ) )
     //check we have the right managers
     if ( !( ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE) ||
             ( m_mailcapStylesInited & wxMAILCAP_STANDARD) ) )
-        return FALSE;
+        return false;
 
     bool bTemp;
     wxString strHome = wxGetenv(wxT("HOME"));
 
     bool bTemp;
     wxString strHome = wxGetenv(wxT("HOME"));
@@ -1742,7 +1742,7 @@ bool wxMimeTypesManagerImpl::WriteToMailCap (int index, bool delete_index)
     }
     else
     {
     }
     else
     {
-        if (delete_index) return FALSE;
+        if (delete_index) return false;
         bTemp = file.Create(strUserMailcap);
     }
     if (bTemp)
         bTemp = file.Create(strUserMailcap);
     }
     if (bTemp)
@@ -1804,13 +1804,13 @@ bool wxMimeTypesManagerImpl::WriteToMailCap (int index, bool delete_index)
                 s = sT.GetNextToken();
                 while ( ! s.empty() )
                 {
                 s = sT.GetNextToken();
                 while ( ! s.empty() )
                 {
-                    bool bKnownToken = FALSE;
-                    if (s.Contains(wxT("description="))) bKnownToken = TRUE;
-                    if (s.Contains(wxT("x11-bitmap="))) bKnownToken = TRUE;
+                    bool bKnownToken = false;
+                    if (s.Contains(wxT("description="))) bKnownToken = true;
+                    if (s.Contains(wxT("x11-bitmap="))) bKnownToken = true;
                     size_t i;
                     for (i=0; i < entries->GetCount(); i++)
                     {
                     size_t i;
                     for (i=0; i < entries->GetCount(); i++)
                     {
-                        if (s.Contains(entries->GetVerb(i))) bKnownToken = TRUE;
+                        if (s.Contains(entries->GetVerb(i))) bKnownToken = true;
                     }
                     if (!bKnownToken)
                     {
                     }
                     if (!bKnownToken)
                     {
@@ -1886,7 +1886,7 @@ wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
         {
         sExt = sA_Exts.Item(i);
         //clean up to just a space before and after
         {
         sExt = sA_Exts.Item(i);
         //clean up to just a space before and after
-        sExt.Trim().Trim(FALSE);
+        sExt.Trim().Trim(false);
         sExt = wxT(' ') + sExt + wxT(' ');
         for (nIndex = 0; nIndex < m_aExtensions.GetCount(); nIndex ++)
             {
         sExt = wxT(' ') + sExt + wxT(' ');
         for (nIndex = 0; nIndex < m_aExtensions.GetCount(); nIndex ++)
             {
@@ -1909,44 +1909,44 @@ bool wxMimeTypesManagerImpl::DoAssociation(const wxString& strType,
                                            const wxArrayString& strExtensions,
                                            const wxString& strDesc)
 {
                                            const wxArrayString& strExtensions,
                                            const wxString& strDesc)
 {
-    int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, TRUE);
+    int nIndex = AddToMimeData(strType, strIcon, entry, strExtensions, strDesc, true);
 
     if ( nIndex == wxNOT_FOUND )
 
     if ( nIndex == wxNOT_FOUND )
-        return FALSE;
+        return false;
 
 
-    return WriteMimeInfo (nIndex, FALSE);
+    return WriteMimeInfo (nIndex, false);
 }
 
 bool wxMimeTypesManagerImpl::WriteMimeInfo(int nIndex, bool delete_mime )
 {
 }
 
 bool wxMimeTypesManagerImpl::WriteMimeInfo(int nIndex, bool delete_mime )
 {
-    bool ok = TRUE;
+    bool ok = true;
 
     if ( m_mailcapStylesInited & wxMAILCAP_STANDARD )
     {
         // write in metamail  format;
         if (WriteToMimeTypes (nIndex, delete_mime) )
             if ( WriteToMailCap   (nIndex, delete_mime) )
 
     if ( m_mailcapStylesInited & wxMAILCAP_STANDARD )
     {
         // write in metamail  format;
         if (WriteToMimeTypes (nIndex, delete_mime) )
             if ( WriteToMailCap   (nIndex, delete_mime) )
-                ok = FALSE;
+                ok = false;
     }
     if ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE )
     {
         // write in netsacpe format;
         if (WriteToNSMimeTypes (nIndex, delete_mime) )
             if ( WriteToMailCap   (nIndex, delete_mime) )
     }
     if ( m_mailcapStylesInited & wxMAILCAP_NETSCAPE )
     {
         // write in netsacpe format;
         if (WriteToNSMimeTypes (nIndex, delete_mime) )
             if ( WriteToMailCap   (nIndex, delete_mime) )
-                ok = FALSE;
+                ok = false;
     }
     if (m_mailcapStylesInited & wxMAILCAP_GNOME)
     {
         // write in Gnome format;
         if (WriteGnomeMimeFile (nIndex, delete_mime) )
             if (WriteGnomeKeyFile   (nIndex, delete_mime) )
     }
     if (m_mailcapStylesInited & wxMAILCAP_GNOME)
     {
         // write in Gnome format;
         if (WriteGnomeMimeFile (nIndex, delete_mime) )
             if (WriteGnomeKeyFile   (nIndex, delete_mime) )
-                ok = FALSE;
+                ok = false;
     }
     if (m_mailcapStylesInited & wxMAILCAP_KDE)
     {
         // write in KDE format;
         if (WriteKDEMimeFile (nIndex, delete_mime) )
     }
     if (m_mailcapStylesInited & wxMAILCAP_KDE)
     {
         // write in KDE format;
         if (WriteKDEMimeFile (nIndex, delete_mime) )
-            ok = FALSE;
+            ok = false;
     }
 
     return ok;
     }
 
     return ok;
@@ -2070,7 +2070,7 @@ wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& ext)
         while ( tk.HasMoreTokens() )
         {
             // consider extensions as not being case-sensitive
         while ( tk.HasMoreTokens() )
         {
             // consider extensions as not being case-sensitive
-            if ( tk.GetNextToken().IsSameAs(ext, FALSE /* no case */) )
+            if ( tk.GetNextToken().IsSameAs(ext, false /* no case */) )
             {
                 // found
                 wxFileType *fileType = new wxFileType;
             {
                 // found
                 wxFileType *fileType = new wxFileType;
@@ -2181,7 +2181,7 @@ void wxMimeTypesManagerImpl::AddMimeTypeInfo(const wxString& strMimeType,
     wxString sTmp = strExtensions;
 
     wxArrayString sExts;
     wxString sTmp = strExtensions;
 
     wxArrayString sExts;
-    sTmp.Trim().Trim(FALSE);
+    sTmp.Trim().Trim(false);
 
     while (!sTmp.empty())
     {
 
     while (!sTmp.empty())
     {
@@ -2189,7 +2189,7 @@ void wxMimeTypesManagerImpl::AddMimeTypeInfo(const wxString& strMimeType,
         sTmp = sTmp.BeforeLast(wxT(' '));
     }
 
         sTmp = sTmp.BeforeLast(wxT(' '));
     }
 
-    AddToMimeData (strMimeType, strIcon, NULL, sExts, strDesc, TRUE);
+    AddToMimeData (strMimeType, strIcon, NULL, sExts, strDesc, true);
 }
 
 void wxMimeTypesManagerImpl::AddMailcapInfo(const wxString& strType,
 }
 
 void wxMimeTypesManagerImpl::AddMailcapInfo(const wxString& strType,
@@ -2208,7 +2208,7 @@ void wxMimeTypesManagerImpl::AddMailcapInfo(const wxString& strType,
     wxString strIcon;
     wxArrayString strExtensions;
 
     wxString strIcon;
     wxArrayString strExtensions;
 
-    AddToMimeData (strType, strIcon, entry, strExtensions, strDesc, TRUE);
+    AddToMimeData (strType, strIcon, entry, strExtensions, strDesc, true);
 
 }
 
 
 }
 
@@ -2223,7 +2223,7 @@ bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName)
 #else
     if ( !file.Open() )
 #endif
 #else
     if ( !file.Open() )
 #endif
-        return FALSE;
+        return false;
 
     // the information we extract
     wxString strMimeType, strDesc, strExtensions;
 
     // the information we extract
     wxString strMimeType, strDesc, strExtensions;
@@ -2315,7 +2315,7 @@ bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName)
             // if there is something left, it may be either a '\\' to continue
             // the line or the next field of the same entry
             bool entryEnded = *pc == wxT('\0'),
             // if there is something left, it may be either a '\\' to continue
             // the line or the next field of the same entry
             bool entryEnded = *pc == wxT('\0'),
-                 nextFieldOnSameLine = FALSE;
+                 nextFieldOnSameLine = false;
             if ( !entryEnded ) {
                 nextFieldOnSameLine = ((*pc != wxT('\\')) || (pc[1] != wxT('\0')));
             }
             if ( !entryEnded ) {
                 nextFieldOnSameLine = ((*pc != wxT('\\')) || (pc[1] != wxT('\0')));
             }
@@ -2378,7 +2378,7 @@ bool wxMimeTypesManagerImpl::ReadMimeTypes(const wxString& strFileName)
         pc = NULL;
     }
 
         pc = NULL;
     }
 
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -2403,7 +2403,7 @@ struct MailcapLineData
          needsterminal,
          copiousoutput;
 
          needsterminal,
          copiousoutput;
 
-    MailcapLineData() { testfailed = needsterminal = copiousoutput = FALSE; }
+    MailcapLineData() { testfailed = needsterminal = copiousoutput = false; }
 };
 
 // process a non-standard (i.e. not the first or second one) mailcap field
 };
 
 // process a non-standard (i.e. not the first or second one) mailcap field
@@ -2414,7 +2414,7 @@ wxMimeTypesManagerImpl::ProcessOtherMailcapField(MailcapLineData& data,
     if ( curField.empty() )
     {
         // we don't care
     if ( curField.empty() )
     {
         // we don't care
-        return TRUE;
+        return true;
     }
 
     // is this something of the form foo=bar?
     }
 
     // is this something of the form foo=bar?
@@ -2425,8 +2425,8 @@ wxMimeTypesManagerImpl::ProcessOtherMailcapField(MailcapLineData& data,
         wxString lhs = curField.BeforeFirst(wxT('=')),
                  rhs = curField.AfterFirst(wxT('='));
 
         wxString lhs = curField.BeforeFirst(wxT('=')),
                  rhs = curField.AfterFirst(wxT('='));
 
-        lhs.Trim(TRUE);     // from right
-        rhs.Trim(FALSE);    // from left
+        lhs.Trim(true);     // from right
+        rhs.Trim(false);    // from left
 
         // it might be quoted
         if ( !rhs.empty() && rhs[0u] == wxT('"') && rhs.Last() == wxT('"') )
 
         // it might be quoted
         if ( !rhs.empty() && rhs[0u] == wxT('"') && rhs.Last() == wxT('"') )
@@ -2451,7 +2451,7 @@ wxMimeTypesManagerImpl::ProcessOtherMailcapField(MailcapLineData& data,
                            wxT("Test '%s' for mime type '%s' failed, skipping."),
                            rhs.c_str(), data.type.c_str());
 
                            wxT("Test '%s' for mime type '%s' failed, skipping."),
                            rhs.c_str(), data.type.c_str());
 
-                data.testfailed = TRUE;
+                data.testfailed = true;
             }
         }
         else if ( lhs == wxT("desc") )
             }
         }
         else if ( lhs == wxT("desc") )
@@ -2477,21 +2477,21 @@ wxMimeTypesManagerImpl::ProcessOtherMailcapField(MailcapLineData& data,
         // so it must be a simple flag
         if ( curField == wxT("needsterminal") )
         {
         // so it must be a simple flag
         if ( curField == wxT("needsterminal") )
         {
-            data.needsterminal = TRUE;
+            data.needsterminal = true;
         }
         else if ( curField == wxT("copiousoutput"))
         {
             // copiousoutput impies that the viewer is a console program
             data.needsterminal =
         }
         else if ( curField == wxT("copiousoutput"))
         {
             // copiousoutput impies that the viewer is a console program
             data.needsterminal =
-            data.copiousoutput = TRUE;
+            data.copiousoutput = true;
         }
         else if ( !IsKnownUnimportantField(curField) )
         {
         }
         else if ( !IsKnownUnimportantField(curField) )
         {
-            return FALSE;
+            return false;
         }
     }
 
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
 }
 
 bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
@@ -2506,7 +2506,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
 #else
     if ( !file.Open() )
 #endif
 #else
     if ( !file.Open() )
 #endif
-        return FALSE;
+        return false;
 
     // indices of MIME types (in m_aTypes) we already found in this file
     //
 
     // indices of MIME types (in m_aTypes) we already found in this file
     //
@@ -2549,7 +2549,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
         // the flags and field values on the current line
         MailcapLineData data;
 
         // the flags and field values on the current line
         MailcapLineData data;
 
-        bool cont = TRUE;
+        bool cont = true;
         while ( cont )
         {
             switch ( *pc )
         while ( cont )
         {
             switch ( *pc )
@@ -2563,7 +2563,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
                         if ( nLine == nLineCount - 1 )
                         {
                             // something is wrong, bail out
                         if ( nLine == nLineCount - 1 )
                         {
                             // something is wrong, bail out
-                            cont = FALSE;
+                            cont = false;
 
                             wxLogDebug(wxT("Mailcap file %s, line %lu: '\\' on the end of the last line ignored."),
                                        strFileName.c_str(),
 
                             wxLogDebug(wxT("Mailcap file %s, line %lu: '\\' on the end of the last line ignored."),
                                        strFileName.c_str(),
@@ -2586,13 +2586,13 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
                     break;
 
                 case wxT('\0'):
                     break;
 
                 case wxT('\0'):
-                    cont = FALSE;   // end of line reached, exit the loop
+                    cont = false;   // end of line reached, exit the loop
 
                     // fall through to still process this field
 
                 case wxT(';'):
                     // trim whitespaces from both sides
 
                     // fall through to still process this field
 
                 case wxT(';'):
                     // trim whitespaces from both sides
-                    curField.Trim(TRUE).Trim(FALSE);
+                    curField.Trim(true).Trim(false);
 
                     switch ( currentToken )
                     {
 
                     switch ( currentToken )
                     {
@@ -2639,7 +2639,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
                             else if ( data.testfailed )
                             {
                                 // skip this entry entirely
                             else if ( data.testfailed )
                             {
                                 // skip this entry entirely
-                                cont = FALSE;
+                                cont = false;
                             }
 
                             // it already has this value
                             }
 
                             // it already has this value
@@ -2714,7 +2714,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
         // the fall back entries have the lowest priority, by definition
         if ( fallback )
         {
         // the fall back entries have the lowest priority, by definition
         if ( fallback )
         {
-            overwrite = FALSE;
+            overwrite = false;
         }
         else
         {
         }
         else
         {
@@ -2747,7 +2747,7 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
         }
     }
 
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes)
 }
 
 size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes)
@@ -2789,11 +2789,11 @@ bool wxMimeTypesManagerImpl::Unassociate(wxFileType *ft)
         if ( nIndex == wxNOT_FOUND)
         {
             // error if we get here ??
         if ( nIndex == wxNOT_FOUND)
         {
             // error if we get here ??
-            return FALSE;
+            return false;
         }
         else
         {
         }
         else
         {
-            WriteMimeInfo(nIndex, TRUE );
+            WriteMimeInfo(nIndex, true );
             m_aTypes.RemoveAt(nIndex);
             m_aEntries.RemoveAt(nIndex);
             m_aExtensions.RemoveAt(nIndex);
             m_aTypes.RemoveAt(nIndex);
             m_aEntries.RemoveAt(nIndex);
             m_aExtensions.RemoveAt(nIndex);
@@ -2807,7 +2807,7 @@ bool wxMimeTypesManagerImpl::Unassociate(wxFileType *ft)
             m_aTypes.Count() == m_aIcons.Count() &&
             m_aTypes.Count() == m_aDescriptions.Count() );
 
             m_aTypes.Count() == m_aIcons.Count() &&
             m_aTypes.Count() == m_aDescriptions.Count() );
 
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -2827,10 +2827,10 @@ static bool IsKnownUnimportantField(const wxString& fieldAll)
     for ( size_t n = 0; n < WXSIZEOF(knownFields); n++ )
     {
         if ( field.CmpNoCase(knownFields[n]) == 0 )
     for ( size_t n = 0; n < WXSIZEOF(knownFields); n++ )
     {
         if ( field.CmpNoCase(knownFields[n]) == 0 )
-            return TRUE;
+            return true;
     }
 
     }
 
-    return FALSE;
+    return false;
 }
 
 #endif
 }
 
 #endif