Revision: 7156
          http://svn.sourceforge.net/mahogany/?rev=7156&view=rev
Author:   vadz
Date:     2006-11-06 16:43:12 -0800 (Mon, 06 Nov 2006)

Log Message:
-----------
require wx 2.7.2; remove compile-time checks for older versions (going back as 
far as 2.3 sometimes...)

Modified Paths:
--------------
    trunk/M/configure.in
    trunk/M/include/Mconfig.h
    trunk/M/include/gui/wxMFrame.h
    trunk/M/include/gui/wxMainFrame.h
    trunk/M/src/adb/AdbFrame.cpp
    trunk/M/src/classes/MFolder.cpp
    trunk/M/src/classes/MModule.cpp
    trunk/M/src/gui/wxComposeView.cpp
    trunk/M/src/gui/wxFolderTree.cpp
    trunk/M/src/gui/wxHeadersDialogs.cpp
    trunk/M/src/gui/wxIconManager.cpp
    trunk/M/src/gui/wxMApp.cpp
    trunk/M/src/gui/wxMDialogs.cpp
    trunk/M/src/gui/wxMFolderDialogs.cpp
    trunk/M/src/gui/wxOptionsDlg.cpp
    trunk/M/src/gui/wxllist.cpp
    trunk/M/src/gui/wxlwindow.cpp
    trunk/M/src/modules/BareBonesEditor.cpp
    trunk/M/src/modules/HtmlViewer.cpp
    trunk/M/src/util/ColourNames.cpp
    trunk/M/src/util/strutil.cpp
    trunk/M/src/util/upgrade.cpp
    trunk/M/src/wx/generic/persctrl.cpp

Modified: trunk/M/configure.in
===================================================================
--- trunk/M/configure.in        2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/configure.in        2006-11-07 00:43:12 UTC (rev 7156)
@@ -927,7 +927,7 @@
 dnl --------------------------------------------------------------------------
 
 dnl check for wxWidgets installation\xA4
