aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <dberkholz@gentoo.org>2006-10-17 18:07:48 -0700
committerDonnie Berkholz <donnie@comet.(none)>2006-10-17 18:07:48 -0700
commit96be0c67c186e01bf0c869f90589257b5ed47a0d (patch)
treeb38ea01265d6223398d89298c2f710dd80436d66 /mail-client
parentcompiz: drop patches, use straight upstream (diff)
downloaddberkholz-96be0c67c186e01bf0c869f90589257b5ed47a0d.tar.gz
dberkholz-96be0c67c186e01bf0c869f90589257b5ed47a0d.tar.bz2
dberkholz-96be0c67c186e01bf0c869f90589257b5ed47a0d.zip
Add mahogany 0.67, not working yet.
Diffstat (limited to 'mail-client')
-rw-r--r--mail-client/mahogany/Manifest20
-rw-r--r--mail-client/mahogany/files/0.67-cvs20060903.patch2015
-rw-r--r--mail-client/mahogany/files/0.67-utf8warn.patch70
-rw-r--r--mail-client/mahogany/files/0.67-wx26.patch11
-rw-r--r--mail-client/mahogany/files/digest-mahogany-0.673
-rw-r--r--mail-client/mahogany/mahogany-0.67.ebuild82
6 files changed, 2201 insertions, 0 deletions
diff --git a/mail-client/mahogany/Manifest b/mail-client/mahogany/Manifest
new file mode 100644
index 0000000..efa6948
--- /dev/null
+++ b/mail-client/mahogany/Manifest
@@ -0,0 +1,20 @@
+AUX 0.67-cvs20060903.patch 74145 RMD160 7a3f34d2c674fc6d5ee35813f518b27c37a6674e SHA1 9bdb0b27c548e239e5f7bdb55e2fe9665916542c SHA256 00a99705e17c4bdc65808742d691ca5ac5001d20052998dbf076b5250ce0eb20
+MD5 782c8dec2f7bfd885fdd084886ffa04e files/0.67-cvs20060903.patch 74145
+RMD160 7a3f34d2c674fc6d5ee35813f518b27c37a6674e files/0.67-cvs20060903.patch 74145
+SHA256 00a99705e17c4bdc65808742d691ca5ac5001d20052998dbf076b5250ce0eb20 files/0.67-cvs20060903.patch 74145
+AUX 0.67-utf8warn.patch 2685 RMD160 3740a1683b51506ec3425df81352c83b49805cb7 SHA1 8745c3b5604ec5b935522bc9b46ec9ac6f24ae14 SHA256 647f403051e5939e87635c9f889c690fee9627dc603754cc132f1ebd89c4bb59
+MD5 873c4c62667875a1a067460d5482dc3b files/0.67-utf8warn.patch 2685
+RMD160 3740a1683b51506ec3425df81352c83b49805cb7 files/0.67-utf8warn.patch 2685
+SHA256 647f403051e5939e87635c9f889c690fee9627dc603754cc132f1ebd89c4bb59 files/0.67-utf8warn.patch 2685
+AUX 0.67-wx26.patch 485 RMD160 d36450a8547607faad0f482bc9469b85a199a551 SHA1 0935a9d695abaa905211024fca2024e06a090182 SHA256 1471427e7f411b414cfc6684d2681d11fb03bcc4fec7359941b9551d4bfbf66c
+MD5 9c96f0f72adc2b30c7af5c167157a617 files/0.67-wx26.patch 485
+RMD160 d36450a8547607faad0f482bc9469b85a199a551 files/0.67-wx26.patch 485
+SHA256 1471427e7f411b414cfc6684d2681d11fb03bcc4fec7359941b9551d4bfbf66c files/0.67-wx26.patch 485
+DIST mahogany-0.67.tar.bz2 5315580 RMD160 41684bdd7b50fb4697192e63e19d103c0da2cf12 SHA1 9f2a1698061e792ab1363cd9539a10490bd7231f SHA256 c9d1ab0bc3d1441facb879f01aa3151beaac85819d00bbac075b7c0150cc1b78
+EBUILD mahogany-0.67.ebuild 1897 RMD160 d1dbacee4f23250ae4876b8e88f30bed81806978 SHA1 23e2e65de9b478dff74b211564884f6ddb7bad00 SHA256 f08b862f9a570360b9b482f97524524dc8e894392da37de3f19cfb1f17087992
+MD5 4dccc9e7238cf8472f1501e1c46ff47d mahogany-0.67.ebuild 1897
+RMD160 d1dbacee4f23250ae4876b8e88f30bed81806978 mahogany-0.67.ebuild 1897
+SHA256 f08b862f9a570360b9b482f97524524dc8e894392da37de3f19cfb1f17087992 mahogany-0.67.ebuild 1897
+MD5 bb64813e94186cdf313021df2f07ee89 files/digest-mahogany-0.67 247
+RMD160 2a5777054f24601de7d6079a040097eaca2c0a62 files/digest-mahogany-0.67 247
+SHA256 b17f51d67f32d8236c36dfd1a312f121e9f7bcaecf54c09e0b6c8d9020dbfeed files/digest-mahogany-0.67 247
diff --git a/mail-client/mahogany/files/0.67-cvs20060903.patch b/mail-client/mahogany/files/0.67-cvs20060903.patch
new file mode 100644
index 0000000..1952621
--- /dev/null
+++ b/mail-client/mahogany/files/0.67-cvs20060903.patch
@@ -0,0 +1,2015 @@
+diff -Naur mahogany-0.67/acinclude.m4 mahogany-0.67.20060903/acinclude.m4
+--- mahogany-0.67/acinclude.m4 2004-10-11 01:55:35.000000000 +0200
++++ mahogany-0.67.20060903/acinclude.m4 2006-09-02 22:32:06.000000000 +0200
+@@ -1,4 +1,4 @@
+-dnl $Id: acinclude.m4,v 1.9 2004/10/10 23:55:35 vadz Exp $
++dnl $Id: acinclude.m4,v 1.11 2006/08/25 15:38:28 vadz Exp $
+ dnl local macro definitions for M's configure.in
+
+ dnl package,message,variable,default,helpmessage
+@@ -170,263 +170,19 @@
+ ]
+ )
+
+-
+-## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
+-## Copyright (C) 1996-1998 Free Software Foundation, Inc.
+-## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+-##
+-## This program is free software; you can redistribute it and/or modify
+-## it under the terms of the GNU General Public License as published by
+-## the Free Software Foundation; either version 2 of the License, or
+-## (at your option) any later version.
+-##
+-## This program is distributed in the hope that it will be useful, but
+-## WITHOUT ANY WARRANTY; without even the implied warranty of
+-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-## General Public License for more details.
+-##
+-## You should have received a copy of the GNU General Public License
+-## along with this program; if not, write to the Free Software
+-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+-##
+-## As a special exception to the GNU General Public License, if you
+-## distribute this file as part of a program that contains a
+-## configuration script generated by Autoconf, you may include it under
+-## the same distribution terms that you use for the rest of that program.
+-
+-# serial 24 AM_PROG_LIBTOOL
+-AC_DEFUN([AM_PROG_LIBTOOL],
+-[AC_REQUIRE([AM_ENABLE_SHARED])dnl
+-AC_REQUIRE([AM_ENABLE_STATIC])dnl
+-AC_REQUIRE([AC_CANONICAL_HOST])dnl
+-AC_REQUIRE([AC_PROG_RANLIB])dnl
+-AC_REQUIRE([AC_PROG_CC])dnl
+-AC_REQUIRE([AM_PROG_LD])dnl
+-AC_REQUIRE([AM_PROG_NM])dnl
+-AC_REQUIRE([AC_PROG_LN_S])dnl
++dnl M_GCC_OPTION(OPTION, ACTION-IF-SUPPORTED, ACTION-IF-NOT-SUPPORTED)
+ dnl
+-# Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+-AC_SUBST(LIBTOOL)dnl
+-
+-# Check for any special flags to pass to ltconfig.
+-libtool_flags=
+-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+-test "$silent" = yes && libtool_flags="$libtool_flags --silent"
+-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+-
+-# Some flags need to be propagated to the compiler or linker for good
+-# libtool support.
+-case "$host" in
+-*-*-irix6*)
+- # Find out which ABI we are using.
+- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+- if AC_TRY_EVAL(ac_compile); then
+- case "`/usr/bin/file conftest.o`" in
+- *32-bit*)
+- LD="${LD-ld} -32"
+- ;;
+- *N32*)
+- LD="${LD-ld} -n32"
+- ;;
+- *64-bit*)
+- LD="${LD-ld} -64"
+- ;;
+- esac
+- fi
+- rm -rf conftest*
+- ;;
+-
+-*-*-sco3.2v5*)
+- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+- CFLAGS="$CFLAGS -belf"
+- ;;
+-esac
+-
+-# Actually configure libtool. ac_aux_dir is where install-sh is found.
+-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
+-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
+-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+-|| AC_MSG_ERROR([libtool configure failed])
+-])
+-
+-# AM_ENABLE_SHARED - implement the --enable-shared flag
+-# Usage: AM_ENABLE_SHARED[(DEFAULT)]
+-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+-# `yes'.
+-AC_DEFUN([AM_ENABLE_SHARED],
+-[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+-AC_ARG_ENABLE(shared,
+-changequote(<<, >>)dnl
+-<< --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
+-changequote([, ])dnl
+-[ --enable-shared=PKGS only build shared libraries if the current package
+- appears as an element in the PKGS list],
+-[p=${PACKAGE-default}
+-case "$enableval" in
+-yes) enable_shared=yes ;;
+-no) enable_shared=no ;;
+-*)
+- enable_shared=no
+- # Look at the argument we got. We use all the common list separators.
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+- for pkg in $enableval; do
+- if test "X$pkg" = "X$p"; then
+- enable_shared=yes
+- fi
+- done
+- IFS="$ac_save_ifs"
+- ;;
+-esac],
+-enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
+-])
+-
+-# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
+-AC_DEFUN([AM_DISABLE_SHARED],
+-[AM_ENABLE_SHARED(no)])
+-
+-# AM_DISABLE_STATIC - set the default static flag to --disable-static
+-AC_DEFUN([AM_DISABLE_STATIC],
+-[AM_ENABLE_STATIC(no)])
+-
+-# AM_ENABLE_STATIC - implement the --enable-static flag
+-# Usage: AM_ENABLE_STATIC[(DEFAULT)]
+-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
+-# `yes'.
+-AC_DEFUN([AM_ENABLE_STATIC],
+-[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+-AC_ARG_ENABLE(static,
+-changequote(<<, >>)dnl
+-<< --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
+-changequote([, ])dnl
+-[ --enable-static=PKGS only build shared libraries if the current package
+- appears as an element in the PKGS list],
+-[p=${PACKAGE-default}
+-case "$enableval" in
+-yes) enable_static=yes ;;
+-no) enable_static=no ;;
+-*)
+- enable_static=no
+- # Look at the argument we got. We use all the common list separators.
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+- for pkg in $enableval; do
+- if test "X$pkg" = "X$p"; then
+- enable_static=yes
+- fi
+- done
+- IFS="$ac_save_ifs"
+- ;;
+-esac],
+-enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
+-])
+-
+-
+-# AM_PROG_LD - find the path to the GNU or non-GNU linker
+-AC_DEFUN([AM_PROG_LD],
+-[AC_ARG_WITH(gnu-ld,
+-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+-AC_REQUIRE([AC_PROG_CC])
+-ac_prog=ld
+-if test "$ac_cv_prog_gcc" = yes; then
+- # Check if gcc -print-prog-name=ld gives a path.
+- AC_MSG_CHECKING([for ld used by GCC])
+- ac_prog=`($CC -print-prog-name=ld) 2>&5`
+- case "$ac_prog" in
+- # Accept absolute paths.
+- /* | [A-Za-z]:\\*)
+- test -z "$LD" && LD="$ac_prog"
+- ;;
+- "")
+- # If it fails, then pretend we aren't using GCC.
+- ac_prog=ld
+- ;;
+- *)
+- # If it is relative, then search for the first ld in PATH.
+- with_gnu_ld=unknown
+- ;;
+- esac
+-elif test "$with_gnu_ld" = yes; then
+- AC_MSG_CHECKING([for GNU ld])
+-else
+- AC_MSG_CHECKING([for non-GNU ld])
+-fi
+-AC_CACHE_VAL(ac_cv_path_LD,
+-[if test -z "$LD"; then
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+- for ac_dir in $PATH; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f "$ac_dir/$ac_prog"; then
+- ac_cv_path_LD="$ac_dir/$ac_prog"
+- # Check to see if the program is GNU ld. I'd rather use --version,
+- # but apparently some GNU ld's only accept -v.
+- # Break only if it was the GNU/non-GNU ld that we prefer.
+- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+- test "$with_gnu_ld" != no && break
+- else
+- test "$with_gnu_ld" != yes && break
+- fi
+- fi
+- done
+- IFS="$ac_save_ifs"
+-else
+- ac_cv_path_LD="$LD" # Let the user override the test with a path.
+-fi])
+-LD="$ac_cv_path_LD"
+-if test -n "$LD"; then
+- AC_MSG_RESULT($LD)
+-else
+- AC_MSG_RESULT(no)
+-fi
+-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+-AC_SUBST(LD)
+-AM_PROG_LD_GNU
+-])
+-
+-AC_DEFUN([AM_PROG_LD_GNU],
+-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+- ac_cv_prog_gnu_ld=yes
+-else
+- ac_cv_prog_gnu_ld=no
+-fi])
+-])
+-
+-# AM_PROG_NM - find the path to a BSD-compatible name lister
+-AC_DEFUN([AM_PROG_NM],
+-[AC_MSG_CHECKING([for BSD-compatible nm])
+-AC_CACHE_VAL(ac_cv_path_NM,
+-[case "$NM" in
+-/* | [A-Za-z]:\\*)
+- ac_cv_path_NM="$NM" # Let the user override the test with a path.
+- ;;
+-*)
+- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
+- test -z "$ac_dir" && ac_dir=.
+- if test -f $ac_dir/nm; then
+- # Check to see if the nm accepts a BSD-compat flag.
+- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+- # nm: unknown option "B" ignored
+- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+- ac_cv_path_NM="$ac_dir/nm -B"
+- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+- ac_cv_path_NM="$ac_dir/nm -p"
+- else
+- ac_cv_path_NM="$ac_dir/nm"
+- fi
+- break
+- fi
+- done
+- IFS="$ac_save_ifs"
+- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+- ;;
+-esac])
+-NM="$ac_cv_path_NM"
+-AC_MSG_RESULT([$NM])
+-AC_SUBST(NM)
++dnl Check if gcc supports the given option (fails if compiler is not gcc)
++AC_DEFUN([M_GCC_OPTION], [
++ AC_REQUIRE([AC_PROG_CC])
++ if test "x$GCC" = "xyes"; then
++ echo 'void f(){}' >conftest.c
++ case "`$CC $1 -c conftest.c 2>&1`" in
++ '') ifelse([$2], , :, [$2]) ;;
++ *) ifelse([$3], , :, [$3]) ;;
++ esac
++ rm -f conftest.*
++ else
++ ifelse([$3], , :, [$3])
++ fi
+ ])
+diff -Naur mahogany-0.67/configure mahogany-0.67.20060903/configure
+--- mahogany-0.67/configure 2006-07-31 01:31:56.000000000 +0200
++++ mahogany-0.67.20060903/configure 2006-09-02 22:32:13.000000000 +0200
+@@ -16,7 +16,7 @@
+ ac_help="$ac_help
+ --disable-optimize disable optimization (automatic if debugging)"
+ ac_help="$ac_help
+- --with-wxdebug use debug wxWindows libraries"
++ --with-wxdebug use debug wxWidgets libraries"
+ ac_help="$ac_help
+ --with-dmalloc use dmalloc (http://dmalloc.com/) for debugging"
+ ac_help="$ac_help
+@@ -568,7 +568,7 @@
+ fi
+
+
+-# From configure.in Id: configure.in,v 1.316 2006/05/03 20:16:04 vadz Exp
++# From configure.in Id: configure.in,v 1.318 2006/08/25 15:39:12 vadz Exp
+
+ rm -f conftestdata
+ if ln -s X conftestdata 2>/dev/null
+@@ -2143,14 +2143,14 @@
+ if test -f /etc/redhat-release -a ! grep "7\.0" /etc/redhat-release
+ then workarroundmsg="
+ It seems you are using Red Hat Linux 7.0. A workaround for your
+- problem is to use egcs to compile wxWindows and Mahogany:
++ problem is to use egcs to compile wxWidgets and Mahogany:
+ - at your bash prompt type:
+ export CC=egcs
+ export CXX=egcs++
+- - reconfigure and rebuild wxWindows and Mahogany
++ - reconfigure and rebuild wxWidgets and Mahogany
+ (don't forget to remove the config.cache files
+ located in the source code directories of
+- wxWindows and Mahogany before reconfiguring them."
++ wxWidgets and Mahogany before reconfiguring them."
+ else workarroundmsg=""
+ fi
+ { echo "configure: error: Sorry, it seems that you have a buggy gcc version which is
+@@ -4481,13 +4481,13 @@
+
+ if test "$wxOK" != 1; then
+ { echo "configure: error:
+- Mahogany requires wxWindows to be installed on your system
++ Mahogany requires wxWidgets to be installed on your system
+ but wx-config script couldn't be found.
+
+ Please check that wx-config is in PATH, the directory
+- where wxWindows libraries are installed (returned by
++ where wxWidgets libraries are installed (returned by
+ 'wx-config --libs' command) is in LD_LIBRARY_PATH or
+- equivalent variable and wxWindows version is 2.5.2 or above.
++ equivalent variable and wxWidgets version is 2.5.2 or above.
+ " 1>&2; exit 1; }
+ fi
+
+@@ -4559,8 +4559,8 @@
+ fi
+
+ case "$USE_THREADS" in 1)
+- echo $ac_n "checking if wxWindows was compiled with threads""... $ac_c" 1>&6
+-echo "configure:4564: checking if wxWindows was compiled with threads" >&5
++ echo $ac_n "checking if wxWidgets was compiled with threads""... $ac_c" 1>&6
++echo "configure:4564: checking if wxWidgets was compiled with threads" >&5
+ if eval "test \"`echo '$''{'m_cv_wx_threads'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5324,8 +5324,30 @@
+
+ IMAP_CFLAGS="$CFLAGS"
+ IMAP_CPPFLAGS="$IMAP_CPPFLAGS $CPPFLAGS"
+-if test "$GCC" = "yes"; then
+- IMAP_CPPFLAGS="$IMAP_CPPFLAGS -Wno-pointer-sign"
++echo $ac_n "checking whether $CC accepts -Wno-pointer-sign""... $ac_c" 1>&6
++echo "configure:5329: checking whether $CC accepts -Wno-pointer-sign" >&5
++if eval "test \"`echo '$''{'m_cv_cc_no_warn_ptr_sign'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++
++
++ if test "x$GCC" = "xyes"; then
++ echo 'void f(){}' >conftest.c
++ case "`$CC -Wno-pointer-sign -c conftest.c 2>&1`" in
++ '') m_cv_cc_no_warn_ptr_sign="yes" ;;
++ *) m_cv_cc_no_warn_ptr_sign="no" ;;
++ esac
++ rm -f conftest.*
++ else
++ m_cv_cc_no_warn_ptr_sign="no"
++ fi
++
++
++fi
++
++echo "$ac_t""$m_cv_cc_no_warn_ptr_sign" 1>&6
++if test $m_cv_cc_no_warn_ptr_sign = "yes"; then
++ IMAP_CPPFLAGS="$IMAP_CPPFLAGS -Wno-pointer-sign"
+ fi
+
+
+@@ -5380,7 +5402,7 @@
+ if test "x$DEPFLAGS" != "x"; then
+ if test "x$GXX" != "xyes"; then
+ echo $ac_n "checking whether ${CXX} accepts ${DEPFLAGS}""... $ac_c" 1>&6
+-echo "configure:5384: checking whether ${CXX} accepts ${DEPFLAGS}" >&5
++echo "configure:5406: checking whether ${CXX} accepts ${DEPFLAGS}" >&5
+ if eval "test \"`echo '$''{'m_cv_cxx_depflags'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5403,7 +5425,7 @@
+ if test "x$DEPFLAGS" != "x"; then
+ if test "x$GCC" != "xyes"; then
+ echo $ac_n "checking whether ${CC} accepts ${DEPFLAGS}""... $ac_c" 1>&6
+-echo "configure:5407: checking whether ${CC} accepts ${DEPFLAGS}" >&5
++echo "configure:5429: checking whether ${CC} accepts ${DEPFLAGS}" >&5
+ if eval "test \"`echo '$''{'m_cv_c_depflags'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+@@ -5958,7 +5980,7 @@
+ echo
+ echo "Configured Mahogany ${M_VERSION_MAJOR}.${M_VERSION_MINOR}.${M_VERSION_RELEASE} for ${host}."
+ echo ""
+-echo " wxWindows port used: ${WX_NAME} ${WX_VERSION}"
++echo " wxWidgets port used: ${WX_NAME} ${WX_VERSION}"
+ echo " Debug mode: ${debug_option}"
+ echo " SSL support: ${ssl_option}"
+ echo " Modules support: ${m_cv_USE_MODULES}"
+diff -Naur mahogany-0.67/configure.in mahogany-0.67.20060903/configure.in
+--- mahogany-0.67/configure.in 2006-07-31 02:32:44.000000000 +0200
++++ mahogany-0.67.20060903/configure.in 2006-09-02 22:32:46.000000000 +0200
+@@ -1,7 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+
+ AC_INIT(configure.in)
+-AC_REVISION([$Id: configure.in,v 1.317 2006/07/31 00:32:44 nerijus Exp $])
++AC_REVISION([$Id: configure.in,v 1.319 2006/08/31 23:58:25 vadz Exp $])
+
+ rm -f conftestdata
+ if ln -s X conftestdata 2>/dev/null
+@@ -1293,9 +1293,15 @@
+ dnl imap
+ IMAP_CFLAGS="$CFLAGS"
+ IMAP_CPPFLAGS="$IMAP_CPPFLAGS $CPPFLAGS"
+-if test "$GCC" = "yes"; then
+- dnl there are too many warnings in c-client sources which its author
+- dnl refuses to fix, suppress them when using gcc
++dnl there are too many warnings in c-client sources which its author
++dnl refuses to fix, suppress them when using gcc4
++AC_CACHE_CHECK([whether $CC accepts -Wno-pointer-sign],
++ m_cv_cc_no_warn_ptr_sign,
++ [M_GCC_OPTION(-Wno-pointer-sign,
++ m_cv_cc_no_warn_ptr_sign="yes",
++ m_cv_cc_no_warn_ptr_sign="no")]
++)
++if test $m_cv_cc_no_warn_ptr_sign = "yes"; then
+ IMAP_CPPFLAGS="$IMAP_CPPFLAGS -Wno-pointer-sign"
+ fi
+ AC_SUBST(IMAP_CPPFLAGS)
+diff -Naur mahogany-0.67/doc/release.txt mahogany-0.67.20060903/doc/release.txt
+--- mahogany-0.67/doc/release.txt 2006-08-06 22:40:43.000000000 +0200
++++ mahogany-0.67.20060903/doc/release.txt 2006-09-04 21:20:31.000000000 +0200
+@@ -98,7 +98,6 @@
+
+ mahogany-announce@lists.sourceforge.net
+ mahogany-users@lists.sourceforge.net
+-mahogany-developers@lists.sourceforge.net
+
+ c-client@u.washington.edu
+ wxwin-announce@lists.wxwindows.org
+@@ -118,7 +117,7 @@
+
+ Update the FM record
+
+-d) GNOME app map: http://www.gnome.org/softwaremap/projects/mahogany/
++d) GNOME app map: http://www.gnomefiles.org/app.php/Mahogany
+
+ e) GNU Free Software Directory: http://www.gnu.org/directory/mahogany.html
+
+diff -Naur mahogany-0.67/include/gui/wxBrowseButton.h mahogany-0.67.20060903/include/gui/wxBrowseButton.h
+--- mahogany-0.67/include/gui/wxBrowseButton.h 2006-01-16 21:32:01.000000000 +0100
++++ mahogany-0.67.20060903/include/gui/wxBrowseButton.h 2006-09-02 21:50:01.000000000 +0200
+@@ -6,7 +6,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 24.12.98
+-// CVS-ID: $Id: wxBrowseButton.h,v 1.26 2006/01/16 20:32:01 nerijus Exp $
++// CVS-ID: $Id: wxBrowseButton.h,v 1.27 2006/08/31 23:18:29 vadz Exp $
+ // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -293,11 +293,6 @@
+ // show the font selection dialog
+ virtual void DoBrowse();
+
+- // convert between wxNativeFontInfo description and the string we show to
+- // the user in the text control
+- static String FontDescToUser(const String& desc);
+- static String FontDescFromUser(const String& desc);
+-
+ private:
+ DECLARE_NO_COPY_CLASS(wxFontBrowseButton)
+ };
+diff -Naur mahogany-0.67/include/guidef.h mahogany-0.67.20060903/include/guidef.h
+--- mahogany-0.67/include/guidef.h 2004-08-13 22:57:56.000000000 +0200
++++ mahogany-0.67.20060903/include/guidef.h 2006-09-02 21:52:17.000000000 +0200
+@@ -1,14 +1,16 @@
+-/*-*- c++ -*-********************************************************
+- * guidef.h define the GUI implementation *
+- * *
+- * (C) 1997 by Karsten Ballüder (Ballueder@usa.net) *
+- * *
+- * $Id: guidef.h,v 1.25 2004/08/13 20:57:56 vadz Exp $
+- *
+- *******************************************************************/
++///////////////////////////////////////////////////////////////////////////////
++// Project: M - cross platform e-mail GUI client
++// File name: guidef.h
++// Purpose: miscellaneous GUI helpers
++// Author: Karsten Ballüder, Vadim Zeitlin
++// Created: 1998
++// CVS-ID: $Id: guidef.h,v 1.26 2006/08/19 13:11:59 vadz Exp $
++// Copyright: (c) 1998-2006 Mahogany team
++// Licence: M license
++///////////////////////////////////////////////////////////////////////////////
+
+-#ifndef GUIDEF_H
+-#define GUIDEF_H
++#ifndef M_GUIDEF_H_
++#define M_GUIDEF_H_
+
+ #ifndef USE_PCH
+ # include <wx/frame.h>
+@@ -63,8 +65,6 @@
+ find a replacement encoding - if this succeeds, the text is translated into
+ this encoding and the encoding parameter is modified in place.
+
+- Note that this function is implemented in wxMApp.cpp.
+-
+ @param encoding the encoding to check, may be modified
+ @param text the text we want to show in this encoding, may be translated
+ @return true if this or equivalent encoding is available, false otherwise
+@@ -73,6 +73,24 @@
+ wxString *text = NULL,
+ bool mayAskUser = false);
+
++/**
++ Create a font from the given native font description or font family and
++ size.
++
++ Notice that if neither of the parameters is specified (description is empty
++ and the other ones are -1), an invalid font is returned and the caller
++ should check for it and avoid using it in this case to avoid overriding the
++ default system font if the user didn't set any specific font to use.
++
++ @param fontDesc opaque string returned by wxFont::GetNativeFontInfoDesc()
++ @param fontSize font size, -1 if not specified
++ @param fontFamily font family, wxFONTFAMILY_DEFAULT if not specified
++ @return font which may be invalid, to be checked by the caller
++ */
++extern wxFont
++CreateFontFromDesc(const String& fontDesc, int fontSize, int fontFamily);
++
++
+ // Prevent MEvent dispatch inside wxYield
+ extern int g_busyCursorYield;
+
+@@ -86,4 +104,4 @@
+ ~MBusyCursor() { MEndBusyCursor(); }
+ };
+
+-#endif // GUIDEF_H
++#endif // M_GUIDEF_H_
+diff -Naur mahogany-0.67/include/Mdefaults.h mahogany-0.67.20060903/include/Mdefaults.h
+--- mahogany-0.67/include/Mdefaults.h 2005-05-15 23:16:50.000000000 +0200
++++ mahogany-0.67.20060903/include/Mdefaults.h 2006-09-02 21:54:59.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Karsten Ballüder
+ // Modified by: Vadim Zeitlin at 22.08.01 to use MOption class
+ // Created: 1997
+-// CVS-ID: $Id: Mdefaults.h,v 1.259 2005/05/15 21:16:50 vadz Exp $
++// CVS-ID: $Id: Mdefaults.h,v 1.260 2006/08/19 13:11:59 vadz Exp $
+ // Copyright: (c) 1997-2001 Mahogany team
+ // Licence: M licence
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -15,14 +15,6 @@
+
+ class Profile;
+
+-// under Windows 12pt font looks too huge, letters are like in a book for
+-// children
+-#ifdef OS_WIN
+-# define DEFAULT_FONT_SIZE 10l
+-#else
+-# define DEFAULT_FONT_SIZE 12l
+-#endif
+-
+ /** @name Levels of interaction, do something or not?
+
+ NB: these values can't be changed as they are written to (and read from)
+diff -Naur mahogany-0.67/include/Moptions.h mahogany-0.67.20060903/include/Moptions.h
+--- mahogany-0.67/include/Moptions.h 2006-06-24 01:27:30.000000000 +0200
++++ mahogany-0.67.20060903/include/Moptions.h 2006-09-02 21:55:52.000000000 +0200
+@@ -7,7 +7,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 23.08.01
+-// CVS-ID: $Id: Moptions.h,v 1.105 2006/06/23 23:27:30 vadz Exp $
++// CVS-ID: $Id: Moptions.h,v 1.106 2006/08/19 13:11:59 vadz Exp $
+ // Copyright: (c) 2001 Vadim Zeitlin
+ // Licence: M licence
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -1906,9 +1906,9 @@
+ /// message view title
+ #define MP_MVIEW_TITLE_FMT_DEFVAL _("from $from about \"$subject\"")
+ /// which font to use
+-#define MP_MVIEW_FONT_DEFVAL 6L
++#define MP_MVIEW_FONT_DEFVAL 0L
+ /// which font size
+-#define MP_MVIEW_FONT_SIZE_DEFVAL DEFAULT_FONT_SIZE
++#define MP_MVIEW_FONT_SIZE_DEFVAL -1
+ /// the full font desc (replaces the 2 settings above)
+ #define MP_MVIEW_FONT_DESC_DEFVAL wxEmptyString
+ /// which foreground colour for the font
+@@ -1944,9 +1944,9 @@
+ /**@name Font settings for message view */
+ //@{
+ /// which font to use
+-#define MP_FVIEW_FONT_DEFVAL 4L
++#define MP_FVIEW_FONT_DEFVAL 0L
+ /// which font size
+-#define MP_FVIEW_FONT_SIZE_DEFVAL DEFAULT_FONT_SIZE
++#define MP_FVIEW_FONT_SIZE_DEFVAL -1
+ /// the full font desc (replaces the 2 settings above)
+ #define MP_FVIEW_FONT_DESC_DEFVAL wxEmptyString
+ /// don't show full e-mail, only sender's name
+@@ -2007,9 +2007,9 @@
+ /**@name Font settings for compose view */
+ //@{
+ /// which font to use
+-#define MP_CVIEW_FONT_DEFVAL 6L
++#define MP_CVIEW_FONT_DEFVAL 0L
+ /// which font size
+-#define MP_CVIEW_FONT_SIZE_DEFVAL DEFAULT_FONT_SIZE
++#define MP_CVIEW_FONT_SIZE_DEFVAL -1
+ /// the full font desc (replaces the 2 settings above)
+ #define MP_CVIEW_FONT_DESC_DEFVAL wxEmptyString
+ /// which foreground colour for the font
+diff -Naur mahogany-0.67/include/sysutil.h mahogany-0.67.20060903/include/sysutil.h
+--- mahogany-0.67/include/sysutil.h 2003-09-18 18:30:43.000000000 +0200
++++ mahogany-0.67.20060903/include/sysutil.h 2006-09-02 21:53:49.000000000 +0200
+@@ -1,18 +1,17 @@
+-/*-*- c++ -*-********************************************************
+- * sysutil.h : utility functions for various OS functionality *
+- * *
+- * (C) 1999 by Karsten Ballüder (Ballueder@usa.net) *
+- * *
+- * $Id: sysutil.h,v 1.10 2003/09/18 16:30:43 robertvazan Exp $
+- *
+- *******************************************************************/
++///////////////////////////////////////////////////////////////////////////////
++// Project: M - cross platform e-mail GUI client
++// File name: include/sysutil.h
++// Purpose: utility functions for various OS-level functionality
++// Author: Karsten Ballüder, Vadim Zeitlin
++// Created: 1999
++// CVS-ID: $Id: sysutil.h,v 1.11 2006/08/31 23:45:05 vadz Exp $
++// Copyright: (c) 1999 Karsten Ballüder
++// (c) 2000-2006 Vadim Zeitlin <vadim@wxwindows.org>
++// Licence: M license
++///////////////////////////////////////////////////////////////////////////////
+
+-
+-#ifndef SYSUTIL_H
+-#define SYSUTIL_H
+-
+-#ifndef USE_PCH
+-#endif // USE_PCH
++#ifndef M_SYSUTIL_H
++#define M_SYSUTIL_H
+
+ #include <wx/filename.h>
+
+@@ -38,27 +37,50 @@
+ class MTempFileName
+ {
+ public:
+- // def ctor: creates the temp file and doesn't delete it unless told to do
+- // so (i.e. Ok() is called)
+- MTempFileName() : m_name (wxFileName::CreateTempFileName(_T("Mahogany")))
+- { m_ok = false; }
+-
+- // ctor which takes a temp file name: still won't be deleted unless Ok() is
+- // called
+- MTempFileName(const String& name) : m_name(name) { m_ok = false; }
++ /**
++ Ctor creates a temporary file name and possibly associates it with the
++ specified file.
++
++ If the temp file name is used for writing some data to it, the file
++ parameter must be specified as otherwise the operation wouldn't be atomic
++ and race conditions could occur. Do close the file before this object
++ goes out of scope in this case though as otherwise we could fail to
++ delete the temp file under Windows.
++
++ @param file if non-NULL, the file to open (for writing) with the
++ temporary file name
++ */
++ MTempFileName(wxFile *file = NULL)
++ : m_name(wxFileName::CreateTempFileName(_T("Mahogany"), file))
++ {
++ m_keepFile = false;
++ }
++
++ /**
++ Ctor from an existing temporary file name.
+
+- /// returns FALSE if temp file name couldn't be generated
+- bool IsOk() const { return !!m_name; }
++ The specified file will be deleted when this object is destroyed unless
++ Ok() is called.
+
+- /// get the name of the temp file
++ @param name of the existing temporary file
++ */
++ MTempFileName(const String& name) : m_name(name)
++ {
++ m_keepFile = false;
++ }
++
++ /// Returns false if temp file name couldn't be generated
++ bool IsOk() const { return !m_name.empty(); }
++
++ /// Get the name of the temp file
+ const String& GetName() const { return m_name; }
+
+- /// tells us not to delete the temp file
+- void Ok() { m_ok = true; }
++ /// Tells us not to delete the temp file
++ void Ok() { m_keepFile = true; }
+
+ ~MTempFileName()
+ {
+- if ( !m_ok && !m_name.empty() )
++ if ( !m_keepFile && !m_name.empty() )
+ {
+ if ( wxRemove(m_name) != 0 )
+ {
+@@ -69,9 +91,10 @@
+
+ private:
+ String m_name;
+- bool m_ok;
++ bool m_keepFile;
+ };
+
+ //@}
+-#endif
++
++#endif // M_SYSUTIL_H
+
+diff -Naur mahogany-0.67/src/adb/AdbFrame.cpp mahogany-0.67.20060903/src/adb/AdbFrame.cpp
+--- mahogany-0.67/src/adb/AdbFrame.cpp 2006-01-16 21:32:26.000000000 +0100
++++ mahogany-0.67.20060903/src/adb/AdbFrame.cpp 2006-09-02 21:57:54.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 09.08.98
+-// CVS-ID: $Id: AdbFrame.cpp,v 1.121 2006/01/16 20:32:26 nerijus Exp $
++// CVS-ID: $Id: AdbFrame.cpp,v 1.122 2006/08/25 16:06:53 vadz Exp $
+ // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -3166,7 +3166,7 @@
+
+ wxAdbTree::wxAdbTree(wxAdbEditFrame *frame, wxWindow *parent, long id)
+ : wxTreeCtrl(parent, id, wxDefaultPosition, wxDefaultSize,
+- wxTR_HAS_BUTTONS | wxSUNKEN_BORDER)
++ wxTR_DEFAULT_STYLE | wxSUNKEN_BORDER)
+ {
+ m_frame = frame;
+ m_menu = NULL;
+diff -Naur mahogany-0.67/src/classes/MessageView.cpp mahogany-0.67.20060903/src/classes/MessageView.cpp
+--- mahogany-0.67/src/classes/MessageView.cpp 2006-07-24 16:13:41.000000000 +0200
++++ mahogany-0.67.20060903/src/classes/MessageView.cpp 2006-09-02 21:59:25.000000000 +0200
+@@ -8,7 +8,7 @@
+ // Author: Vadim Zeitlin (based on gui/MessageView.cpp by Karsten)
+ // Modified by:
+ // Created: 24.07.01
+-// CVS-ID: $Id: MessageView.cpp,v 1.173 2006/07/24 14:13:41 vadz Exp $
++// CVS-ID: $Id: MessageView.cpp,v 1.175 2006/08/23 15:41:53 vadz Exp $
+ // Copyright: (c) 2001 Mahogany Team
+ // Licence: Mahogany license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -505,35 +505,16 @@
+
+ wxFont MessageView::AllProfileValues::GetFont(wxFontEncoding encoding) const
+ {
+- wxFont font;
++ wxFont font(CreateFontFromDesc(fontDesc, fontSize, fontFamily));
+
+- if ( !fontDesc.empty() )
++ // assume that wxFONTENCODING_DEFAULT (US-ASCII) text can be shown in any
++ // encoding
++ if ( encoding != wxFONTENCODING_DEFAULT )
+ {
+- wxNativeFontInfo fontInfo;
+- if ( fontInfo.FromString(fontDesc) )
+- {
+- font.SetNativeFontInfo(fontInfo);
++ if ( !font.Ok() )
++ font = *wxNORMAL_FONT;
+
+- // assume that iso8859-1 text can be shown in any encoding - it's
+- // true for all normal fonts
+- if ( font.Ok() &&
+- (encoding != wxFONTENCODING_DEFAULT) &&
+- (encoding != wxFONTENCODING_ISO8859_1) )
+- {
+- font.SetEncoding(encoding);
+- }
+- }
+- }
+-
+- if ( !font.Ok() )
+- {
+- font = wxFont(fontSize,
+- fontFamily,
+- wxFONTSTYLE_NORMAL,
+- wxFONTWEIGHT_NORMAL,
+- FALSE, // not underlined
+- wxEmptyString, // no specific face name
+- encoding);
++ font.SetEncoding(encoding);
+ }
+
+ return font;
+diff -Naur mahogany-0.67/src/classes/MModule.cpp mahogany-0.67.20060903/src/classes/MModule.cpp
+--- mahogany-0.67/src/classes/MModule.cpp 2006-02-12 23:36:40.000000000 +0100
++++ mahogany-0.67.20060903/src/classes/MModule.cpp 2006-09-02 22:01:12.000000000 +0200
+@@ -3,7 +3,7 @@
+ * *
+ * (C) 1999 by Karsten Ballüder (karsten@phy.hw.ac.uk) *
+ * *
+- * $Id: MModule.cpp,v 1.97 2006/02/12 22:36:40 vadz Exp $
++ * $Id: MModule.cpp,v 1.98 2006/08/25 15:59:30 vadz Exp $
+ *******************************************************************/
+
+ /*
+@@ -158,8 +158,8 @@
+ wxDynamicLibrary *dll = module->GetDLL();
+
+ // call cleanup function, if any
++ if ( dll->HasSymbol(MMODULE_CLEANUP_FUNCTION) )
+ {
+- wxLogNull noLog;
+ MModule_CleanUpFuncType funcCleanup =
+ (MModule_CleanUpFuncType)dll->GetSymbol(MMODULE_CLEANUP_FUNCTION);
+ if ( funcCleanup )
+diff -Naur mahogany-0.67/src/gui/ClickURL.cpp mahogany-0.67.20060903/src/gui/ClickURL.cpp
+--- mahogany-0.67/src/gui/ClickURL.cpp 2006-06-27 01:24:41.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/ClickURL.cpp 2006-09-02 22:03:53.000000000 +0200
+@@ -6,7 +6,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 05.12.02 (extracted from MessageView.cpp and wxMessageView.cpp)
+-// CVS-ID: $Id: ClickURL.cpp,v 1.24 2006/06/26 23:24:41 vadz Exp $
++// CVS-ID: $Id: ClickURL.cpp,v 1.26 2006/08/31 17:59:27 nerijus Exp $
+ // Copyright: (c) 2001-2002 Mahogany Team
+ // Licence: Mahogany license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -48,6 +48,7 @@
+ #include "Collect.h"
+
+ #include <wx/clipbrd.h>
++#include <wx/mimetype.h>
+
+ #ifdef OS_UNIX
+ #include <sys/stat.h>
+@@ -260,9 +261,13 @@
+ }
+ else
+ {
++#ifdef DEBUG_nerijus
+ wxTheClipboard->UsePrimarySelection();
+- wxTheClipboard->SetData(new
+- wxTextDataObject(m_clickableURL->GetUrl()));
++ wxTheClipboard->SetData(new wxTextDataObject(m_clickableURL->GetUrl()));
++#endif
++ wxURLDataObject *dobj = new wxURLDataObject;
++ dobj->SetURL(m_clickableURL->GetUrl());
++ wxTheClipboard->SetData(dobj);
+ }
+ }
+ break;
+@@ -500,8 +505,7 @@
+ // either not netscape or ns isn't running or we have non-UNIX
+ if(! bOk)
+ {
+- command = browser;
+- command << _T(' ') << m_url;
++ String command = wxFileType::ExpandCommand(browser, m_url);
+
+ wxString errmsg;
+ errmsg.Printf(_("Couldn't launch browser: '%s' failed"),
+diff -Naur mahogany-0.67/src/gui/wxBrowseButton.cpp mahogany-0.67.20060903/src/gui/wxBrowseButton.cpp
+--- mahogany-0.67/src/gui/wxBrowseButton.cpp 2006-04-09 22:36:54.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/wxBrowseButton.cpp 2006-09-02 22:04:10.000000000 +0200
+@@ -6,7 +6,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 24.12.98
+-// CVS-ID: $Id: wxBrowseButton.cpp,v 1.43 2006/04/09 20:36:54 vadz Exp $
++// CVS-ID: $Id: wxBrowseButton.cpp,v 1.44 2006/08/31 23:18:28 vadz Exp $
+ // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+ ///////////////////////////////////////////////////////////////////////////////
+
+@@ -384,35 +384,6 @@
+ {
+ }
+
+-// FIXME: these methods rely on internals of wxNativeFontInfo because they
+-// know that it prepends the format version number (currently 0) to
+-// the real font desc string - they shouldn't but we should add methods
+-// to wxNativeFontInfo to do this conversion instead!
+-
+-String wxFontBrowseButton::FontDescToUser(const String& desc)
+-{
+- String user = desc;
+- if ( user.length() > 2 && user[0u] == '0' && user[1u] == ';' )
+- {
+- user.erase(0, 2);
+- }
+-
+- return user;
+-}
+-
+-String wxFontBrowseButton::FontDescFromUser(const String& user)
+-{
+- String desc;
+- if ( !user.empty() )
+- {
+- desc = _T("0;");
+- }
+-
+- desc += user;
+-
+- return desc;
+-}
+-
+ void wxFontBrowseButton::DoBrowse()
+ {
+ wxFont font;
+@@ -420,7 +391,7 @@
+ wxString desc = GetText();
+ if ( !desc.empty() )
+ {
+- if ( fontInfo.FromString(FontDescFromUser(desc)) )
++ if ( fontInfo.FromString(desc) )
+ {
+ font.SetNativeFontInfo(fontInfo);
+ }
+@@ -434,7 +405,7 @@
+ {
+ font = dialog.GetFontData().GetChosenFont();
+
+- SetText(FontDescToUser(font.GetNativeFontInfoDesc()));
++ SetText(font.GetNativeFontInfoDesc());
+ }
+ }
+
+diff -Naur mahogany-0.67/src/gui/wxComposeView.cpp mahogany-0.67.20060903/src/gui/wxComposeView.cpp
+--- mahogany-0.67/src/gui/wxComposeView.cpp 2006-06-28 17:55:15.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/wxComposeView.cpp 2006-09-02 22:06:03.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Karsten Ballüder, Vadim Zeitlin
+ // Modified by:
+ // Created: 1998
+-// CVS-ID: $Id: wxComposeView.cpp,v 1.413 2006/06/28 15:55:15 vadz Exp $
++// CVS-ID: $Id: wxComposeView.cpp,v 1.418 2006/08/25 13:25:48 vadz Exp $
+ // Copyright: (c) 1998-2001 Mahogany team
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -924,25 +924,7 @@
+
+ wxFont ComposerOptions::GetFont() const
+ {
+- wxFont font;
+- if ( !m_font.empty() )
+- {
+- wxNativeFontInfo fontInfo;
+- if ( fontInfo.FromString(m_font) )
+- {
+- font.SetNativeFontInfo(fontInfo);
+- }
+- }
+-
+- if ( !font.Ok() )
+- {
+- font = wxFont(m_fontSize,
+- m_fontFamily,
+- wxFONTSTYLE_NORMAL,
+- wxFONTWEIGHT_NORMAL);
+- }
+-
+- return font;
++ return CreateFontFromDesc(m_font, m_fontSize, m_fontFamily);
+ }
+
+ // ----------------------------------------------------------------------------
+@@ -2288,7 +2270,9 @@
+ {
+ text->SetForegroundColour(m_options.m_fg);
+ text->SetBackgroundColour(m_options.m_bg);
+- text->SetFont(m_options.GetFont());
++ wxFont font(m_options.GetFont());
++ if ( font.Ok() )
++ text->SetFont(font);
+
+ wxSizer *sizer = text->GetContainingSizer();
+ if ( sizer )
+@@ -3764,8 +3748,8 @@
+ // we have a handy function in wxFileType which will replace
+ // '%s' with the file name or add the file name at the end if
+ // there is no '%s'
+- wxFileType::MessageParameters params(tmpFileName.GetName(), wxEmptyString);
+- String command = wxFileType::ExpandCommand(extEdit, params);
++ String
++ command = wxFileType::ExpandCommand(extEdit, tmpFileName.GetName());
+
+ // do start the external process
+ m_procExtEdit = new wxProcess(this, HelperProcess_Editor);
+@@ -4074,12 +4058,10 @@
+ }
+ else // non empty file
+ {
+- wxChar *p = text.GetWriteBuf(lenFile + 1);
+- p[lenFile] = '\0';
+-
+- ok = file.Read(p, lenFile) != wxInvalidOffset;
++ wxStringBuffer buf(text, lenFile + 1);
++ buf[lenFile] = '\0';
+
+- text.UngetWriteBuf();
++ ok = file.Read(buf, lenFile) != wxInvalidOffset;
+ }
+ }
+
+@@ -4095,11 +4077,37 @@
+ return true;
+ }
+
+-/// inserts a text
+ void
+ wxComposeView::InsertText(const String &text)
+ {
+- m_editor->InsertText(text, MessageEditor::Insert_Append);
++ // the text here may come from a file and so can be in an encoding different
++ // from the one we currently use, but we -- unfortunately -- have no way of
++ // knowing about it, except in the special case when we use UTF-8 and then
++ // we must check if text is a valid UTF-8 string as otherwise inserting it
++ // is going to fail
++ String textCopy;
++ if ( wxLocale::GetSystemEncoding() == wxFONTENCODING_UTF8 )
++ {
++ if ( wxConvUTF8.MB2WC(NULL, text, 0) == (size_t)-1 )
++ {
++ // not a valid UTF-8 string, must suppose it's in some other encoding
++ // and as we have no idea about what it is, choose latin1 as the most
++ // common (among Mahogany users, anyhow)
++ if ( m_encoding == wxFONTENCODING_SYSTEM )
++ {
++ // change the encoding to latin1 if none explicitly specified
++ SetEncoding(wxFONTENCODING_ISO8859_1);
++ }
++ else // we already have an existing encoding
++ {
++ // transform the text from latin1 to the current encoding
++ textCopy = wxCSConv(m_encoding).cWC2MB(wxConvISO8859_1.cMB2WC(text));
++ }
++ }
++ }
++
++ m_editor->InsertText(textCopy.empty() ? text : textCopy,
++ MessageEditor::Insert_Append);
+ }
+
+ void
+diff -Naur mahogany-0.67/src/gui/wxFolderTree.cpp mahogany-0.67.20060903/src/gui/wxFolderTree.cpp
+--- mahogany-0.67/src/gui/wxFolderTree.cpp 2006-06-28 14:46:34.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/wxFolderTree.cpp 2006-09-02 22:09:53.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 03.10.98
+-// CVS-ID: $Id: wxFolderTree.cpp,v 1.243 2006/06/28 12:46:34 vadz Exp $
++// CVS-ID: $Id: wxFolderTree.cpp,v 1.244 2006/08/19 14:22:53 vadz Exp $
+ // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -1754,7 +1754,7 @@
+ wxWindow *parent, wxWindowID id,
+ const wxPoint& pos, const wxSize& size)
+ : wxPTreeCtrl(_T("FolderTree"), parent, id, pos, size,
+- wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)
++ wxTR_DEFAULT_STYLE | wxTR_EDIT_LABELS)
+ {
+ // init member vars
+ m_current = NULL;
+diff -Naur mahogany-0.67/src/gui/wxFolderView.cpp mahogany-0.67.20060903/src/gui/wxFolderView.cpp
+--- mahogany-0.67/src/gui/wxFolderView.cpp 2006-06-30 13:08:18.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/wxFolderView.cpp 2006-09-02 22:08:08.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Karsten Ballüder (Ballueder@gmx.net)
+ // Modified by: VZ at 13.07.01: use virtual list control, update on demand
+ // Created: 1997
+-// CVS-ID: $Id: wxFolderView.cpp,v 1.679 2006/06/30 11:08:18 nerijus Exp $
++// CVS-ID: $Id: wxFolderView.cpp,v 1.683 2006/08/19 13:12:00 vadz Exp $
+ // Copyright: (c) 1997-2001 Mahogany team
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -1608,24 +1608,12 @@
+ SetTextColour( fg );
+ SetBackgroundColour( bg );
+
+- wxFont font;
+- if ( !fontDesc.empty() )
++ wxFont font(CreateFontFromDesc(fontDesc, fontSize, fontFamily));
++ if ( font.Ok() )
+ {
+- wxNativeFontInfo fontInfo;
+- if ( fontInfo.FromString(fontDesc) )
+- {
+- font.SetNativeFontInfo(fontInfo);
+- }
+- }
+-
+- if ( !font.Ok() )
+- {
+- font = wxFont(fontSize, fontFamily,
+- wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
++ SetFont(font);
+ }
+
+- SetFont(font);
+-
+ if ( memcmp(m_columns, columns, sizeof(m_columns)) != 0 )
+ {
+ // the control must be recreated if the order of columns changed
+@@ -4626,26 +4614,20 @@
+ }
+ break;
+
+- case WXK_UP:
+- case WXK_DOWN:
+- case WXK_HOME:
+- case WXK_END:
+- case WXK_RETURN:
+-#if !defined DEBUG_nerijus
+- case WXK_SPACE:
+-#endif
+- // let the control process these keys as they're used for navigation
+- event.Skip();
+- return false;
+-
+ default:
+ // pressing any alphanumeric character in the list control starts
+ // incremental search in it which is worse than useless in our case
+ // because it's never going to find anything (the first column is
+- // always flags in this case and won't match...) and we just lost the
++ // always flags in this case and won't match...) and we just lose the
+ // current selection, so prevent this from happening by *not* calling
+- // event.Skip() here
+- ;
++ // event.Skip() in this case
++ if ( key >= 0x7f || !isalnum(key) )
++ {
++ // let the control process other keys (some are used for navigation
++ // in it)
++ event.Skip();
++ return false;
++ }
+ }
+
+ if ( cmd )
+diff -Naur mahogany-0.67/src/gui/wxIconManager.cpp mahogany-0.67.20060903/src/gui/wxIconManager.cpp
+--- mahogany-0.67/src/gui/wxIconManager.cpp 2006-01-16 21:32:27.000000000 +0100
++++ mahogany-0.67.20060903/src/gui/wxIconManager.cpp 2006-09-02 22:11:34.000000000 +0200
+@@ -3,7 +3,7 @@
+ * *
+ * (C) 1997-1999 by Karsten Ballüder (ballueder@gmx.net) *
+ * *
+- * $Id: wxIconManager.cpp,v 1.110 2006/01/16 20:32:27 nerijus Exp $
++ * $Id: wxIconManager.cpp,v 1.112 2006/08/25 16:23:13 vadz Exp $
+ *******************************************************************/
+
+ // ============================================================================
+@@ -556,13 +556,15 @@
+ return icon;
+
+ // next step: try to load the icon files .png,.xpm,.gif:
+- bool found = false;
+ if(m_GlobalDir.Length())
+ {
+ PathFinder pf(READ_APPCONFIG(MP_ICONPATH));
+
+ #ifdef M_TOP_SOURCEDIR
++ // look in the source directory to make it possible to use the program
++ // without installing it
+ pf.AddPaths(String(M_TOP_SOURCEDIR) + _T("/src/icons"));
++ pf.AddPaths(String(M_TOP_SOURCEDIR) + _T("/res"));
+ #endif // M_TOP_SOURCEDIR
+
+ pf.AddPaths(m_GlobalDir, false);
+@@ -580,11 +582,16 @@
+ String name;
+ for ( int ext = 0; wxIconManagerFileExtensions[ext]; ext++ )
+ {
+- // Use iconNameOrig to preserve captialisation:
+- name = iconNameOrig + wxIconManagerFileExtensions[ext];
+- name = pf.FindFile(name, &found);
++ // use iconNameOrig here to preserve the original case
++ name = pf.FindFile(iconNameOrig + wxIconManagerFileExtensions[ext]);
+
+- if( found )
++ // but if it's not found, also fall back to the usual lower case
++ if ( name.empty() )
++ {
++ name = pf.FindFile(iconName + wxIconManagerFileExtensions[ext]);
++ }
++
++ if ( !name.empty() )
+ {
+ ms_IconPath = name.BeforeLast('/');
+
+diff -Naur mahogany-0.67/src/gui/wxMApp.cpp mahogany-0.67.20060903/src/gui/wxMApp.cpp
+--- mahogany-0.67/src/gui/wxMApp.cpp 2006-04-19 02:55:04.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/wxMApp.cpp 2006-09-02 22:42:46.000000000 +0200
+@@ -6,7 +6,7 @@
+ // Author: Karsten Ballüder, Vadim Zeitlin
+ // Modified by:
+ // Created: 1997
+-// CVS-ID: $Id: wxMApp.cpp,v 1.305 2006/04/19 00:55:04 vadz Exp $
++// CVS-ID: $Id: wxMApp.cpp,v 1.309 2006/09/02 12:41:30 vadz Exp $
+ // Copyright: (c) 1997-2002 M-Team
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -913,8 +913,9 @@
+ bool
+ wxMApp::OnInit()
+ {
+- // we want our OnAbnormalTermination() be called if we crash
+-#if wxUSE_ON_FATAL_EXCEPTION
++ // we want our OnAbnormalTermination() be called if we crash but don't use
++ // it in debug builds as it interferes with the debugger
++#if wxUSE_ON_FATAL_EXCEPTION && !defined(__WXDEBUG__)
+ wxHandleFatalExceptions();
+ #endif
+
+@@ -1101,6 +1102,26 @@
+ }
+ #endif // USE_I18N
+
++ // 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)
++ // we need UTF-8 support to be able to work with messages in different
++ // encodings
++ if ( wxLocale::GetSystemEncoding() != wxFONTENCODING_UTF8 )
++ {
++ // TODO: set encoding to UTF-8 (but keeping the current language)
++ // ourselves
++ wxLogWarning(_("Your current locale doesn't use UTF-8 encoding!\n"
++ "\n"
++ "This means that Mahogany will not be able to work "
++ "with texts in encodings other than the default one\n"
++ "which may result in messages not being displayed or "
++ "even sent correctly.\n"
++ "\n"
++ "Please change the system locale to UTF-8."));
++ }
++#endif // GTK+ 2.0
++
+ wxInitAllImageHandlers();
+ wxFileSystem::AddHandler(new wxMemoryFSHandler);
+ // wxFileSystem::AddHandler(new wxZipFSHandler); // for zipped docs
+@@ -2503,73 +2524,6 @@
+ return true;
+ }
+
+-// ----------------------------------------------------------------------------
+-// global functions implemented here
+-// ----------------------------------------------------------------------------
+-
+-extern bool EnsureAvailableTextEncoding(wxFontEncoding *enc,
+- wxString *text,
+- bool mayAskUser)
+-{
+- CHECK( enc, false, _T("CheckEncodingAvailability: NULL encoding") );
+-
+- if ( !wxFontMapper::Get()->IsEncodingAvailable(*enc) )
+- {
+- // try to find another encoding
+- wxFontEncoding encAlt;
+- if ( wxFontMapper::Get()->
+- GetAltForEncoding(*enc, &encAlt, wxEmptyString, mayAskUser) )
+- {
+- // translate the text (if any) to the equivalent encoding
+- if ( text && !text->empty() )
+- {
+-#if wxUSE_WCHAR_T
+- // try converting via Unicode
+- wxCSConv a2w(*enc);
+- wxWCharBuffer wbuf(a2w.cMB2WC(text->c_str()));
+- if ( *wbuf )
+- {
+- // special case of UTF-8 which is used all the time under wxGTK
+- if ( encAlt == wxFONTENCODING_UTF8 )
+- {
+- *text = wxConvUTF8.cWC2MB(wbuf);
+- }
+- else // all the other encodings, use generic converter
+- {
+- wxCSConv w2a(encAlt);
+- *text = w2a.cWC2MB(wbuf);
+- }
+-
+- if ( !text->empty() )
+- return true;
+- //else: fall back to wxEncodingConverter
+- }
+- //else: conversion to Unicode failed
+-#endif // wxUSE_WCHAR_T
+-
+- wxEncodingConverter conv;
+- if ( !conv.Init(*enc, encAlt) )
+- {
+- // failed to convert the text
+- return false;
+- }
+-
+- *text = conv.Convert(*text);
+- }
+- //else: just return the encoding
+-
+- *enc = encAlt;
+- }
+- else // no equivalent encoding
+- {
+- return false;
+- }
+- }
+-
+- // we have either the requested encoding or an equivalent one
+- return true;
+-}
+-
+ // ============================================================================
+ // IPC and multiple program instances handling
+ // ============================================================================
+diff -Naur mahogany-0.67/src/gui/wxMDialogs.cpp mahogany-0.67.20060903/src/gui/wxMDialogs.cpp
+--- mahogany-0.67/src/gui/wxMDialogs.cpp 2006-08-06 22:02:01.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/wxMDialogs.cpp 2006-09-02 22:17:03.000000000 +0200
+@@ -3,7 +3,7 @@
+ * *
+ * (C) 1998-2000 by Karsten Ballüder (karsten@phy.hw.ac.uk) *
+ * *
+- * $Id: wxMDialogs.cpp,v 1.433 2006/08/06 20:02:01 vadz Exp $
++ * $Id: wxMDialogs.cpp,v 1.435 2006/08/25 16:22:46 vadz Exp $
+ *******************************************************************/
+
+ #ifdef __GNUG__
+@@ -2163,8 +2163,10 @@
+ MH_DIALOG_LICENSE);
+ wxHtmlWindow *license = new wxHtmlWindow(this);
+
+- wxBitmap bmp(mApplication->GetIconManager()-> GetBitmap(_T("Msplash")));
+- const int w = bmp.Ok() ? bmp.GetWidth() : 400;
++ wxBitmap bmp(mApplication->GetIconManager()->GetBitmap(_T("Msplash")));
++ int w = bmp.Ok() ? bmp.GetWidth() : 0;
++ if ( w < 400 )
++ w = 400;
+
+ wxMemoryFSHandler::AddFile(_T("splash.png"), bmp, wxBITMAP_TYPE_PNG);
+
+@@ -2740,7 +2742,7 @@
+ m_frame->CentreOnParent();
+ m_frame->Show();
+
+- wxYield();
++ m_frame->Update();
+ }
+
+ void MProgressInfo::SetLabel(const wxString& label)
+diff -Naur mahogany-0.67/src/gui/wxMGuiUtils.cpp mahogany-0.67.20060903/src/gui/wxMGuiUtils.cpp
+--- mahogany-0.67/src/gui/wxMGuiUtils.cpp 1970-01-01 01:00:00.000000000 +0100
++++ mahogany-0.67.20060903/src/gui/wxMGuiUtils.cpp 2006-09-04 21:40:36.000000000 +0200
+@@ -0,0 +1,129 @@
++///////////////////////////////////////////////////////////////////////////////
++// Project: M - cross platform e-mail GUI client
++// File name: gui/wxMGuiUtils.cpp
++// Purpose: miscellaneous GUI helpers
++// Author: Vadim Zeitlin
++// Created: 2006-08-19
++// CVS-ID: $Id: wxMGuiUtils.cpp,v 1.1 2006/08/19 13:12:00 vadz Exp $
++// Copyright: (c) 2006 Vadim Zeitlin
++// Licence: M license
++///////////////////////////////////////////////////////////////////////////////
++
++// ============================================================================
++// declarations
++// ============================================================================
++
++// ----------------------------------------------------------------------------
++// headers
++// ----------------------------------------------------------------------------
++
++#include "Mpch.h"
++
++#ifndef USE_PCH
++# include "Mcommon.h"
++# include "guidef.h"
++
++# include <wx/fontmap.h>
++#endif // USE_PCH
++
++#include <wx/encconv.h>
++
++// ============================================================================
++// implementation
++// ============================================================================
++
++bool
++EnsureAvailableTextEncoding(wxFontEncoding *enc, wxString *text, bool mayAskUser)
++{
++ CHECK( enc, false, _T("CheckEncodingAvailability: NULL encoding") );
++
++ if ( !wxFontMapper::Get()->IsEncodingAvailable(*enc) )
++ {
++ // try to find another encoding
++ wxFontEncoding encAlt;
++ if ( wxFontMapper::Get()->
++ GetAltForEncoding(*enc, &encAlt, wxEmptyString, mayAskUser) )
++ {
++ // translate the text (if any) to the equivalent encoding
++ if ( text && !text->empty() )
++ {
++#if wxUSE_WCHAR_T
++ // try converting via Unicode
++ wxCSConv a2w(*enc);
++ wxWCharBuffer wbuf(a2w.cMB2WC(text->c_str()));
++ if ( *wbuf )
++ {
++ // special case of UTF-8 which is used all the time under wxGTK
++ if ( encAlt == wxFONTENCODING_UTF8 )
++ {
++ *text = wxConvUTF8.cWC2MB(wbuf);
++ }
++ else // all the other encodings, use generic converter
++ {
++ wxCSConv w2a(encAlt);
++ *text = w2a.cWC2MB(wbuf);
++ }
++
++ if ( !text->empty() )
++ return true;
++ //else: fall back to wxEncodingConverter
++ }
++ //else: conversion to Unicode failed
++#endif // wxUSE_WCHAR_T
++
++ wxEncodingConverter conv;
++ if ( !conv.Init(*enc, encAlt) )
++ {
++ // failed to convert the text
++ return false;
++ }
++
++ *text = conv.Convert(*text);
++ }
++ //else: just return the encoding
++
++ *enc = encAlt;
++ }
++ else // no equivalent encoding
++ {
++ return false;
++ }
++ }
++
++ // we have either the requested encoding or an equivalent one
++ return true;
++}
++
++wxFont
++CreateFontFromDesc(const String& fontDesc, int fontSize, int fontFamily)
++{
++ wxFont font;
++
++ // use the native font description if we have it
++ if ( !fontDesc.empty() )
++ {
++ wxNativeFontInfo fontInfo;
++ if ( fontInfo.FromString(fontDesc) )
++ {
++ font.SetNativeFontInfo(fontInfo);
++ }
++ }
++
++ // if we don't, or if creating font from it failed, create the font with the
++ // given size and family if we have [either of] them
++ if ( !font.Ok() && (fontSize != -1 || fontFamily != -1) )
++ {
++ font = wxFont
++ (
++ fontSize == -1 ? wxNORMAL_FONT->GetPointSize()
++ : fontSize,
++ fontFamily == wxFONTFAMILY_DEFAULT ? wxNORMAL_FONT->GetFamily()
++ : fontFamily,
++ wxFONTSTYLE_NORMAL,
++ wxFONTWEIGHT_NORMAL
++ );
++ }
++
++ return font;
++}
++
+diff -Naur mahogany-0.67/src/gui/wxMSplash.cpp mahogany-0.67.20060903/src/gui/wxMSplash.cpp
+--- mahogany-0.67/src/gui/wxMSplash.cpp 2006-06-04 21:24:54.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/wxMSplash.cpp 2006-09-02 22:18:27.000000000 +0200
+@@ -4,7 +4,7 @@
+ // Purpose: splash screen/about dialog implementation
+ // Author: Vadim Zeitlin
+ // Created: 2006-06-04 (extracted from wxMDialogs.cpp)
+-// CVS-ID: $Id: wxMSplash.cpp,v 1.2 2006/06/04 19:24:54 nerijus Exp $
++// CVS-ID: $Id: wxMSplash.cpp,v 1.6 2006/08/31 23:09:06 nerijus Exp $
+ // Copyright: (c) 1998-2006 Vadim Zeitlin <vadim@wxwindows.org>
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -174,7 +174,8 @@
+ wxStaticBitmap *top = new wxStaticBitmap(this, wxID_ANY, bmp,
+ wxPoint(0, 0), sizeBmp);
+ wxHtmlWindow *bottom = new wxHtmlWindow(this, wxID_ANY,
+- wxPoint(0, sizeBmp.y + 1), sizeBmp);
++ wxPoint(0, sizeBmp.y + 1), sizeBmp,
++ wxHW_DEFAULT_STYLE | wxHW_NO_SELECTION);
+
+ ConnectMouseAndKeyEvents(top);
+ ConnectMouseAndKeyEvents(bottom);
+@@ -219,6 +220,7 @@
+ wxString pageHtmlText;
+
+ pageHtmlText << _T("<body text=#000000 bgcolor=#ffffff>"
++ "<meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;charset=UTF-8\">"
+ "<font face=\"Times New Roman,times\">"
+
+ "<h4>") << _("Mahogany information") << _T("</h4>")
+@@ -261,8 +263,8 @@
+ << "<p>"
+ _T("<h4>") << _("List of contributors:") << _T("</h4>")
+ "<p>"
+- "Karsten Ball&uuml;der, Vadim Zeitlin, Greg Noel,<br> "
+- "Nerijus Bali&#363;nas, Xavier Nodet, Vaclav Slavik,<br>"
++ "Karsten Ball" "\xC3\xBC" "der, Vadim Zeitlin, Greg Noel,<br>"
++ "Nerijus Bali" "\xC5\xAB" "nas, Xavier Nodet, Vaclav Slavik,<br>"
+ "Daniel Seifert, Michele Ravani, Michael A Chase,<br>"
+ "Robert Vazan " << _("and many others") << "<br>"
+ "<br>"
+diff -Naur mahogany-0.67/src/gui/wxOptionsDlg.cpp mahogany-0.67.20060903/src/gui/wxOptionsDlg.cpp
+--- mahogany-0.67/src/gui/wxOptionsDlg.cpp 2006-07-31 02:38:47.000000000 +0200
++++ mahogany-0.67.20060903/src/gui/wxOptionsDlg.cpp 2006-09-02 22:19:50.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 20.08.98
+-// CVS-ID: $Id: wxOptionsDlg.cpp,v 1.430 2006/07/31 00:38:47 vadz Exp $
++// CVS-ID: $Id: wxOptionsDlg.cpp,v 1.431 2006/08/31 23:18:28 vadz Exp $
+ // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -2818,9 +2818,6 @@
+ strValue = strutil_decrypt(strValue);
+
+ case Field_Font:
+- strValue = wxFontBrowseButton::FontDescToUser(strValue);
+- // fall through
+-
+ case Field_Dir:
+ case Field_File:
+ case Field_Folder:
+@@ -2987,8 +2984,6 @@
+ // post processing is needed for some fields
+ if ( fieldType == Field_Passwd )
+ strValue = strutil_encrypt(strValue);
+- else if ( fieldType == Field_Font )
+- strValue = wxFontBrowseButton::FontDescFromUser(strValue);
+ else if ( fieldType == Field_Number ) {
+ wxASSERT( m_aDefaults[n].IsNumeric() );
+
+diff -Naur mahogany-0.67/src/gui/wxTemplateDialog.cpp mahogany-0.67.20060903/src/gui/wxTemplateDialog.cpp
+--- mahogany-0.67/src/gui/wxTemplateDialog.cpp 2006-01-16 21:32:28.000000000 +0100
++++ mahogany-0.67.20060903/src/gui/wxTemplateDialog.cpp 2006-09-02 22:22:22.000000000 +0200
+@@ -6,7 +6,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by: VZ at 09.05.00 to allow editing all templates
+ // Created: 16.07.99
+-// CVS-ID: $Id: wxTemplateDialog.cpp,v 1.42 2006/01/16 20:32:28 nerijus Exp $
++// CVS-ID: $Id: wxTemplateDialog.cpp,v 1.43 2006/08/19 14:49:52 vadz Exp $
+ // Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -527,10 +527,14 @@
+ listbox->Append(wxGetTranslation(gs_templateNames[n]));
+ }
+
++ int wLbox = listbox->GetBestSize().x;
++ if ( wLbox > 3*wBtn )
++ wLbox = 3*wBtn;
++
+ c = new wxLayoutConstraints;
+ c->top.Below(msg, LAYOUT_Y_MARGIN);
+ c->left.SameAs(box, wxLeft, 2*LAYOUT_X_MARGIN);
+- c->width.AsIs();
++ c->width.Absolute(wLbox);
+ c->height.Absolute(5*hBtn);
+ listbox->SetConstraints(c);
+
+@@ -612,7 +616,7 @@
+ {
+ m_kind = kind;
+
+- SetDefaultSize(6*wBtn, 10*hBtn);
++ SetDefaultSize(10*wBtn, 10*hBtn);
+ }
+
+ bool wxTemplatesDialogBase::TransferDataToWindow()
+@@ -755,11 +759,15 @@
+ // now lay them out
+ // ----------------
+
++ int wLbox = m_listbox->GetBestSize().x;
++ if ( wLbox > 3*wBtn )
++ wLbox = 3*wBtn;
++
+ wxLayoutConstraints *c;
+ c = new wxLayoutConstraints;
+ c->left.SameAs(box, wxLeft, 2*LAYOUT_X_MARGIN);
+ c->top.SameAs(box, wxTop, 4*LAYOUT_Y_MARGIN);
+- c->width.AsIs();
++ c->width.Absolute(wLbox);
+ c->bottom.SameAs(box, wxBottom, 2*LAYOUT_Y_MARGIN);
+ m_listbox->SetConstraints(c);
+
+@@ -887,10 +895,14 @@
+ // constraints
+ FillListBox();
+
++ int wLbox = m_listbox->GetBestSize().x;
++ if ( wLbox > 3*wBtn )
++ wLbox = 3*wBtn;
++
+ c = new wxLayoutConstraints;
+ c->top.Below(combo, 2*LAYOUT_Y_MARGIN);
+ c->left.SameAs(msg, wxLeft, 2*LAYOUT_X_MARGIN);
+- c->width.AsIs();
++ c->width.Absolute(wLbox);
+ c->bottom.SameAs(box, wxBottom, 2*LAYOUT_Y_MARGIN);
+ m_listbox->SetConstraints(c);
+
+diff -Naur mahogany-0.67/src/gui/wxTextDialog.cpp mahogany-0.67.20060903/src/gui/wxTextDialog.cpp
+--- mahogany-0.67/src/gui/wxTextDialog.cpp 2006-01-16 21:32:28.000000000 +0100
++++ mahogany-0.67.20060903/src/gui/wxTextDialog.cpp 2006-09-02 22:23:44.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 14.02.03 (extracted from src/gui/wxMDialogs.cpp)
+-// CVS-ID: $Id: wxTextDialog.cpp,v 1.10 2006/01/16 20:32:28 nerijus Exp $
++// CVS-ID: $Id: wxTextDialog.cpp,v 1.14 2006/08/24 17:58:37 vadz Exp $
+ // Copyright: (c) 2001-2003 Vadim Zeitlin
+ // Licence: M licence
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -143,38 +143,29 @@
+
+ m_configPath = configPath;
+
+- // we may have or not the location in config where the dialogs position/size
+- // are stored
+- int x, y, w, h;
+- if ( m_configPath )
+- {
+- wxMFrame::RestorePosition(configPath, &x, &y, &w, &h);
+- }
+- else
+- {
+- x =
+- y = -1;
+- w = 500;
+- h = 300;
+- }
+-
+- SetSize(x, y, w, h);
+-
+ // create controls
+ // ---------------
+
+ m_text = new wxTextCtrl(this, -1, wxEmptyString,
+- wxPoint(0, 0),
+- wxSize(w, h),
++ wxDefaultPosition,
++ wxDefaultSize,
+ wxTE_MULTILINE |
+ wxTE_READONLY |
+ wxTE_NOHIDESEL |
+ wxTE_RICH2);
+- m_text->SetValue(text);
+
+- // use fixed-width font
+- m_text->SetFont(wxFont(12, wxFONTFAMILY_TELETYPE,
+- wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL));
++ // use fixed-width font and latin1 encoding in which all text is valid:
++ // without encoding information (which wouldn't make sense anyhow as we can
++ // have multiple parts using different encodings) we must do this to at
++ // least show something to the user while using the default UTF-8 encoding
++ // of GTK+ 2 could result in nothing being shown at all
++ m_text->SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE,
++ wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
++ false /* not underlined */, wxEmptyString,
++ wxFONTENCODING_ISO8859_1));
++
++ // now that the encoding is set, we can show the text
++ m_text->SetValue(text);
+
+ // in TAB order we want "Save" to get focus before "Close", so create
+ // them in order
+@@ -196,20 +187,34 @@
+ sizerTop->Add(m_text, 1, wxEXPAND);
+ sizerTop->Add(sizerBtns, 0, wxCENTRE | wxTOP | wxBOTTOM, LAYOUT_Y_MARGIN);
+
+- // set the sizer &c
+- // ----------------
+-
+ SetSizer(sizerTop);
+- SetAutoLayout(TRUE);
+
+- // FIXME: bug in wxMSW? without Layout() the buttons are not positioned
+- // correctly initially
+-#ifdef __WXMSW__
+- Layout();
+-#endif
++ // final initialization
++ // --------------------
+
+ m_text->SetFocus();
+
++ // under wxGTK SetFocus() scrolls the control to the bottom for some reason
++ // while we always want to show the top of the message
++ m_text->SetInsertionPoint(0);
++
++ // we may have or not the location in config where the dialogs position/size
++ // are stored
++ int x, y, w, h;
++ if ( m_configPath )
++ {
++ wxMFrame::RestorePosition(configPath, &x, &y, &w, &h);
++ }
++ else
++ {
++ x =
++ y = -1;
++ w = 500;
++ h = 300;
++ }
++
++ SetSize(x, y, w, h);
++
+ Show(TRUE);
+ }
+
+diff -Naur mahogany-0.67/src/icons/adb_palmos.xpm mahogany-0.67.20060903/src/icons/adb_palmos.xpm
+--- mahogany-0.67/src/icons/adb_palmos.xpm 2003-11-08 14:04:26.000000000 +0100
++++ mahogany-0.67.20060903/src/icons/adb_palmos.xpm 2006-09-02 22:24:44.000000000 +0200
+@@ -178,25 +178,20 @@
+ "/. c #a4a8a8",
+ "(. c #a8b6ad",
+ /* pixels */
+-" ",
+-" ",
+-"g e.S._ J Y I ^ A.X.% ",
+-"j D H A r M 2 e -.=.@ ",
+-"5 $.V L i.6.j.g.D.*., ",
+-"z H.R.T.G.b.V.!.Q.p.4 ",
+-"b n.1.z.M.9.f.Z.B.l.7 ",
+-"t F.x.G U ] { r.g.y.9 ",
+-"< L.t.5.4.2.>.v.C.%.q ",
+-"a P.( :.} ) m.a.d.3.w ",
+-"p u.[ S B P / F ,.+.8 ",
+-"k ! ~ s.<.o.;. .8.O.3 ",
+-"d N...W./.^.~.(.' Q > ",
+-"y #.R U.I.E.K.Y.` T = ",
+-"1 | &.@.c.k.q.7.h.W # ",
+-"h v $ o X + . * n O ",
+-"i u 0.K Z N l w.E J.: ",
+-"c & - 0 x s f 6 ; m C ",
+-" ",
+-" ",
+-" ",
++"g g e.e.S.S._ J Y I ^ A.X.X.% % ",
++"j j D D H H A r M 2 e -.=.=.@ @ ",
++"5 5 $.$.V V L i.6.j.g.D.*.*., , ",
++"z z H.H.R.R.T.G.b.V.!.Q.p.p.4 4 ",
++"b b n.n.1.1.z.M.9.f.Z.B.l.l.7 7 ",
++"t t F.F.x.x.G U ] { r.g.y.y.9 9 ",
++"< < L.L.t.t.5.4.2.>.v.C.%.%.q q ",
++"a a P.P.( ( :.} ) m.a.d.3.3.w w ",
++"p p u.u.[ [ S B P / F ,.+.+.8 8 ",
++"k k ! ! ~ ~ s.<.o.;. .8.O.O.3 3 ",
++"d d N.N.....W./.^.~.(.' Q Q > > ",
++"y y #.#.R R U.I.E.K.Y.` T T = = ",
++"1 1 | | &.&.@.c.k.q.7.h.W W # # ",
++"h h v v $ $ o X + . * n n O O ",
++"i i u u 0.0.K Z N l w.E J.J.: : ",
++"c c & & - - 0 x s f 6 ; m m C C ",
+ };
+diff -Naur mahogany-0.67/src/mail/SendMessageCC.cpp mahogany-0.67.20060903/src/mail/SendMessageCC.cpp
+--- mahogany-0.67/src/mail/SendMessageCC.cpp 2006-06-24 01:27:31.000000000 +0200
++++ mahogany-0.67.20060903/src/mail/SendMessageCC.cpp 2006-09-02 22:25:53.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Karsten Ballüder
+ // Modified by:
+ // Created: 1998
+-// CVS-ID: $Id: SendMessageCC.cpp,v 1.233 2006/06/23 23:27:31 vadz Exp $
++// CVS-ID: $Id: SendMessageCC.cpp,v 1.234 2006/08/31 23:45:33 vadz Exp $
+ // Copyright: (C) 1999-2001 by M-Team
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -43,6 +43,10 @@
+ #include "Message.h"
+ #include "MFolder.h"
+
++#ifdef OS_UNIX
++# include "sysutil.h"
++#endif // OS_UNIX
++
+ // has to be included before SendMessage.h, as it includes windows.h which
+ // defines SendMessage under Windows
+ #include <wx/fontmap.h> // for GetEncodingName()
+@@ -1920,8 +1924,8 @@
+
+ // write to temp file:
+ wxFile out;
+- const String filename = wxFileName::CreateTempFileName(
+- _T("Mtemp"), &out);
++ MTempFileName tmpFN(&out);
++ const String& filename = tmpFN.GetName();
+
+ bool success = false;
+ if ( !filename.empty() )
+@@ -1930,18 +1934,21 @@
+ out.Close();
+ if ( written == lfOnly.Length() )
+ {
+- String command;
+- command.Printf(_T("%s < '%s'; exec /bin/rm -f '%s'"),
+- m_SendmailCmd.c_str(),
+- filename.c_str(), filename.c_str());
+- // HORRIBLE HACK: this should be `const char *' but wxExecute's
+- // prototype doesn't allow it...
+- wxChar *argv[4];
+- argv[0] = (wxChar *)"/bin/sh";
+- argv[1] = (wxChar *)"-c";
+- argv[2] = (wxChar *)command.c_str();
+- argv[3] = 0; // NULL
+- success = wxExecute(argv) != 0;
++ int rc = system(m_SendmailCmd + " < " + filename);
++ if ( WEXITSTATUS(rc) != 0 )
++ {
++ ERRORMESSAGE((_("Failed to execute local MTA \"%s\""),
++ m_SendmailCmd.c_str()));
++ }
++ else
++ {
++ success = true;
++ }
++ }
++ else
++ {
++ ERRORMESSAGE((_("Failed to write to temporary file \"%s\""),
++ filename.c_str()));
+ }
+ }
+ else
+@@ -1961,8 +1968,11 @@
+ }
+ else
+ {
+- ERRORMESSAGE((_("Failed to send message via '%s'"),
+- m_SendmailCmd.c_str()));
++ ERRORMESSAGE((_("Failed to send message via local MTA, maybe "
++ "it's not configured correctly?\n"
++ "\n"
++ "Please try using an SMTP server if you are not "
++ " sure.")));
+ }
+
+ return success;
+diff -Naur mahogany-0.67/src/modules/HtmlViewer.cpp mahogany-0.67.20060903/src/modules/HtmlViewer.cpp
+--- mahogany-0.67/src/modules/HtmlViewer.cpp 2006-06-27 02:35:07.000000000 +0200
++++ mahogany-0.67.20060903/src/modules/HtmlViewer.cpp 2006-09-02 22:27:16.000000000 +0200
+@@ -6,7 +6,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 26.07.01
+-// CVS-ID: $Id: HtmlViewer.cpp,v 1.77 2006/06/27 00:35:07 vadz Exp $
++// CVS-ID: $Id: HtmlViewer.cpp,v 1.78 2006/08/19 13:12:00 vadz Exp $
+ // Copyright: (c) 2001 Vadim Zeitlin
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -140,8 +140,8 @@
+ // add "attr=#colour" attribute to m_htmlText if col is valid
+ void AddColourAttr(const wxChar *attr, const wxColour& col);
+
+- // calculate font size
+- int CalculateFontSize(int diff);
++ // calculate HTML font size for the given font
++ int CalculateFontSize(const wxFont& font);
+
+ // get the name of the virtual file for the n-th image we use
+ wxString GetVirtualFileName(size_t n) const;
+@@ -844,12 +844,19 @@
+ }
+ }
+
+-int HtmlViewer::CalculateFontSize(int diff)
++int HtmlViewer::CalculateFontSize(const wxFont& font)
+ {
++ if ( !font.Ok() )
++ {
++ // use default size
++ return 0;
++ }
++
+ // map the point size into the HTML font size so that if the standard font
+ // size is 12pt, 6pt is very small and 24pt is very big
+ //
+ // this is not very rigorous, of course...
++ int diff = font.GetPointSize() - wxNORMAL_FONT->GetPointSize();
+ if ( diff > 0 )
+ diff /= 4;
+ else
+@@ -901,9 +908,8 @@
+ // close <body> tag
+ m_htmlText += _T(">");
+
+- wxFont font = profileValues.GetFont();
+-
+- int diff = CalculateFontSize(font.GetPointSize() - DEFAULT_FONT_SIZE);
++ wxFont font(profileValues.GetFont());
++ int diff = CalculateFontSize(font);
+ if ( diff )
+ {
+ m_htmlText << _T("<font size=") << wxString::Format(_T("%+d"), diff) << _T(">");
+@@ -913,7 +919,7 @@
+ // map the font family into HTML font face name
+ //
+ // TODO: use <font face="...">
+- if ( font.IsFixedWidth() )
++ if ( font.Ok() && font.IsFixedWidth() )
+ {
+ m_htmlText << _T("<tt>");
+ m_htmlEnd.Prepend(_T("</tt>"));
+@@ -925,10 +931,7 @@
+
+ void HtmlViewer::ShowRawHeaders(const String& header)
+ {
+- const ProfileValues& profileValues = GetOptions();
+- wxFont font = profileValues.GetFont();
+-
+- int diff = CalculateFontSize(font.GetPointSize() - DEFAULT_FONT_SIZE);
++ int diff = CalculateFontSize(GetOptions().GetFont());
+ m_htmlText << _T("<pre>") << _T("<font size=") << wxString::Format(_T("%+d"), diff) << _T(">")
+ << MakeHtmlSafe(header) << _T("</font>") << _T("</pre>");
+ }
+diff -Naur mahogany-0.67/src/modules/spam/HeadersFilter.cpp mahogany-0.67.20060903/src/modules/spam/HeadersFilter.cpp
+--- mahogany-0.67/src/modules/spam/HeadersFilter.cpp 2006-06-25 16:36:07.000000000 +0200
++++ mahogany-0.67.20060903/src/modules/spam/HeadersFilter.cpp 2006-09-02 22:28:57.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 2004-07-10 (mostly extracted from Filters.cpp)
+-// CVS-ID: $Id: HeadersFilter.cpp,v 1.15 2006/06/25 14:36:07 vadz Exp $
++// CVS-ID: $Id: HeadersFilter.cpp,v 1.16 2006/08/25 10:47:57 vadz Exp $
+ // Copyright: (c) 2004 Vadim Zeitlin <vadim@wxwindows.org>
+ // Licence: M licence
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -70,10 +70,10 @@
+ Spam_Test_HTML,
+ Spam_Test_BadMIME,
+ Spam_Test_ExeAttachment,
+- Spam_Test_WhiteList,
+ #ifdef USE_RBL
+ Spam_Test_RBL,
+ #endif // USE_RBL
++ Spam_Test_WhiteList,
+
+ Spam_Test_Max
+ };
+diff -Naur mahogany-0.67/src/modules/TextViewer.cpp mahogany-0.67.20060903/src/modules/TextViewer.cpp
+--- mahogany-0.67/src/modules/TextViewer.cpp 2006-01-16 21:32:28.000000000 +0100
++++ mahogany-0.67.20060903/src/modules/TextViewer.cpp 2006-09-02 22:30:10.000000000 +0200
+@@ -5,7 +5,7 @@
+ // Author: Vadim Zeitlin
+ // Modified by:
+ // Created: 26.07.01
+-// CVS-ID: $Id: TextViewer.cpp,v 1.67 2006/01/16 20:32:28 nerijus Exp $
++// CVS-ID: $Id: TextViewer.cpp,v 1.68 2006/08/19 13:12:00 vadz Exp $
+ // Copyright: (c) 2001 Vadim Zeitlin
+ // Licence: M license
+ ///////////////////////////////////////////////////////////////////////////////
+@@ -549,7 +549,9 @@
+
+ const ProfileValues& profileValues = GetOptions();
+
+- m_window->SetFont(profileValues.GetFont());
++ wxFont font(profileValues.GetFont());
++ if ( font.Ok() )
++ m_window->SetFont(font);
+ m_window->SetForegroundColour(profileValues.FgCol);
+ m_window->SetBackgroundColour(profileValues.BgCol);
+ }
diff --git a/mail-client/mahogany/files/0.67-utf8warn.patch b/mail-client/mahogany/files/0.67-utf8warn.patch
new file mode 100644
index 0000000..6fd97c9
--- /dev/null
+++ b/mail-client/mahogany/files/0.67-utf8warn.patch
@@ -0,0 +1,70 @@
+diff -Naur mahogany-0.67.cvs/include/gui/wxMApp.h mahogany-0.67.utf8warn/include/gui/wxMApp.h
+--- mahogany-0.67.cvs/include/gui/wxMApp.h 2006-09-04 20:27:35.000000000 +0200
++++ mahogany-0.67.utf8warn/include/gui/wxMApp.h 2006-09-04 20:22:24.000000000 +0200
+@@ -81,6 +81,8 @@
+ virtual bool CanClose() const;
+ virtual void OnClose();
+
++ wxFontEncoding GetSystemEncoding_Workaround();
++
+ // wxWin calls these functions to start/run/stop the application
+ virtual bool OnInit();
+ virtual int OnRun();
+diff -Naur mahogany-0.67.cvs/src/gui/wxMApp.cpp mahogany-0.67.utf8warn/src/gui/wxMApp.cpp
+--- mahogany-0.67.cvs/src/gui/wxMApp.cpp 2006-09-04 20:27:41.000000000 +0200
++++ mahogany-0.67.utf8warn/src/gui/wxMApp.cpp 2006-09-04 20:22:36.000000000 +0200
+@@ -909,6 +909,39 @@
+ #endif // 0
+ }
+
++wxFontEncoding wxMApp::GetSystemEncoding_Workaround()
++{
++ const wxString encname = wxLocale::GetSystemEncodingName();
++ if ( !encname.empty() )
++ {
++ wxFontEncoding enc = wxFontMapperBase::GetEncodingFromName(encname);
++
++ // on some modern Linux systems (RedHat 8) the default system locale
++ // is UTF8 -- but it isn't supported by wxGTK1 in ANSI build at all so
++ // don't even try to use it in this case
++#if !wxUSE_UNICODE && \
++ ((defined(__WXGTK__) && !defined(__WXGTK20__)) || defined(__WXMOTIF__))
++ if ( enc == wxFONTENCODING_UTF8 )
++ {
++ // the most similar supported encoding...
++ enc = wxFONTENCODING_ISO8859_1;
++ }
++#endif // !wxUSE_UNICODE
++
++ // GetEncodingFromName() returns wxFONTENCODING_DEFAULT for C locale
++ // (a.k.a. US-ASCII) which is arguably a bug but keep it like this for
++ // backwards compatibility and just take care to not return
++ // wxFONTENCODING_DEFAULT from here as this surely doesn't make sense
++ if ( enc != wxFONTENCODING_MAX && enc != wxFONTENCODING_DEFAULT )
++ {
++ return enc;
++ }
++ //else: return wxFONTENCODING_SYSTEM below
++ }
++
++ return wxFONTENCODING_SYSTEM;
++}
++
+ // app initilization
+ bool
+ wxMApp::OnInit()
+@@ -1102,12 +1135,10 @@
+ }
+ #endif // USE_I18N
+
+- // 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)
++#ifdef __WXGTK20__
+ // we need UTF-8 support to be able to work with messages in different
+ // encodings
+- if ( wxLocale::GetSystemEncoding() != wxFONTENCODING_UTF8 )
++ if ( GetSystemEncoding_Workaround() != wxFONTENCODING_UTF8 )
+ {
+ // TODO: set encoding to UTF-8 (but keeping the current language)
+ // ourselves
diff --git a/mail-client/mahogany/files/0.67-wx26.patch b/mail-client/mahogany/files/0.67-wx26.patch
new file mode 100644
index 0000000..54b4260
--- /dev/null
+++ b/mail-client/mahogany/files/0.67-wx26.patch
@@ -0,0 +1,11 @@
+--- mahogany-0.67.cvs/src/classes/MessageView.cpp 2006-09-04 20:27:41.000000000 +0200
++++ mahogany-0.67.wx26/src/classes/MessageView.cpp 2006-09-02 13:41:58.000000000 +0200
+@@ -2454,7 +2454,7 @@
+ CHECK( !cidOrig.empty(), false, "empty CID not allowed" );
+
+ String cid;
+- if ( *cidOrig.begin() == '<' && *cidOrig.rbegin() == '>' )
++ if ( *cidOrig.begin() == '<' && cidOrig.length() == '>' )
+ cid.assign(cidOrig, 1, cidOrig.length() - 2);
+ else
+ cid = cidOrig;
diff --git a/mail-client/mahogany/files/digest-mahogany-0.67 b/mail-client/mahogany/files/digest-mahogany-0.67
new file mode 100644
index 0000000..d7749f2
--- /dev/null
+++ b/mail-client/mahogany/files/digest-mahogany-0.67
@@ -0,0 +1,3 @@
+MD5 0e6901fb4baf08114c2f2cb18f34d2ea mahogany-0.67.tar.bz2 5315580
+RMD160 41684bdd7b50fb4697192e63e19d103c0da2cf12 mahogany-0.67.tar.bz2 5315580
+SHA256 c9d1ab0bc3d1441facb879f01aa3151beaac85819d00bbac075b7c0150cc1b78 mahogany-0.67.tar.bz2 5315580
diff --git a/mail-client/mahogany/mahogany-0.67.ebuild b/mail-client/mahogany/mahogany-0.67.ebuild
new file mode 100644
index 0000000..a5eca6e
--- /dev/null
+++ b/mail-client/mahogany/mahogany-0.67.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-client/mahogany/mahogany-0.65.ebuild,v 1.3 2005/05/06 11:38:14 swegener Exp $
+
+inherit eutils wxwidgets
+
+DESCRIPTION="Highly customizable powerful mail client"
+SRC_URI="mirror://sourceforge/mahogany/${P}.tar.bz2"
+HOMEPAGE="http://mahogany.sourceforge.net"
+
+KEYWORDS="~x86 ~ppc"
+SLOT="0"
+LICENSE="mahogany"
+IUSE="python ssl static nls debug doc dspam pda"
+
+RDEPEND=">=x11-libs/wxGTK-2.6.3
+ python? ( <dev-lang/python-2.5 )
+ ssl? ( dev-libs/openssl )
+ dspam? ( mail-filter/dspam )
+ pda? ( app-pda/pilot-link )"
+
+DEPEND="${RDEPEND}
+ doc? ( dev-tex/latex2html )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PV}-cvs20060903.patch
+ epatch "${FILESDIR}"/${PV}-wx26.patch
+ epatch "${FILESDIR}"/${PV}-utf8warn.patch
+}
+
+src_compile() {
+ local myconf
+
+ WX_GTK_VER="2.6"
+
+ need-wxwidgets gtk2 || die "Emerge wxGTK with X in USE"
+ myconf="--with-wx-config=${WX_CONFIG}"
+
+ if use python; then
+ myconf="${myconf} --with-python="
+ use static && myconf="${myconf}static" || myconf="${myconf}dynamic"
+ else
+ myconf="--with-python=none"
+ fi
+
+ econf \
+ $(use_enable nls) \
+ $(use_enable debug) \
+ $(use_with ssl) \
+ $(use_with dspam) \
+ $(use_with pda palm) \
+ $(use_with static modules static) \
+ ${myconf} || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}"/usr install_bin || die
+
+ if use nls; then
+ emake DESTDIR="${D}"/usr install_locale
+ fi
+
+ if use doc; then
+ emake DESTDIR="${D}"/usr install_doc || die
+ fi
+
+ insinto /etc
+ doins extra/install/M.conf
+
+ dodoc COPYING CREDITS CHANGES INSTALL README
+ if use doc; then
+ cd "${D}"/usr/share/Mahogany/doc
+ dodoc Pdf/*
+ dohtml -r Manual HackersGuide
+ rm -rf COPYING CREDITS CHANGES INSTALL README Pdf Manual Manual.html \
+ Manual.chm
+ fi
+}