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 , 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 &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/HtmlHlp/Manual.html mahogany-0.67.20060903/doc/HtmlHlp/Manual.html --- mahogany-0.67/doc/HtmlHlp/Manual.html 2006-08-06 22:18:26.000000000 +0200 +++ mahogany-0.67.20060903/doc/HtmlHlp/Manual.html 1970-01-01 01:00:00.000000000 +0100 @@ -1,5651 +0,0 @@ - - - - - -Mahogany User Manual -Version 0.67 ``Constance'' - - - - - - - - - - - - - - -

- - - - -

- -

-

Mahogany User Manual -
Version 0.67 ``Constance''

-
- -

Copyright 1997-2006 by The Mahogany Development Team

-
- -

-
- -

-Contents -

- - - - - -

- -

-Using Mahogany -

- -

- -

-Release Notes -

- -

-Welcome to the new Mahogany release! If you haven't installed the -program yet, you probably want to start by doing it. Please check -if we don't have prebuilt binaries for your platform (currently we -only provide binaries for Linux and Win32). If not, you'll have to -build it from the sources: please refer to the README file for the -compilation instructions. Mahogany should generally work on any modern -Unix flavour but, of course, you can always contact us if you have -any problems with building it. - -

- -

-Changes against the previous versions -

- -

-All sections here except the first one present only historical interest, please -skip them unless you're updating from a very old version of Mahogany. - -

- -

-0.67 against 0.66 -

- -

- -

- -

-By far the main new feature in this version is the integration of DSPAM -According to http://www.nuclearelephant.com/projects/dspam/: - -

-

-DSPAM (as in De-Spam) is an extremely scalable, open-source statistical -anti-spam filter. While most commercial solutions only provide a mere 95% -accuracy (1 error in 20), a majority of DSPAM users frequently see between -99.95% (1 error in 2000) all the way up to 99.991% (2 errors in 22,786). - -
- -

-Please see [*] section for the description of how to configure and use -DSPAM. - -

- -

-0.66 against 0.65 -

- -

-The most noticeable new feature is the new composer. Unfortunately, it is less -powerful than the old one as the new one is text-only and not rich text but it -is also significantly less buggy and simpler to use. Another big internal -change is that the built in Python interpreter now works again and you can use -it to write filter functions and do other nifty things (see section -[*]). Finally, we now have a working version for Mac OS X. - -

-Other than that, the focus of the new release is yet again more bug fixing -than adding new features. As usual, some of them were still added: - -

- -

- -

-0.65 against 0.64 -

- -

-First of all, too many bugs to be mentioned here were fixed. During more than a -year since the last release we mainly concentrated on making Mahogany more -stable and faster (or at least less slow) rather than on adding new features. - -

-Yet, inevitably, some of them still crept in and here is an incomplete list: - -

- -

-Finally not really a new feature but an important achievement in our struggle -for world domination: Mahogany now runs under Mac OS X as well! Note that -Mahogany is a real native (Carbon) application and doesn't require GTK+ or X11. - -

- -

-0.64 against 0.63 -

- -

-This time the most important changes have happened to the already -existing features many of which were dramatically improved. Support -for both IMAP4 and POP3 has got better, many UI improvements were done -and too many bugs to mention here were fixed. - -