-AM_PATH_WXCONFIG(2.7.1, wxOK=1,, [adv,base,core,html,net,qa])
+AM_PATH_WXCONFIG(2.7.2, wxOK=1,, [adv,base,core,html,net,qa])
 
 if test "$wxOK" != 1; then
    AC_MSG_ERROR([

Modified: trunk/M/include/Mconfig.h
===================================================================
--- trunk/M/include/Mconfig.h   2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/include/Mconfig.h   2006-11-07 00:43:12 UTC (rev 7156)
@@ -118,8 +118,8 @@
 // wxWindows stuff
 // ----------------------------------------------------------------------------
 
-#if !wxCHECK_VERSION(2, 5, 1)
-#  error "This version of Mahogany requires wxWindows 2.5.1 or higher."
+#if !wxCHECK_VERSION(2, 7, 2)
+#  error "This version of Mahogany requires wxWindows 2.7.2 or higher."
 #endif
 
 #ifdef USE_THREADS

Modified: trunk/M/include/gui/wxMFrame.h
===================================================================
--- trunk/M/include/gui/wxMFrame.h      2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/include/gui/wxMFrame.h      2006-11-07 00:43:12 UTC (rev 7156)
@@ -24,11 +24,6 @@
 
 #include <wx/frame.h>
 
-// enable workaround broken maximize?
-#if defined(__WXMSW__) && !wxCHECK_VERSION(2, 3, 0)
-   #define USE_WORKAROUND_FOR_MAXIMIZE
-#endif // wxMSW < 2.3.0
-
 class Profile;
 
 #ifdef USE_PYTHON
@@ -69,11 +64,8 @@
    /// return true if initialised
    bool  IsInitialised(void) const { return m_initialised; }
 
-   // if we use this hack, Show() is implemented below
-#ifndef USE_WORKAROUND_FOR_MAXIMIZE
    /// make it visible or invisible
    bool Show(bool visible = true) { return wxFrame::Show(visible); }
-#endif // USE_WORKAROUND_FOR_MAXIMIZE
 
    /// used to set the title of the window class
    void  SetTitle(String const & name);

Modified: trunk/M/include/gui/wxMainFrame.h
===================================================================
--- trunk/M/include/gui/wxMainFrame.h   2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/include/gui/wxMainFrame.h   2006-11-07 00:43:12 UTC (rev 7156)
@@ -25,9 +25,7 @@
 
 #include "MEvent.h"
 
-#if wxCHECK_VERSION(2,7,0)
-   #include <wx/power.h>
-#endif
+#include <wx/power.h>
 
 class MFolder;
 class MFolderList;

Modified: trunk/M/src/adb/AdbFrame.cpp
===================================================================
--- trunk/M/src/adb/AdbFrame.cpp        2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/adb/AdbFrame.cpp        2006-11-07 00:43:12 UTC (rev 7156)
@@ -3738,11 +3738,7 @@
   if ( m_bListboxModified ) {
     data.ClearExtraEMails();
     wxListBox *listbox = GetListBox();
-#if wxCHECK_VERSION(2, 3, 2)
     size_t nCount = listbox->GetCount();
-#else
-    size_t nCount = listbox->Number();
-#endif
     for ( size_t n = 0; n < nCount; n++ ) {
       data.AddEMail(listbox->GetString(n));
     }

Modified: trunk/M/src/classes/MFolder.cpp
===================================================================
--- trunk/M/src/classes/MFolder.cpp     2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/classes/MFolder.cpp     2006-11-07 00:43:12 UTC (rev 7156)
@@ -1316,11 +1316,7 @@
    CHECK_RET( index != wxNOT_FOUND,
               _T("can't remove folder from cache because it's not in it") );
 
-#if wxCHECK_VERSION(2, 2, 8)
    ms_aFolderNames.RemoveAt((size_t)index);
-#else
-   ms_aFolderNames.Remove((size_t)index);
-#endif
 
    ms_aFolders.RemoveAt((size_t)index);
 }

Modified: trunk/M/src/classes/MModule.cpp
===================================================================
--- trunk/M/src/classes/MModule.cpp     2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/classes/MModule.cpp     2006-11-07 00:43:12 UTC (rev 7156)
@@ -140,11 +140,9 @@
       // FIXME: if we do unload the library, M crashes because modules are
       //        unloaded too soon -- they should really remain in memory for as
       //        long as they're used
-#if wxCHECK_VERSION(2, 5, 0)
       (*m_dllsToUnload.begin())->Detach(); // prevent DLL from being unloaded
 
       delete *m_dllsToUnload.begin();
-#endif // wxGTK 2.5.0+
 
       m_dllsToUnload.pop_front();
    }

Modified: trunk/M/src/gui/wxComposeView.cpp
===================================================================
--- trunk/M/src/gui/wxComposeView.cpp   2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/gui/wxComposeView.cpp   2006-11-07 00:43:12 UTC (rev 7156)
@@ -1338,9 +1338,7 @@
 
       if ( event.ShiftDown() || !IsModified() )
       {
-#if wxCHECK_VERSION(2, 5, 2)
          Navigate(event.ShiftDown() ? 0 : wxNavigationKeyEvent::IsForward);
-#endif // wx 2.5.2+
       }
       else
       {

Modified: trunk/M/src/gui/wxFolderTree.cpp
===================================================================
--- trunk/M/src/gui/wxFolderTree.cpp    2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/gui/wxFolderTree.cpp    2006-11-07 00:43:12 UTC (rev 7156)
@@ -63,13 +63,6 @@
    #include "utf8.h"  // for utf8_text_utf7()
 }
 
-// support for UTF-8 has been only added in 2.3.0
-#if wxCHECK_VERSION(2, 3, 0)
-   #define USE_UTF8
-#else
-   #undef USE_UTF8
-#endif // wxWin 2.3.0
-
 // wxMSW treectrl has a bug: it's impossible to prevent it from
 // collapsing/expanding a branch when it is double clicked, even if we do
 // process the activate message
@@ -212,12 +205,7 @@
    wxFolderTreeNode *GetParent() const { return m_parent; }
 
       // get the name (base part of the label) of this folder
-   String GetName() const
-#ifdef USE_UTF8
-      ;
-#else
-      { return m_folder->GetName(); }
-#endif
+   String GetName() const;
 
    // expanded flag
       // must be called from OnTreeExpanding() only!
@@ -1633,8 +1621,6 @@
 // wxFolderTreeNode UTF8 support
 // ----------------------------------------------------------------------------
 
-#ifdef USE_UTF8
-
 // Folder names (IMAP, but can be used for local mailboxes also) may contain
 // characters encoded in "modified-UTF7" (RFC 2060)
 
@@ -1717,8 +1703,6 @@
    return isValid ? name : nameOrig;
 }
 
