Revision: 7430
          http://mahogany.svn.sourceforge.net/mahogany/?rev=7430&view=rev
Author:   vadz
Date:     2008-04-24 15:55:22 -0700 (Thu, 24 Apr 2008)

Log Message:
-----------
compilation fixes for wx 2.8

Modified Paths:
--------------
    trunk/M/include/gui/wxMenuDefs.h
    trunk/M/src/adb/AdbFrame.cpp
    trunk/M/src/classes/MessageView.cpp
    trunk/M/src/gui/wxMenuDefs.cpp
    trunk/M/src/gui/wxllist.cpp
    trunk/M/src/mail/MimeDecode.cpp
    trunk/M/src/mail/SendMessageCC.cpp
    trunk/M/src/modules/HtmlViewer.cpp

Modified: trunk/M/include/gui/wxMenuDefs.h
===================================================================
--- trunk/M/include/gui/wxMenuDefs.h    2008-04-24 22:37:29 UTC (rev 7429)
+++ trunk/M/include/gui/wxMenuDefs.h    2008-04-24 22:55:22 UTC (rev 7430)
@@ -324,7 +324,9 @@
    WXMENU_LANG_CP1256,
    WXMENU_LANG_CP1257,
    WXMENU_LANG_KOI8,
+#ifdef wxFONTENCODING_ISO2022_JP
    WXMENU_LANG_ISO2022JP,
+#endif
    WXMENU_LANG_SJIS,
    WXMENU_LANG_GB2312,
    WXMENU_LANG_BIG5,

Modified: trunk/M/src/adb/AdbFrame.cpp
===================================================================
--- trunk/M/src/adb/AdbFrame.cpp        2008-04-24 22:37:29 UTC (rev 7429)
+++ trunk/M/src/adb/AdbFrame.cpp        2008-04-24 22:55:22 UTC (rev 7430)
@@ -3098,7 +3098,7 @@
   // set label and position
   // ----------------------
   wxString strTitle;
-  strTitle.Printf(_("Properties for '%s'"), book->GetName());
+  strTitle.Printf(_("Properties for '%s'"), book->GetName().c_str());
   SetTitle(strTitle);
 
   Centre(wxCENTER_FRAME | wxBOTH);

Modified: trunk/M/src/classes/MessageView.cpp
===================================================================
--- trunk/M/src/classes/MessageView.cpp 2008-04-24 22:37:29 UTC (rev 7429)
+++ trunk/M/src/classes/MessageView.cpp 2008-04-24 22:55:22 UTC (rev 7430)
@@ -1757,7 +1757,7 @@
    if ( faceString.length() > 966 )
    {
       wxLogDebug("Message \"%s\" Face header is too long, ignored.",
-                 m_mailMessage->Subject());
+                 m_mailMessage->Subject().c_str());
       return;
    }
 
@@ -1779,7 +1779,7 @@
    if ( !faceData )
    {
       wxLogDebug("Message \"%s\" Face header is not valid base64, ignored.",
-                 m_mailMessage->Subject());
+                 m_mailMessage->Subject().c_str());
       return;
    }
 
@@ -1790,14 +1790,14 @@
    if ( !face.LoadFile(is, wxBITMAP_TYPE_PNG) )
    {
       wxLogDebug("Message \"%s\" Face header is corrupted, ignored.",
-                 m_mailMessage->Subject());
+                 m_mailMessage->Subject().c_str());
       return;
    }
 
    if ( face.GetWidth() != 48 || face.GetHeight() != 48 )
    {
       wxLogDebug("Message \"%s\" Face header has non-standard size.",
-                 m_mailMessage->Subject());
+                 m_mailMessage->Subject().c_str());
    }
 
    m_viewer->ShowXFace(face);

Modified: trunk/M/src/gui/wxMenuDefs.cpp
===================================================================
--- trunk/M/src/gui/wxMenuDefs.cpp      2008-04-24 22:37:29 UTC (rev 7429)
+++ trunk/M/src/gui/wxMenuDefs.cpp      2008-04-24 22:55:22 UTC (rev 7430)
@@ -522,7 +522,9 @@
    { WXMENU_LANG_CP1256, gettext_noop("Windows Arabic (CP 125&6)"), "", 
wxITEM_RADIO },
    { WXMENU_LANG_CP1257, gettext_noop("Windows Baltic (CP 125&7)"), "", 
wxITEM_RADIO },
    { WXMENU_LANG_KOI8, gettext_noop("Russian (KOI&8-R)"), "", wxITEM_RADIO },
+#ifdef wxFONTENCODING_ISO2022_JP
    { WXMENU_LANG_ISO2022JP, gettext_noop("&Japanese (ISO-2022-JP)"), "", 
wxITEM_RADIO },
+#endif
    { WXMENU_LANG_SJIS, gettext_noop("Japanese (Shift&-JIS)"), "", wxITEM_RADIO 
},
    { WXMENU_LANG_GB2312, gettext_noop("Chinese Si&mplified (GB2312)"), "", 
wxITEM_RADIO },
    { WXMENU_LANG_BIG5, gettext_noop("Chinese &Traditional (Big5)"), "", 
wxITEM_RADIO },
@@ -902,9 +904,11 @@
          id = WXMENU_LANG_KOI8;
          break;
 
+#ifdef wxFONTENCODING_ISO2022_JP
       case wxFONTENCODING_ISO2022_JP:
          id = WXMENU_LANG_ISO2022JP;
          break;