-The main change without doubt is the complete reorganisation of the -program internals which now allows us to only download the headers -shown on the screen from server instead of getting all of them. This -means that the time needed to open a folder is now almost independent -of the folder size and Mahogany can be used without troubles with -folders containing $50000$ messages (and maybe more - but this wasn't -tested yet). - -

-But what would be a new release without some new features? So here -they are: - -

- -

-Some of the notable UI improvements are: - -

- -

-The Win32 version has now some more of the possibilities of the Unix -one: - -

- -

- -

- -

-0.63 against 0.62 -

- -

-Again, most of the effort went into optimizing the program for speed. -Filtering and moving mail messages on IMAP servers is now an order -of magnitude faster and startup time has been reduced too (especially -under Windows). Several fatal bugs which had unfortunately crept into -Win32 release were fixed as well. - -

-The new features this time include - -

- -

-There are several more minor improvements as well: - -

- -

-Some of non fatal but annoying bugs fixed in this release are: - -

- -

- -

- -

-0.62 against 0.61 -

- -

-The main changes in this release concern the Mahogany internals: the -stability and efficiency have been both greatly improved, in particular -it is believed that all fatal crashes using IMAP servers are now gone. -Deleting, expunging and changing the status of the messages is now -much faster, especially for the folders with a lot of messages. Of -course, there are also several new features: - -

- -

-Many bugs have been fixed: - -

- -

-And a few improvements too: - -

- -

- -

- -

-0.61 against 0.60 -

- -

-Note: the version 0.61 wasn't officially released - -

-A couple of new features, most importantly: - -

- -

- -

- -

-0.60 against 0.50 -

- -

-Most importantly, all known major bugs in 0.5 have been fixed in this -release. We still have some minor buglets and lots of wishes and enhancements -on our list, but all serious bugs should be gone now. A couple of -new features have been added: - -

- -

-New experimental features include: - -

- -

-Known bugs: - -

- -

- -

- -

-0.5 against 0.23a -

- -

-This release has long been delayed, mainly due to us waiting for changes -in wxWidgets to be completed. As we introduced new features in the -meantime, those introduced new delays, and so on. It has been more -than half a year since the last release, so changes are major. We -hope to stick to a much faster cycle of minor update releases for -the future. The main new features are: - -

- -

- -

- -

-0.23a against 0.22a -

- -

-The main news is, of course, the long-waited for availability of Win32 -version. Also: - -

- -

-We have also made good progress on the filtering code, PGP/GPG support, -multi-threading support and support for loadable external modules, -but these features are not complete yet and disabled in the release. -Expect them to appear in the next releases. - -

- -

-0.22a against 0.21a -

- -

-Release 0.22a is mainly a bugfix release against 0.21a. - -

- -

- -

- -

-0.10a to 0.21a -

- -

-First, there are some user-visible changes against the latest version, -most notably the much improved message editor. This is still work -in progress and the next release should add the sorely missed cut -and paste support which only recently became functional in the underlying -wxGTK toolkit. Also, configurability has been much extended. For the -first time, Mahogany now defaults to collecting all mail from the -system's INBOX (whatever that is) to a central ``New Mail'' -folder. It can easily be set up to watch any number of different mail -accounts or newsgroups and collect mail from them. - -

-This release got a bit delayed because we decided to finish some long -planned changes under the hood, mainly a complete rewrite of the internal -configuration system which now provides the inheriting configuration -settings we had planned, something that will become obvious in the -next release when full GUI support for it will be added. Also, we -seriously improved the mailfolder handling code to reliably handle -all kinds of error conditions, such as modified or disappearing mailboxes -or terminated connections and recover from them safely. Also, Mahogany -now has full working support for IMAP, NNTP and newsspools. - -

-Apart from this there were many minor fixes and changes, both GUI -and mail code, documented in detail at the end of the TODO file. - -

- -

-Known bugs -

- -

- -

- -

- -

-TODO, features to implement -

- -

- -

-The next few things to be implemented: -

- -

- -

- -

- -

-Help Needed -

- -

-As you can see, we have big plans for Mahogany. To achieve all this, -we need some help. Areas where we would use some help are - -

- -

- -

- -

-Copyright -

- -

-Mahogany is copyright by The Mahogany Development Team (Founding members -Karsten Ballüder and Vadim Zeitlin). It is licensed under the Mahogany -``Artistic License'' as stated in section[*] or, -alternatively, under GNU General Public License. Some part of the -source tree distributed with Mahogany is not covered under this license. -These additional sources can be found in the ``extra/src'' -subdirectory. Please check the files in the individual directories -for their copyright notices. However, they can be freely distributed -under certain conditions. - -

- -

-Why not the GPL/BSD/QPL/my favourite license? -

- -

-Recently discussions about which license to chose for which project -provoked major flamewars in the Unix community. There is a trend to -put everything under the GPL or LGPL1.1. We do not want to get involved in this highly emotional and political -discussion. Our intent is to allow everyone to use and modify Mahogany -while preserving some form of control over its development. That is -why we chose a modified version of Perl's Artistic License. It is -both more and less restrictive than the GPL in certain ways. We do -not believe that there is one right license for everything. The Mahogany -Artistic License is much simpler and easier to understand than the -GPL, so we feel more comfortable with it. If you want to do something -with Mahogany and feel that the license poses a problem, please -contact us! We do not want the license to be a problem and any reasonable -request for deviating uses of Mahogany will be likely to be granted. -If in doubt, ask us and we will find a solution. - -

- -

-
-The Mahogany ``Artistic License'' -

- -

- -

-Preamble -

- -

-The intent of this document is to state the conditions under which -this software package may be copied, such that the Copyright Holder -maintains some semblance of artistic control over the development -of the package, while giving the users of the package the right to -use and distribute the Package in a more-or-less customary fashion, -plus the right to make reasonable modifications. - -

-This license is based on Perl's ``Artistic License'' and has been -adapted to better suit Mahogany. It aims to confirm with the Open-Source -specification. If you should have any questions about this license, -are unhappy with it or simply would like to comment on it, please -get in touch with us. - -

- -

-Definitions -

- -

-``Package'' refers to the collection of files distributed by the Copyright -Holder, and derivatives of that collection of files created through -textual modification. - -

-``Standard Version'' refers to such a Package if it has not been modified, -or has been modified in accordance with the wishes of the Copyright -Holder as specified below. - -

-``Copyright Holder'' is whoever is named in the copyright or copyrights -for the package. - -

-``You'' is you, if you're thinking about copying or distributing this -Package. - -

-``Reasonable copying fee'' is whatever you can justify on the basis -of media cost, duplication charges, time of people involved, and so -on. (You will not be required to justify it to the Copyright Holder, -but only to the computing community at large as a market that must -bear the fee.) - -

-``Freely Available'' means that no fee is charged for the item itself, -though there may be fees involved in handling the item. It also means -that recipients of the item may redistribute it under the same conditions -they received it. - -

- -

-Conditions of Use -

- -

- -

    -
  1. You may make and give away verbatim copies of the source form of the -Standard Version of this Package without restriction, provided that -you duplicate all of the original copyright notices and associated -disclaimers and only distribute the complete package as a whole. -
  2. -
  3. You may apply bug fixes, portability fixes and other modifications -derived from the Public Domain or from the Copyright Holder. A Package -modified in such a way shall still be considered the Standard Version. -
  4. -
  5. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how -and when you changed that file, and provided that you do at least -ONE of the following: - -

    - -

      -
    1. place your modifications in the Public Domain or otherwise make them -Freely Available, such as by posting said modifications to Usenet -or an equivalent medium, or placing the modifications on a major archive -site such as sunsite.unc.edu, or by allowing the Copyright Holder -to include your modifications in the Standard Version of the Package, -and rename any non-standard executables so the names do not conflict -with standard executables, which must also be provided, and provide -a separate manual page for each non-standard executable that clearly -documents how it differs from the Standard Version. You must not make -the modified version depend on any other software or library if that -software or library is not Freely Available or if it is covered under -a license more restrictive than this. -
    2. -
    3. use the modified Package only within your corporation or organisation. -
    4. -
    5. make other distribution arrangements with the Copyright Holder. -
    6. -
    -
  6. -
  7. You may distribute the programs of this Package in object code or -executable form, provided that you do at least ONE of the following: - -

    - -

      -
    1. distribute a Standard Version of the executables and library files, -together with instructions (in the manual page or equivalent) on where -to get the Standard Version. -
    2. -
    3. accompany the distribution with the machine-readable source of the -Package with your modifications, including the complete machine-readable -source of the unmodified Standard Version. You must not make the modified -version depend on any other software or library if that software or -library is not Freely Available or if it is covered under a license -more restrictive than this. -
    4. -
    5. give non-standard executables non-standard names, and clearly document -the differences in manual pages (or equivalent), together with instructions -on where to get the Standard Version. d.make other distribution arrangements -with the Copyright Holder. -
    6. -
    -
  8. -
  9. You may charge a reasonable copying fee for any distribution of this -Package. You may charge any fee you choose for support of this Package. -You may not charge a fee for this Package itself. However, you may -distribute this Package in aggregate with other (possibly commercial) -programs as part of a larger (possibly commercial) software distribution -provided that you do not advertise this Package as a product of your -own. -
  10. -
  11. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written -permission. However, all products derived from this software must -reproduce the original copyright notice as found in the Standard Version. -
  12. -
  13. THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -
  14. -
- -

- -

-The License Dialog -

- -

-When you start Mahogany for the first time, it will display the license -and conditions of use and ask you to accept or reject the license. -If you do not accept it, Mahogany will terminate. If you have any -questions about the license or want to otherwise comment on it, please -email the development team at mahogany-users@lists.sourceforge.net -. - -

- -

-Additional Credits -

- -

- -

-C-Client library: -

- -

-The use of the c-client library requires us to display the following -copyright notice: - -

-

-Copyright 1999 by the University of Washington -
-Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appears in all copies and -that both the above copyright notice and this permission notice appear -in supporting documentation, and that the name of the University of -Washington not be used in advertising or publicity pertaining to distribution -of the software without specific, written prior permission.  This -software is made available "as is", and THE UNIVERSITY -OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD -TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN NO -EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL, -INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING -FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -
- -

- -

-The OpenSSL toolkit: -

- -

-Mahogany can be linked with the OpenSSL toolkit to support secure -communications over SSL. In that case, we must give due credit to -the authors and copyright of this library: - -

-

-This product includes software developed by the OpenSSL Project for -use in the OpenSSL Toolkit -.This product includes cryptographic software written by Eric Young -(eay@cryptsoft.com) This product includes software written by Tim -Hudson (tjh@cryptsoft.com)" - -
- -

- -

-wxWidgets (formerly known as wxWindows): -

- -

-Mahogany is built using wxWidgets -cross-platform class library - without it, Mahogany wouldn't have been -possible. - -

- -

-Introduction / Tutorial -

- -

-To get started on Mahogany, you should look at the following sections -of this manual: - -

- -

-Obviously, the more of this manual you read, the better use you can -make of Mahogany. Once the manual has grown too large, we will provide -a short tutorial, but for now we go on coding instead. - -

- -

-Getting started -

- -

-When you start Mahogany for the first time, it will first ask you -to accept the terms of its license. Note that you must accept it to -be able to use the program. After doing it, you will see the installation -wizard. It will guide you through several pages whose purpose is to -get the information absolutely required for running the program and -also prepare a useable initial setup for you. Please avoid abandoning -the wizard unless you really know what you are doing, so just click -next and ignore the checkbox on the first page for now. - -

-It is quite likely that you already have some other email program -installed on your computer. Mahogany may import the configuration -settings for some of them (currently, Netscape Communicator, Pine -and XFMail but we have plans to add support for more programs in the -future) meaning that it will provide your existing settings as the -default values in the next pages. Of course, it is absolutely safe -to just skip this step and continue directly. - -

-Next page asks you for your minimal personal information. You may -enter an empty personal name here if you wish (although it is better -to enter something) but it is required that you enter a valid email -address below. It will be used as your default return email address. -Note that you will be able to change this address in the future in -the program prefernces dialog as well as add other identities, possibly -with different email addresses, later. - -

-The next page proposes you to setup some default servers. Windows -users must specify an SMTP server here. Under Unix you may -leave it empty if you want to use a local MTA such as SENDMAIL, -QMAIL or EXIM. For the other servers you are free -to enter the server name or leave the entry empty if you don't want -to use it. - -

-The following page is more interesting as it gives you the possibility -to configure some of the basic Mahogany options to your liking. Let's -consider them in order: - -

- -

-After finishing with the previous page you are almost done - the last -page of the wizard doesn't have any more options. It just proposes -you to send a test email to the address you had entered in the beginning -(remember that it must have been a valid one?). If you are absolutely -sure that you made no mistakes or if you can't or don't want to send -mail currently, please uncheck the checkbox at the bottom of the page. -Otherwise, let Mahogany do it as it might discover some problem with -your SMTP server. In any case, you should now see the main Mahogany -window which is described in the main section in front of you and -it means that Mahogany has been successfully installed. Congratulations! - -

- -

-The main window -

- -

-The main window is broken in three parts. There is a tree of folders -([*]) on the left and a view of the currently selected -folder ([*]) to the right of it which itself has two -parts: the upper one shows the list of all messages in the folder -while the lower one shows the currently previewed message. - -

-The installation wizard has created a small number of standard folders -that Mahogany uses itself. Exactly which folders you now see on your -screen depends, of course, on the choices you have done in the wizard -but it should be a subset of the following list: - -

- -

-The folder view on the right should show only one or two messages -right now (unless you already had some mail in your INBOX). -The first of them should be self-explanatory and the second, if any, -is the test message Mahogany has sent to test your configuration. -If you didn't disable this test but don't see this message in the -folder, something may have gone wrong. Please look at the activity -log window which Mahogany has also created to see if there are any -errors in it. Also please see ([*]) section. - -

- -

-How to configure POP and IMAP folders? -

- -

-Although the installation wizard did create entries for POP and/or -IMAP servers in the folder, they are probably not very useful right -now. Or maybe you didn't create them then and want to do it now - -then just choose ``Create'' item from the ``Folder'' menu -and follow the instructions. If you are already fed up with the wizards -you may prefer to dismiss it on the first page by selecting the checkbox -there and enter all the folder parameters directly in the folder properties -dialog. - -

-If you have let the wizard create the folder, you still need to use -the folder properties dialog to customize it. By the way, this dialog -can be accessed by selecting the corresponding item either from the -``Folder'' menu in the menu bar or from the popup menu you obtain -by right-clicking the folder in the tree. - -

-Browse this dialog to get an idea of some of the options you may change. -Please note that most of the options in the first, ``Access'', -page cannot be changed after the folder creation. The different options -are described in more details elsewhere in this manual. - -

-Right now let us just give some examples of the typical configurations: - -

- -

    -
  1. Typical POP3 server: normally, the new mail is downloaded from the -POP3 folders locally so go to the ``New Mail'' page and select -``Collect new mail from this folder''. This will move all new -mail from the POP3 server to the ``New Mail'' folder. If you -want to copy it instead just check the ``Leave mail in this folder'' -checkbox as well. Finally, if you want Mahogany to check the POP3 -folder for the updates automatically please check the ``Permanently -monitor this folder'' checkbox and change the polling interval -for it if needed. -
  2. -
  3. IMAP server with only INBOX: if you only have INBOX folder on your -IMAP server you may configure it exactly as the POP3 server above. -You may also decide not to collect mail from it but read it directly -on the server - this is, in fact, the preferred mode of operation -as this works much better with IMAP than with POP. -
  4. -
  5. IMAP server with multiple folders: in this case you almost surely -don't want to download all new mail from the IMAP INBOX to the local -folders but keep it on server. You will probably be interested in -using filters ([*]) in this case. -
  6. -
- -

- -

-How to set up your mail accounts -

- -

-** This is currently missing, see the text in the FAQ. I will -explain here how to set up your accounts. - -

- -

-Setting up Mahogany, its configuration files -

- -

- -

-
-Mahogany command line options -

- -

-The following options are accepted. When both short and long options are listed -either one can be used and if the long options requires an argument, it must be -specified for the short one as well. The delimiter for the short options is -either / or - but only - can be used for the long ones. - -

-
-
- -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionMeaning
-h, -helpshow the summary of the command line options
-verbosegenerate verbose messages (off by default)
-debugenable debug logging
-safedon't do anything automatically on startup
 may be useful if Mahogany crashes when trying
 to automatically do something after starting up
-userdir=dirspecify a non default directory containing all user
 data including, but not limited to, the file mailboxes
-config=filespecify the alternate configuration file to use
 may be also used to force using file instead of
 the registry under Windows
-b, -bcc=adrspecify a blind carbon-copy (BCC) recipient
-c, -cc=adrspecify a carbon-copy (CC) recipient
-s, -subject=strspecify the subject for the new message
-body=strthe initial text of the message
-f, -folder=strthe folder to open in the main frame on startup
-lang=lngthe language to use for the program messages,
 overrides the default language choice
-newsgroup=groupthe news group to post the message to
-nopythondisable the embedded Python interpreter, even if it is -enabled in the program options ([*])
- -

-
-
- -

-The remaining command line arguments are taken as the recipients for the new -message. - -

-If either of the -bcc, -cc, -subject, -newsgroup or --body options is given or a command line argument follows the options, -the composer will be automatically opened on startup. If the ``Always run only -one instance'' option (see [*]) is set, the composer will be -opened in the already running instance of the program, if any. - -

-Please do use -debug option if something goes wrongly, it can give -valuable information about the problem! See also the corresponding option -([*]). - -

-If you want to use the configuration files under Windows (by default the -registry will be used to store the program options) you should use the --config=file option each time when running the program. The easiest way -to do it is to create a shortcut to M.exe and enter this argument there. - -

- -

-User configuration files (Unix only) -

- -

-When run for the first time, Mahogany creates a directory called -.M in the user's home directory. The file $HOME/.M/config -will contain the current program configuration for this user. Only -values different from the default configuration are stored here. If -you want to obtain a list of all possible options (although arguably -if you are so curious, you'd better read Mahogany sources directly), -you can manually add the entry - -

-

-RecordDefaults = 1 - -
-to the [M/Profiles] section of the configuration file. -This will cause all values which are used to be written to the configuration -file. - -

-Note that an easy way to ``reinstall'' Mahogany is to move $HOME/.M/config -file to some other location or even delete it and restart Mahogany -- then it will go through the installation process once again. - -

- -

-System wide configuration file -

- -

-Mahogany can be pre-configured on a system wide basis by supplying -a M.conf file in the installation directory (e.g. /usr/share/mahogany/M.conf). -The syntax for this configuration file is identical to the user's -configuration file, so you can just copy a user's file to this location -and edit it by hand. Useful settings for a system wide default are -servers or mail return addresses. Entries prefixed with an exclamation -mark ``!'' are marked as immutable and cannot be overwritten -by the user. This can be used by the system administrator to hard-wire -certain settings, like, for example the return mail addresses or mail -servers to use. - -