-#endif // USE_UTF8
-
 // ----------------------------------------------------------------------------
 // wxFolderTreeImpl
 // ----------------------------------------------------------------------------
@@ -1935,11 +1919,7 @@
          Expand(current);
       }
 
-#if wxCHECK_VERSION(2, 5, 0)
       wxTreeItemIdValue cookie;
-#else
-      long cookie;
-#endif
       wxTreeItemId child = GetFirstChild(current, cookie);
       while ( child.IsOk() )
       {
@@ -2196,11 +2176,7 @@
    // garbage in, garbage out
    CHECK( id.IsOk(), id, _T("invalid tree item in GetNextItem") );
 
-#if wxCHECK_VERSION(2, 5, 0)
    wxTreeItemIdValue cookie;
-#else
-   long cookie;
-#endif
    wxTreeItemId idNext;
 
    if ( next )
@@ -3262,11 +3238,7 @@
 
                // insert the new folder at the right place
                int pos = 0;
-#if wxCHECK_VERSION(2, 5, 0)
                wxTreeItemIdValue cookie;
-#else
-               long cookie;
-#endif
                wxTreeItemId item = GetFirstChild(parent, cookie);
                while ( item.IsOk() )
                {

Modified: trunk/M/src/gui/wxHeadersDialogs.cpp
===================================================================
--- trunk/M/src/gui/wxHeadersDialogs.cpp        2006-11-07 00:28:30 UTC (rev 
7155)
+++ trunk/M/src/gui/wxHeadersDialogs.cpp        2006-11-07 00:43:12 UTC (rev 
7156)
@@ -548,11 +548,7 @@
 {
    // copy all entries from the checklistbox to the profile
    wxString shownHeaders, allHeaders, header;
-#if wxCHECK_VERSION(2, 3, 2)
    size_t count = (size_t)m_checklstBox->GetCount();
-#else
-   size_t count = (size_t)m_checklstBox->Number();
-#endif
    for ( size_t n = 0; n < count; n++ )
    {
       header = m_checklstBox->GetString(n);

Modified: trunk/M/src/gui/wxIconManager.cpp
===================================================================
--- trunk/M/src/gui/wxIconManager.cpp   2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/gui/wxIconManager.cpp   2006-11-07 00:43:12 UTC (rev 7156)
@@ -29,9 +29,7 @@
 #  include "Mdefaults.h"
 #endif // USE_PCH
 
-#if wxCHECK_VERSION(2, 5, 0)
-#  include <wx/iconloc.h>
-#endif
+#include <wx/iconloc.h>
 
 #include "gui/wxMDialogs.h"
 #include "PathFinder.h"         // for PathFinder
@@ -676,11 +674,7 @@
    // now try to find it by name
    icon = GetIcon(type);
 
-#if wxCHECK_VERSION(2, 7, 2)
    if ( icon.IsSameAs(m_unknownIcon) )
-#else
-   if ( icon == m_unknownIcon )
-#endif
    {
       // the generic icon for this class of things
       String primType = type.BeforeLast(_T('/'));

Modified: trunk/M/src/gui/wxMApp.cpp
===================================================================
--- trunk/M/src/gui/wxMApp.cpp  2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/gui/wxMApp.cpp  2006-11-07 00:43:12 UTC (rev 7156)
@@ -101,13 +101,6 @@
    #define UNUSED_IF_WIN(arg) arg
 #endif
 
-#if defined(__WXGTK20__) && !wxCHECK_VERSION(2, 6, 2)
-   // wxGTK 2.6.1 references this function but it doesn't exist in recent GTK+
-   // versions so stub it out here to make it possible to link the app (it's
-   // not really used anyhow)
-   extern "C" void *pango_x_get_context(void *) { return NULL; }
-#endif
-
 // ----------------------------------------------------------------------------
 // options we use here
 // ----------------------------------------------------------------------------
@@ -961,7 +954,6 @@
                    "program instances are running."));
    }
 
-#if wxCHECK_VERSION(2, 3, 2)
    // parse our command line options inside OnInit()
    if ( !wxApp::OnInit() )
    {
@@ -969,7 +961,6 @@
 
       return false;
    }
-#endif // wxWin 2.3.2+
 
 #ifdef OS_WIN
    // stupidly enough wxWin resets the default timestamp under Windows :-(
@@ -1122,7 +1113,7 @@
 
    // wxLocale::GetSystemEncoding() is broken in wx <= 2.6.3, it returns
    // ISO-8859-1 for UTF-8 locale
-#if defined(__WXGTK20__) && wxCHECK_VERSION(2, 6, 4)
+#if defined(__WXGTK20__)
    // we need UTF-8 support to be able to work with messages in different
    // encodings
    if ( wxLocale::GetSystemEncoding() != wxFONTENCODING_UTF8 )
@@ -1882,8 +1873,6 @@
 // Customize wxApp behaviour
 // ----------------------------------------------------------------------------
 
-#if wxCHECK_VERSION(2, 3, 0)
-
 // never return splash frame from here
 wxWindow *wxMApp::GetTopWindow() const
 {
@@ -1894,8 +1883,6 @@
    return win;
 }
 
-#endif // 2.3.0
-
 // return our icons
 wxIcon
 wxMApp::GetStdIcon(int UNUSED_IF_WIN(which)) const

Modified: trunk/M/src/gui/wxMDialogs.cpp
===================================================================
--- trunk/M/src/gui/wxMDialogs.cpp      2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/gui/wxMDialogs.cpp      2006-11-07 00:43:12 UTC (rev 7156)
@@ -329,25 +329,6 @@
 {
    frame->Hide(); // immediately
    frame->Close(true /* force */); // will happen later
-
-#if !wxCHECK_VERSION(2, 3, 0)
-   // unset the given frame as the main app window: otherwise we risk to create
-   // the dialogs with splash as parent and a crash later when the dialog is
-   // closed as its parent will have already been deleted
-   //
-   // NB: use mApplication and not wxTheApp now as the latter could still be
-   //     NULL if we're called from OnInit()!
-   if ( mApplication )
-   {
-      wxMApp *mapp = (wxMApp *)mApplication;
-      if ( mapp->GetTopWindow() == frame )
-      {
-         mapp->SetTopWindow(NULL);
-
-         wxTopLevelWindows.DeleteObject(frame);
-      }
-   }
-#endif // wxWin 2.3+
 }
 
 wxWindow *GetParentOfClass(const wxWindow *win, wxClassInfo *classinfo)
@@ -2485,11 +2466,7 @@
     {
         wxString label = m_checklstBox->GetString(selection);
 
-#if wxCHECK_VERSION(2, 3, 2)
         int count = m_checklstBox->GetCount();
-#else
-        int count = m_checklstBox->Number();
-#endif
         int positionNew = up ? selection - 1 : selection + 2;
         if ( positionNew >= 0 && positionNew <= count )
         {
@@ -2756,9 +2733,7 @@
    m_labelText->SetLabel(label);
 
    // update the frame
-#if wxCHECK_VERSION(2, 2, 6)
    wxYieldIfNeeded();
-#endif // wxWin 2.2.6+
 }
 
 void MProgressInfo::SetValue(size_t numDone)
@@ -2766,9 +2741,7 @@
    m_labelValue->SetLabel(wxString::Format(_("%u done"), numDone));
 
    // update the frame
-#if wxCHECK_VERSION(2, 2, 6)
    wxYieldIfNeeded();
-#endif // wxWin 2.2.6+
 }
 
 MProgressInfo::~MProgressInfo()

Modified: trunk/M/src/gui/wxMFolderDialogs.cpp
===================================================================
--- trunk/M/src/gui/wxMFolderDialogs.cpp        2006-11-07 00:28:30 UTC (rev 
7155)
+++ trunk/M/src/gui/wxMFolderDialogs.cpp        2006-11-07 00:43:12 UTC (rev 
7156)
@@ -1667,13 +1667,7 @@
    // enable folder subtype combobox only if we're creating because (folder
    // type can't be changed later) and if there are any subtypes
    EnableControlWithLabel(m_folderSubtype,
-                          IsCreating() &&
-#if wxCHECK_VERSION(2, 3, 2)
-                             m_folderSubtype->GetCount() > 0
-#else
-                             m_folderSubtype->Number() > 0
-#endif
-                          );
+                          IsCreating() && !m_folderSubtype->IsEmpty());
 
    dlg->SetMayEnableOk(TRUE);
 }