+#endif
 
       case wxFONTENCODING_SHIFT_JIS:
          id = WXMENU_LANG_SJIS;
@@ -964,7 +968,9 @@
       WXMENU_LANG_CP1256,
       WXMENU_LANG_CP1257,
       WXMENU_LANG_KOI8,
+#ifdef wxFONTENCODING_ISO2022_JP
       WXMENU_LANG_ISO2022JP,
+#endif
       WXMENU_LANG_SJIS,
       WXMENU_LANG_GB2312,
       WXMENU_LANG_BIG5,
@@ -1030,9 +1036,11 @@
          encoding = wxFONTENCODING_KOI8;
          break;
 
+#ifdef wxFONTENCODING_ISO2022_JP
       case WXMENU_LANG_ISO2022JP:
          encoding = wxFONTENCODING_ISO2022_JP;
          break;
+#endif
 
       case WXMENU_LANG_SJIS:
          encoding = wxFONTENCODING_SHIFT_JIS;

Modified: trunk/M/src/gui/wxllist.cpp
===================================================================
--- trunk/M/src/gui/wxllist.cpp 2008-04-24 22:37:29 UTC (rev 7429)
+++ trunk/M/src/gui/wxllist.cpp 2008-04-24 22:55:22 UTC (rev 7430)
@@ -43,13 +43,11 @@
 #   include <wx/wxchar.h>        // for wxPrintf/Scanf
 #   include <wx/dc.h>
 #   include <wx/dcps.h>
+#   include <wx/dcprint.h>
 #   include <wx/print.h>
 #   include <wx/log.h>
 #   include <wx/filefn.h>
 #   include <wx/msgdlg.h>
-#ifdef __WINE__
-#   include <wx/dcprint.h>       // for wxPrinterDC
-#endif // __WINE__
 #endif // USE_PCH
 
 #ifdef M_BASEDIR
@@ -3478,6 +3476,11 @@
 */
 void wxLayoutPrintout::GetPageInfo(int *minPage, int *maxPage, int 
*selPageFrom, int *selPageTo)
 {
+   // wxGTK doesn't have wxPrinterDC in wx 2.8
+#if !wxCHECK_VERSION(2, 9, 0) && !defined(__MSW__)
+   #define wxPrinterDC wxPostScriptDC
+#endif
+
    /* We allocate a temporary wxDC for printing, so that we can
       determine the correct paper size and scaling. We don't actually
       print anything on it. */

Modified: trunk/M/src/mail/MimeDecode.cpp
===================================================================
--- trunk/M/src/mail/MimeDecode.cpp     2008-04-24 22:37:29 UTC (rev 7429)
+++ trunk/M/src/mail/MimeDecode.cpp     2008-04-24 22:55:22 UTC (rev 7430)
@@ -110,7 +110,9 @@
       case wxFONTENCODING_CP1256:
 
       case wxFONTENCODING_KOI8:
+#ifdef wxFONTENCODING_ISO2022_JP
       case wxFONTENCODING_ISO2022_JP:
+#endif
       case wxFONTENCODING_SHIFT_JIS:
       case wxFONTENCODING_GB2312:
       case wxFONTENCODING_BIG5:
@@ -614,7 +616,7 @@
       enc = wxLocale::GetSystemEncoding();
    }
 
-   if ( wxCSConv(enc).FromWChar(NULL, 0, in.wc_str()) == wxCONV_FAILED )
+   if ( wxCSConv(enc).FromWChar(NULL, 0, in.wc_str(wxConvLibc)) == 
wxCONV_FAILED )
    {
       // but if we can't encode with it, fall back to UTF-8 as it never fails
       enc = wxFONTENCODING_UTF8;

Modified: trunk/M/src/mail/SendMessageCC.cpp
===================================================================
--- trunk/M/src/mail/SendMessageCC.cpp  2008-04-24 22:37:29 UTC (rev 7429)
+++ trunk/M/src/mail/SendMessageCC.cpp  2008-04-24 22:55:22 UTC (rev 7430)
@@ -683,8 +683,11 @@
 
    // if headers are already encoded, don't do anything, they must be already
    // in ASCII
-   wxCharBuffer buf(m_encodeHeaders ? MIME::EncodeHeader(subject, m_encHeaders)
-                                    : subject.ToAscii());
+   wxCharBuffer buf;
+   if ( m_encodeHeaders )
+      buf = MIME::EncodeHeader(subject, m_encHeaders);
+   else
+      buf = subject.ToAscii();
    m_Envelope->subject = cpystr(buf);
 }
 

Modified: trunk/M/src/modules/HtmlViewer.cpp
===================================================================
--- trunk/M/src/modules/HtmlViewer.cpp  2008-04-24 22:37:29 UTC (rev 7429)
+++ trunk/M/src/modules/HtmlViewer.cpp  2008-04-24 22:55:22 UTC (rev 7430)
@@ -1132,7 +1132,11 @@
 
       // provide stubs for base class pure virtual methods which we don't use
       virtual wxObject* GetProduct() { return NULL; }
+#if wxCHECK_VERSION(2, 9, 0)
       virtual void AddText(const wxString& WXUNUSED(txt)) { }
+#else // wx <= 2.8
+      virtual void AddText(const char *WXUNUSED(txt)) { }
+#endif // wx 2.9+/2.8-
    };
 
    BodyTagHandler *handler = new BodyTagHandler(data);


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

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to