- -

-
-Registry (Windows only) -

- -

-Under Windows the user settings are by default stored in the registry, under -HKCU$\backslash$Software$\backslash$Mahogany-Team$\backslash$M key -where HKCU stands for HKEY_CURRENT_USER. - -

-If you encounter a mention of some Entry in the group [Group] -of the config file, it maps to a value Entry in the key -Profiles$\backslash$Group under the root key specified above under -Windows. - -

- -

-
-Using multiple configuration sources -

- -

-The default behaviour described in the sections above is the simplest possible -and works well as long as Mahogany is only used on a single machine. However it -is not ideal if you want to use it from several different installations. It -should be noted that in the simplest case, when all these installations use the -same operating system and are similarly configured, you may simply transfer the -Mahogany configuration file 1.2 to the other machine, however this doesn't work if you want to use the -program from both Unix and Windows as in such case some settings are bound to -be different. - -

-The solution is to use multiple configuration sources (they are called -sources and not files because, in general, the settings can also be stored in -other locations such as on a remote IMAP server). To set this up, choose the -corresponding command from the "Edit" menu: it will present you with -the dialog allowing to create more configuration sources (currently only local -files are supported) and to change their priority by moving them up or down in -the list. - -

-Here is an example of a setup recommended for IMAP users: - -

    -
  1. OS-specific settings are stored in machine-os.conf: this - file should be tiny as the only OS-specific options are those that - involve external paths, e.g. the user directory. -
  2. -
  3. Machine-specific settings are stored in machine.conf: this - file is still quite small as the only machine-specific entries are - usually the IMAP and SMTP host names. -
  4. -
  5. All the rest is stored in global.conf which may be shared - among all installations. This file is, correspondingly, usually large. -
  6. -
- -

- -

-The User Interface -

- -

- -

-The Main Window -

- -

-Mahogany's main window is vertically divided into two parts. -On the left it has a tree view ([*]) of all available -mail or news folders. On the right of it, it shows the currently selected -folder in a folder view (see [*]). - -

- -

-The Folder Tree -

- -

-The folder tree shows a hierarchical view of -all folders managed by Mahogany, this includes both mail folders -and newsgroups. Folders can be grouped hierarchically and inherit -settings from their parent folders (e.g. the server host). Clicking -the right mouse button on any tree node will pop up a menu with some -options. To open a folder or connection to a server for the first -time, choose ``Create New Folder'' which will show you a dialog -([*]). - -

- -

-Create New Folder Dialog -

- -

-This menu entry allows you to open a -connection to a server or view a mailfolder. No matter whether it -is a POP, IMAP, NNTP connection , a file based mailfolder, a newsgroup -or whatever, Mahogany treats them all the same and calls them all -``folder''. The dialog has several pages which include at least: -Access ([*]), New Mail (), -Compose ([*]) and MessageViewer ([*]). - -

- -

-Access -

- -

- -

- -

- -

-Folder Views -

- -

-A Folder View is a window or part of a window displaying -the contents of a mail folder or a newsgroup. It consists of two parts: - -

- -

- -

- -

-Understanding the folder view -

- -

-The messages are displayed in the folder view according to the curent -sort order which may be changed either from the folder properties -dialog (of course, it can be set independently for each folder or -be the same for all folders at once) or by clicking on the column -header. In the latter case, clicking on, for example, ``SUBJECT'' -column, will sort the messages by subject if they were not sorted -by subject already, otherwise it will sort them by subject in the -reverse order. This allows you to sort the listing on some column -by just clicking it and to reverse the sort order by clicking it again. - -

-Most of the columns are self explanatory. It should be mentioned that -the date format is configurable from the folder view page of the folder -properties dialog and you may set it to anything you like. In particular, -some people find it very useful to show the date in GMT instead of -the local time. - -

-The status column (which is usually the first one, although you may -change the column order from the same page already mentioned above) -may be empty or contain one or more flags: - -

- - - - - - - - - - - - - - - - - - - - - - -
SymbolMeaning
*message is flagged or important
Amessage was answered to
Dmessage is marked as deleted and will disappear after expunge
Umessage is unread: you haven't seen its body yet
Rmessage is recent: this is the first time you see it
Nmessage is new: it is recent and unread
- -

-Accordingly, if nothing appears in the status column, the message -was read but wasn't deleted nor flagged and this is not the first -time you see it. Note that not all kinds of folders support all kinds -of flags: while IMAP servers always do, POP servers are not capable -of storing the message flags and so all messages will always appear -as new in them. - -

-Note that each message flag has also the corresponding colour which -is used to highlight the message in the folder view and also to highlight -the folder containing this message in the folder tree. These colours -can be changed from the folder view page of the options dialog, as -usual. - -

- -

-
-Keyboard and mouse handling -

- -

-The reaction to a mouse click in the list of messages depends on the -preferences setting ``Preview message when selected``. When -the option is selected, a single mouse click will select the message -and load it into the preview window. If the option is not set, the -message will only be selected but not previewed automatically, which -is very useful for accessing mail folders through a slow connection. -The same setting effects the behaviour of the space bar, it acts exactly -like a single mouse click in the window and will only cause a message -to be previewed if a single mouse click is configured to do so. The -space key can be used to view the message under the current cursor. - -

-Other keyboard bindings are summarized in the following table (except where -explicitly noticed, lower and uppe case keys work do the same thing): - -

-
-
-

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyAction performed
*mark/unmark message under cursor
SPACEpreview message under cursor
D or DELmark selected messages for deletion
Uremove deletion mark from selected messages
X or #expunge messages marked for deletion
Ccopy marked messages to another folder
Mmove selected messages to another folder
Ssave marked messages to files
Pprint marked messages
Rreply to messages
Fforward messages
Oopen messages in separate window
Htoggle display of all headers
BACK/PG UPscroll the message preview one page up
PG DOWNscroll the message preview one page down
Ctrl-Uview next unread message
/start forward search for a string
?start reverse search for a string
ngo to the next match (after doing a search)
Ngo to the previous match (after doing a search)
-

- -
-
- -

-Note that all commands for which it makes sense operate either on -the current message only if there is no selection or on all selected -messages at once. You can use the mouse or the cursor arrows together -with the SHIFT or CTRL keys to select multiple messages at once. The -commands which affect the message preview are inactive if no message -is previewed. - -

- -

-Migrating from another mail client -

- -

-Mahogany supports importing the settings from -a few other popular mail clients. The current list includes Netscape, -Pine, XFMail and Eudora. Depending on the mail client only part of -its settings may be imported but in the best case Mahogany can import -the address books, the configuration settings, the filter rules and -the list of folders to use. To use this feature, choose -"Mail|Import..." command and follow the dialogs. - -

-Even if you don't find your email client in the list proposed in the -dialog, everything is not lost. You won't be able to import its configuration -information nor the filter rules but you might still recuperate the -address book information if your program can export the addresses -in the standard comma separated format or as vCards. In either case -you can then import just the address books from the address book editor. - -

-Finally, Mahogany can automatically create the entries in the -folder tree for all MBOX (standard Unix format, also used by Eudora) -files under the given directory. To do this, select the folder in -the tree which you want the new folders to appear under and choose -"Folder|Import folder tree..." command. - -

- -

-Reading Mail -

- -

- -

-The INBOX Folder -

- -

-The folder named INBOX has a special meaning. -It is the main system mailbox and cannot be deleted or renamed. All -new mail will arrive in here. At present, Mahogany leaves all messages -in the system inbox. Mahogany will collect mail from several different -incoming mailboxes, e.g. the INBOX and some additional POP3 accounts, -and move them to a new folder. - -

- -

-The ``New Mail'' Folder -

- -

-Created by Mahogany the first time you start -it, this is a file mailbox which by default receives all new mail. -If you mark any folder as incoming, its contents will be checked regularly -and any new mail in it moved to the ``New Mail'' folder. If -you do not like this name, you can change it in the preferences dialog. -Mahogany should in all situations recover from closed connections -or disappearing mailboxes, so it is safe to let it run over long periods -of time. If a server connection times out, you will receive one or -possibly a few error messages but Mahogany will reopen the connection -and continue as usual. - -

- -

-Other Folders -

- -

-The folders are organized in a tree structure: this is purely for -the convenience of the user, so any folder may contain as many other -folders as needed. Folders can be managed either from the top level -menu or from the popup menu in the folder control invoked by pressing -the right mouse button in it. You can group folders together by making -the sub folders of another folder. This builds no physical connection -between the folders but makes the sub folder inherit certain configuration -defaults settings from their parent folder. We will soon add a ``folder -group'' folder type not representing any mailbox but just being -a group of folders. - -

- -

-Accessing Mail Remotely -

- -

-Mahogany supports two protocols for accessing remote mail servers: -POP3 and IMAP. While POP3 is more commonly available, IMAP is definitely -the superiour protocol and should be used where available. It will -generally give you more functionality and will be much faster over -slow connections. Both normally require you to log in with a username -and password, but can be configured to work anonymously if supported -by the server. IMAP additionally allows you to access any mailfolder -file on the remote machine. For example, if you use Mahogany on a -remote machine ``atwork.company.com'', you might have -your local INBOX (which could be /var/spool/mail/MyUserName -on a unix box) and also your ``New Mail'' folder, which usually -is ``~/.M/New Mail''. With IMAP, if -you log in from home, you can not only access your INBOX on the atwork.company.com -mail server, but also the ``New Mail'' folder there, -by telling Mahogany to use ``/home/MyUserName/.M/New Mail'' -as the path to the mailbox file. Like this, you can access any mail -folder on that machine that you have access to locally, making remote -access to your mail much more flexible than just accessing your new -messages. - -

- -

-
-Searching for Messages -

- -

-There are two ways to search for the messages in Mahogany. One is very simple: -just press '/' or '?' in the folder view and then use -'n' and 'N' keys to go to the next and previous matches -respectively (see also [*]). This allows to only search for a -string in the message header and to do it inside one folder only - but to do -it quickly. - -

-If you need more powerful search, you should use "Folder|Search..." -command which opens the search dialog where you can choose more options. In -particular, you can use buttons there to add other folders to search (by -default only the current folder is searched). If any messages are found, they -are shown in a separate folder view. - -

- -

-Filters -

- -

- -

-
-Overview -

- -

-Mahogany has powerful builtin filters. The filters are written in -a real (albeit small and specialized) programming language but there -is also GUI support for creating them. All the existing filters appear -in the dialog shown by the ``Filters rules'' command of the -``Edit'' menu. You can also access the filters configured for -a specific folder by selecting ``Filters'' from the ``Folders'' -menu. The difference between these dialogs is that not all filters -are associated with all folder, i.e. you may have two filters and -two folders but the first folder can use only the first filter rule -and the second - only the second one. The global ``Filter rules'' -dialog allows you to manage all the filters but after creating a new -one you still must associate it with some folder or folders for it -to be useful. - -