Modified: trunk/M/src/gui/wxOptionsDlg.cpp
===================================================================
--- trunk/M/src/gui/wxOptionsDlg.cpp    2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/gui/wxOptionsDlg.cpp    2006-11-07 00:43:12 UTC (rev 7156)
@@ -4798,11 +4798,7 @@
 {
    // delete the values of all selected settings in this profile - this will
    // effectively restore their default values
-#if wxCHECK_VERSION(2, 3, 2)
    size_t count = (size_t)m_checklistBox->GetCount();
-#else
-   size_t count = (size_t)m_checklistBox->Number();
-#endif
    for ( size_t n = 0; n < count; n++ )
    {
       if ( m_checklistBox->IsChecked(n) )

Modified: trunk/M/src/gui/wxllist.cpp
===================================================================
--- trunk/M/src/gui/wxllist.cpp 2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/gui/wxllist.cpp 2006-11-07 00:43:12 UTC (rev 7156)
@@ -3386,7 +3386,7 @@
    // force a full layout of the list:
    m_llist->ForceTotalLayout();
    // layout  is called in ScaleDC() when we have a DC
-#if defined(__UNIX__) && wxCHECK_VERSION(2,2,1)
+#if defined(__UNIX__)
    wxPostScriptDC::SetResolution(72);
 #endif
 }

Modified: trunk/M/src/gui/wxlwindow.cpp
===================================================================
--- trunk/M/src/gui/wxlwindow.cpp       2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/gui/wxlwindow.cpp       2006-11-07 00:43:12 UTC (rev 7156)
@@ -245,11 +245,7 @@
 wxLayoutWindow::DoClearWindow(bool noUpdate)
 {
    SetBackgroundColour(GetLayoutList()->GetDefaultStyleInfo().GetBGColour());
-#if wxCHECK_VERSION(2, 5, 0)
    ClearBackground();
-#else
-   wxScrolledWindow::Clear();
-#endif
    ResizeScrollbars(true);
    SetDirty();
    SetModified(FALSE);

Modified: trunk/M/src/modules/BareBonesEditor.cpp
===================================================================
--- trunk/M/src/modules/BareBonesEditor.cpp     2006-11-07 00:28:30 UTC (rev 
7155)
+++ trunk/M/src/modules/BareBonesEditor.cpp     2006-11-07 00:43:12 UTC (rev 
7156)
@@ -188,8 +188,6 @@
    int SizeWithoutNewline(const String &paragraph);
    int FindLineLength(
       const String &paragraph,int lineStart,int paragraphEnd) const;
-   size_t RFind(const String &where,wxChar what,size_t start) const;
-   size_t FindLastNotOf(const String &where,wxChar what,size_t start) const;
    void FindSignature();
    bool PastSignature() { return m_from >= m_signature; }
 
@@ -527,7 +525,7 @@
 
    // Try to find at least one space on the line. Pick the last one.
    // Include one character past margin in case it is space.
-   size_t findSpace = RFind(paragraph,_T(' '),lineStart+m_margin);
+   size_t findSpace = paragraph.rfind(_T(' '),lineStart+m_margin);
    if(findSpace != paragraph.npos && (int)findSpace >= lineStart)
    {
       // There are spaces and wrapping within margin is possible.
@@ -567,50 +565,6 @@
    return lineLength;
 }
 
-size_t FormattedParagraph::RFind(
-   const String &where,wxChar what,size_t start) const
-{
-#if wxCHECK_VERSION(2,5,0) // Bug in wxWindows implementation of rfind
-   size_t result = where.rfind(what,start);
-#else
-   size_t result = where.npos;
-   int cursor;
-
-   for( cursor = start; cursor >= 0; --cursor )
-   {
-      if( where[cursor] == what )
-      {
-         result = (size_t)cursor;
-         break;
-      }
-   }
-#endif
-
-   return result;
-}
-
-size_t FormattedParagraph::FindLastNotOf(
-   const String &where,wxChar what,size_t start) const
-{
-#if wxCHECK_VERSION(2,5,0) // Bug in wxWindows implem. of find_last_not_of
-   size_t result = where.find_last_not_of(what,start);
-#else
-   size_t result = where.npos;
-   int cursor;
-
-   for( cursor = start; cursor >= 0; --cursor )
-   {
-      if( where[cursor] != what )
-      {
-         result = (size_t)cursor;
-         break;
-      }
-   }
-#endif
-
-   return result;
-}
-
 void FormattedParagraph::FindSignature()
 {
    int count = m_control->GetNumberOfLines();

Modified: trunk/M/src/modules/HtmlViewer.cpp
===================================================================
--- trunk/M/src/modules/HtmlViewer.cpp  2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/modules/HtmlViewer.cpp  2006-11-07 00:43:12 UTC (rev 7156)
@@ -396,20 +396,8 @@
 
 
    // provide access to some wxHtmlWindow protected methods
-   void Copy()
-   {
-#if wxCHECK_VERSION(2, 5, 1)
-      CopySelection();
-#endif
-   }
-   wxString GetSelection()
-   {
-#if wxCHECK_VERSION(2, 5, 1)
-      return SelectionToText();
-#else
-      return wxEmptyString;
-#endif
-   }
+   void Copy() { CopySelection(); }
+   wxString GetSelection() { return SelectionToText(); }
 
 private:
    // get the clickable info previousy stored by StoreClickable()
@@ -657,9 +645,7 @@
 
 void HtmlViewer::SelectAll()
 {
-#if wxCHECK_VERSION(2, 5, 1)
    m_window->SelectAll();
-#endif // wxWin 2.5.1+
 }
 
 String HtmlViewer::GetSelection() const
@@ -1164,8 +1150,6 @@
 
    m_window->SetPage(m_htmlText);
 
-#if defined(wxCHECK_VERSION_FULL)
-#if wxCHECK_VERSION_FULL(2, 5, 2, 1)
    // if we display HTML text, we need to let the msg view know about the text
    // we have so that it could be quoted later -- normally this is done by
    // TransparentFilter which intercepts all InsertText() calls, but it can't
@@ -1180,8 +1164,6 @@
 
       m_hasHtmlContents = false;
    }
-#endif // wx >= 2.5.2
-#endif
 }
 
 // ----------------------------------------------------------------------------
@@ -1192,11 +1174,7 @@
 {
    wxKeyEvent event;
    event.m_keyCode = keycode;
-#if !wxCHECK_VERSION(2, 7, 0) && defined(__WXGTK__)
-   m_window->OnChar(event);
-#else
    m_window->HandleOnChar(event);
-#endif
 }
 
 bool

Modified: trunk/M/src/util/ColourNames.cpp
===================================================================
--- trunk/M/src/util/ColourNames.cpp    2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/util/ColourNames.cpp    2006-11-07 00:43:12 UTC (rev 7156)
@@ -45,21 +45,12 @@
    }
    else // a colour name
    {
-#if wxCHECK_VERSION(2,5,0)
       wxColour col = wxTheColourDatabase->Find(name);
       if ( !col.Ok() )
          return false;
 
       if ( colour )
          *colour = col;
-#else
-      wxColour *col = wxTheColourDatabase->FindColour(name);
-      if ( !col )
-         return false;
-
-      if ( colour )
-         *colour = *col;
-#endif
    }
 
    return true;

Modified: trunk/M/src/util/strutil.cpp
===================================================================
--- trunk/M/src/util/strutil.cpp        2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/util/strutil.cpp        2006-11-07 00:43:12 UTC (rev 7156)
@@ -1485,26 +1485,6 @@
    {
       if ( enc == wxFONTENCODING_UTF7 )
       {
-#if !wxCHECK_VERSION(2, 5, 4)
-         // wxWindows does not support UTF-7 yet, so we first convert
-         // UTF-7 to UTF-8 using c-client function and then convert
-         // UTF-8 to current environment's encoding.
-         SIZEDTEXT text7, text8;
-         text7.data = (unsigned char *) strUtf->c_str();
-         text7.size = strUtf->length();
-
-         utf8_text_utf7 (&text7, &text8);
-
-         strUtf->clear();
-         strUtf->reserve(text8.size);
-         for ( unsigned long k = 0; k < text8.size; k++ )
-         {
-            *strUtf << wxChar(text8.data[k]);
-         }
-
-         return ConvertUTF8ToMB(strUtf);
-#else // wx >= 2.5.4
-
          // try to determine which multibyte encoding is best suited for this
          // Unicode string
          wxWCharBuffer wbuf(strUtf->wc_str(wxConvUTF7));
@@ -1539,7 +1519,6 @@
                *strUtf = str;
             }
          }