-After creating some filters you may go to the ``Filters'' dialog -of the ``Folder'' menu (you will also have an opportunity to -go directly there immediately after the filter creation) and check -the filters you would like to use for this folder. The filters are -applied in the order in which they appear in the list, so use the -up and down buttons to arrange them as needed: the order of filters -is important because if one filter had decided to move a message to -another folder the subsequent filters won't process this message at -all. - -

- -

-Filter Rule Editor -

- -

-This dialog allows you to edit an individual filter. You may use the -different controls to compose it, note the ``More'' button which -allows you to add a new condition to the rule. You may notice that -when you change something in the upper part of the dialog, the text -in the lower part is updated to reflect it: this text is the source -of the filter program which Mahogany will apply. By experimenting -with the dialog controls it should be easy to see the different possibilities -of this language. In a few words, it is a C-like language which has -several built-in functions for testing for the various conditions -and performing some actions. All of the usual C operations are supported. - -

-You may also edit the filter program text directly but be warned that -it will be impossible to use the GUI controls to modify it then because -they are not flexible enough to be able to express an arbitrary filter -program. - -

- -

-Quick Filter -

- -

-There is another, quicker, way to create filters as well: this is -done with ``Quick filter'' command from the ``Message'' -menu or the popup menu displayed when you right click the message. -It allows to easily create filters for the most common cases. Note -that you may update the filter rule later using the full-fledged filter -edit dialog if you decide to add more conditions to it, for example. - -

- -

-
-Managing Filters -

- -

-After some time of using the program, you will probably end up with quite a few -filters. Several dialogs in Mahogany will help you with managing them: - -

- -

- -

-Filter Language -

- -

-Almost, but not quite all constructs of the filter language are accessible from -the GUI editor, so if you need something which it doesn't provide yuo can try -editing the filter text directly. Be warned, however, that you wouldn't be able -to use the GUI again if you do this. - -

-The syntax of the filter language is very simple. It is C-like but a program -consists just of a sequence of if statements. Inside each of them you -can have a condition of (almost) arbitrary complexity using the usual C -operations &&, || and ! and the built-in filter -functions. The filter functions correspond to the choices in the GUI dialogs. - -

-Each test also has the associated code block executed only if it succeeds. Here -again you can use the built-in functions which are the same as the verbs in the -GUI controls. - -

- -

-
-Spam filtering -

- -

-Mahogany supports pluggable spam filter modules. In theory it means that -anybody can write such modules but in practice only two of them currently exist -and are described in details below. - -

-However independently of the spam filters used, the interface to them remains -always the same: - -

- -

-To actually use the spam filters you need to configure a filter rule (see -[*]) using them. Usually you just create a rule named "Spam" using -the "Seems to be spam" test and "Move to some Junk folder" (you will need to -create this junk folder too) as its action. If you feel very confident in the -spam filters (or just have backup of your mail somewhere) you can also -configure the rule to delete the messages recognized as spam immediately but -this is not recommended. - -

- -

-Simple header analyzer -

- -

-This is a very simple filter which looks for some common characteristics of -spam mail in the message headers. Its accuracy is much worse than that of DSPAM -but it is also much faster to execute and doesn't need any training. You may -configure its options in the "Edit|Spam filters..." dialog. - -

- -

-
-DSPAM -

- -

-DSPAM is a statistical spam filter which means that to use it in the optimal -way you need to train it first. Just open the "Edit|Spam -filters..." dialog and use the Train button on the DSPAM page. For the -best results you should train the filter with 2500 spam and 2500 non-spam (ham) -messages. Be warned that this can take a rather long time and also consumes -significant amount of disk space (of order of 50Mb) - however the results are -well worth it. - -

-If you don't have enough messages to train it with, you can start using it -immediately but in this case you should be ready to manually mark messages as -spams as explained in [*]. Please also remember to actually create a -spam filter rule to really use DSPAM at all. - -

- -

-Sending Mail -

- -

- -

-To: CC: and BCC: Settings -

- -

-All of these fields accept either mail addresses, aliases or folder -names. Aliases must be expanded by using the tabulator key or the -Expand button next to the fields. If multiple entries match the text, -you will be prompted with a list to choose from. - -

- -

-Using Folder names as an address -

- -

-Folder names can be entered by prefixing them with a hash ('#') sign. -This will cause a copy of the message to be saved in the folder with -this name. If no such folder exists, it will be created in the mail -folder directory. For example, entering ``joe.user@foo.com, #myMail'' -in the To: field, will send the mail to Joe User and save a copy of -it in the folder ``myMail''. Note, that if you have your folders -organised hierarchically, you must specify the full path to the folder -in the folder tree control. An example: If you have a group of folders -in the tree, called ``Work'' and want to save a copy of the -message to the folder ``TODO'' which is a sub-folder of ``Work'', -you need to add ``#Work/TODO'' in the address field. Instead -of using the To: field for this, you can also use CC: or BCC:, there -is no difference. - -

- -

-To: -

- -

-The primary address to which to send the message, multiple addresses -can be entered and must be comma-separated. - -

- -

-CC: -

- -

-CC means Carbon Copy - copies of the message will get sent to the -addresses listed here. - -

- -

-BCC: -

- -

-BCC means Blind Carbon Copy - like CC:, copies will be sent to the -addresses listed here, but the addresses will not be stored in the -mail header. This allows you to send copies without other recipients -of the message knowing about it. - -

- -

-Key Bindings in the Message Editor -

- -

-
-
-

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyFunction
ALT-Ddelete word
CTRL-Ydelete line
CTRL-Udelete to begin of line
CTRL-Kdelete to end of line
CTRL-Ccopy selection to clipboard
SHIFT-INSERT 
CTRL-Xcut selection to clipboard
SHIFT-DELETE 
CTRL-Vpaste text from clipboard
CTRL-INSERT 
CTRL-Ssearch for text
CTRL-Tsearch same text again
-

- -
-
- -

- -

- -

-Using the address book -

- -

-Although you may directly enter the addresses of recipients of your -message into the different address fields (``To:``, ``Cc:`` -and ``Bcc:`` although the last two are optional and so might -not appear), there is a more convenient way to do it using the address -book. To insert an address fromyour address book you should type the -first few letters of either the ``nick name'' (or the ``alias'') -for this address or the the first letters of the e-mail address and -press <TAB> key or click on the ``Expand'' button. If there -is only one possible expansion for the letters you have typed, Mahogany -will automatically replace them with the corresponding full e-mail -address. Other possible cases: either there are no matches at all -and a message in the status line of the window will tell you so, or -there are more than one match in which case you will be presented -with a choice of all possible completions. - -

-Hint: if you press <TAB> immediately after the address expansion -it will bring you to the next text entry zone and will not attempt -the address expansion the second time. - -

-A special feature of the address expansion is the so-called ``group -extension'': if you type the first few letters of an address group -name (see ``Address Book Editor'' description for more about -it) it will be replaced by the addresses of all the addresses in this -group. So, for example, if you have a group called ``Friends'' -you may type ``fri'' in the ``To:`` text entry zone and -after pressing <TAB> it will be replaced by the e-mail addresses of -all your friends. - -

- -

-The Mail Composition Window -

- -

-The composition window's appearance -depends on your configuration settings ([*]). Generally, -it will at least show text entry fields to specify who to send the -message to, for the subject and a large editing window below for the -actual message itself. It also features an EXPAND button next to the -address field, which allows you to lookup addresses in the currently -loaded addressbooks. If you type in the beginning or a substring of -a name, alias or email address and either press the expand button -or the tabulator key, Mahogany will look up a list of matching addressbook -entries and either expand it directly or prompt you with the matching -choices. This works for the main address field (``To'') as well -as for the carbon copy addresses (``CC'' and ``BCC''). -If you specify an address in the ``CC'' or ``BCC'' fields, -these people will receive a copy of the message. The difference between -them is that the list of addresses in ``CC'' is included in -the message, while the ``BCC'' (blind carbon copy) addresses -will be suppressed in the message keeping them anonymous. If you enter -an address like ``#myfolder'', Mahogany will interpret it as -the name of a mailfolder and save a copy of the message to that folder -(in this case ``myfolder''). - -

- -

-The News Article Composition Window -

- -

-This window is essentially identical to the mail composition window -([*]), but instead of specifying a mail address -to send the message to, you can enter one or more newsgroups names -(comma separated). The newsserver used depends on from where this -window was opened, if it was opened while reading a specific newgroup, -it will use the same newsserver that the newsgroup was read from, -otherwise it will fall back to the setting in the global preferences. - -

- -

-Message Templates -

- -

- -

-What are they? -

- -

-Mahogany uses the message templates to initialize the text of the new message -whenever you start composing a new mail message or reply to or forward an -existing one. By default, the standard templates are used which are empty for -the "new mail" and "new article" and have some reasonable default values for -the "reply", "forward" and "follow up". However you may define an arbitrary -number of additional templates and also modify the standard ones using the -"Edit|Templates..." menu command. - -

-Beyond customizing the standard templates to suit your tastes, it is also often -useful to define additional templates for the messages you write often. For -example, a system administrator could have some ready to use reply templates -for answering the standard user questions and so on. If you create new -templates, it is convenient to use the Shift-Ctrl-<X> versions of the -usual commands, i.e. instead of using F in the folder view to forward -a message you may use Shift-Ctrl-F to choose the template first. The -same applies to the other commands. - -

-When you edit the templates in the dialog, most of the functionality is -accessible via the right click menu in the control containing the template -text, however it may sometimes be necessary to edit the templates by hand so -the next section gives a brief description of their syntax. - -

- -

-Templates syntax -

- -

-First of all, any normal text appearing in the template will be copied as is to -the text of the new message. Special constructions are introduced by the -variable expansion, that is anything starting with the dollar sign -($). The general syntax of a variable expansion is the following: -

-
-$([category:]name[?arguments][{+|-|=}<number>[!]])
-
-
-
-(the parentheses around all this may be replaced with braces). For the -simplest cases (no category, no arguments, no justficiation tail) the -parentheses may be omitted entirely, as in $DATE. - -

-The possible values of category and name are described below. -Both of them are "words", i.e. are sequences of alphabetic characters. The -category also may be implied by using the special brackets: $`...` -implies the category "cmd", i.e. executes the command specified inside -the single quotes and $<...< implies the category "file" -(both of these shortcuts come from standard Unix shell notations). - -

-The arguments are optional and if they are present are either a -comma-separated list of words (i.e. alphabetic characters only are allowed) -or another variable expansion. For example, the following will insert -the quoted contents of the file after asking the user for a file name -defaulting to foo.bar: -

-
-$(file:foo.bar?ASK,QUOTE)
-
-
-
-and this example will set the value of the specified header as expected: -
-
-$(header:X-UnixName?$`whoami`)
-
-
-
- -

-Finally, the optional tail {+|-|=}<number> may be used to justify -the value: "+" aligns it to the right, "-" (which is default) -to the left and "=" centers it in the text field of width -number. If the number is followed by "!", the value is -truncated if it doesn't fit into the given width instead of taking as much -place as is required for it as it does by default. - -