-#endif // 2.5.4
       }
       else
       {

Modified: trunk/M/src/util/upgrade.cpp
===================================================================
--- trunk/M/src/util/upgrade.cpp        2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/util/upgrade.cpp        2006-11-07 00:43:12 UTC (rev 7156)
@@ -30,9 +30,7 @@
 #  include "gui/wxIconManager.h"
 
 #  include <wx/stattext.h>              // for wxStaticText
-#  if wxCHECK_VERSION(2,5,0)
-#     include <wx/sizer.h>              // for wxBoxSizer
-#  endif
+#  include <wx/sizer.h>                // for wxBoxSizer
 #endif  //USE_PCH
 
 #include "Mpers.h"
@@ -40,7 +38,6 @@
 #include "MFolder.h"
 #include "Message.h"
 
-#include <wx/version.h>                // for wxCHECK_VERSION
 #include <wx/file.h>                   // for wxFile
 #include <wx/fileconf.h>
 
@@ -743,19 +740,8 @@
 
 wxEnhancedPanel *InstallWizardPage::CreateEnhancedPanel(wxStaticText *text)
 {
-#if !wxCHECK_VERSION(2,5,0)
-   wxSize sizeLabel = text->GetSize();
-   wxSize sizePage = ((wxWizard *)GetParent())->GetPageSize();
-//   wxSize sizePage = ((wxWizard *)GetParent())->GetSize();
-   wxCoord y = sizeLabel.y + 2*LAYOUT_Y_MARGIN;
-#endif
-
    wxEnhancedPanel *panel = new wxEnhancedPanel(this, true /* scrolling */);
-#if !wxCHECK_VERSION(2,5,0)
-   panel->SetSize(0, y, sizePage.x, sizePage.y - y);
-#endif
 
-#if wxCHECK_VERSION(2,5,0)
    wxBoxSizer *pageSizer = new wxBoxSizer(wxVERTICAL);
    SetSizer(pageSizer);
 
@@ -771,7 +757,6 @@
       1, // Vertical stretching
       wxEXPAND // No border, horizontal stretching
    );
-#endif
 
    panel->SetAutoLayout(true);
 
@@ -790,9 +775,7 @@
 {
    m_useWizard = true;
 
-#if wxCHECK_VERSION(2,5,0)
    wxStaticText *introduction =
-#endif // 2.5.0+
    new wxStaticText(this, -1, _(
       "Welcome to Mahogany!\n"
       "\n"
@@ -818,13 +801,6 @@
                   _("I'm an &expert and don't need the wizard")
                 );
 
-#if !wxCHECK_VERSION(2,5,0)
-   wxSize sizeBox = m_checkbox->GetSize(),
-          sizePage = wizard->GetPageSize();
-
-   // adjust the vertical position
-   m_checkbox->Move(5, sizePage.y - 2*sizeBox.y);
-#else // 2.5.x
    wxBoxSizer *pageSizer = new wxBoxSizer(wxVERTICAL);
    pageSizer->Add(
       introduction,
@@ -841,7 +817,6 @@
 
    SetSizer(pageSizer);
    pageSizer->Fit(this);
-#endif // 2.5.x
 }
 
 InstallWizardPageId InstallWizardWelcomePage::GetNextPageId() const
@@ -901,11 +876,7 @@
    wxEnhancedPanel *panel = CreateEnhancedPanel(text);
    panel->CreateButton(_("&Import..."), NULL);
 
-#if !wxCHECK_VERSION(2,5,0)
-   panel->Layout();
-#else
    GetSizer()->Fit(this);
-#endif
 }
 
 void InstallWizardImportPage::OnImportButton(wxCommandEvent&)
@@ -947,11 +918,7 @@
    m_login = panel->CreateTextWithLabel(labels[2], widthMax, m_organization);
    m_email = panel->CreateTextWithLabel(labels[3], widthMax, m_login);
 
-#if !wxCHECK_VERSION(2,5,0)
-   panel->Layout();
-#else
    GetSizer()->Fit(this);
-#endif
 }
 
 bool InstallWizardIdentityPage::TransferDataToWindow()
@@ -1045,11 +1012,7 @@
    m_smtp = panel->CreateTextWithLabel(labels[3], widthMax, m_leaveOnServer);
    m_nntp = panel->CreateTextWithLabel(labels[4], widthMax, m_smtp);
 
-#if !wxCHECK_VERSION(2,5,0)
-   panel->Layout();
-#else
    GetSizer()->Fit(this);
-#endif
 }
 
 bool InstallWizardServersPage::TransferDataToWindow()
@@ -1221,11 +1184,7 @@
    m_disconnect = panel->CreateTextWithLabel(labels[1], widthMax, m_connect);
 #endif // platform
 
-#if !wxCHECK_VERSION(2,5,0)
-   panel->Layout();
-#else
    GetSizer()->Fit(this);
-#endif
 }
 
 bool InstallWizardDialUpPage::TransferDataFromWindow()
@@ -1424,11 +1383,7 @@
                                                widthMax, text6);
 #endif // USE_PYTHON
 
-#if !wxCHECK_VERSION(2,5,0)
-   panel->Layout();
-#else
    GetSizer()->Fit(this);
-#endif
 }
 
 #ifdef USE_HELPERS_PAGE
@@ -1505,11 +1460,7 @@
       m_checkboxSendTestMsg = NULL;
    }
 
-#if !wxCHECK_VERSION(2,5,0)
-   panel->Layout();
-#else
    GetSizer()->Fit(this);
-#endif
 }
 
 bool InstallWizardFinalPage::TransferDataToWindow()
@@ -1642,12 +1593,9 @@
                         NULL,                         // parent
                         -1,                           // id
                         _("Mahogany Installation"),   // title
-                        iconManager->GetBitmap(_T("install_welcome")) // def 
image
-#if wxCHECK_VERSION(2,5,0)
-                        ,
+                        iconManager->GetBitmap(_T("install_welcome")), // def 
image
                         wxDefaultPosition,
                         wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