- -

-Template variables -

- -

-After the description of the general syntax in the previous section, here are -the possible values for the category and name parameter mentioned above: - -

- -

-Unnamed category -

- -

-This category contains the most commonly used variables and allows to write -them in the shortest possible form, i.e. without any parentheses or braces -around them and without the category name. The names in this category are: - -

- -

- -

-Message category -

- -

-The "message:" prefix gives access to the headers of the message being -composed. It allows to use the same message template for composing messages to -different people, for example, by reusing the value of To: header in -the message text. It has the following variables: - -

- -

- -

- -

-Original message category -

- -

-The category "original:" gives access to the message being forwarded -or replied to. Accordingly, you can't use this category in the templates for -the new messages. - -

- -

- -

- -

-File category -

- -

-The "file:" category doesn't contain any fixed names, instead it -allows you to insert the named file in the message text by using (full) path to -it as name. There are two arguments: ask and quote. -The first will ask the user for the file to insert during the template -expansion (with default being the file name in the template) and the second one -will insert the file prepending a quote marker before each of its lines. - -

- -

-Attach category -

- -

-The "attach:" category is very similar to the "file:" one, -the only difference being that the contents of the file is attached and not -inserted as text. It also supports ask but not quote -arguments as the latter doesn't make sense for attachments. - -

- -

-Command category -

- -

-Like the two previous one, this category doesn't have any standard names -neither. The syntax "cmd:name" allows to execute an external -command name and insert its output in the message text. The template -arguments are passed to the command as command line parameters. - -

- -

-Python category -

- -

-Very similar to the previous category, this one allows to execute arbitrary -Python scripts. The syntax is "python:function" and you may -additional string arguments which will be passed to the function. - -

-Possibility to use Python functions allows to do almost anything in the message -expansion. For example, to use different signatures in replies to different -people all you have to do is to append "${python:sig?$to}" at the -end of your reply template and add a Python function like this to your -Minit.py file: -

-   def sig(to):
-      if to == "someone@some.where":
-         return "Hello someone!"
-      elif to == "someoneelse@...":
-         return "Goodbye someone else"
-      else # general case
-         return "No special signature for you, sorry"
-
- -

- -

-Header category -

- -

-Using "header:" category you can change the values of the -headers of the new message. This is mostly useful in the templates for the -messages which are always sent to the same addressee as then you don't have to -enter it manually each time. The name is the name of the header to set -and the (only allowed) argument is its value. Any header names, standard or -not, can be used. - -

- -

-Understanding program options -

- -

-One of the goals of the Mahogany project is to be as configurable -as possible. Of course, it means that Mahogany has a lot of options -- however we hope that it doesn't make the program more difficult -to use because you have the complete liberty to ignore all options -until you need to use them. Moreover, many program options are completely -transparent to the user because they are automatically remembered -by the program. All the other ones may be changed from the main options -dialog which may be invoked from the "Edit" menu of any window. - -

- -

-
-Hierarchical options organization -

- -

-Before starting to change options, it is important to understand that Mahogany -configuration settings are inherited in a logical fashion. The settings in the -preferences dialog are the global default settings and can be overridden on a -per-folder basis. The top level folders in the tree use by default the same -global options but you may also edit each folders options via -"Folder|Properties..." menu item. Subfolders inherit from their -parent folders and, again, you can change their options independently. - -

-To make visualizing this mechanism easier, the names of the options with non -default values are highlighted in the options dialog. Those whose values are -set at the level of the folder currently being edited are shown in bright -blue, while those which inherit values from the parent folder are shown in -darker shade of blue. Of coourse, this behaviour in itself is customizable and -the colours may be changed (or disabled completely) in the ``Miscellaneous'' -page of the options dialog ([*]). - -

- -

-Automatically remembered options -

- -

-These options include the sizes and the positions of all windows, -the texts of all prompts, the positions of splitters in the main program -window and the other folder views as well as several other things. -These options are special in that they do not appear in the options -dialog and so can not be changed directly - instead Mahogany remembers -them each time it is shut down, so when it is reopened it will be -in exactly the same state as during the last run. Try to play with -it: adjust the sizes of the main program window and the splitters -in it as you like, exit Mahogany and restart it (this is for testing -only, of course, you do not need to do it each time!) - you should -see that the window reappears on the same position (although this -might not work under some window managers), has the same size and -is split in the same manner. - -

- -

-Other options -

- -

-All other options except those mentioned in the previous subsection -can be changed from the program options dialog. This dialog has several -pages which are described in more details below: - -

- -

-Identity page -

- -

-

-Here several important settings are configured, so it is advised (as -the program itself will tell you when it is run for the first time) -to set them up before starting using Mahogany. These include your -personal identity settings - see also your preferred mail and news -servers which is configured from the network page ([*]). - -

- -

- -

-

-This page allows you to configure the network-related settings. Please -notice that the four server names (for POP3, IMAP4, SMTP and NNTP) -are only the default values and that Mahogany can use as many different -servers (in particular, POP3 and NNTP) as you wish - for this, it -is just enough to change the server name when creating a new folder -from the default value specified here. - -

- -

- -

- -

-
-New Mail Page -

- -

-This page looks slightly differently in the global preferences dialog -and in the folder properties one as some of the settings here must -be the same for all folders while the others can only be set for a -specific folder. First here is the list of the settings which appear -in the global dialog: - -

- -

-In addition to these settings, the folder ``New Mail'' properties -page also proposes you the following settings: - -

- -

- -

- -

-
-Compose Page -

- -

-On this page you may configure different settings which control the -behaviour of the message composer (it is also used when replying or -forwarding mail messages, not only for composing the new ones). - -

- -

- -

- -

-Folders page -

- -

- -

- -

- -

-
-Python page -

- -

-(This page is only present if you have a Python-enabled version of Mahogany) - -

- -

- -

- -

-Callbacks -

- -

-Callbacks are python functions that can be called from different parts -of Mahogany's code. See the section [*] for more information on -this. - -

- -

- -

- -

-Message Viewer -

- -

- -

- -

- -

-Addresses page -

- -

-Mahogany may automatically remember all addresses from all e-mail -messages you receive (actually, only those which you read). This is -called address autocollection and, as almost any other feature -of Mahogany can be turned on and off as desired. In this page you -may choose whether you want to use this feature at all (it is on by -default) and, if so, where should be the autocollected addresses be -put and other settings. See the Addressbook section ([*]) -for more information on Mahogany's built-in addressbook. - -

- -

- -

-In addition to its own built-in addressbook format, Mahogany also -supports the addressbook files of the BBDB addressbook used with Emacs -(see [*]). Some settings can be set here which apply only -to the BBDB addressbook support: - -

- -

- -

- -

-Helpers -

- -

-On this page you can customise which external -helper applications Mahogany uses for different action that it does -not perform itself. - -

- -

- -

- -

-
-Miscellaneous -

- -

-All options which don't fit in any other pages are collected here. - -

- -

- -

- -

-Remote configuration synchronisation -

- -

-Mahogany can automatically save a subset of its configuration settings -in a mailbox at program exit and automatically retrieve that information -the next time it is started up. This option becomes useful if you -are using the program from different systems, e.g. if sometimes from -the office and some other times from home over a dialup link. In this -case, you can save some settings in a special IMAP folder and tell -the program to use this for some of the settings. Like that, you can -share the program settings no matter from where you run Mahogany and -you do not need to manually adjust both configurations. - -

-To use this option, first create a folder on an IMAP server. Do not -use a POP3 server, as the program cannot store information via POP3, -IMAP is required for this to work. Then, activate the ``Sync options -with remote server'' setting and choose which settings you wish -to share. Currently supported are: - -

- -

- -

- -

-Some Other Dialogs You May Encounter -

- -

- -

-Date Format -

- -

-The dates of messages for the list of headers -can be displayed in a format of your choice. The same format is used -for inserting the current date in templates when writing messages. -The format of the date is controlled by a list of format specifiers -(as accepted by the strftime() function in the c-library). -Most of the available format specifiers are available via a little -popup menu which appears if you press the right-mouse button in the -input field. - -

- -

-Display time in GMT/UST -

- -

-If you tick this box, all times will be displayed in Greenwich Mean -Time (= Universal Standard Time) rather than local time. If not checked, -all dates and times will be displayed in your own timezone. Note -that the time and date displayed is not the local time in the sender's -timezone but the time it was in your local timezone when the message -was sent. - -

- -

-Message Sorting Dialog -

- -

-Here you can choose the criteria for sorting mailfolder listings. -If you want to use message score as a sort criterium, you need to -have a plugin module loaded which provides the ``Scoring'' interface. -At time of writing no such plugin is available, it will appear soon, -though. - -

- -

-Use Threading -

- -

-If you tick this box, all messages will be threaded, i.e. sorted in -hierarchical orders, with replies following earlier messages in the -same discussion thread. - -

- -

-Re-Sort on status change -

- -

-The effect of this option feels a bit strange at first and you might -not like it. If selected, the messages will be re-sorted each time -the status of a message changes. If you sort messages by message status -and delete a message, it will immediately drop to the bottom of the -list. Useful to always maintain a strict sorting order, but can be -confusing. - -

- -

-Mahogany Plugin Modules -

- -

-Mahogany can load plugin modules at runtime to extend -its functionality. Currently we are working on plugins to supply PGP/GPG -encryption support and a scoring engine for sorting mailfolder listings. -A plugin to use IBM's ViaVoice will be started work on as soon as -the Debian/Linux ``Potato'' release becomes stable. - -

-Generally, if you want to write an extension for Mahogany without -using Python (which we hope to turn into a plugin, too, soon), you -can do that very easily by writing it as a plugin module. Get in touch -with the developers and we will show you how to do so. - -

- -

-The Plugin Module Configuration Dialog -

- -

-This dialog allows you to decide which plugins get loaded at program -start. At present, modules don't get loaded/unloaded at runtime, so -you need to restart Mahogany for these options to take effect. On -the top left you see a list of all modules that Mahogany has found -in either the global modules directory or in your local directory -($HOME/.M/modules/). The window below shows some information -about the module currently selected in the list, such as the name, -author, a description of what it does and the name of the interface -it provides. The interface would e.g. be ``Scoring'' for the -plugin providing the functionality for scoring messages and is used -by the program to find the right plugin for a given operation. - -

-Any changes to the plugin module settings will only take effect -after you re-started Mahogany! - -

- -

-
-The Address Database -

- -

-Mahogany has a built-in address book system with flexible support -for different addressbook formats. It can be easily expanded to handle -other programs' file formats and at present supports three formats - -it's own ADB format ([*]), (X)Emacs' BBDB ([*]) address -book format, and simple one address per line file ([*]). -Generally the address books are ordered hierarchically, -with the possibility to order entries in groups and sub-groups in -a tree-like fashion. Alias expansion is configurable and also handles -group names, to expand to the full list of email addresses within -that given group. - -

- -

-The native Address Book -

- -