-#endif
                       );
 
    // NULL the pages array
@@ -1658,7 +1606,6 @@
 
    gs_wizardPages[InstallWizard_WelcomePage] = welcomePage;
 
-#if wxCHECK_VERSION(2,5,0)
    // we need to add to the sizer all pages not reachable from the initial one
    // by calling GetNext()
    wizard->GetPageAreaSizer()->Add(welcomePage);
@@ -1667,7 +1614,6 @@
             welcomePage->GetPageById(InstallWizard_DialUpPage)
       );
    #endif // USE_DIALUP
-#endif // wxWindows 2.5.0+
 
    // the wizard may be either cancelled or a checkbox may be used to skip it
    // entirely (besides, this is confusing - the checkbox is probably useless,

Modified: trunk/M/src/wx/generic/persctrl.cpp
===================================================================
--- trunk/M/src/wx/generic/persctrl.cpp 2006-11-07 00:28:30 UTC (rev 7155)
+++ trunk/M/src/wx/generic/persctrl.cpp 2006-11-07 00:43:12 UTC (rev 7156)
@@ -1435,11 +1435,7 @@
     bool hasExpandedChildren = FALSE;
 
     size_t nChild = 0;
-#if wxCHECK_VERSION(2, 5, 0)
     wxTreeItemIdValue cookie;
-#else
-    long cookie;
-#endif
     wxTreeItemId idChild = GetFirstChild(id, cookie);
     while ( idChild.IsOk() )
     {
@@ -1526,11 +1522,7 @@
             }
 
             // get the child with the given index
-#if wxCHECK_VERSION(2, 5, 0)
             wxTreeItemIdValue cookie;
-#else
-            long cookie;
-#endif
             wxTreeItemId idChild = GetFirstChild(id, cookie);
             while ( idChild.IsOk() )
             {
@@ -2187,15 +2179,11 @@
 {
     switch ( rc )
     {
-#if wxCHECK_VERSION(2, 3, 1)
         case 0x0020:
-#endif
         case wxYES:
             return wxYES;
 
-#if wxCHECK_VERSION(2, 3, 1)
         case 0x0040:
-#endif
         case wxNO:
             return wxNO;
 


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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to