-This is Mahogany's own address book format, offering you -the maximum set of functionality supported by the address book editor. -It offers hierarchical grouping of address entries and it also the -default address book format used by the address auto-collection mechanisms, -which uses different groups for address entries collected from different -mail folders. - -

- -

-The Address Book Editor -

- -

-To edit the address book, open the address book editor. If the book -is already present in the address book tree on the left side of the -window, you may expand it (and any subgroups it might have) and start -editing immediately. If not, you must first add it to the tree by -choosing ``New..'' from the ``Book'' submenu or using -the corresponding toolbar button. - -

-Generally speaking, there are several ways to perform the same action -in the address book editor: - -

- -

    -
  1. use the menus: the commands for creating and deleting address book -entries are in the ``Edit'' menu, the corresponding commands -for the address books - in ``Book'' one. -
  2. -
  3. use the toolbar: this may be more convenient because, depending on -the current position of the selected item in the tree it will propose -to create either an address book or an entry. -
  4. -
  5. use keyboard: <INSERT> key creates a new entry or address book if -the current selection is the root of the tree, <DELETE> deletes an -item and <Alt-ENTER> brings up the ``Properties'' dialog. -
  6. -
-To edit the entry, simply select it in the tree. The data associated -to it is spread over several notebook pages - select the one which -contains the field you want to change and change it. If you want to -undo your changes, simply press ``Cancel'' at any moment - however, -this only works while you're editing the entry. As soon as you pass -to another one, all previous changes are saved and cannot be undone -any more. The changes are saved automatically when you select another -entry or close the address book editor - there is no special ``Save'' -button. - -

-To quickly move in the address book tree you may use either the ``Find'' -or ``Go to'' dialogs (both available in the ``Find'' menu). -The first dialog allows you to find the entry by its contents while -the second one allows you to quickly go to the entry (in thecurrent -address book only) if you know its nickname. In the ``Find'' -dialog you have several options to configure the search: it may be -either case sensitive or not (should ``mike'' match ``Mike''?) -and try to find only the whole string or just the substring of it -(should ``mik'' match ``Mike''?). You may also choose -among which fields should the search be done. You may choose as many -fields as you like (possibly all of them) but you must choose at least -one. - -

-After you used the ``Find'' dialog once, you may choose the -``Find next'' menu item to go to the next address book entry -matching your search criterium (notice that a message in the status -bar will notify you about how many matches, if any, were found). Keep -hitting ``Find next'' until the search wraps to the beginning -(again, watch the status line for the message) or until you find the -entry you're looking for. - -

-You may import your existing address book file by choosing the ``Import -book...''entry from the ``Book'' menu - this will open the -address book import dialog proposing you to select the - -

- -

-Support for BBDB Address Books -

- -

-Mahogany supports reading and writing of BBDB address -book files. BBDB is the Big Brother DataBase used with the Emacs family -of editors. If you have an existing address book file, usually called -.bbdb, you can load it into Mahogany and use it. This is -especially useful if you have an existing file with auto-collected -email addresses that you want to continue to use. - -

- -

-Caution: -

- -

-The BBDB address book format supports different fields than Mahogany's -native database. When reading a BBDB file, Mahogany will only read -the first two addresses and telephone numbers and assign them to the -``Home'' and ``Work'' addresses and phone numbers. All -additional addresses and phone numbers, the AKA list and the comments -will get lost. Mahogany will only save the information displayed in -the address editor window. Currently saving of phone numbers to BBDB -files is unsupported as it uses a different format from Mahogany. -Therefore, reading a BBDB file and saving it back to disk -may lead to a loss of information! - -

- -

-One Address per Line File Address Books -

- -

-This is probably the simplest possible address book format. -It is useful for integration with external programs and scripts. Addresses -are stored without name and angle brackets. Mahogany doesn't attempt to lock -the file, so care must be taken when writing to it from both Mahogany and -external program. - -

- -

-Support for Palm Address Books -

- -

-Mahogany does currently support reading of -Palm Addressbooks (referring to a ``Palm'' we mean the handheld -organizer Palm Pilot running PalmOS). For being able to do that it -is required to include the PalmOS-Module (see below). The support -of Palm Addressbooks is not yet fully implemented, as so far it is -only possible to download the addresses from the Palm and to display -them. Changing and uploading changed/new addresses to the Palm is -something we plan to add in the next release. - -

-To display the Palm addressbook, create a new addressbook of type -``PalmOS''. You will be asked to put your Palm into the cradle -and to push the HotSync-button. After the download the addressbook -is accessible in read-only mode. Restarting Mahogany requires -to download the addressbook again. - -

- -

-
-Scripting and Extending Mahogany -

- -

- -

-
-Python Scripting -

- -

- -

-Introduction -

- -

-Mahogany has an embedded Python interpreter, if compiled -with Python support enabled (check if Python appears in the ``Extra features'' -list in the "Help|About..." screen if you are unsure about this). -Python is an object-oriented script language which can be used to write scripts -to be executed by Mahogany or even to extend Mahogany's -functionality. Python scripts have full access to all internal Mahogany data -structures and objects. - -

-A number of user definable callback functions are available. Scripts -have access to most objects living in Mahogany. Scripting can be disabled -in the Preferences dialog (see [*]). - -

-Currently the scripting support is quite basic. If you are interested -in writing scripts and need additional callbacks or support for them -within Mahogany, please get in touch with the developers -who will be happy to add it. - -

- -

-Initialisation -

- -

-At startup, Mahogany will load a file called Minit.py -and call the Init() function defined in there, without any -arguments. - -

- -

-Using Python with Filters -

- -

-It is possible to write filter tests and actions in Python. The test function -should return an integer which determines whether the test passed (non zero) or -not (zero). Both test and action functions receive as their single parameter -the Message object which corresponds to the message currently being -filtered. - -

-Please have a look at spam.py example included in Mahogany -distribution (in Python directory under Windows and in -/usr/share/mahogany/scripts under Unix) to see a real life example of -using Python for writing non trivial filters. - -

- -

-
-Callback Functions (Hooks) -

- -

-There are a number of callbacks available which will be called from -different places within Mahogany. These are defined in the -header file Mcallbacks.h. There is no documentation for these -callbacks yet, but don't hesitate to ask us if you need more information -about this. All of these callbacks are called with at least one arguments -which is a pointer to the object from which it was called. E.g. for -FolderOpenHook, this would be a MailFolder object. - -

-The callback return value is usually a boolean and indicates whether Mahogany -should proceed normally ($1$) or cancel the operation ($0$). - -

- -

-Namespaces -

- -

-To avoid repeatedly typing in the name of the module (MailFolder -in this case), it can be imported into the global namespace with ``from MailFolder import *''. -By default modules are not imported into the global namespace and -must be explicitly named. - -

- -

-List of Callbacks -

- -

-
-
-

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 8 1 0 0 0 00 8 1 0 0 0 0Callback NameObject TypeAdditional Arguments/TypesReturn ValueDocumentation
FolderOpenHookMailFolder voidCalled after a folder has been opened.
FolderUpdateHookMailFolder voidCalled after a folder has been updated.
FolderSetMessageFlagMailFolder(long) index of message1 if changing flags is ok,0 otherwiseCalled before changing flags for a message.
  (string)name of flag  
FolderClearMessageFlagMailFolder(long) index of message1 if changing flags is ok,0 otherwiseCalled before changing flags for a message.
  (string) name of flag  
FolderExpungeHookMailFolder 1 to expunge, 0 to abortCalled before expunging messages.
FolderNewMailHookMailFolder 1 to suppress default message, 0 elseCalled when new mail arrived in folder.
GlobalNewMailHookmApplication(string) sender of mail1 to suppress default message, 0 elseCalled when new mail arrived anywhere.
  (string) subject of mail  
-

- -
-
- -

- -

-Supported Classes -

- -

-Python has access to Mahogany's internal class hierarchy. At present -we supply interface definitions and Python modules for only a small -number of classes, however if there is need for more classes being -supported, we can easily extend the list - please ask us if you want -more support! - -

-Some automatically generated documentation of the Python interface -to Mahogany classes can be found in the doc/Python directory. -Documentation about all classes, including those not available to -Python, can be found in the doc/classes directory. - -

- -

-Plugins -

- -

- -

-Introduction -

- -

-Starting with release 0.5, Mahogany allows the use of plugins -(modules). This allows for an easy and comfortable way to enlarge -Mahogany's functionality. These modules can be loaded at runtime -and do not need to be part of the main executable. - -

- -

-The Filters Module -

- -

-This module provides a filtering language for Mahogany. It allows -you to have Mahogany look at different message properties, such as -message contents, size or header lines and execute arbitrary action -on them. The most common use would be to sort mails from different -mailing lists in corresponding mailfolders, to reduce the number of -messages in your main incoming mailbox. Filters can be specified in -three possible ways: - -

- -

-The normal way to set up filters is to specify them in the filters -dialog ([*]) and then tell Mahogany folder which -of the filter rules to use for the individual folders with athe folder -filters dialog ([*]). - -

- -

-
-The Filters Dialog -

- -

-This dialog allows you to define any number of filter rules available -to Mahogany. In a seaparate dialog ([*]) you -can then pick any rule from the list and assign it to a folder. As -you can have different sets of rules for each folder and might want -to share rules for some folders, this dialog simply sets up rules -and you can later specify for which folders to use them. When editing -or adding a new filter rule, you will get to the following dialog: - -

- -

-The Filter-Rule Dialog -

- -

-This dialog allows you to set up or edit an individual filtering rule, -it contains of the following components: - -

- -

-You can add more pattern matching controls by pressing the [More] -button, and you can delete the last pattern matching rule by pressing -the [Less] button. The number of actions to execute is fixed to -one. - -

-You can use several condition and connect them via logical AND and -OR, optionally negating them by ticking the [Not] box. The following -conditions can be tested for at present: - -

- -

-The possible actions which can be performed, are: - -

- -

-If you are not using a Trash folder, it is a good idea to add a rule -at the end of the list of filtering rules, that always expunges all -messages. For testing filters, you can leave that rule disabled, an -all messages will get treated and marked as deleted, but stay around. -Only when expunge is executed, will they really disappear in the original -mailbox. Notice, if you are using a Trash folder, this does not apply, -as messages won't be marked as deleted but moved straight to Trash. - -

- -

-
-The Folder Filters dialog -

- -

-This dialog allows you to assign filter rules to a folder. You can -pick them from the set of existing filter rules (set up via the Filters -Dialog ([*])) and change the order of the rules. -The listbox on the left lists the existing filtering rules for the -currently selected folder in the order in which they are executed. -You can use the buttons to change the order or rules. You can also -activate/deactivate rules by clicking on the litte checkbox ([X] -or [ ]) next to their name. - -

-If you want to apply rules to all incoming messages and are collecting -mail from different servers, simply apply the rules to the ``New -Mail'' folder if you have one, alternatively you can set up rules -for individual servers or INBOX. - -

- -

-The PalmOS Module -

- -

-When 3Com released its first PalmPilots several years ago, many people -did not believe in a success. But they were proven wrong, the Palm -Pilot (or short: Palm) is today the most used handheld organizer. - -

-For all the people possessing one of those little helpers, the PalmOS -Module allows (or will allow) for an easy integration of the Palm's -data in Mahogany. In future releases there will be full support for -addressbook synching, schedules etc. Currently you can only view the -Palm's addressbook (see above) and use Mahogany as your Palm -desktop software. - -

- -

-Desktop functionality -

- -

-As there is not really a common Palm desktop in the Unix/Linux environment -(not like under MS Windows), we thought it a nice idea to include -the desktop into Mahogany. Therefore Mahogany does allow -to - -

- -

-To use this functionality, you must of course have the PalmOS module -enabled. You can access the functions via the Plugin menu. In addition -to the above mentioned tasks, you can specify quite a lot of options -to adapt for instance the backup process to your personal needs. - -

-There is an additional function not mentioned yet, labelled ``Synchronize''. -Via the configuration dialog you can specify what should happen during -synchronization - starting with mail exchange, backups and automatic -installations. Read the following section about the configuration -dialog to get see how you can customize your PalmOS-Module. - -

- -

-The configuration dialog -

- -

-You can configure the PalmOS module via the Plugin menu in a lot of -ways. Let's go through every single item in the configuration dialog -which you can access using the Plugin-Menu: - -

-

-
Synchronise Mail
-
When you have this enabled, you can specify a mailbox -which will be used as place of exchange for mails. Mails in this folder -will be transfered to the Palm at the next hotsync and the outbox -of the Palm's mail program will be send. This mailbox is also used -as a configuration setting for messages sent. Mahogany will -use the properties of this mailbox when sending the messages retrieved -from the Palm's Outbox. If you have enabled the ``advanced user'' -option in the program preferences' identity tab, you can set up a -separate return-address or completely different options for this mailbox -and therefore have the mail sent from the PalmPilot with different -settings as those sent normally. The options for user name and return -address as set on the Palm are ignored when mails are sent with Mahogany. -
-
Mailbox for Exchange
-
Enter here the name of the mailbox that should -be used for mail exchange when you have the ``Synchronise Mail'' -feature enabled (see above). -
-
Mail disposal mode
-
This specifies what to do with outgoing e-mails -retrieved from the PalmPilot and sent. You have three options: - -

- -

    -
  • file : move messages from Outbox to Filed mailbox on the Palm -
  • -
  • delete : delete messages after sending -
  • -
  • keep : keep messages in Palm's Outbox -
  • -
-
-
Always do Backup
-
Setting this checkbox to true will make a backup -take place every time you ``Synchronize''. -
-
Directory for backup files
-
This field does contain a valid directory -path where the PalmOS-Module will store the backup of your Palm's -databases. -
-
Delete no longer existing backups
-
This checkbox determines whether -you want files to be deleted on the PC that are residing in the backup -directory but are not any longer on the Palm. This makes it possible -to really keep the backup identical to the Palm, but has the disadvantage -that you might loose data if you (accidently?) delete important data -on the Palm and do a backup, as the backup-ed databases will be deleted -too. So think carefully whether you do really want to do this. -
-
Make incremental backup only
-
Enable this checkbox if you only -want to make an incremental backup. Using this features will speed -the backup process up, as only changed or new databases are downloaded -from the Palm. -
-
Backup all databases
-
Enabling this checkbox will make the PalmOS-Module -ignore the backup flags of the databases. By default the PalmOS-Module -does only backup files with a set backup flag. Use this option if -you want all files to be backup'ed. -
-
Exclude these databases
-
Here you can specify a comma separated -list of databases (without spaces!) that should not be backup'ed. -
-
Do auto-install
-
Using this feature enables the auto-install feature -and everytime you ``Synchronize'' the module will check the -auto-install directory for Palm databases. If databases are found -they will be installed and deleted without further notice! -
-
Auto-install directory
-
Specify here a directory where the files -to be auto-installed can be found. -
-
-Besides that, some general options are available: - -

-

-
Pilot device
-
Here you can specify the device where the Pilot is -residing (this ought to be /dev/pilot under Unix/Linux and Com1: or -Com2: under MS Windows (not yet supported)). -
-
Connection speed
-
You have the choice beetween different hotsync -speeds (``connection speed''), measured in baud. -
-
Try to lock device
-
You can force a lock of the above set device -by enabling ``Try to lock device'' -
-
- -

- -

-Accessing the Palms -

- -

-There is the ``general'' approach to get the Palm databases -on your computer and the more selective one. For the first one, just -use the ``Synchronize'' menu point in the plugin menu. Depending -on what you have enabled in the configuration dialog (see above), -different actions will be taken (backup, mail exchange, ...). - -

-If you only want to update your backup or to install a file or to -restore your Palm's contents, you can access these functions individually -by using the corresponding menu points in the plugin menu. - -

- -

-Getting Help and Support -

- -

- -

-
-Troubleshooting -

- -

-Before asking for the help on our mailing lists, please try to see -if you cannot fix, or, at least, understand the reasons of, the problem -yourself. It is difficult to list everything which could go wrong -here but here are some basic recommendations: - -

- -

- -

- -

-WWW Support -

- -

-Mahogany has a home on the world wide web where you can get up to -date information about development and the last releases. Come and -visit us at the Mahogany Homepage -

- -

-Mailing Lists -

- -

-Several mailing lists exist to contact the developers, to receive -updates of new releases and to exchange information and experiences -with other users. Please visit the Mahogany Project Pagefor -more information and to join the lists. - -

-If you want to help further development of Mahogany, please go to -the same place and you will find all the information you need about -how to contribute or how to contact us. - -

- -

-Advanced Usage -

- -

- -

-Compiling Mahogany from source -

- -

-Run ./configure; make; make doc; make install. - -

-Some quick notes about common compilation problems can be found in -the FAQ, in section [*]. - -

- -

-Using Mahogany more efficiently -

- -

-This section contains assorted tips about how you can make Mahogany -run faster. - -

- -

-Speeding up Mahogany startup -

- -

-Unix users only: Mahogany accesses the file ~/.M/CONFIG -which stores all program options on startup. If this file is located -on a slow partition such as a network disk (NFS), the startup time -can be reduced just by moving it elsewhere and creating a link to -it from ~/.M directory. - -

-You can choose to not open any folders at startup (``Folders'' -page of the options dialog) if doing this takes too long in your case. -Also, remember to close the address book editor window if you don't -want it to be reopened the next time you run Mahogany. - -

- -

-
-Limiting Amount of Data Transferred -

- -

-When using a remote server, especially over a slow link (such as a -modem), it may be undesirable to automatically retrieve all messages -from the server. Mahogany provides several options to help you with -limiting the amount of data transferred. - -

-First, you should probably disable the ``Open folder at single -click'' and ``Preview message when selected'' options from -the ``Message View'' and ``Miscellaneous'' pages of the -options dialog to avoid accidentally open a folder or a message. - -

-Second, there are several useful settings in the ``Folders'' -page. Note that they can be set for each folder separately so you -can only choose to change the default values for some slow servers -but keep the original values for all the other ones. These options -allow you to specify a threshold for message size: before downloading -a message of size bigger than the specified (in Kb), you will be asked -for the confirmation. - -

- -

-FAQ - Frequently Asked Questions -

- -

-Being a brand new program, this section is currently pretty empty. -However, we will constantly update this chapter with questions received -on the mailing lists. - -

- -

-Installation Problems -

- -

- -

-All Mahogany icons show a question mark -

- -

-I'm a linux user (redhat) who just found Mahogany and really -likes it, but I have a problem, I can't get all the widgets to work, -the pictures on the buttons and the ones before the mailboxes all -appear as an questionmark? - -

-It depends how you installed it. If the icon with the question mark -appears, it means that Mahogany didn't find its installation directory -with the icons. If you installed the linux version from the .tar.gz -with the binary, it should go into /usr/local or a similar place and -you should have the icons in /usr/local/share/M/icons. If they are -not there, Mahogany cannot find them. If you have installed it in -a different location, Mahogany should ask you for the installation -("global Mahogany directory") when you start it -for the first time. - -

-If you have compiled it yourself, make sure you do a "make -install" or "make install_all" (of which -parts might fail, depending on your setup), to install everything -in the right place. If you just grabbed the binary of the daily snapshot, -you need to have a working Mahogany installation as well or it won't -get the icons. You do not need any additional library, Mahogany handles -xpm files internally. - -

- -

-How do I unpack the compressed files? -

- -

-The distribution files for Solaris and some of the other ones are -in compressed tar format, having the ending .tar.gz . To -unpack them you need gzip and tar. Change to the -directory where you want to install Mahogany, e.g to /usr -or /opt or /usr/local and issue the following command: - -

-

-gzip -dc < thedistributionfile | tar xvof - - -
-Where thedistributionfile is the complete path to the file -you downloaded. You will need to have proper write access to the directory -where you install it and tar should show you a list of all -files being installed as it unpacks them. - -

- -

-Compiling aborts with errors -

- -

-A common problem with compiling wxGTK and Mahogany -is, that you need to follow the instructions in Mahogany's README -file and use the configure script to set them up as explained. If -you use different arguments for configure than those shown in README, -things will not work! Also, before running configure again, remove -any *.cache and *status files in the working directory or configure -will re-use some old settings. - -

-Also, as we are omitting some unused subdirectories from the wxGTK -source, to save you download time, you may need to run ``make -k'' -rather than just ``make'' to get it to ignore some errors caused -by this. On non-Linux/GNU systems, you need to use the GNU make utility, -i.e. ``gmake'' rather than the default ``make''. - -

- -

-Mahogany fails to find wxWidgets, configure fails -

- -

-The following steps should identify and solve the problem: - -

- -

    -
  1. Do a "make install" for wxWidgets and watch the -output, it should copy lots of things to /usr/local/.... -
  2. -
  3. Do a "which wx-config", it should report wx-config -to be in /usr/local/bin -
  4. -
  5. Just type "wx-config -cxxflags", it should run -the wx-config script and report the compiler flags, which should include -something like "-I/usr/local/include". -
  6. -
  7. Then go to the Mahogany directory and "rm *cache*" -to remove old configuration info and run ./configure -
  8. -
  9. This *should* find wx/wx.h if all of the above worked, if not, -look at the end of config.log to see what went wrong. -
  10. -
  11. If it does not find the wxWidgets library, you need to add /usr/local/lib -to either your LD_LIBRARY_PATH or to /etc/ld.so.conf (and run /sbin/ldconfig -as root), then remove *cache* and try again. Again, if something -fails, look at config.log. -
  12. -
- -

- -

-SSL does not work -

- -

-I went to the "Miscellaneous" tab in preferences -menu and made sure the pathnames of libcrypto and libssl where correct. -I enabled SSL in the access tab of my mail folder preferences. However, -when I try to open that folder, it fails and the log window talks -about being unable to load libssl. - -

-Under Linux, this is due to a combination of factors, fixing one of -them is enough to fix the problem. Versions of libssl.so older than -0.9.6 require libcrypto to be explicitly loaded beforehand. Updating -to version 0.9.6 or newer fixes the problem. Versions of libwx_gtk -older than or equal to 2.2.0 load shared libraries in such a way that, -even though M loads libcrypto, libssl still fails to load. Upgrading -libwx_gtk to a later version will fix the problem. Finally, if everything -else fails, starting M with the command: ``LD_PRELOAD=/usr/lib/libcrypto.so -M'' will fix the problem as well. If the second solution is used, -the pathname of libcrypto.so must be set properly. Otherwise it is -better to leave it blank. - -

- -

-Other Problems / Questions -

- -

- -

-The Preferences Dialog does not show up properly -

- -

-When I set up Mahogany or select the preferences dialog, its -contents do not appear. Sometimes I cannot enter anything in the fields. - -

-wxGTK has a problem with constraint handling which can cause this -dialog to sometimes get into an endless loop trying to do the layout. -On most windowmanagers it helps if you resize the dialog a little -and it will appear correctly. This seems to depend on the platform -and window manager. Also, wxGTK does not seem to work correctly with -OpenLook which does not allow you to enter anything. - -

-Sometimes there may be some dialog window opened behind Mahogany window -or on another desktop. Please check this (with Alt-Tab) if you think -Mahogany got stuck. - -

- -

-How to use Mahogany with fetchmail/procmail? -

- -

-I use fetchmail and procmail to deliver my mail (Redhat Linux). -I'm reading mail with Netscape right now and I want to move to M. -I cannot for the life of me get M to open my mail when it loads. I -have to open them manually. Can someone please help me to get M to -open all of my Linux Folders at startup. - -

-You should be able to right-click on the folder treecontrol on the -left of the main screen and "Create a new folder". -Make it of type "file" and specify the path to the -the folder file as the filename. Your normal mailspool /var/spool/mail/username -is available under the name INBOX anyway, but I guess you have fetchmail/procmail -deliver your mail to some other place. - -

- -

-Does Mahogany have group aliases? -

- -

-Mahogany supports alias expansion for individual entries and for groups. -There are two ways in which you can expand an alias to a group of -addresses: - -

- -

- -

- -

-How can I set up POP3/IMAP access? -

- -

-It is not immediately apparent how to set up my POP3 server -under 0.23a , can someone give me a hand, please? It appears there -is no section in the initial configuration utility for this. - -

-Mahogany allows you to have as many folders or mail accounts as you -like. That's why it doesn't ask you at the beginning. To add a POP -account: - -

- -

    -
  1. right click on the folder tree and choose "Create Folder" -
  2. -
  3. give the folder a name, set its type to POP3 and fill in the required -fields, such as server and login -
  4. -
  5. Click on [OK]. The folder will now appear in the tree -
  6. -
  7. Double-click on the folder to open it. -
  8. -
- - - -

- -

-How can I set up IMAP access? -

- -

-Follow the rules for setting up POP3 access[*] but set the -folder type to be ``IMAP folder''. Then enter the name of your -IMAP server, your username and password (or leave it empty to be asked -later) for that server and, optionally, the path to the folder on -the IMAP server. You can leave the path empty, and it will use the -default folder (usually INBOX). - -

-If you want to access many IMAP folders on the same server, or a directory -there, you can create foldertree entries representing the IMAP server -itself (i.e. the top-level directory on it) or a directory on the -IMAP server. For these, if not using the Wizard dialog, make sure -that the folder properties dialog has the ``is directory'' checkbox -ticked, which tells Mahogany that it is not a mailbox file to open, -but a directory which can be browsed for entries via the popup menu. - -

- -

-Can I have multiple POP3 or IMAP accounts? -

- -

-Can I access multiple different POP3 or IMAP accounts? - -

-Yes, Mahogany allows you to have any number of different -folders configured, and you can choose different account type ("Folder -Type" setting in "Access" page when creating a folder) for them. -Just right-click on the folder tree control and -choose the ``Create Folder...'' option from the popup-menu. -You can then switch between the different folders by selecting them -(usually with a double-click on the tree control) for display in the -main window, or, by selecting ``Open'' from the popup-menu which -will open the folders in their own individual windows. - -

-You can also select the ``Collect all mail from this folder'' -option when creating the entries for them (or later, via the ``Preferences'' -popup-menu option) to let Mahogany automatically check these -accounts for new mail and collect it from there. - -

- -

-Can I have multiple identities? -

- -

-Does Mahogany allow me to send email as different people? -That is, if I monitor two IMAP or POP servers, one for my work email, -and one for my home email, can I reply to emails and specify it to -use my home or work email address as the sender? - -

-Yes, you can set almost *all* options on a per-folder basis, including -your name or return address, even outgoing SMTP servers to make it -perfect. To have full access to all these configuration options in -the folder properties dialog, you must first set your user level to -``advanced'' in the main configuration dialog, otherwise only -a small subset of configuration options is available. You can also -create global identities which are available in all folders. - -

- -

-Can I run Mahogany as root? -

- -

-Very simple question: can I run Mahogany on a unix system -as the superuser (root)? - -

-Not directly. There are two problems with it: - -

- -

    -
  1. It is not a good idea for security reasons. In fact, you should not -even run X11 as root. Though, we would not dare to impose that on -you, if you want to, that is your problem. -
  2. -
  3. The technical reason, and this is why Mahogany does not allow it: -The c-client library that we use for accessing mail folders and servers -uses the user-Id 0 (root) internally and does not work when called -as root. When inquiring why this is so, c-client's author told us -that it was bad to read mail as root - he thinks he knows what is -good for you. Unless we find an easy way to circumvent that problem, -you will not be able to run Mahogany as root as we have no time and -desire to re-write the c-client library just for this. -
  4. -
-There is a workaround however: - -

-You can forward your email to another user, say ``user1'', -by creating a /root/.forward file containing that user's -name. Then, run Mahogany through the ``su'' command: -``su user1 -c mahogany''. This will work just fine. -If you get an error message about it being unable to access your X11 -display, do a ``xhost localhost'' before, which will -allow all local users to access your display. All this is not very -safe from a security point of view if you don't trust your local machine, -but perfectly fine for standalone or dialup boxes. - -

-Update: Mahogany now runs as "root". - -

- -

-How can I set which language to use? -

- -

-Under Unix: simply set and export your LANG environment variable like -for any other program, too. Under Windows: the environment variable -LANG will be recognised if it is set, but in addition Mahogany will -automatically detect which language your system is set to use. - -

-In addition, there is a -lang command line option, see -[*]. - -

- -

-How can I delete messages? -

- -

-If I press 'D' or 'Del' or use the menu to delete messages, -they get marked as deleted but never disappear. How can I delete them? - -

-Simple, press '#' or 'x' or select Message/Expunge from the menu. -Mahogany will also ask you if you want to expunge them when closing -the folder. If you use the Trash folder, this only applies to that -one as all other folders will move messages straight to Trash instead -of marking them deleted. - -

- -

-How can I forward a message with attachments? -

- -

-Do "Forward with template" and create a new template -containing $quote822 - this will forward the entire message. You -can also change the default forward template to do it. - -

- -

-How can I customize the position of folders in the tree? -

- -

-Unfortunately there is no GUI support for doing it yet. You may vote for the -bug 404 -or subscribe to -it if you want to be notified when this is implemented. - -

-But in the meanwhile you can do it manually relatively simply. Under Unix you -will need to edit the configuration file ($HOME/.M/config by default) -and under Windows you need to directly modify the registry entries (see -[*]). In any case the program shouldn't run when you are -doing this modification. - -

-Here is what you should do: just add ``Index=N'' entry in the folder -profile section of the config file. I.e. if you add the marked lines: - -

-

-[IMAP/Inbox]
-Index=0                 # added manually
-...
-
-[IMAP/Mahogany]
-Index=1                 # added manually
-...
-
-[IMAP/Junk]
-Index=100               # added manually
-
- -

-then Inbox and Mahogany will appear first and Junk last in the tree. - -

-Under Windows you need to add the registry values of type DWORD using -the registry editor. For example, the value for Junk folder should be added -under HKCU$\backslash$Software$\backslash$Mahogany-Team$\backslash$M$\backslash$Profiles$\backslash$IMAP$\backslash$Junk -key. - -

- -

-How can I ``leave messages on server'' (POP3)? -

- -

-Typical POP3 server: normally, the new mail is downloaded from the -POP3 folders locally so go to the ``New Mail'' page in folder -properties and select ``Collect new mail from this folder''. -This will move all new mail from the POP3 server to the ``New Mail'' -folder. If you want to copy it instead (leave messages on server) -just check the ``Leave mail in this folder'' checkbox as well. - -

- -

-Can I have ``subfolders'' of File type (mbox) folders? -

- -

-Mahogany tries to preserve some sanity by disabling "Create -new folder" in the popup menu when you select a folder of -a non hierarchical format (such as MBX) but you can still circumvent -this by doing "Folder|Create..." and selecting the -folder you want as the parent. - -

- -

-Can I ``Follow-up'' to the message? -

- -

-You can open the message in the Sent Mail folder and do "Message|Edit -in composer". It is sort of like "replying to yourself" -but the to/from fields remain the same. - -

-


Footnotes

-
-
... LGPL1.1
-
which we recently felt victim of - due to some strong demand, we have -decided to allow alternatively licensing Mahogany under GPL - - -
-
... file1.2
-
use the option in the synchronisation -page of the options dialog to force using a file instead of the registry under -Windows - -
-
-

-
-Vadim Zeitlin -2006-08-06 -
- - 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 // 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 @@ -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 +// Licence: M license +/////////////////////////////////////////////////////////////////////////////// - -#ifndef SYSUTIL_H -#define SYSUTIL_H - -#ifndef USE_PCH -#endif // USE_PCH +#ifndef M_SYSUTIL_H +#define M_SYSUTIL_H #include @@ -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 // 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 +#include #ifdef OS_UNIX #include @@ -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 /////////////////////////////////////////////////////////////////////////////// @@ -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 // 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 +#endif // USE_PCH + +#include + +// ============================================================================ +// 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 // 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("" + "" "" "

") << _("Mahogany information") << _T("

") @@ -261,8 +263,8 @@ << "

" _T("

") << _("List of contributors:") << _T("

") "

" - "Karsten Ballüder, Vadim Zeitlin, Greg Noel,
" - "Nerijus Baliūnas, Xavier Nodet, Vaclav Slavik,
" + "Karsten Ball" "\xC3\xBC" "der, Vadim Zeitlin, Greg Noel,
" + "Nerijus Bali" "\xC5\xAB" "nas, Xavier Nodet, Vaclav Slavik,
" "Daniel Seifert, Michele Ravani, Michael A Chase,
" "Robert Vazan " << _("and many others") << "
" "
" 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 // 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 // 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 // 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 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(""); @@ -913,7 +919,7 @@ // map the font family into HTML font face name // // TODO: use - if ( font.IsFixedWidth() ) + if ( font.Ok() && font.IsFixedWidth() ) { m_htmlText << _T(""); m_htmlEnd.Prepend(_T("")); @@ -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("

") << _T("")
               << MakeHtmlSafe(header) << _T("") << _T("
"); } 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 // 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); }