mail-notification

Fork of Jean-Yves Lefort's mail-notification, a tray icon to notify of new mail
git clone https://code.djc.id.au/git/mail-notification/
commit 2829733b35a59b67d5a7b69ffb6794b0137dc952
parent cf18f5212d91fbc0ca7fa1acdbbf9fd2c3b27f5b
Author: Jean-Yves Lefort <jylefort@brutele.be>
Date:   Tue, 17 Aug 2004 02:17:38 +1000

mail-notification-0.6.0

* Added IMAP support
* Added SSL support for POP3 and IMAP (requires OpenSSL)
* Added SASL authentication support for POP3 and IMAP
  (requires Cyrus SASL 2)
* Added APOP authentication support
* Gmail support has been fixed
* If there is no new mail, the icon is now hidden
* Now complies with the HIG 2.0
* Now installs a GNOME sound event
* The user interface has been improved
* The mail icon is now taken from the icon theme
* The command line arguments have been modified
* The POP3 handler now honours the LOGIN-DELAY capability
* Objects are now generated with GOB
* Some cleanups have been performed
* A few minor bugs have been fixed
* Does not depend on GNet anymore

Diffstat:
MAUTHORS | 18++++++++----------
MINSTALL | 34++++++++++++++++++++++++----------
MMakefile.am | 6+++++-
MMakefile.in | 30++++++++++++++++++++++++------
MNEWS | 20++++++++++++++++++++
MREADME | 30++++++++++++++++++++++--------
MTODO | 2+-
Maclocal.m4 | 2++
Mart/Makefile.am | 6+-----
Mart/Makefile.in | 29+++++++++++++++++++++--------
Mart/logo.png | 0
Dart/mail-error.png | 0
Dart/mail.png | 0
Dart/no-mail-error.png | 0
Dart/no-mail.png | 0
Rart/preferences-icon.png -> art/properties-icon.png | 0
Mconfig.h.in | 60+++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
Mconfigure | 1096+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
Mconfigure.ac | 137++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
Adata/GNOME_MailNotification_Automation.server.in.in | 18++++++++++++++++++
Mdata/Makefile.am | 33+++++++++++++++++++++++++++++++--
Mdata/Makefile.in | 134++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
Adata/mail-notification-properties.desktop.in | 10++++++++++
Mdata/mail-notification.desktop.in | 2+-
Mdata/mail-notification.schemas.in | 32++++++++++++++++----------------
Adata/mail-notification.soundlist.in | 6++++++
Mhelp/C/Makefile.in | 23++++++++++++++++++++---
Dhelp/C/figures/mail-error.png | 0
Mhelp/C/figures/mail.png | 0
Dhelp/C/figures/no-mail-error.png | 0
Dhelp/C/figures/no-mail.png | 0
Mhelp/C/mail-notification-C.omf | 4++--
Mhelp/C/mail-notification.xml | 498++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
Mhelp/Makefile.in | 23++++++++++++++++++++---
Mm4/Makefile.in | 23++++++++++++++++++++---
Am4/openssl.m4 | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Am4/sasl2.m4 | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpo/POTFILES.in | 73++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------
Mpo/fr.gmo | 0
Mpo/fr.po | 1066++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
Mpo/mail-notification.pot | 885++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
Mpo/ru.gmo | 0
Mpo/ru.po | 904++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
Asrc/MNAutomation.idl | 30++++++++++++++++++++++++++++++
Msrc/Makefile.am | 215+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
Msrc/Makefile.in | 429+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
Asrc/mn-about-dialog-private.h | 17+++++++++++++++++
Asrc/mn-about-dialog.c | 151++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-about-dialog.gob | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-about-dialog.h | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-auth-combo-box-private.h | 17+++++++++++++++++
Asrc/mn-auth-combo-box.c | 361+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-auth-combo-box.gob | 144+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-auth-combo-box.h | 76++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-autodetect-mailbox-properties-private.h | 26++++++++++++++++++++++++++
Asrc/mn-autodetect-mailbox-properties.c | 490+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-autodetect-mailbox-properties.gob | 172+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-autodetect-mailbox-properties.h | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-automation-private.h | 17+++++++++++++++++
Asrc/mn-automation.c | 205+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-automation.gob | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-automation.h | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-blinking-image-private.h | 30++++++++++++++++++++++++++++++
Asrc/mn-blinking-image.c | 365+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-blinking-image.gob | 98+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-blinking-image.h | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-client-session.c | 938+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-client-session.h | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-conf.c | 40+++++-----------------------------------
Msrc/mn-conf.h | 9++++++---
Msrc/mn-dialog.c | 18++++++++++++++++++
Msrc/mn-dialog.h | 10++++++----
Asrc/mn-gmail-mailbox-private.h | 28++++++++++++++++++++++++++++
Asrc/mn-gmail-mailbox-properties-private.h | 28++++++++++++++++++++++++++++
Asrc/mn-gmail-mailbox-properties.c | 419+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-gmail-mailbox-properties.gob | 132+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-gmail-mailbox-properties.h | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-gmail-mailbox.c | 1069+++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------
Asrc/mn-gmail-mailbox.gob | 412+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-gmail-mailbox.h | 90++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Asrc/mn-imap-mailbox-private.h | 34++++++++++++++++++++++++++++++++++
Asrc/mn-imap-mailbox-properties-private.h | 26++++++++++++++++++++++++++
Asrc/mn-imap-mailbox-properties.c | 440+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-imap-mailbox-properties.gob | 219+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-imap-mailbox-properties.h | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-imap-mailbox.c | 1095+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-imap-mailbox.gob | 635+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-imap-mailbox.h | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-mail-icon-private.h | 24++++++++++++++++++++++++
Msrc/mn-mail-icon.c | 788++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------
Asrc/mn-mail-icon.gob | 181+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-mail-icon.h | 159++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
Asrc/mn-mailbox-private.h | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-mailbox-properties-dialog.c | 585+++++++++++++++++++++++++++----------------------------------------------------
Asrc/mn-mailbox-properties-util.c | 191+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-mailbox-properties-util.h | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-mailbox-properties.c | 121+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-mailbox-properties.h | 48++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-mailbox-view-private.h | 32++++++++++++++++++++++++++++++++
Asrc/mn-mailbox-view.c | 1403+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-mailbox-view.gob | 646+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-mailbox-view.h | 119+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-mailbox.c | 1439++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
Asrc/mn-mailbox.gob | 438+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-mailbox.h | 188+++++++++++++++++++++++++++++++++++++++++--------------------------------------
Asrc/mn-mailboxes-private.h | 24++++++++++++++++++++++++
Msrc/mn-mailboxes.c | 753++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
Asrc/mn-mailboxes.gob | 254+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-mailboxes.h | 110++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------
Asrc/mn-maildir-mailbox-private.h | 17+++++++++++++++++
Msrc/mn-maildir-mailbox.c | 426+++++++++++++++++++++++++++++++++++++++++++------------------------------------
Asrc/mn-maildir-mailbox.gob | 128+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-maildir-mailbox.h | 83++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Msrc/mn-main.c | 212+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
Asrc/mn-mbox-mailbox-private.h | 28++++++++++++++++++++++++++++
Msrc/mn-mbox-mailbox.c | 681+++++++++++++++++++++++++++++++++++--------------------------------------------
Asrc/mn-mbox-mailbox.gob | 184+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-mbox-mailbox.h | 88++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Asrc/mn-md5.c | 351+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-md5.h | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-mh-mailbox-private.h | 17+++++++++++++++++
Msrc/mn-mh-mailbox.c | 442+++++++++++++++++++++++++++++++++++++++++++------------------------------------
Asrc/mn-mh-mailbox.gob | 129+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-mh-mailbox.h | 85++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Asrc/mn-pending-mailbox-private.h | 17+++++++++++++++++
Msrc/mn-pending-mailbox.c | 175++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------
Asrc/mn-pending-mailbox.gob | 41+++++++++++++++++++++++++++++++++++++++++
Msrc/mn-pending-mailbox.h | 87+++++++++++++++++++++++++++++++++++++++++++++----------------------------------
Asrc/mn-pi-mailbox-properties-private.h | 18++++++++++++++++++
Asrc/mn-pi-mailbox-properties.c | 516+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-pi-mailbox-properties.gob | 230+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-pi-mailbox-properties.h | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-pop3-mailbox-private.h | 36++++++++++++++++++++++++++++++++++++
Asrc/mn-pop3-mailbox-properties-private.h | 17+++++++++++++++++
Asrc/mn-pop3-mailbox-properties.c | 344+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-pop3-mailbox-properties.gob | 150+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-pop3-mailbox-properties.h | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-pop3-mailbox.c | 1396+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------
Asrc/mn-pop3-mailbox.gob | 717+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-pop3-mailbox.h | 88++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Dsrc/mn-preferences.c | 824-------------------------------------------------------------------------------
Dsrc/mn-preferences.h | 25-------------------------
Asrc/mn-properties.c | 229+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-properties.h | 24++++++++++++++++++++++++
Asrc/mn-sasl.c | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-sasl.h | 27+++++++++++++++++++++++++++
Asrc/mn-shell-private.h | 30++++++++++++++++++++++++++++++
Asrc/mn-shell.c | 825+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-shell.gob | 417+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-shell.h | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-soup.c | 19++++++++++++++++++-
Asrc/mn-ssl.c | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-ssl.h | 27+++++++++++++++++++++++++++
Msrc/mn-stock.c | 16++++++++++++----
Msrc/mn-stock.h | 9++++++---
Asrc/mn-sylpheed-mailbox-private.h | 17+++++++++++++++++
Msrc/mn-sylpheed-mailbox.c | 418++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Asrc/mn-sylpheed-mailbox.gob | 120+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-sylpheed-mailbox.h | 83++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
Asrc/mn-system-mailbox-properties-private.h | 24++++++++++++++++++++++++
Asrc/mn-system-mailbox-properties.c | 334+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-system-mailbox-properties.gob | 79+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asrc/mn-system-mailbox-properties.h | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dsrc/mn-ui.c | 284-------------------------------------------------------------------------------
Dsrc/mn-ui.h | 28----------------------------
Asrc/mn-unsupported-mailbox-private.h | 22++++++++++++++++++++++
Msrc/mn-unsupported-mailbox.c | 359++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------
Asrc/mn-unsupported-mailbox.gob | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/mn-unsupported-mailbox.h | 104+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
Msrc/mn-uri.c | 632+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------
Msrc/mn-uri.h | 28+++++++++++++++++++++++++---
Msrc/mn-util.c | 144+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
Msrc/mn-util.h | 18+++++++++++++++++-
Msrc/mn-vfs.c | 361+++++++++++++++++++++----------------------------------------------------------
Msrc/mn-vfs.h | 39++++++---------------------------------
Atests/Makefile.am | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atests/Makefile.in | 626+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atests/test-uri.c | 253+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atests/test-uri.expected | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atests/test-vfs-read-line.c | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Atests/test-vfs-read-line1.expected | 3+++
Atests/test-vfs-read-line1.input | 4++++
Atests/test-vfs-read-line2.expected | 3+++
Atests/test-vfs-read-line2.input | 3+++
Mui/Makefile.am | 6++----
Mui/Makefile.in | 29++++++++++++++++++++++-------
Mui/mailbox-properties.glade | 477++-----------------------------------------------------------------------------
Dui/menu.glade | 90-------------------------------------------------------------------------------
Dui/menu.gladep | 14--------------
Dui/preferences.glade | 773-------------------------------------------------------------------------------
Dui/preferences.gladep | 14--------------
Aui/properties.glade | 672+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aui/properties.gladep | 14++++++++++++++
193 files changed, 30098 insertions(+), 8026 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -2,15 +2,13 @@
  mail-notification credits
 -------------------------------------------------------------------------------
 
-Jean-Yves Lefort <jylefort@brutele.be> has created and is the
-copyright holder for all the files in the distribution, except:
+Developed by Jean-Yves Lefort <jylefort@brutele.be>.
 
-	* files saying otherwise in their top notice
+Contributors:
+	* Dan Korostelev <dan@ats.energo.ru> (russian translations)
 
-	* art/about-icon.png
-	  art/gmail.png
-	  art/logo.png
-	  art/mail-notification.png
-	  art/mail.png
-	  art/no-mail.png
-	  art/preferences-icon.png
+External art sources:
+	* GNOME (about-icon.png)
+	* Google (gmail.png)
+	* Evolution (mail-notification.png, properties-icon.png)
+	* GTK+ (unsupported.png)
diff --git a/INSTALL b/INSTALL
@@ -5,21 +5,21 @@
 Index
 
 	0. About this document
-	1. Requirements
+	1. Dependencies
 	2. Instructions
 
 0. About this document
 
-	$Id: INSTALL,v 1.6 2004/07/21 18:52:06 jylefort Exp $
+	$Id: INSTALL,v 1.7 2004/08/16 16:08:17 jylefort Exp $
 
 	Copyright (c) 2003, 2004 Jean-Yves Lefort.
 
 	This document is part of Mail Notification.
 	It may be distributed under the same terms as Mail Notification.
 
-1. Requirements
+1. Dependencies
 
-	Mail Notification requires the following libraries:
+	Mandatory libraries:
 
 		* GTK+ (version 2.4.0 or superior)
 		  http://www.gtk.org/
@@ -27,12 +27,23 @@ Index
 		* GNOME (version 2.0 or superior)
 		  http://www.gnome.org/
 
-		* for POP3 support: GNet (version 2.0 or superior)
-		  http://www.gnetlibrary.org/
+	Optional libraries:
 
-		* for Gmail support: libsoup (version 1.99.28)
+		* for Gmail support:
+
+		  libsoup (version 1.99.28)
 		  ftp://ftp.gnome.org/pub/GNOME/sources/libsoup/1.99/
 
+		* for SSL support:
+
+		  OpenSSL (version 0.9.5b or superior)
+		  http://www.openssl.org/
+
+		* for SASL authentication support:
+
+		  Cyrus SASL (version 2.0 or superior)
+		  http://asg.web.cmu.edu/sasl/sasl-library.html
+
 2. Instructions
 
 	Mail Notification uses the well-known GNU build system. Hence,
@@ -47,14 +58,17 @@ Index
 	command-line options: type "./configure --help" for an
 	exhaustive list.
 
-	Six options are specific to Mail Notification:
+	These options are specific to Mail Notification:
 
 		--enable-mbox
 		--enable-mh
 		--enable-maildir
 		--enable-pop3
+		--enable-imap
+		--enable-ssl
+		--enable-sasl
 		--enable-sylpheed
 		--enable-gmail
+		--enable-ipv6
 
-	They may be used to disable the compilation of some format
-	handlers. They are all enabled by default.
+	They are all enabled by default.
diff --git a/Makefile.am b/Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = art data help m4 po src ui
+if WITH_REGRESSION_TESTS
+tests = tests
+endif
+
+SUBDIRS = art data help m4 po src $(tests) ui
 
 EXTRA_DIST = \
 	autogen.sh		\
diff --git a/Makefile.in b/Makefile.in
@@ -40,7 +40,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	compile config.guess config.sub depcomp install-sh missing \
 	mkinstalldirs
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/sasl2.m4 \
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -59,7 +60,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	uninstall-recursive
 ETAGS = etags
 CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = art data help m4 po src tests ui
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -79,6 +80,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BONOBO_ACTIVATION_IDL = @BONOBO_ACTIVATION_IDL@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -103,10 +105,9 @@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
-GNET_CFLAGS = @GNET_CFLAGS@
-GNET_LIBS = @GNET_LIBS@
 GNOME_CFLAGS = @GNOME_CFLAGS@
 GNOME_LIBS = @GNOME_LIBS@
+GOB2 = @GOB2@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 G_ASSERTIONS = @G_ASSERTIONS@
@@ -139,6 +140,7 @@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
+LIBBONOBO_IDL = @LIBBONOBO_IDL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
@@ -149,6 +151,9 @@ MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+ORBIT_IDL = @ORBIT_IDL@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -161,6 +166,8 @@ POFILES = @POFILES@
 POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SASL_CFLAGS = @SASL_CFLAGS@
+SASL_LIBS = @SASL_LIBS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SOUP_CFLAGS = @SOUP_CFLAGS@
@@ -171,6 +178,8 @@ VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
 WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
 WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
+WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
+WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
 WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
 WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
 WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
@@ -178,7 +187,15 @@ WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
 WITH_MH_FALSE = @WITH_MH_FALSE@
 WITH_MH_TRUE = @WITH_MH_TRUE@
 WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_OR_IMAP_FALSE = @WITH_POP3_OR_IMAP_FALSE@
+WITH_POP3_OR_IMAP_TRUE = @WITH_POP3_OR_IMAP_TRUE@
 WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
+WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
+WITH_SASL_FALSE = @WITH_SASL_FALSE@
+WITH_SASL_TRUE = @WITH_SASL_TRUE@
+WITH_SSL_FALSE = @WITH_SSL_FALSE@
+WITH_SSL_TRUE = @WITH_SSL_TRUE@
 WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
 WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
 XGETTEXT = @XGETTEXT@
@@ -209,7 +226,8 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-SUBDIRS = art data help m4 po src ui
+@WITH_REGRESSION_TESTS_TRUE@tests = tests
+SUBDIRS = art data help m4 po src $(tests) ui
 EXTRA_DIST = \
 	autogen.sh		\
 	autotools.conf		\
@@ -428,7 +446,7 @@ distdir: $(DISTFILES)
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(SUBDIRS)'; for subdir in $$list; do \
+	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
 	    || mkdir "$(distdir)/$$subdir" \
diff --git a/NEWS b/NEWS
@@ -1,3 +1,23 @@
+0.6.0					16 August 2004
+
+	* Added IMAP support
+	* Added SSL support for POP3 and IMAP (requires OpenSSL)
+	* Added SASL authentication support for POP3 and IMAP
+	  (requires Cyrus SASL 2)
+	* Added APOP authentication support
+	* Gmail support has been fixed
+	* If there is no new mail, the icon is now hidden
+	* Now complies with the HIG 2.0
+	* Now installs a GNOME sound event
+	* The user interface has been improved
+	* The mail icon is now taken from the icon theme
+	* The command line arguments have been modified
+	* The POP3 handler now honours the LOGIN-DELAY capability
+	* Objects are now generated with GOB
+	* Some cleanups have been performed
+	* A few minor bugs have been fixed
+	* Does not depend on GNet anymore
+
 0.5.0					21 July 2004
 
 	* Added Gmail support (requires libsoup)
diff --git a/README b/README
@@ -6,11 +6,12 @@ Index
 
 	0. About this document
 	1. About Mail Notification
-	2. Installation instructions
+	2. Release notes
+	3. Installation instructions
 
 0. About this document
 
-	$Id: README,v 1.14 2004/07/21 17:56:33 jylefort Exp $
+	$Id: README,v 1.16 2004/08/16 16:11:07 jylefort Exp $
 
 	Copyright (c) 2003, 2004 Jean-Yves Lefort.
 
@@ -29,12 +30,25 @@ Index
 
 	Mail Notification features include:
 
-		- multiple mailbox support
-		- mbox, MH, Maildir, Sylpheed, POP3 and Gmail support
-		- automatic detection of mailbox format
-		- automatic notification
-		- HIG compliance
+		* multiple mailbox support
+		* mbox, MH, Maildir, Sylpheed, POP3, IMAP and Gmail
+		  support
+		* SASL authentication support
+		* APOP authentication support
+		* SSL support
+		* automatic detection of mailbox format
+		* automatic notification
+		* HIG 2.0 compliance
 
-2. Installation instructions
+2. Release notes
+
+	Some configuration keys have been obsoleted. For the sake of
+	cleanliness, you should remove them:
+
+		$ gconftool-2 --recursive-unset \
+			/apps/mail-notification/commands/clicked \
+			/apps/mail-notification/preferences-dialog
+
+3. Installation instructions
 
 	See the INSTALL file.
diff --git a/TODO b/TODO
@@ -1 +1 @@
-- implement pop3s, imap and imaps support
+* add STARTTLS support to the IMAP backend
diff --git a/aclocal.m4 b/aclocal.m4
@@ -1731,5 +1731,7 @@ fi
 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+m4_include([m4/openssl.m4])
 m4_include([m4/pkg.m4])
+m4_include([m4/sasl2.m4])
 m4_include([acinclude.m4])
diff --git a/art/Makefile.am b/art/Makefile.am
@@ -3,11 +3,7 @@ APP_IMAGES = \
 	about-icon.png		\
 	logo.png		\
 	gmail.png		\
-	mail-error.png		\
-	mail.png		\
-	no-mail-error.png	\
-	no-mail.png		\
-	preferences-icon.png	\
+	properties-icon.png	\
 	unsupported.png
 
 gnome_pixmapsdir = $(datadir)/pixmaps
diff --git a/art/Makefile.in b/art/Makefile.in
@@ -38,7 +38,8 @@ subdir = art
 DIST_COMMON = $(dist_app_pixmaps_DATA) $(dist_gnome_pixmaps_DATA) \
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/sasl2.m4 \
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -60,6 +61,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BONOBO_ACTIVATION_IDL = @BONOBO_ACTIVATION_IDL@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -84,10 +86,9 @@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
-GNET_CFLAGS = @GNET_CFLAGS@
-GNET_LIBS = @GNET_LIBS@
 GNOME_CFLAGS = @GNOME_CFLAGS@
 GNOME_LIBS = @GNOME_LIBS@
+GOB2 = @GOB2@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 G_ASSERTIONS = @G_ASSERTIONS@
@@ -120,6 +121,7 @@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
+LIBBONOBO_IDL = @LIBBONOBO_IDL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
@@ -130,6 +132,9 @@ MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+ORBIT_IDL = @ORBIT_IDL@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -142,6 +147,8 @@ POFILES = @POFILES@
 POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SASL_CFLAGS = @SASL_CFLAGS@
+SASL_LIBS = @SASL_LIBS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SOUP_CFLAGS = @SOUP_CFLAGS@
@@ -152,6 +159,8 @@ VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
 WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
 WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
+WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
+WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
 WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
 WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
 WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
@@ -159,7 +168,15 @@ WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
 WITH_MH_FALSE = @WITH_MH_FALSE@
 WITH_MH_TRUE = @WITH_MH_TRUE@
 WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_OR_IMAP_FALSE = @WITH_POP3_OR_IMAP_FALSE@
+WITH_POP3_OR_IMAP_TRUE = @WITH_POP3_OR_IMAP_TRUE@
 WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
+WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
+WITH_SASL_FALSE = @WITH_SASL_FALSE@
+WITH_SASL_TRUE = @WITH_SASL_TRUE@
+WITH_SSL_FALSE = @WITH_SSL_FALSE@
+WITH_SSL_TRUE = @WITH_SSL_TRUE@
 WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
 WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
 XGETTEXT = @XGETTEXT@
@@ -195,11 +212,7 @@ APP_IMAGES = \
 	about-icon.png		\
 	logo.png		\
 	gmail.png		\
-	mail-error.png		\
-	mail.png		\
-	no-mail-error.png	\
-	no-mail.png		\
-	preferences-icon.png	\
+	properties-icon.png	\
 	unsupported.png
 
 gnome_pixmapsdir = $(datadir)/pixmaps
diff --git a/art/logo.png b/art/logo.png
Binary files differ.
diff --git a/art/mail-error.png b/art/mail-error.png
Binary files differ.
diff --git a/art/mail.png b/art/mail.png
Binary files differ.
diff --git a/art/no-mail-error.png b/art/no-mail-error.png
Binary files differ.
diff --git a/art/no-mail.png b/art/no-mail.png
Binary files differ.
diff --git a/art/preferences-icon.png b/art/properties-icon.png
Binary files differ.
diff --git a/config.h.in b/config.h.in
@@ -6,9 +6,6 @@
 /* Define to the gettext package name */
 #undef GETTEXT_PACKAGE
 
-/* log domain */
-#undef G_LOG_DOMAIN
-
 /* Define to 1 if you have the `atoi' function. */
 #undef HAVE_ATOI
 
@@ -24,6 +21,24 @@
 /* Define to 1 if you have the `exit' function. */
 #undef HAVE_EXIT
 
+/* Define to 1 if you have the `freeaddrinfo' function. */
+#undef HAVE_FREEADDRINFO
+
+/* Define to 1 if you have the `gai_strerror' function. */
+#undef HAVE_GAI_STRERROR
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `getnameinfo' function. */
+#undef HAVE_GETNAMEINFO
+
+/* Define to 1 if you have the `getpeername' function. */
+#undef HAVE_GETPEERNAME
+
+/* Define to 1 if you have the `getsockname' function. */
+#undef HAVE_GETSOCKNAME
+
 /* Define if the GNU gettext() function is already present or preinstalled. */
 #undef HAVE_GETTEXT
 
@@ -36,9 +51,30 @@
 /* Define to 1 if you have the <locale.h> header file. */
 #undef HAVE_LOCALE_H
 
+/* Define to 1 if you have the `memcpy' function. */
+#undef HAVE_MEMCPY
+
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `read' function. */
+#undef HAVE_READ
+
+/* Define to 1 if you have the `signal' function. */
+#undef HAVE_SIGNAL
+
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if you have the `sleep' function. */
+#undef HAVE_SLEEP
+
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
 /* Define to 1 if you have the `sscanf' function. */
 #undef HAVE_SSCANF
 
@@ -72,6 +108,9 @@
 /* Define to 1 if you have the `strncmp' function. */
 #undef HAVE_STRNCMP
 
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
@@ -81,6 +120,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if you have the `write' function. */
+#undef HAVE_WRITE
+
 /* Name of package */
 #undef PACKAGE
 
@@ -108,6 +150,12 @@
 /* Define to 1 if Gmail support is enabled */
 #undef WITH_GMAIL
 
+/* Define to 1 if IMAP support is enabled */
+#undef WITH_IMAP
+
+/* Define to 1 if IPv6 support is enabled */
+#undef WITH_IPV6
+
 /* Define to 1 if Maildir support is enabled */
 #undef WITH_MAILDIR
 
@@ -120,6 +168,12 @@
 /* Define to 1 if POP3 support is enabled */
 #undef WITH_POP3
 
+/* Define to 1 if SASL support is enabled */
+#undef WITH_SASL
+
+/* Define to 1 if SSL support is enabled */
+#undef WITH_SSL
+
 /* Define to 1 if Sylpheed support is enabled */
 #undef WITH_SYLPHEED
 
diff --git a/configure b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for mail-notification 0.5.0.
+# Generated by GNU Autoconf 2.59 for mail-notification 0.6.0.
 #
 # Report bugs to <jylefort@brutele.be>.
 #
@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='mail-notification'
 PACKAGE_TARNAME='mail-notification'
-PACKAGE_VERSION='0.5.0'
-PACKAGE_STRING='mail-notification 0.5.0'
+PACKAGE_VERSION='0.6.0'
+PACKAGE_STRING='mail-notification 0.6.0'
 PACKAGE_BUGREPORT='jylefort@brutele.be'
 
 ac_unique_file="src/mn-main.c"
@@ -311,7 +311,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS G_ASSERTIONS WARN_CFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GETTEXT_PACKAGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_PROP_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XAM_RULE INTLTOOL_KBD_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL PKG_CONFIG GTK_CFLAGS GTK_LIBS GNOME_CFLAGS GNOME_LIBS GCONF_SCHEMA_CONFIG_SOURCE GCONF_SCHEMA_FILE_DIR GCONF_SCHEMAS_INSTALL_TRUE GCONF_SCHEMAS_INSTALL_FALSE GCONFTOOL GNET_CFLAGS GNET_LIBS SOUP_CFLAGS SOUP_LIBS WITH_MBOX_TRUE WITH_MBOX_FALSE WITH_MH_TRUE WITH_MH_FALSE WITH_MAILDIR_TRUE WITH_MAILDIR_FALSE WITH_POP3_TRUE WITH_POP3_FALSE WITH_SYLPHEED_TRUE WITH_SYLPHEED_FALSE WITH_GMAIL_TRUE WITH_GMAIL_FALSE HAVE_SOUP_TRUE HAVE_SOUP_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS G_ASSERTIONS WARN_CFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GETTEXT_PACKAGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_PROP_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XAM_RULE INTLTOOL_KBD_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL PKG_CONFIG GTK_CFLAGS GTK_LIBS GNOME_CFLAGS GNOME_LIBS GCONF_SCHEMA_CONFIG_SOURCE GCONF_SCHEMA_FILE_DIR GCONF_SCHEMAS_INSTALL_TRUE GCONF_SCHEMAS_INSTALL_FALSE GCONFTOOL OPENSSL_CFLAGS OPENSSL_LIBS SASL_CFLAGS SASL_LIBS SOUP_CFLAGS SOUP_LIBS ORBIT_IDL LIBBONOBO_IDL BONOBO_ACTIVATION_IDL GOB2 WITH_MBOX_TRUE WITH_MBOX_FALSE WITH_MH_TRUE WITH_MH_FALSE WITH_MAILDIR_TRUE WITH_MAILDIR_FALSE WITH_POP3_TRUE WITH_POP3_FALSE WITH_IMAP_TRUE WITH_IMAP_FALSE WITH_POP3_OR_IMAP_TRUE WITH_POP3_OR_IMAP_FALSE WITH_SSL_TRUE WITH_SSL_FALSE WITH_SASL_TRUE WITH_SASL_FALSE WITH_SYLPHEED_TRUE WITH_SYLPHEED_FALSE WITH_GMAIL_TRUE WITH_GMAIL_FALSE HAVE_SOUP_TRUE HAVE_SOUP_FALSE WITH_REGRESSION_TESTS_TRUE WITH_REGRESSION_TESTS_FALSE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -780,7 +780,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mail-notification 0.5.0 to adapt to many kinds of systems.
+\`configure' configures mail-notification 0.6.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -842,7 +842,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mail-notification 0.5.0:";;
+     short | recursive ) echo "Configuration of mail-notification 0.6.0:";;
    esac
   cat <<\_ACEOF
 
@@ -853,11 +853,17 @@ Optional Features:
   --disable-mh            disable MH support
   --disable-maildir       disable Maildir support
   --disable-pop3          disable POP3 support
+  --disable-imap          disable IMAP support
+  --disable-ssl           disable SSL support
+  --disable-sasl          disable SASL authentication support
   --disable-sylpheed      disable Sylpheed support
   --disable-gmail         disable Gmail support
+  --disable-ipv6          disable IPv6 support
   --disable-assertions    disable GLib assertions (not recommended)
   --enable-compile-warnings=no|yes|error
                           enable compiler warnings [no]
+  --enable-regression-tests
+                          build and run regression tests [no]
   --enable-maintainer-mode  enable make rules and dependencies not useful
 			  (and sometimes confusing) to the casual installer
   --disable-dependency-tracking  speeds up one-time build
@@ -980,7 +986,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-mail-notification configure 0.5.0
+mail-notification configure 0.6.0
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -994,7 +1000,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mail-notification $as_me 0.5.0, which was
+It was created by mail-notification $as_me 0.6.0, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1388,6 +1394,45 @@ else
   enable_pop3=yes
 fi;
 
+# Check whether --enable-imap or --disable-imap was given.
+if test "${enable_imap+set}" = set; then
+  enableval="$enable_imap"
+  case "$enableval" in
+	yes|no) enable_imap=$enableval ;;
+	*) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-imap" >&5
+echo "$as_me: error: bad value $enableval for --enable-imap" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  enable_imap=yes
+fi;
+
+# Check whether --enable-ssl or --disable-ssl was given.
+if test "${enable_ssl+set}" = set; then
+  enableval="$enable_ssl"
+  case "$enableval" in
+	yes|no) enable_ssl=$enableval ;;
+	*) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ssl" >&5
+echo "$as_me: error: bad value $enableval for --enable-ssl" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  enable_ssl=yes
+fi;
+
+# Check whether --enable-sasl or --disable-sasl was given.
+if test "${enable_sasl+set}" = set; then
+  enableval="$enable_sasl"
+  case "$enableval" in
+	yes|no) enable_sasl=$enableval ;;
+	*) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sasl" >&5
+echo "$as_me: error: bad value $enableval for --enable-sasl" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  enable_sasl=yes
+fi;
+
 # Check whether --enable-sylpheed or --disable-sylpheed was given.
 if test "${enable_sylpheed+set}" = set; then
   enableval="$enable_sylpheed"
@@ -1414,6 +1459,19 @@ else
   enable_gmail=yes
 fi;
 
+# Check whether --enable-ipv6 or --disable-ipv6 was given.
+if test "${enable_ipv6+set}" = set; then
+  enableval="$enable_ipv6"
+  case "$enableval" in
+	yes|no) enable_ipv6=$enableval ;;
+	*) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
+echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  enable_ipv6=yes
+fi;
+
 # Check whether --enable-assertions or --disable-assertions was given.
 if test "${enable_assertions+set}" = set; then
   enableval="$enable_assertions"
@@ -1456,6 +1514,19 @@ fi
 
 
 
+# Check whether --enable-regression-tests or --disable-regression-tests was given.
+if test "${enable_regression_tests+set}" = set; then
+  enableval="$enable_regression_tests"
+  case "$enableval" in
+	yes|no) enable_regression_tests=$enableval ;;
+	*) { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-regression-tests" >&5
+echo "$as_me: error: bad value $enableval for --enable-regression-tests" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  enable_regression_tests=no
+fi;
+
 ### initialization
 
 am__api_version="1.8"
@@ -1757,7 +1828,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='mail-notification'
- VERSION='0.5.0'
+ VERSION='0.6.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6233,12 +6304,15 @@ rm -f conftest*
 fi
 
 
+# the order of these tests matters
+
+
 
 
 
 
 
-for ac_header in errno.h stdarg.h stdio.h stdlib.h string.h
+for ac_header in errno.h signal.h stdarg.h stdio.h stdlib.h string.h sys/types.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -6391,19 +6465,9 @@ fi
 
 done
 
-
-
-
-
-
-
-
-for ac_func in atoi exit sscanf strchr strcmp strlen strncmp
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+echo "$as_me:$LINENO: checking for sys/uio.h" >&5
+echo $ECHO_N "checking for sys/uio.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_uio_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -6412,54 +6476,13 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
+#include <sys/types.h>
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
+#include <sys/uio.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -6473,105 +6496,468 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_header_sys_uio_h=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_var=no"
+ac_cv_header_sys_uio_h=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_uio_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_uio_h" >&6
+if test $ac_cv_header_sys_uio_h = yes; then
+  :
 else
-  { { echo "$as_me:$LINENO: error: library function not found" >&5
-echo "$as_me: error: library function not found" >&2;}
+  { { echo "$as_me:$LINENO: error: header not found" >&5
+echo "$as_me: error: header not found" >&2;}
    { (exit 1); exit 1; }; }
 fi
-done
 
 
-### build dependencies
-
-# Check whether --enable-gtktest or --disable-gtktest was given.
-if test "${enable_gtktest+set}" = set; then
-  enableval="$enable_gtktest"
+echo "$as_me:$LINENO: checking for sys/socket.h" >&5
+echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_socket_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
 
+#include <sys/socket.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_sys_socket_h=yes
 else
-  enable_gtktest=yes
-fi;
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-  pkg_config_args=gtk+-2.0
-  for module in .
-  do
-      case "$module" in
-         gthread)
-             pkg_config_args="$pkg_config_args gthread-2.0"
-         ;;
-      esac
-  done
+ac_cv_header_sys_socket_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
+if test $ac_cv_header_sys_socket_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: header not found" >&5
+echo "$as_me: error: header not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-  no_gtk=""
 
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+echo "$as_me:$LINENO: checking for netdb.h" >&5
+echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6
+if test "${ac_cv_header_netdb_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
 
-  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+#include <netdb.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_netdb_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-if test -n "$PKG_CONFIG"; then
-  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
+ac_cv_header_netdb_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5
+echo "${ECHO_T}$ac_cv_header_netdb_h" >&6
+if test $ac_cv_header_netdb_h = yes; then
+  :
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { { echo "$as_me:$LINENO: error: header not found" >&5
+echo "$as_me: error: header not found" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 
-  if test x$PKG_CONFIG != xno ; then
-    if pkg-config --atleast-pkgconfig-version 0.7 ; then
-      :
-    else
-      echo "*** pkg-config too old; version 0.7 or better required."
+echo "$as_me:$LINENO: checking for netinet/in.h" >&5
+echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_in_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_netinet_in_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_netinet_in_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
+if test $ac_cv_header_netinet_in_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: header not found" >&5
+echo "$as_me: error: header not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
+echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
+if test "${ac_cv_header_arpa_inet_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+#include <arpa/inet.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_arpa_inet_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_arpa_inet_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
+echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
+if test $ac_cv_header_arpa_inet_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: header not found" >&5
+echo "$as_me: error: header not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in atoi exit freeaddrinfo gai_strerror getaddrinfo getnameinfo getpeername getsockname memcpy memset read signal sleep socket sscanf strchr strcmp strlen strncmp strstr write
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  { { echo "$as_me:$LINENO: error: library function not found" >&5
+echo "$as_me: error: library function not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+done
+
+
+### build dependencies
+
+# Check whether --enable-gtktest or --disable-gtktest was given.
+if test "${enable_gtktest+set}" = set; then
+  enableval="$enable_gtktest"
+
+else
+  enable_gtktest=yes
+fi;
+
+  pkg_config_args=gtk+-2.0
+  for module in .
+  do
+      case "$module" in
+         gthread)
+             pkg_config_args="$pkg_config_args gthread-2.0"
+         ;;
+      esac
+  done
+
+  no_gtk=""
+
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+  if test x$PKG_CONFIG != xno ; then
+    if pkg-config --atleast-pkgconfig-version 0.7 ; then
+      :
+    else
+      echo "*** pkg-config too old; version 0.7 or better required."
       no_gtk=yes
       PKG_CONFIG=no
     fi
@@ -6866,14 +7252,14 @@ else
 	PKG_CONFIG_MIN_VERSION=0.9.0
 
 	if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-		echo "$as_me:$LINENO: checking for libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0" >&5
-echo $ECHO_N "checking for libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0... $ECHO_C" >&6
+		echo "$as_me:$LINENO: checking for gthread-2.0 libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 bonobo-activation-2.0" >&5
+echo $ECHO_N "checking for gthread-2.0 libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 bonobo-activation-2.0... $ECHO_C" >&6
 
-		if $PKG_CONFIG --exists "libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0"; then
+		if $PKG_CONFIG --exists "gthread-2.0 libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 bonobo-activation-2.0"; then
 			found=yes
 
-			GNOME_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0"`
-			GNOME_LIBS=`$PKG_CONFIG --libs "libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0"`
+			GNOME_CFLAGS=`$PKG_CONFIG --cflags "gthread-2.0 libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 bonobo-activation-2.0"`
+			GNOME_LIBS=`$PKG_CONFIG --libs "gthread-2.0 libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 bonobo-activation-2.0"`
 
 			echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
@@ -7003,87 +7389,174 @@ echo "$as_me: error: unable to find the gconftool-2 program" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-if test $enable_pop3 = yes; then
-	found=no
-GNET_CFLAGS=""
-GNET_LIBS=""
+if test $enable_pop3 = no && test $enable_imap = no; then
+	if test $enable_ssl = yes; then
+		{ echo "$as_me:$LINENO: POP3 and IMAP support disabled: forcing --disable-ssl" >&5
+echo "$as_me: POP3 and IMAP support disabled: forcing --disable-ssl" >&6;}
+		enable_ssl=no
+		disable_ssl_reason="(not needed)"
+	fi
+	if test $enable_sasl = yes; then
+		{ echo "$as_me:$LINENO: POP3 and IMAP support disabled: forcing --disable-sasl" >&5
+echo "$as_me: POP3 and IMAP support disabled: forcing --disable-sasl" >&6;}
+		enable_sasl=no
+		disable_sasl_reason="(not needed)"
+	fi
+fi
 
-if test -z "$PKG_CONFIG"; then
-	# Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $enable_ssl = yes; then
+	OPENSSL_CFLAGS=""
+OPENSSL_LIBS="-lssl -lcrypto"
+
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
+LIBS="$LIBS $OPENSSL_LIBS"
+
+# the OPENSSL_VERSION_NUMBER format we use appeared in 0.9.5b
+openssl_min_version=0.9.5b
+
+echo "$as_me:$LINENO: checking for OpenSSL - version >= $openssl_min_version" >&5
+echo $ECHO_N "checking for OpenSSL - version >= $openssl_min_version... $ECHO_C" >&6
+if test "$cross_compiling" = yes; then
+  found=yes
 else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+  cat >conftest.$ac_ext <<_ACEOF
 
-  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
-  ;;
-esac
+#include <openssl/opensslv.h>
+
+int main() {
+  int n;
+  char cpatch = 0;
+  int major, minor, fix, patch = 0;
+  int openssl_major, openssl_minor, openssl_fix, openssl_patch;
+
+  n = sscanf("$openssl_min_version", "%d.%d.%d%c", &major, &minor, &fix, &cpatch);
+  if (n < 3)
+    exit(1); /* bad version string */
+  if (cpatch)
+    patch = cpatch - 96; /* letter -> number */
+
+  if (OPENSSL_VERSION_NUMBER <
+      (major << 28) + (minor << 20) + (fix << 12) + (patch << 4))
+    exit(2); /* version too old */
+
+  exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  found=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+found=no
 fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $found" >&5
+echo "${ECHO_T}$found" >&6
 
-if test -n "$PKG_CONFIG"; then
-  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+
+if test $found = yes; then
+	:
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+	OPENSSL_CFLAGS=""
+	OPENSSL_LIBS=""
+	{ echo "$as_me:$LINENO: WARNING: unable to find the OpenSSL library: forcing --disable-ssl" >&5
+echo "$as_me: WARNING: unable to find the OpenSSL library: forcing --disable-ssl" >&2;}; enable_ssl=no; disable_ssl_reason="(OpenSSL not found)"
 fi
 
+
+
 fi
 
-if test "x$PKG_CONFIG" = "xno" ; then
-	{ echo "$as_me:$LINENO: WARNING: the pkg-config script could not be found: make sure it is in your path, or set the PKG_CONFIG environment variable to the full path to pkg-config" >&5
-echo "$as_me: WARNING: the pkg-config script could not be found: make sure it is in your path, or set the PKG_CONFIG environment variable to the full path to pkg-config" >&2;}
+if test $enable_sasl = yes; then
+	SASL_CFLAGS=""
+SASL_LIBS="-lsasl2"
+
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+CFLAGS="$CFLAGS $SASL_CFLAGS"
+LIBS="$LIBS $SASL_LIBS"
+
+sasl2_min_version=2.0
+
+echo "$as_me:$LINENO: checking for Cyrus SASL - version >= $sasl2_min_version" >&5
+echo $ECHO_N "checking for Cyrus SASL - version >= $sasl2_min_version... $ECHO_C" >&6
+if test "$cross_compiling" = yes; then
+  found=yes
 else
-	PKG_CONFIG_MIN_VERSION=0.9.0
+  cat >conftest.$ac_ext <<_ACEOF
 
-	if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-		echo "$as_me:$LINENO: checking for gnet-2.0" >&5
-echo $ECHO_N "checking for gnet-2.0... $ECHO_C" >&6
+#include <sasl/sasl.h>
 
-		if $PKG_CONFIG --exists "gnet-2.0"; then
-			found=yes
+int main() {
+  int major, minor, step = 0, patch = 0;
+  int sasl_major, sasl_minor, sasl_step, sasl_patch;
 
-			GNET_CFLAGS=`$PKG_CONFIG --cflags "gnet-2.0"`
-			GNET_LIBS=`$PKG_CONFIG --libs "gnet-2.0"`
+  if (sscanf("$sasl2_min_version", "%d.%d.%d.%d", &major, &minor, &step, &patch) < 2)
+    exit(1); /* bad version string */
 
-			echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-		else
-			echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-		fi
-	else
-		{ echo "$as_me:$LINENO: WARNING: your version of pkg-config is too old, you need version $PKG_CONFIG_MIN_VERSION or newer" >&5
-echo "$as_me: WARNING: your version of pkg-config is too old, you need version $PKG_CONFIG_MIN_VERSION or newer" >&2;}
-	fi
-fi
+  sasl_version_info(0, 0, &sasl_major, &sasl_minor, &sasl_step, &sasl_patch);
+  if ((sasl_major << 24) + (sasl_minor << 16) + (sasl_step << 8) + sasl_patch
+      < (major << 24) + (minor << 16) + (step << 8) + patch)
+    exit(2); /* version too old */
 
-if test $found = no; then
-	{ echo "$as_me:$LINENO: WARNING: unable to find the GNet library: forcing --disable-pop3" >&5
-echo "$as_me: WARNING: unable to find the GNet library: forcing --disable-pop3" >&2;}; enable_pop3=no; disable_pop3_reason="(GNet not found)"
+  exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  found=yes
 else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+found=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $found" >&5
+echo "${ECHO_T}$found" >&6
+
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+
+if test $found = yes; then
 	:
+else
+	SASL_CFLAGS=""
+	SASL_LIBS=""
+	{ echo "$as_me:$LINENO: WARNING: unable to find the Cyrus SASL library: forcing --disable-sasl" >&5
+echo "$as_me: WARNING: unable to find the Cyrus SASL library: forcing --disable-sasl" >&2;}; enable_sasl=no; disable_sasl_reason="(Cyrus SASL not found)"
 fi
 
 
@@ -7178,11 +7651,60 @@ fi
 
 fi
 
+ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
+
+
+LIBBONOBO_IDL="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
+
+
+BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
+
+
+# Extract the first word of "gob2", so it can be a program name with args.
+set dummy gob2; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GOB2+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $GOB2 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GOB2="$GOB2" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GOB2="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+GOB2=$ac_cv_path_GOB2
+
+if test -n "$GOB2"; then
+  echo "$as_me:$LINENO: result: $GOB2" >&5
+echo "${ECHO_T}$GOB2" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
 ### Automake conditionals
 
 
 
-if test $enable_mbox != no; then
+if test $enable_mbox = yes; then
   WITH_MBOX_TRUE=
   WITH_MBOX_FALSE='#'
 else
@@ -7192,7 +7714,7 @@ fi
 
 
 
-if test $enable_mh != no; then
+if test $enable_mh = yes; then
   WITH_MH_TRUE=
   WITH_MH_FALSE='#'
 else
@@ -7202,7 +7724,7 @@ fi
 
 
 
-if test $enable_maildir != no; then
+if test $enable_maildir = yes; then
   WITH_MAILDIR_TRUE=
   WITH_MAILDIR_FALSE='#'
 else
@@ -7212,7 +7734,7 @@ fi
 
 
 
-if test $enable_pop3 != no; then
+if test $enable_pop3 = yes; then
   WITH_POP3_TRUE=
   WITH_POP3_FALSE='#'
 else
@@ -7222,7 +7744,47 @@ fi
 
 
 
-if test $enable_sylpheed != no; then
+if test $enable_imap = yes; then
+  WITH_IMAP_TRUE=
+  WITH_IMAP_FALSE='#'
+else
+  WITH_IMAP_TRUE='#'
+  WITH_IMAP_FALSE=
+fi
+
+
+
+if test $enable_pop3 = yes || test $enable_imap = yes; then
+  WITH_POP3_OR_IMAP_TRUE=
+  WITH_POP3_OR_IMAP_FALSE='#'
+else
+  WITH_POP3_OR_IMAP_TRUE='#'
+  WITH_POP3_OR_IMAP_FALSE=
+fi
+
+
+
+if test $enable_ssl = yes; then
+  WITH_SSL_TRUE=
+  WITH_SSL_FALSE='#'
+else
+  WITH_SSL_TRUE='#'
+  WITH_SSL_FALSE=
+fi
+
+
+
+if test $enable_sasl = yes; then
+  WITH_SASL_TRUE=
+  WITH_SASL_FALSE='#'
+else
+  WITH_SASL_TRUE='#'
+  WITH_SASL_FALSE=
+fi
+
+
+
+if test $enable_sylpheed = yes; then
   WITH_SYLPHEED_TRUE=
   WITH_SYLPHEED_FALSE='#'
 else
@@ -7232,7 +7794,7 @@ fi
 
 
 
-if test $enable_gmail != no; then
+if test $enable_gmail = yes; then
   WITH_GMAIL_TRUE=
   WITH_GMAIL_FALSE='#'
 else
@@ -7242,7 +7804,7 @@ fi
 
 
 
-if test $have_soup != no; then
+if test $have_soup = yes; then
   HAVE_SOUP_TRUE=
   HAVE_SOUP_FALSE='#'
 else
@@ -7251,13 +7813,17 @@ else
 fi
 
 
-### config.h definitions
 
+if test $enable_regression_tests = yes; then
+  WITH_REGRESSION_TESTS_TRUE=
+  WITH_REGRESSION_TESTS_FALSE='#'
+else
+  WITH_REGRESSION_TESTS_TRUE='#'
+  WITH_REGRESSION_TESTS_FALSE=
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define G_LOG_DOMAIN "mail-notification"
-_ACEOF
 
+### config.h definitions
 
 if test $enable_mbox = yes; then
 
@@ -7287,6 +7853,27 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
+if test $enable_imap = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_IMAP 1
+_ACEOF
+
+fi
+if test $enable_ssl = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_SSL 1
+_ACEOF
+
+fi
+if test $enable_sasl = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_SASL 1
+_ACEOF
+
+fi
 if test $enable_sylpheed = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -7301,10 +7888,17 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
+if test $enable_ipv6 = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_IPV6 1
+_ACEOF
+
+fi
 
 ### output
 
-                                                                                          ac_config_files="$ac_config_files Makefile art/Makefile data/Makefile help/Makefile help/C/Makefile m4/Makefile po/Makefile.in src/Makefile ui/Makefile"
+                                                                                                    ac_config_files="$ac_config_files Makefile art/Makefile data/Makefile help/Makefile help/C/Makefile m4/Makefile po/Makefile.in src/Makefile tests/Makefile ui/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -7467,6 +8061,34 @@ echo "$as_me: error: conditional \"WITH_POP3\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${WITH_IMAP_TRUE}" && test -z "${WITH_IMAP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"WITH_IMAP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_IMAP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${WITH_POP3_OR_IMAP_TRUE}" && test -z "${WITH_POP3_OR_IMAP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"WITH_POP3_OR_IMAP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_POP3_OR_IMAP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${WITH_SSL_TRUE}" && test -z "${WITH_SSL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"WITH_SSL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_SSL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${WITH_SASL_TRUE}" && test -z "${WITH_SASL_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"WITH_SASL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_SASL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${WITH_SYLPHEED_TRUE}" && test -z "${WITH_SYLPHEED_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"WITH_SYLPHEED\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -7488,6 +8110,13 @@ echo "$as_me: error: conditional \"HAVE_SOUP\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${WITH_REGRESSION_TESTS_TRUE}" && test -z "${WITH_REGRESSION_TESTS_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"WITH_REGRESSION_TESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"WITH_REGRESSION_TESTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
@@ -7759,7 +8388,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by mail-notification $as_me 0.5.0, which was
+This file was extended by mail-notification $as_me 0.6.0, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7822,7 +8451,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-mail-notification config.status 0.5.0
+mail-notification config.status 0.6.0
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -7942,6 +8571,7 @@ do
   "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
   "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+  "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
   "ui/Makefile" ) CONFIG_FILES="$CONFIG_FILES ui/Makefile" ;;
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
@@ -8121,10 +8751,16 @@ s,@GCONF_SCHEMA_FILE_DIR@,$GCONF_SCHEMA_FILE_DIR,;t t
 s,@GCONF_SCHEMAS_INSTALL_TRUE@,$GCONF_SCHEMAS_INSTALL_TRUE,;t t
 s,@GCONF_SCHEMAS_INSTALL_FALSE@,$GCONF_SCHEMAS_INSTALL_FALSE,;t t
 s,@GCONFTOOL@,$GCONFTOOL,;t t
-s,@GNET_CFLAGS@,$GNET_CFLAGS,;t t
-s,@GNET_LIBS@,$GNET_LIBS,;t t
+s,@OPENSSL_CFLAGS@,$OPENSSL_CFLAGS,;t t
+s,@OPENSSL_LIBS@,$OPENSSL_LIBS,;t t
+s,@SASL_CFLAGS@,$SASL_CFLAGS,;t t
+s,@SASL_LIBS@,$SASL_LIBS,;t t
 s,@SOUP_CFLAGS@,$SOUP_CFLAGS,;t t
 s,@SOUP_LIBS@,$SOUP_LIBS,;t t
+s,@ORBIT_IDL@,$ORBIT_IDL,;t t
+s,@LIBBONOBO_IDL@,$LIBBONOBO_IDL,;t t
+s,@BONOBO_ACTIVATION_IDL@,$BONOBO_ACTIVATION_IDL,;t t
+s,@GOB2@,$GOB2,;t t
 s,@WITH_MBOX_TRUE@,$WITH_MBOX_TRUE,;t t
 s,@WITH_MBOX_FALSE@,$WITH_MBOX_FALSE,;t t
 s,@WITH_MH_TRUE@,$WITH_MH_TRUE,;t t
@@ -8133,12 +8769,22 @@ s,@WITH_MAILDIR_TRUE@,$WITH_MAILDIR_TRUE,;t t
 s,@WITH_MAILDIR_FALSE@,$WITH_MAILDIR_FALSE,;t t
 s,@WITH_POP3_TRUE@,$WITH_POP3_TRUE,;t t
 s,@WITH_POP3_FALSE@,$WITH_POP3_FALSE,;t t
+s,@WITH_IMAP_TRUE@,$WITH_IMAP_TRUE,;t t
+s,@WITH_IMAP_FALSE@,$WITH_IMAP_FALSE,;t t
+s,@WITH_POP3_OR_IMAP_TRUE@,$WITH_POP3_OR_IMAP_TRUE,;t t
+s,@WITH_POP3_OR_IMAP_FALSE@,$WITH_POP3_OR_IMAP_FALSE,;t t
+s,@WITH_SSL_TRUE@,$WITH_SSL_TRUE,;t t
+s,@WITH_SSL_FALSE@,$WITH_SSL_FALSE,;t t
+s,@WITH_SASL_TRUE@,$WITH_SASL_TRUE,;t t
+s,@WITH_SASL_FALSE@,$WITH_SASL_FALSE,;t t
 s,@WITH_SYLPHEED_TRUE@,$WITH_SYLPHEED_TRUE,;t t
 s,@WITH_SYLPHEED_FALSE@,$WITH_SYLPHEED_FALSE,;t t
 s,@WITH_GMAIL_TRUE@,$WITH_GMAIL_TRUE,;t t
 s,@WITH_GMAIL_FALSE@,$WITH_GMAIL_FALSE,;t t
 s,@HAVE_SOUP_TRUE@,$HAVE_SOUP_TRUE,;t t
 s,@HAVE_SOUP_FALSE@,$HAVE_SOUP_FALSE,;t t
+s,@WITH_REGRESSION_TESTS_TRUE@,$WITH_REGRESSION_TESTS_TRUE,;t t
+s,@WITH_REGRESSION_TESTS_FALSE@,$WITH_REGRESSION_TESTS_FALSE,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
@@ -8918,6 +9564,10 @@ Features
   --enable-mh                   $enable_mh
   --enable-maildir              $enable_maildir
   --enable-pop3                 $enable_pop3 $disable_pop3_reason
+  --enable-imap                 $enable_imap $disable_imap_reason
+  --enable-ssl                  $enable_ssl $disable_ssl_reason
+  --enable-sasl                 $enable_sasl $disable_sasl_reason
   --enable-sylpheed             $enable_sylpheed
   --enable-gmail                $enable_gmail $disable_gmail_reason
+  --enable-ipv6                 $enable_ipv6
 EOF
diff --git a/configure.ac b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(mail-notification, 0.5.0, jylefort@brutele.be)
+AC_INIT(mail-notification, 0.6.0, jylefort@brutele.be)
 AC_CONFIG_SRCDIR(src/mn-main.c)
 
 AC_PREREQ(2.59)
@@ -33,6 +33,27 @@ AC_HELP_STRING([--disable-pop3], [disable POP3 support]),
 	*) AC_MSG_ERROR([bad value $enableval for --enable-pop3]) ;;
 esac], [enable_pop3=yes])
 
+AC_ARG_ENABLE(imap,
+AC_HELP_STRING([--disable-imap], [disable IMAP support]),
+[case "$enableval" in
+	yes|no) enable_imap=$enableval ;;
+	*) AC_MSG_ERROR([bad value $enableval for --enable-imap]) ;;
+esac], [enable_imap=yes])
+
+AC_ARG_ENABLE(ssl,
+AC_HELP_STRING([--disable-ssl], [disable SSL support]),
+[case "$enableval" in
+	yes|no) enable_ssl=$enableval ;;
+	*) AC_MSG_ERROR([bad value $enableval for --enable-ssl]) ;;
+esac], [enable_ssl=yes])
+
+AC_ARG_ENABLE(sasl,
+AC_HELP_STRING([--disable-sasl], [disable SASL authentication support]),
+[case "$enableval" in
+	yes|no) enable_sasl=$enableval ;;
+	*) AC_MSG_ERROR([bad value $enableval for --enable-sasl]) ;;
+esac], [enable_sasl=yes])
+
 AC_ARG_ENABLE(sylpheed,
 AC_HELP_STRING([--disable-sylpheed], [disable Sylpheed support]),
 [case "$enableval" in
@@ -47,9 +68,23 @@ AC_HELP_STRING([--disable-gmail], [disable Gmail support]),
 	*) AC_MSG_ERROR([bad value $enableval for --enable-gmail]) ;;
 esac], [enable_gmail=yes])
 
+AC_ARG_ENABLE(ipv6,
+AC_HELP_STRING([--disable-ipv6], [disable IPv6 support]),
+[case "$enableval" in
+	yes|no) enable_ipv6=$enableval ;;
+	*) AC_MSG_ERROR([bad value $enableval for --enable-ipv6]) ;;
+esac], [enable_ipv6=yes])
+
 AC_ARG_G_ASSERTIONS
 AC_ARG_COMPILE_WARNINGS
 
+AC_ARG_ENABLE(regression-tests,
+AC_HELP_STRING([--enable-regression-tests], [build and run regression tests [[no]]]),
+[case "$enableval" in
+	yes|no) enable_regression_tests=$enableval ;;
+	*) AC_MSG_ERROR([bad value $enableval for --enable-regression-tests]) ;;
+esac], [enable_regression_tests=no])
+
 ### initialization
 
 AM_INIT_AUTOMAKE(foreign)
@@ -72,14 +107,38 @@ AC_PROG_INTLTOOL
 AC_PROG_CC
 AC_SYS_LARGEFILE
 
-AC_CHECK_HEADERS(errno.h stdarg.h stdio.h stdlib.h string.h,, [AC_MSG_ERROR([header not found])])
-AC_CHECK_FUNCS(atoi exit sscanf strchr strcmp strlen strncmp,, [AC_MSG_ERROR([library function not found])])
+# the order of these tests matters
+AC_CHECK_HEADERS(errno.h signal.h stdarg.h stdio.h stdlib.h string.h sys/types.h,, [AC_MSG_ERROR([header not found])])
+AC_CHECK_HEADER(sys/uio.h,, [AC_MSG_ERROR([header not found])],
+[#include <sys/types.h>])
+AC_CHECK_HEADER(sys/socket.h,, [AC_MSG_ERROR([header not found])],
+[#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>])
+AC_CHECK_HEADER(netdb.h,, [AC_MSG_ERROR([header not found])],
+[#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>])
+AC_CHECK_HEADER(netinet/in.h,, [AC_MSG_ERROR([header not found])],
+[#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>])
+AC_CHECK_HEADER(arpa/inet.h,, [AC_MSG_ERROR([header not found])],
+[#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>])
+
+AC_CHECK_FUNCS(atoi exit freeaddrinfo gai_strerror getaddrinfo getnameinfo getpeername getsockname memcpy memset read signal sleep socket sscanf strchr strcmp strlen strncmp strstr write,, [AC_MSG_ERROR([library function not found])])
 
 ### build dependencies
 
 AM_PATH_GTK_2_0(2.4.0,, [AC_MSG_ERROR([unable to find the GTK+ library])])
 
-AM_PATH_PKG(GNOME, [libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0],, [AC_MSG_ERROR([unable to find the GNOME libraries])])
+AM_PATH_PKG(GNOME, [gthread-2.0 libgnomeui-2.0 gnome-vfs-2.0 libglade-2.0 eel-2.0 bonobo-activation-2.0],, [AC_MSG_ERROR([unable to find the GNOME libraries])])
 AC_SUBST(GNOME_CFLAGS)
 AC_SUBST(GNOME_LIBS)
 
@@ -90,8 +149,25 @@ if test -z "$GCONFTOOL"; then
 	AC_MSG_ERROR([unable to find the gconftool-2 program])
 fi
 
-if test $enable_pop3 = yes; then
-	AM_PATH_PKG(GNET, gnet-2.0,, [AC_MSG_WARN([unable to find the GNet library: forcing --disable-pop3]); enable_pop3=no; disable_pop3_reason="(GNet not found)"])
+if test $enable_pop3 = no && test $enable_imap = no; then
+	if test $enable_ssl = yes; then
+		AC_MSG_NOTICE([POP3 and IMAP support disabled: forcing --disable-ssl])
+		enable_ssl=no
+		disable_ssl_reason="(not needed)"
+	fi
+	if test $enable_sasl = yes; then
+		AC_MSG_NOTICE([POP3 and IMAP support disabled: forcing --disable-sasl])
+		enable_sasl=no
+		disable_sasl_reason="(not needed)"
+	fi
+fi
+
+if test $enable_ssl = yes; then
+	AM_PATH_OPENSSL(,, [AC_MSG_WARN([unable to find the OpenSSL library: forcing --disable-ssl]); enable_ssl=no; disable_ssl_reason="(OpenSSL not found)"])
+fi
+
+if test $enable_sasl = yes; then
+	AM_PATH_SASL2(,, [AC_MSG_WARN([unable to find the Cyrus SASL library: forcing --disable-sasl]); enable_sasl=no; disable_sasl_reason="(Cyrus SASL not found)"])
 fi
 
 have_soup=no
@@ -99,20 +175,34 @@ if test $enable_gmail = yes; then
 	AM_PATH_PKG(SOUP, soup-2.0, have_soup=yes, [AC_MSG_WARN([unable to find the soup library: forcing --disable-gmail]); enable_gmail=no; disable_gmail_reason="(libsoup not found)"])
 fi	
 
+ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
+AC_SUBST(ORBIT_IDL)
+
+LIBBONOBO_IDL="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
+AC_SUBST(LIBBONOBO_IDL)
+
+BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
+AC_SUBST(BONOBO_ACTIVATION_IDL)
+
+AC_PATH_PROG(GOB2, gob2)
+
 ### Automake conditionals
 
-AM_CONDITIONAL(WITH_MBOX, [test $enable_mbox != no])
-AM_CONDITIONAL(WITH_MH, [test $enable_mh != no])
-AM_CONDITIONAL(WITH_MAILDIR, [test $enable_maildir != no])
-AM_CONDITIONAL(WITH_POP3, [test $enable_pop3 != no])
-AM_CONDITIONAL(WITH_SYLPHEED, [test $enable_sylpheed != no])
-AM_CONDITIONAL(WITH_GMAIL, [test $enable_gmail != no])
-AM_CONDITIONAL(HAVE_SOUP, [test $have_soup != no])
+AM_CONDITIONAL(WITH_MBOX, [test $enable_mbox = yes])
+AM_CONDITIONAL(WITH_MH, [test $enable_mh = yes])
+AM_CONDITIONAL(WITH_MAILDIR, [test $enable_maildir = yes])
+AM_CONDITIONAL(WITH_POP3, [test $enable_pop3 = yes])
+AM_CONDITIONAL(WITH_IMAP, [test $enable_imap = yes])
+AM_CONDITIONAL(WITH_POP3_OR_IMAP, [test $enable_pop3 = yes || test $enable_imap = yes])
+AM_CONDITIONAL(WITH_SSL, [test $enable_ssl = yes])
+AM_CONDITIONAL(WITH_SASL, [test $enable_sasl = yes])
+AM_CONDITIONAL(WITH_SYLPHEED, [test $enable_sylpheed = yes])
+AM_CONDITIONAL(WITH_GMAIL, [test $enable_gmail = yes])
+AM_CONDITIONAL(HAVE_SOUP, [test $have_soup = yes])
+AM_CONDITIONAL(WITH_REGRESSION_TESTS, [test $enable_regression_tests = yes])
 
 ### config.h definitions
 
-AC_DEFINE(G_LOG_DOMAIN, ["AC_PACKAGE_NAME"], [log domain])
-
 if test $enable_mbox = yes; then
 	AC_DEFINE(WITH_MBOX, 1, [Define to 1 if mbox support is enabled])
 fi
@@ -125,12 +215,24 @@ fi
 if test $enable_pop3 = yes; then
 	AC_DEFINE(WITH_POP3, 1, [Define to 1 if POP3 support is enabled])
 fi
+if test $enable_imap = yes; then
+	AC_DEFINE(WITH_IMAP, 1, [Define to 1 if IMAP support is enabled])
+fi
+if test $enable_ssl = yes; then
+	AC_DEFINE(WITH_SSL, 1, [Define to 1 if SSL support is enabled])
+fi
+if test $enable_sasl = yes; then
+	AC_DEFINE(WITH_SASL, 1, [Define to 1 if SASL support is enabled])
+fi
 if test $enable_sylpheed = yes; then
 	AC_DEFINE(WITH_SYLPHEED, 1, [Define to 1 if Sylpheed support is enabled])
 fi
 if test $enable_gmail = yes; then
 	AC_DEFINE(WITH_GMAIL, 1, [Define to 1 if Gmail support is enabled])
 fi
+if test $enable_ipv6 = yes; then
+	AC_DEFINE(WITH_IPV6, 1, [Define to 1 if IPv6 support is enabled])
+fi
 
 ### output
 
@@ -142,6 +244,7 @@ AC_CONFIG_FILES(Makefile
 		m4/Makefile 
 		po/Makefile.in
 		src/Makefile
+		tests/Makefile
 		ui/Makefile)
 AC_OUTPUT
 
@@ -166,6 +269,10 @@ Features
   --enable-mh                   $enable_mh
   --enable-maildir              $enable_maildir
   --enable-pop3                 $enable_pop3 $disable_pop3_reason
+  --enable-imap                 $enable_imap $disable_imap_reason
+  --enable-ssl                  $enable_ssl $disable_ssl_reason
+  --enable-sasl                 $enable_sasl $disable_sasl_reason
   --enable-sylpheed             $enable_sylpheed
   --enable-gmail                $enable_gmail $disable_gmail_reason
+  --enable-ipv6                 $enable_ipv6
 EOF
diff --git a/data/GNOME_MailNotification_Automation.server.in.in b/data/GNOME_MailNotification_Automation.server.in.in
@@ -0,0 +1,18 @@
+<oaf_info>
+  <oaf_server iid="OAFIID:GNOME_MailNotification_Automation_Factory" type="exe" location="@bindir@/mail-notification">
+    <oaf_attribute name="repo_ids" type="stringv">
+      <item value="IDL:GNOME/ObjectFactory:1.0"/>
+    </oaf_attribute>
+    <oaf_attribute name="name" type="string" _value="Mail Notification automation"/>        
+    <oaf_attribute name="description" type="string" _value="Mail Notification automation factory"/>
+  </oaf_server>
+
+  <oaf_server iid="OAFIID:GNOME_MailNotification_Automation" type="factory" location="OAFIID:GNOME_MailNotification_Automation_Factory">
+    <oaf_attribute name="repo_ids" type="stringv">
+      <item value="IDL:Bonobo/Unknown:1.0"/>
+      <item value="IDL:GNOME/MailNotificationAutomation:1.0"/>
+    </oaf_attribute>
+    <oaf_attribute name="name" type="string" _value="Mail Notification automation"/>
+    <oaf_attribute name="description" type="string" _value="Mail Notification automation"/>
+  </oaf_server>
+</oaf_info>
diff --git a/data/Makefile.am b/data/Makefile.am
@@ -2,12 +2,26 @@ applicationsdir = $(datadir)/applications
 applications_in_files = mail-notification.desktop.in
 applications_DATA = mail-notification.desktop
 
+settingsdir = $(datadir)/control-center-2.0/capplets
+settings_in_files = mail-notification-properties.desktop.in
+settings_DATA = mail-notification-properties.desktop
+
+serverdir = $(libdir)/bonobo/servers
+server_in_files = GNOME_MailNotification_Automation.server.in
+server_DATA = GNOME_MailNotification_Automation.server
+
 schemasdir = $(sysconfdir)/gconf/schemas
 schemas_in_files = mail-notification.schemas.in
 schemas_DATA = mail-notification.schemas
 
+soundlistdir = $(sysconfdir)/sound/events
+soundlist_in_files = mail-notification.soundlist.in
+soundlist_DATA = mail-notification.soundlist
+
 @INTLTOOL_DESKTOP_RULE@
+@INTLTOOL_SERVER_RULE@
 @INTLTOOL_SCHEMAS_RULE@
+@INTLTOOL_SOUNDLIST_RULE@
 
 if GCONF_SCHEMAS_INSTALL
 install-data-local: install-schemas
@@ -16,5 +30,20 @@ install-schemas:
 		$(GCONFTOOL) --makefile-install-rule mail-notification.schemas
 endif
 
-EXTRA_DIST = mail-notification.desktop.in mail-notification.schemas.in
-CLEANFILES = mail-notification.desktop mail-notification.schemas
+EXTRA_DIST = \
+	mail-notification.desktop.in			\
+	mail-notification-properties.desktop.in		\
+	GNOME_MailNotification_Automation.server.in.in	\
+	mail-notification.schemas.in			\
+	mail-notification.soundlist.in
+
+CLEANFILES = \
+	mail-notification.desktop			\
+	mail-notification-properties.desktop		\
+	GNOME_MailNotification_Automation.server	\
+	GNOME_MailNotification_Automation.server.in	\
+	mail-notification.schemas			\
+	mail-notification.soundlist
+
+GNOME_MailNotification_Automation.server.in: GNOME_MailNotification_Automation.server.in.in
+	sed -e 's|\@bindir\@|$(bindir)|' GNOME_MailNotification_Automation.server.in.in > GNOME_MailNotification_Automation.server.in
diff --git a/data/Makefile.in b/data/Makefile.in
@@ -37,7 +37,8 @@ POST_UNINSTALL = :
 subdir = data
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/sasl2.m4 \
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -46,10 +47,14 @@ CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 SOURCES =
 DIST_SOURCES =
-am__installdirs = "$(DESTDIR)$(applicationsdir)" "$(DESTDIR)$(schemasdir)"
+am__installdirs = "$(DESTDIR)$(applicationsdir)" "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(settingsdir)" "$(DESTDIR)$(soundlistdir)"
 applicationsDATA_INSTALL = $(INSTALL_DATA)
 schemasDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(applications_DATA) $(schemas_DATA)
+serverDATA_INSTALL = $(INSTALL_DATA)
+settingsDATA_INSTALL = $(INSTALL_DATA)
+soundlistDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(applications_DATA) $(schemas_DATA) $(server_DATA) \
+	$(settings_DATA) $(soundlist_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMDEP_FALSE = @AMDEP_FALSE@
@@ -59,6 +64,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BONOBO_ACTIVATION_IDL = @BONOBO_ACTIVATION_IDL@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -83,10 +89,9 @@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
-GNET_CFLAGS = @GNET_CFLAGS@
-GNET_LIBS = @GNET_LIBS@
 GNOME_CFLAGS = @GNOME_CFLAGS@
 GNOME_LIBS = @GNOME_LIBS@
+GOB2 = @GOB2@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 G_ASSERTIONS = @G_ASSERTIONS@
@@ -119,6 +124,7 @@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
+LIBBONOBO_IDL = @LIBBONOBO_IDL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
@@ -129,6 +135,9 @@ MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+ORBIT_IDL = @ORBIT_IDL@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -141,6 +150,8 @@ POFILES = @POFILES@
 POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SASL_CFLAGS = @SASL_CFLAGS@
+SASL_LIBS = @SASL_LIBS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SOUP_CFLAGS = @SOUP_CFLAGS@
@@ -151,6 +162,8 @@ VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
 WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
 WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
+WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
+WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
 WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
 WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
 WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
@@ -158,7 +171,15 @@ WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
 WITH_MH_FALSE = @WITH_MH_FALSE@
 WITH_MH_TRUE = @WITH_MH_TRUE@
 WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_OR_IMAP_FALSE = @WITH_POP3_OR_IMAP_FALSE@
+WITH_POP3_OR_IMAP_TRUE = @WITH_POP3_OR_IMAP_TRUE@
 WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
+WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
+WITH_SASL_FALSE = @WITH_SASL_FALSE@
+WITH_SASL_TRUE = @WITH_SASL_TRUE@
+WITH_SSL_FALSE = @WITH_SSL_FALSE@
+WITH_SSL_TRUE = @WITH_SSL_TRUE@
 WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
 WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
 XGETTEXT = @XGETTEXT@
@@ -192,11 +213,33 @@ target_alias = @target_alias@
 applicationsdir = $(datadir)/applications
 applications_in_files = mail-notification.desktop.in
 applications_DATA = mail-notification.desktop
+settingsdir = $(datadir)/control-center-2.0/capplets
+settings_in_files = mail-notification-properties.desktop.in
+settings_DATA = mail-notification-properties.desktop
+serverdir = $(libdir)/bonobo/servers
+server_in_files = GNOME_MailNotification_Automation.server.in
+server_DATA = GNOME_MailNotification_Automation.server
 schemasdir = $(sysconfdir)/gconf/schemas
 schemas_in_files = mail-notification.schemas.in
 schemas_DATA = mail-notification.schemas
-EXTRA_DIST = mail-notification.desktop.in mail-notification.schemas.in
-CLEANFILES = mail-notification.desktop mail-notification.schemas
+soundlistdir = $(sysconfdir)/sound/events
+soundlist_in_files = mail-notification.soundlist.in
+soundlist_DATA = mail-notification.soundlist
+EXTRA_DIST = \
+	mail-notification.desktop.in			\
+	mail-notification-properties.desktop.in		\
+	GNOME_MailNotification_Automation.server.in.in	\
+	mail-notification.schemas.in			\
+	mail-notification.soundlist.in
+
+CLEANFILES = \
+	mail-notification.desktop			\
+	mail-notification-properties.desktop		\
+	GNOME_MailNotification_Automation.server	\
+	GNOME_MailNotification_Automation.server.in	\
+	mail-notification.schemas			\
+	mail-notification.soundlist
+
 all: all-am
 
 .SUFFIXES:
@@ -264,6 +307,57 @@ uninstall-schemasDATA:
 	  echo " rm -f '$(DESTDIR)$(schemasdir)/$$f'"; \
 	  rm -f "$(DESTDIR)$(schemasdir)/$$f"; \
 	done
+install-serverDATA: $(server_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(serverdir)" || $(mkdir_p) "$(DESTDIR)$(serverdir)"
+	@list='$(server_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(serverDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(serverdir)/$$f'"; \
+	  $(serverDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(serverdir)/$$f"; \
+	done
+
+uninstall-serverDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(server_DATA)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f '$(DESTDIR)$(serverdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(serverdir)/$$f"; \
+	done
+install-settingsDATA: $(settings_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(settingsdir)" || $(mkdir_p) "$(DESTDIR)$(settingsdir)"
+	@list='$(settings_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(settingsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(settingsdir)/$$f'"; \
+	  $(settingsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(settingsdir)/$$f"; \
+	done
+
+uninstall-settingsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(settings_DATA)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f '$(DESTDIR)$(settingsdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(settingsdir)/$$f"; \
+	done
+install-soundlistDATA: $(soundlist_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(soundlistdir)" || $(mkdir_p) "$(DESTDIR)$(soundlistdir)"
+	@list='$(soundlist_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(soundlistDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(soundlistdir)/$$f'"; \
+	  $(soundlistDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(soundlistdir)/$$f"; \
+	done
+
+uninstall-soundlistDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(soundlist_DATA)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f '$(DESTDIR)$(soundlistdir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(soundlistdir)/$$f"; \
+	done
 tags: TAGS
 TAGS:
 
@@ -302,7 +396,7 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(DATA)
 installdirs:
-	for dir in "$(DESTDIR)$(applicationsdir)" "$(DESTDIR)$(schemasdir)"; do \
+	for dir in "$(DESTDIR)$(applicationsdir)" "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(settingsdir)" "$(DESTDIR)$(soundlistdir)"; do \
 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
 	done
 install: install-am
@@ -349,7 +443,8 @@ info: info-am
 info-am:
 
 install-data-am: install-applicationsDATA install-data-local \
-	install-schemasDATA
+	install-schemasDATA install-serverDATA install-settingsDATA \
+	install-soundlistDATA
 
 install-exec-am:
 
@@ -376,27 +471,36 @@ ps: ps-am
 ps-am:
 
 uninstall-am: uninstall-applicationsDATA uninstall-info-am \
-	uninstall-schemasDATA
+	uninstall-schemasDATA uninstall-serverDATA \
+	uninstall-settingsDATA uninstall-soundlistDATA
 
 .PHONY: all all-am check check-am clean clean-generic distclean \
 	distclean-generic distdir dvi dvi-am html html-am info info-am \
 	install install-am install-applicationsDATA install-data \
 	install-data-am install-data-local install-exec \
 	install-exec-am install-info install-info-am install-man \
-	install-schemasDATA install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
-	uninstall-am uninstall-applicationsDATA uninstall-info-am \
-	uninstall-schemasDATA
+	install-schemasDATA install-serverDATA install-settingsDATA \
+	install-soundlistDATA install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+	pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-applicationsDATA uninstall-info-am \
+	uninstall-schemasDATA uninstall-serverDATA \
+	uninstall-settingsDATA uninstall-soundlistDATA
 
 
 @INTLTOOL_DESKTOP_RULE@
+@INTLTOOL_SERVER_RULE@
 @INTLTOOL_SCHEMAS_RULE@
+@INTLTOOL_SOUNDLIST_RULE@
 
 @GCONF_SCHEMAS_INSTALL_TRUE@install-data-local: install-schemas
 @GCONF_SCHEMAS_INSTALL_TRUE@install-schemas:
 @GCONF_SCHEMAS_INSTALL_TRUE@	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
 @GCONF_SCHEMAS_INSTALL_TRUE@		$(GCONFTOOL) --makefile-install-rule mail-notification.schemas
+
+GNOME_MailNotification_Automation.server.in: GNOME_MailNotification_Automation.server.in.in
+	sed -e 's|\@bindir\@|$(bindir)|' GNOME_MailNotification_Automation.server.in.in > GNOME_MailNotification_Automation.server.in
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/data/mail-notification-properties.desktop.in b/data/mail-notification-properties.desktop.in
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+_Name=Mail Notification
+Icon=mail-notification.png
+_Comment=Configure Mail Notification
+Type=Application
+Categories=GNOME;Application;Settings;
+Exec=mail-notification --display-properties
+Terminal=false
+StartupNotify=true
diff --git a/data/mail-notification.desktop.in b/data/mail-notification.desktop.in
@@ -4,6 +4,6 @@ _Name=Mail Notification
 Icon=mail-notification.png
 _Comment=Get notified when new mail arrives
 Type=Application
-Categories=GTK;Application;Network;
+Categories=GNOME;Application;Network;
 Exec=mail-notification
 Terminal=false
diff --git a/data/mail-notification.schemas.in b/data/mail-notification.schemas.in
@@ -44,24 +44,24 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/mail-notification/commands/clicked/enabled</key>
-      <applyto>/apps/mail-notification/commands/clicked/enabled</applyto>
+      <key>/schemas/apps/mail-notification/commands/double-clicked/enabled</key>
+      <applyto>/apps/mail-notification/commands/double-clicked/enabled</applyto>
       <owner>mail-notification</owner>
       <type>bool</type>
       <default>0</default>
       <locale name="C">
-        <short>Run a command when the icon is clicked</short>
-	<long>Whether to run a command when the icon is clicked or not.</long>
+        <short>Run a command when the icon is double-clicked</short>
+	<long>Whether to run a command when the icon is double-clicked or not.</long>
       </locale>
     </schema> 
     <schema>
-      <key>/schemas/apps/mail-notification/commands/clicked/command</key>
-      <applyto>/apps/mail-notification/commands/clicked/command</applyto>
+      <key>/schemas/apps/mail-notification/commands/double-clicked/command</key>
+      <applyto>/apps/mail-notification/commands/double-clicked/command</applyto>
       <owner>mail-notification</owner>
       <type>string</type>
       <locale name="C">
-        <short>Clicked command</short>
-	<long>The command to run when the icon is clicked.</long>
+        <short>Double-clicked command</short>
+	<long>The command to run when the icon is double-clicked.</long>
       </locale>
     </schema>
     <schema>
@@ -76,25 +76,25 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/mail-notification/ui/preferences-dialog/height</key>
-      <applyto>/apps/mail-notification/ui/preferences-dialog/height</applyto>
+      <key>/schemas/apps/mail-notification/ui/properties-dialog/height</key>
+      <applyto>/apps/mail-notification/ui/properties-dialog/height</applyto>
       <owner>mail-notification</owner>
       <type>int</type>
       <default>420</default>
       <locale name="C">
-        <short>Height of preferences dialog</short>
-        <long>The height of the preferences dialog in pixels.</long>
+        <short>Height of properties dialog</short>
+        <long>The height of the properties dialog in pixels.</long>
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/mail-notification/ui/preferences-dialog/width</key>
-      <applyto>/apps/mail-notification/ui/preferences-dialog/width</applyto>
+      <key>/schemas/apps/mail-notification/ui/properties-dialog/width</key>
+      <applyto>/apps/mail-notification/ui/properties-dialog/width</applyto>
       <owner>mail-notification</owner>
       <type>int</type>
       <default>-1</default>
       <locale name="C">
-        <short>Width of preferences dialog</short>
-        <long>The width of the preferences dialog in pixels.</long>
+        <short>Width of properties dialog</short>
+        <long>The width of the properties dialog in pixels.</long>
       </locale>
     </schema>
   </schemalist>
diff --git a/data/mail-notification.soundlist.in b/data/mail-notification.soundlist.in
@@ -0,0 +1,6 @@
+[__section_info__]
+_description=Mail Notification
+
+[new-mail]
+file=email.wav
+_description=New Mail
diff --git a/help/C/Makefile.in b/help/C/Makefile.in
@@ -99,7 +99,8 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 	$(top_srcdir)/help/omf.make $(top_srcdir)/help/xmldocs.make
 subdir = help/C
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/sasl2.m4 \
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -117,6 +118,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BONOBO_ACTIVATION_IDL = @BONOBO_ACTIVATION_IDL@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -141,10 +143,9 @@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
-GNET_CFLAGS = @GNET_CFLAGS@
-GNET_LIBS = @GNET_LIBS@
 GNOME_CFLAGS = @GNOME_CFLAGS@
 GNOME_LIBS = @GNOME_LIBS@
+GOB2 = @GOB2@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 G_ASSERTIONS = @G_ASSERTIONS@
@@ -177,6 +178,7 @@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
+LIBBONOBO_IDL = @LIBBONOBO_IDL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
@@ -187,6 +189,9 @@ MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+ORBIT_IDL = @ORBIT_IDL@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -199,6 +204,8 @@ POFILES = @POFILES@
 POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SASL_CFLAGS = @SASL_CFLAGS@
+SASL_LIBS = @SASL_LIBS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SOUP_CFLAGS = @SOUP_CFLAGS@
@@ -209,6 +216,8 @@ VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
 WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
 WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
+WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
+WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
 WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
 WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
 WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
@@ -216,7 +225,15 @@ WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
 WITH_MH_FALSE = @WITH_MH_FALSE@
 WITH_MH_TRUE = @WITH_MH_TRUE@
 WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_OR_IMAP_FALSE = @WITH_POP3_OR_IMAP_FALSE@
+WITH_POP3_OR_IMAP_TRUE = @WITH_POP3_OR_IMAP_TRUE@
 WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
+WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
+WITH_SASL_FALSE = @WITH_SASL_FALSE@
+WITH_SASL_TRUE = @WITH_SASL_TRUE@
+WITH_SSL_FALSE = @WITH_SSL_FALSE@
+WITH_SSL_TRUE = @WITH_SSL_TRUE@
 WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
 WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
 XGETTEXT = @XGETTEXT@
diff --git a/help/C/figures/mail-error.png b/help/C/figures/mail-error.png
Binary files differ.
diff --git a/help/C/figures/mail.png b/help/C/figures/mail.png
Binary files differ.
diff --git a/help/C/figures/no-mail-error.png b/help/C/figures/no-mail-error.png
Binary files differ.
diff --git a/help/C/figures/no-mail.png b/help/C/figures/no-mail.png
Binary files differ.
diff --git a/help/C/mail-notification-C.omf b/help/C/mail-notification-C.omf
@@ -12,9 +12,9 @@
       Mail Notification Manual
     </title>
     <date>
-      2004-07-21
+      2004-08-16
     </date>
-    <version identifier="2.1" date="2004-07-21" description="Second release"/>
+    <version identifier="2.2" date="2004-08-16" description="Third release"/>
     <subject category="GNOME|Internet"/>
     <description>
       Mail Notification Manual
diff --git a/help/C/mail-notification.xml b/help/C/mail-notification.xml
@@ -2,9 +2,9 @@
 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
   <!ENTITY app "<application>Mail Notification</application>">
-  <!ENTITY appversion "0.5.0">
-  <!ENTITY manrevision "2.1">
-  <!ENTITY date "Wednesday, July 21, 2004">
+  <!ENTITY appversion "0.6.0">
+  <!ENTITY manrevision "2.2">
+  <!ENTITY date "Monday, August 16, 2004">
 
   <!ENTITY project "The Mail Notification Project">
 
@@ -17,12 +17,15 @@
   <!ENTITY mbox "<link linkend=&#34;mbox&#34;>mbox</link>">
   <!ENTITY mh "<link linkend=&#34;mh&#34;>MH</link>">
   <!ENTITY pop3 "<link linkend=&#34;pop3&#34;>POP3</link>">
+  <!ENTITY imap "<link linkend=&#34;imap&#34;>IMAP</link>">
+  <!ENTITY sasl "<link linkend=&#34;sasl&#34;>SASL</link>">
+  <!ENTITY ssl "<link linkend=&#34;pop3&#34;>SSL</link>">
   <!ENTITY sylpheed "<link linkend=&#34;sylpheed&#34;>Sylpheed</link>">
   <!ENTITY gmail "<link linkend=&#34;gmail&#34;>Gmail</link>">
   <!ENTITY gnomevfs "<link linkend=&#34;gnomevfs&#34;>GnomeVFS</link>">
 ]>
 
-<!-- $Id: mail-notification.xml,v 1.13 2004/07/21 16:00:41 jylefort Exp $ -->
+<!-- $Id: mail-notification.xml,v 1.36 2004/08/16 15:58:56 jylefort Exp $ -->
 <!-- Mail Notification Manual -->
 
 <!-- Copyright (c) 2004 Jean-Yves Lefort -->
@@ -130,6 +133,17 @@
 	</revdescription>
       </revision>
       <revision>
+	<revnumber>Mail Notification Manual V2.1</revnumber>
+	<date>Wednesday, July 21, 2004</date>
+	<revdescription>
+	  <para role="author">
+	    Jean-Yves Lefort
+	    <email>jylefort@brutele.be</email>
+	  </para>
+	  <para role="publisher">&project;</para>
+	</revdescription>
+      </revision>
+      <revision>
 	<revnumber>Mail Notification Manual V2.0</revnumber>
 	<date>Tuesday, June 29, 2004</date>
 	<revdescription>
@@ -167,7 +181,7 @@
     </para>
     <para>
       It works with system trays implementing the freedesktop.org
-      <ulink url="http://www.freedesktop.org/Standards/systemtray-spec">System Tray Specification</ulink>, such as the
+      <ulink url="http://www.freedesktop.org/Standards/systemtray-spec" type="http">System Tray Specification</ulink>, such as the
       GNOME Panel Notification Area, the Xfce Notification Area and the KDE System Tray.
     </para>
     <para>
@@ -175,10 +189,13 @@
     </para>
     <itemizedlist>
       <listitem><para>multiple mailbox support</para></listitem>
-      <listitem><para>&mbox;, &mh;, &maildir;, &sylpheed;, &pop3; and &gmail; support</para></listitem>
+      <listitem><para>&mbox;, &mh;, &maildir;, &sylpheed;, &pop3;, &imap; and &gmail; support</para></listitem>
+      <listitem><para>&sasl; authentication support</para></listitem>
+      <listitem><para>APOP authentication support</para></listitem>
+      <listitem><para>&ssl; support</para></listitem>
       <listitem><para>automatic detection of mailbox format</para></listitem>
       <listitem><para><link linkend="automatic-notification">automatic notification</link></para></listitem>
-      <listitem><para><ulink url="http://developer.gnome.org/projects/gup/hig">HIG</ulink> compliance</para></listitem>
+      <listitem><para><ulink url="http://developer.gnome.org/projects/gup/hig" type="http">HIG</ulink> 2.0 compliance</para></listitem>
     </itemizedlist>
   </sect1>
 
@@ -222,12 +239,44 @@
 	    <variablelist>
 	      <varlistentry>
 		<term>--enable-info</term>
-		<listitem><para>Enable informational output</para></listitem>
+		<listitem>
+		  <para>
+		    Enable informational output
+		  </para>
+		  <warning>
+		    <title>Security</title>
+		    <para>
+		      The output of --enable-info may contain
+		      sensitive information such as passwords and
+		      session transcripts.
+		    </para>
+		  </warning>
+		</listitem>
+	      </varlistentry>
+
+	      <varlistentry>
+		<term>--list-features</term>
+		<listitem><para>List compiled-in features and exit</para></listitem>
+	      </varlistentry>
+
+	      <varlistentry>
+		<term>--display-properties</term>
+		<listitem><para>Display the properties dialog</para></listitem>
 	      </varlistentry>
 
 	      <varlistentry>
-		<term>--list-handlers</term>
-		<listitem><para>List compiled-in handlers and exit</para></listitem>
+		<term>--display-about</term>
+		<listitem><para>Display the about dialog</para></listitem>
+	      </varlistentry>
+
+	      <varlistentry>
+		<term>--update</term>
+		<listitem><para>Update the mail status</para></listitem>
+	      </varlistentry>
+
+	      <varlistentry>
+		<term>--report</term>
+		<listitem><para>Report the mail status</para></listitem>
 	      </varlistentry>
 
 	      <varlistentry>
@@ -243,118 +292,45 @@
     <sect2 id="when-start">
       <title>When You Start &app;</title>
       <para>
-	When you start <application>&app;</application>, the following
-	icon is displayed in the notification area (&aka; system
-	tray).
+	When you start <application>&app;</application>, it stays in
+	the background and monitors the status of your mailboxes.
+      </para>
+      <para>
+	When new mail arrives, an icon similar to the following one is
+	displayed in the notification area (&aka; system tray):
       </para>
-
       <figure id="no-mail-fig">
-	<title>&app; status icon</title>
+	<title>&app; when there is new mail</title>
 	<screenshot>
 	  <mediaobject> 
 	    <imageobject>
-	      <imagedata fileref="figures/no-mail.png" format="PNG"/>
+	      <imagedata fileref="figures/mail.png" format="PNG"/>
 	    </imageobject>
-	    <!-- EPS versions of the figures are not required at the moment. -->
-            <!-- 
-		    <imageobject>
-      		<imagedata fileref="figures/image.eps" format="EPS"/>
-    		    </imageobject>
-	    -->
 	    <textobject>
 	      <phrase>Shows the &app; status icon.</phrase>
 	    </textobject>
 	  </mediaobject>
 	</screenshot>
       </figure>
+      <para>
+	If an error is detected, the icon blinks.
+      </para>
+      <para>
+	Leaving your mouse over the icon will reveal more details
+	about the status of your mailboxes.
+      </para>
     </sect2>
   </sect1>
 
-  <sect1 id="usage"> 
-    <title>Usage</title>
-    <para>
-      &app; will monitor the state of your mailboxes and update its
-      status icon according to <xref linkend="icons" />.
-    </para>
-    <para>
-      You can add mailboxes from the
-      <link linkend="preferences">Preferences</link>, or by dragging a
-      file or folder into the icon.
-    </para>
-    <table frame="topbot" id="icons">
-      <title>&app; Icons</title>
-      <tgroup cols="2">
-	<thead>
-	  <row rowsep="1">
-	    <entry><para>Icon</para></entry>
-	    <entry><para>Meaning</para></entry>
-	  </row>
-	</thead>
-	<tbody>
-	  <row>
-	    <entry><screenshot>
-		<mediaobject> 
-		  <imageobject>
-		    <imagedata fileref="figures/no-mail.png" format="PNG"/>
-		  </imageobject>
-		  <textobject>
-		    <phrase>Shows the &app; status icon when you have no new mail.</phrase>
-		  </textobject>
-		</mediaobject>
-	      </screenshot></entry>
-	    <entry><para>you have no new mail</para></entry>
-	  </row>
-	  <row>
-	    <entry><screenshot>
-		<mediaobject> 
-		  <imageobject>
-		    <imagedata fileref="figures/no-mail-error.png" format="PNG"/>
-		  </imageobject>
-		  <textobject>
-		    <phrase>Shows the &app; status icon when you have no new mail and there are one or more errors.</phrase>
-		  </textobject>
-		</mediaobject>
-	      </screenshot></entry>
-	    <entry><para>you have no new mail and there are one or more errors</para></entry>
-	  </row>
-	  <row>
-	    <entry><screenshot>
-		<mediaobject> 
-		  <imageobject>
-		    <imagedata fileref="figures/mail.png" format="PNG"/>
-		  </imageobject>
-		  <textobject>
-		    <phrase>Shows the &app; status icon when you have new mail.</phrase>
-		  </textobject>
-		</mediaobject>
-	      </screenshot></entry>
-	    <entry><para>you have new mail</para></entry>
-	  </row>
-	  <row>
-	    <entry><screenshot>
-		<mediaobject> 
-		  <imageobject>
-		    <imagedata fileref="figures/mail-error.png" format="PNG"/>
-		  </imageobject>
-		  <textobject>
-		    <phrase>Shows the &app; status icon when you have new mail and there are one or more errors.</phrase>
-		  </textobject>
-		</mediaobject>
-	      </screenshot></entry>
-	    <entry><para>you have new mail and there are one or more errors</para></entry>
-	  </row>
-	</tbody>
-      </tgroup>
-    </table>
-  </sect1>
-
-  <sect1 id="preferences"> 
-    <title>Preferences</title> 
-    <para>To configure &app;, right-click the status icon and choose
-      <menuchoice> 
-	<guimenuitem>Preferences</guimenuitem> 
+  <sect1 id="properties"> 
+    <title>Properties</title> 
+    <para>To configure &app;, choose
+      <menuchoice>
+	<guimenu>Applications</guimenu>
+	<guisubmenu>Desktop Preferences</guisubmenu>
+	<guimenuitem>Mail Notification</guimenuitem> 
       </menuchoice>. The
-      <guilabel>Preferences</guilabel> dialog contains the following
+      <guilabel>Properties</guilabel> dialog contains the following
       settings:
     </para>
 
@@ -401,10 +377,10 @@
 	</listitem>
       </varlistentry>
       <varlistentry>
-	<term><guilabel>When clicked:</guilabel></term>
+	<term><guilabel>When double-clicked:</guilabel></term>
 	<listitem>
 	  <para>
-	    This is the command to execute when the icon is clicked.
+	    This is the command to execute when the icon is double-clicked.
 	  </para>
 	</listitem>
       </varlistentry>
@@ -421,7 +397,7 @@
 
     <variablelist>
       <varlistentry>
-	<term><guilabel>Type</guilabel></term>
+	<term><guilabel>Mailbox type</guilabel></term>
 	<listitem>
 	  <para>
 	    This is the type of the mailbox. If you select <guilabel>autodetect</guilabel>,
@@ -460,14 +436,15 @@
       </varlistentry>
 
       <varlistentry>
-	<term>When <guilabel>POP3</guilabel> is selected:</term>
+	<term>When <guilabel>POP3</guilabel> or <guilabel>IMAP</guilabel> is selected:</term>
 	<listitem>
 	  <variablelist>
 	    <varlistentry>
 	      <term><guilabel>Hostname</guilabel></term>
 	      <listitem>
 		<para>
-		  This is the hostname or IP address of the &pop3; server.
+		  This is the hostname or IP address of the &pop3; or
+		  &imap; server.
 		  <note>
 		    <para>
 		      Symbolic names aswell as IPv4 and IPv6 addresses
@@ -478,32 +455,71 @@
 	      </listitem>
 	    </varlistentry>
 	    <varlistentry>
-	      <term><guilabel>Port</guilabel></term>
+	      <term><guilabel>Username</guilabel></term>
 	      <listitem>
 		<para>
-		  This is the port number of the &pop3; server.
-		  <tip>
-		    <para>
-		      &pop3; servers usually listen on port 110.
-		    </para>
-		  </tip>
+		  This is your username on the &pop3; or &imap; server.
 		</para>
 	      </listitem>
 	    </varlistentry>
 	    <varlistentry>
-	      <term><guilabel>Username</guilabel></term>
+	      <term><guilabel>Password</guilabel></term>
 	      <listitem>
 		<para>
-		  This is your username on the &pop3; server.
+		  This is your password on the &pop3; or &imap; server.
 		</para>
+		<warning>
+		  <title>Security</title>
+		  <para>
+		    To avoid sending your password over the network in
+		    clear text, you must eitheir use a SSL connection
+		    or select a secure authentication mechanism.  See
+		    below for more details.
+		  </para>
+		</warning>
 	      </listitem>
 	    </varlistentry>
 	    <varlistentry>
-	      <term><guilabel>Password</guilabel></term>
+	      <term><guilabel>Connection type</guilabel> and <guilabel>Port</guilabel></term>
+	      <listitem>
+		<para>
+		  This is the type of connection to use and the port
+		  number to connect to.
+		</para>
+		<note>
+		  <para>
+		    The security considerations listed below do not
+		    apply if you select <guilabel>SSL</guilabel>.
+		  </para>
+		</note>
+	      </listitem>
+	    </varlistentry>
+	    <varlistentry>
+	      <term><guilabel>Authentication mechanism</guilabel></term>
 	      <listitem>
 		<para>
-		  This is your password on the &pop3; server.
+		  This is the authentication mechanism to use.
+		  If you select <guilabel>autodetect</guilabel>,
+		  all the authentication mechanisms supported by the &pop3;
+		  or &imap; server will be tried, in descending order of
+		  security. Otherwise, the selected mechanism (and
+		  <emphasis>only</emphasis> the selected mechanism) will
+		  be used.
 		</para>
+		<warning>
+		  <title>Security</title>
+		  <para>
+		    If <guilabel>autodetect</guilabel> is selected and
+		    secure authentication fails, your credentials may
+		    be sent over the network in clear text (unless you
+		    use a &ssl; connection).
+		  </para>
+		  <para>
+		    If this is a concern, select the appropriate
+		    secure authentication mechanism from the drop-down
+		    list.
+		  </para>
+		</warning>
 	      </listitem>
 	    </varlistentry>
 	  </variablelist>
@@ -511,6 +527,22 @@
       </varlistentry>
       
       <varlistentry>
+	<term>When <guilabel>IMAP</guilabel> is selected:</term>
+	<listitem>
+	  <variablelist>
+	    <varlistentry>
+	      <term><guilabel>Mailbox</guilabel></term>
+	      <listitem>
+		<para>
+		  This is the &imap; mailbox to use.
+		</para>
+	      </listitem>
+	    </varlistentry>
+	  </variablelist>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
 	<term>When <guilabel>Gmail</guilabel> is selected:</term>
 	<listitem>
 	  <variablelist>
@@ -536,32 +568,127 @@
     </variablelist>
   </sect1>
 
-  <sect1 id="automatic-notification">
-    <title>Automatic Notification</title>
+  <sect1 id="troubleshooting">
+    <title>Troubleshooting</title>
     <para>
-      Automatic notification is the ability to detect changes to a
-      mailbox without needing to poll it periodically. It allows the
-      status icon to be updated within seconds after a mailbox
-      receives new mail.
+      If &app; does not work as expected, remember that you can obtain
+      more details by leaving your mouse over its icon.
     </para>
     <para>
-      For automatic notification to be supported, &gnomevfs; must be compiled
-      with <ulink url="http://oss.sgi.com/projects/fam">FAM</ulink> support,
-      and FAM must be configured properly.
+      Additionally, a very efficient way to identify and solve
+      problems is to run &app; using the --enable-info option and
+      examine the output.
+      <warning>
+	<title>Security</title>
+	<para>
+	  The output of --enable-info may contain sensitive
+	  information such as passwords and session transcripts.
+	</para>
+      </warning>
     </para>
-    <para>
-      Refer to the
-      <citerefentry><refentrytitle>fam</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-      manual page for more details.
-    </para>
-    <note>
+  </sect1>
+  
+  <sect1 id="technical-information">
+    <title>Technical Information</title>
+    
+    <sect2 id="automatic-notification">
+      <title>Automatic Notification</title>
       <para>
-	Automatic notification is only supported for local mailboxes.
-	Mailboxes which do not support it will be checked periodically
-	according to the <link linkend="delay-between-mail-checks">Delay between mail checks</link>
-	setting.
+	Automatic notification is the ability to detect changes to a
+	mailbox without needing to poll it periodically. It allows the
+	status icon to be updated within seconds after a mailbox
+	receives new mail.
       </para>
-    </note>
+      <para>
+	For automatic notification to be supported, &gnomevfs; must be compiled
+	with <ulink url="http://oss.sgi.com/projects/fam" type="http">FAM</ulink> support,
+	and FAM must be configured properly.
+      </para>
+      <para>
+	Refer to the
+	<citerefentry><refentrytitle>fam</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+	manual page for more details.
+      </para>
+      <note>
+	<para>
+	  Automatic notification is only supported for local mailboxes.
+	  Mailboxes which do not support it will be checked periodically
+	  according to the <link linkend="delay-between-mail-checks">Delay between mail checks</link>
+	  setting.
+	</para>
+      </note>
+    </sect2>
+
+    <sect2>
+      <title>POP3 Implementation</title>
+      <para>
+	The &app; &pop3; implementation strictly conforms to
+	<ulink url="http://www.ietf.org/rfc/rfc1939.txt" type="http">RFC 1939</ulink>,
+	<ulink url="http://www.ietf.org/rfc/rfc2449.txt" type="http">RFC 2449</ulink> and
+	<ulink url="http://www.ietf.org/rfc/rfc1734.txt" type="http">RFC 1734</ulink>.
+      </para>
+      <para>
+	The AUTH, APOP and USER/PASS authentication mechanisms are
+	supported, and the LOGIN-DELAY capability is honoured.
+      </para>
+      <para>
+	The authentication logic can be represented with the following
+	pseudo-code:
+      </para>
+      <programlisting>if has-user-selected-mechanism then
+  if server-supports-user-selected-mechanism then
+    attempt authentication using user-selected-mechanism
+  endif
+else
+  if has-sasl-support and server-supports-sasl then
+    if is-ssl-connection then
+      sasl-mechanism = any
+    else
+      sasl-mechanism = any-non-plaintext
+    endif
+    attempt authentication using sasl-mechanism
+  endif
+  if authentication-failed and server-supports-apop then
+    attempt authentication using apop
+  endif
+  if authentication-failed then
+    attempt authentication using user/pass
+  endif
+endif</programlisting>
+    </sect2>
+
+    <sect2>
+      <title>IMAP Implementation</title>
+      <para>
+	The &app; &imap; implementation strictly conforms to
+	<ulink url="http://www.ietf.org/rfc/rfc3501.txt" type="http">RFC 3501</ulink>.
+      </para>
+      <para>
+	The AUTHENTICATE and LOGIN authentication mechanisms are
+	supported.
+      </para>
+      <para>
+	The authentication logic can be represented with the following
+	pseudo-code:
+      </para>
+      <programlisting>if has-user-selected-mechanism then
+  if server-supports-user-selected-mechanism then
+    attempt authentication using user-selected-mechanism
+  endif
+else
+  if has-sasl-support and server-supports-sasl then
+    if is-ssl-connection then
+      sasl-mechanism = any
+    else
+      sasl-mechanism = any-non-plaintext
+    endif
+    attempt authentication using sasl-mechanism
+  endif
+  if authentication-failed and server-supports-login then
+    attempt authentication using login
+  endif
+endif</programlisting>
+    </sect2>
   </sect1>
     
   <sect1 id="about">
@@ -576,7 +703,7 @@
       <title>Reporting Bugs and Other Feedback</title>
       <para>
 	Bug reports and feedback should be sent to Jean-Yves Lefort
-	(<email>jylefort@brutele.be></email>).
+	(<email>jylefort@brutele.be</email>).
       </para>
     </sect2>
 
@@ -603,8 +730,8 @@
 	<glossterm>Gmail</glossterm>
 	<glossdef>
 	  <para>
-	    A free webmail service operated by <ulink url="http://www.google.com">Google</ulink>.
-	    More information can be found on the <ulink url="http://gmail.google.com">Gmail web page</ulink>.
+	    A free webmail service operated by <ulink url="http://www.google.com" type="http">Google</ulink>.
+	    More information can be found on the <ulink url="http://gmail.google.com" type="http">Gmail web page</ulink>.
 	  </para>
 	</glossdef>
       </glossentry>
@@ -615,8 +742,28 @@
 	  <para>
 	    A filesystem abstraction library allowing applications to access
 	    local, remote and virtual resources in a transparent fashion.
-	    <ulink url="http://developer.gnome.org/doc/API/2.0/gnome-vfs-2.0">GnomeVFS</ulink>
-	    is part of the <ulink url="http://www.gnome.org">GNOME Desktop Environment</ulink>.
+	    <ulink url="http://developer.gnome.org/doc/API/2.0/gnome-vfs-2.0" type="http">GnomeVFS</ulink>
+	    is part of the <ulink url="http://www.gnome.org" type="http">GNOME Desktop Environment</ulink>.
+	  </para>
+	</glossdef>
+      </glossentry>
+    </glossdiv>
+
+    <glossdiv><title>I</title>
+      <glossentry>
+	<glossterm>IMAP</glossterm>
+	<glosssee otherterm="imap"/>
+      </glossentry>
+
+      <glossentry id="imap">
+	<glossterm>Internet Message Access Protocol</glossterm>
+	<acronym>IMAP</acronym>
+	<glossdef>
+	  <para>
+	    A protocol allowing a client to access and manipulate
+	    electronic mail messages on a server. &app; implements
+	    version 4rev1 of the protocol, as defined by
+	    <ulink url="http://www.ietf.org/rfc/rfc3501.txt" type="http">RFC 3501</ulink>.
 	  </para>
 	</glossdef>
       </glossentry>
@@ -627,7 +774,7 @@
 	<glossterm>Maildir</glossterm>
 	<glossdef>
 	  <para>
-	    A mailbox format popularized by the <ulink url="http://www.qmail.org">qmail</ulink> mail transfer agent.
+	    A mailbox format popularized by the <ulink url="http://www.qmail.org" type="http">qmail</ulink> mail transfer agent.
 	    Messages are stored in a structure of directories for reliability.
 	  </para>
 	</glossdef>
@@ -648,7 +795,7 @@
 	<glossdef>
 	  <para>
 	    A mailbox format popularized by the
-	    <ulink url="http://www.ics.uci.edu/~mh">MH</ulink> mail user agent.
+	    <ulink url="http://www.ics.uci.edu/~mh" type="http">MH</ulink> mail user agent.
 	    Messages are stored as separate files for flexibility and performance.
 	  </para>
 	</glossdef>
@@ -656,8 +803,14 @@
     </glossdiv>
 
     <glossdiv><title>P</title>
-      <glossentry id="pop3">
+      <glossentry>
 	<glossterm>POP3</glossterm>
+	<glosssee otherterm="pop3"/>
+      </glossentry>
+
+      <glossentry id="pop3">
+	<glossterm>Post Office Protocol Version 3</glossterm>
+	<acronym>POP3</acronym>
 	<glossdef>
 	  <para>
 	    A protocol allowing a workstation to dynamically access
@@ -669,11 +822,44 @@
     </glossdiv>
 
     <glossdiv><title>S</title>
+      <glossentry>
+	<glossterm>SASL</glossterm>
+	<glosssee otherterm="sasl"/>
+      </glossentry>
+
+      <glossentry id="ssl">
+	<glossterm>Secure Sockets Layer</glossterm>
+	<acronym>SSL</acronym>
+	<glossdef>
+	  <para>
+	    A protocol securing a connection through the use of
+	    cryptographic techniques.
+	  </para>
+	</glossdef>
+      </glossentry>
+
+      <glossentry id="sasl">
+	<glossterm>Simple Authentication and Security Layer</glossterm>
+	<acronym>SASL</acronym>
+	<glossdef>
+	  <para>
+	    A method for adding authentication support to
+	    connection-based protocols, as defined by
+	    <ulink url="http://www.ietf.org/rfc/rfc2222.txt" type="http">RFC 2222</ulink>.
+	  </para>
+	</glossdef>
+      </glossentry>
+
+      <glossentry>
+	<glossterm>SSL</glossterm>
+	<glosssee otherterm="ssl"/>
+      </glossentry>
+
       <glossentry id="sylpheed">
 	<glossterm>Sylpheed</glossterm>
 	<glossdef>
 	  <para>
-	    The mailbox format used by the <ulink url="http://sylpheed.good-day.net">Sylpheed</ulink>
+	    The mailbox format used by the <ulink url="http://sylpheed.good-day.net" type="http">Sylpheed</ulink>
 	    mail user agent. The Sylpheed format adds a binary cache to MH folders
 	    for faster indexing.
 	  </para>
@@ -682,11 +868,6 @@
     </glossdiv>
 
     <glossdiv><title>U</title>
-      <glossentry>
-	<glossterm>URI</glossterm>
-	<glosssee otherterm="uri"/>
-      </glossentry>
-
       <glossentry id="uri">
 	<glossterm>Uniform Resource Identifier</glossterm>
 	<acronym>URI</acronym>
@@ -698,6 +879,11 @@
 	  </para>
 	</glossdef>
       </glossentry>
+
+      <glossentry>
+	<glossterm>URI</glossterm>
+	<glosssee otherterm="uri"/>
+      </glossentry>
     </glossdiv>
   </glossary>
 </article>
diff --git a/help/Makefile.in b/help/Makefile.in
@@ -36,7 +36,8 @@ POST_UNINSTALL = :
 subdir = help
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/sasl2.m4 \
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -63,6 +64,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BONOBO_ACTIVATION_IDL = @BONOBO_ACTIVATION_IDL@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -87,10 +89,9 @@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
-GNET_CFLAGS = @GNET_CFLAGS@
-GNET_LIBS = @GNET_LIBS@
 GNOME_CFLAGS = @GNOME_CFLAGS@
 GNOME_LIBS = @GNOME_LIBS@
+GOB2 = @GOB2@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 G_ASSERTIONS = @G_ASSERTIONS@
@@ -123,6 +124,7 @@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
+LIBBONOBO_IDL = @LIBBONOBO_IDL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
@@ -133,6 +135,9 @@ MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+ORBIT_IDL = @ORBIT_IDL@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -145,6 +150,8 @@ POFILES = @POFILES@
 POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SASL_CFLAGS = @SASL_CFLAGS@
+SASL_LIBS = @SASL_LIBS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SOUP_CFLAGS = @SOUP_CFLAGS@
@@ -155,6 +162,8 @@ VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
 WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
 WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
+WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
+WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
 WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
 WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
 WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
@@ -162,7 +171,15 @@ WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
 WITH_MH_FALSE = @WITH_MH_FALSE@
 WITH_MH_TRUE = @WITH_MH_TRUE@
 WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_OR_IMAP_FALSE = @WITH_POP3_OR_IMAP_FALSE@
+WITH_POP3_OR_IMAP_TRUE = @WITH_POP3_OR_IMAP_TRUE@
 WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
+WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
+WITH_SASL_FALSE = @WITH_SASL_FALSE@
+WITH_SASL_TRUE = @WITH_SASL_TRUE@
+WITH_SSL_FALSE = @WITH_SSL_FALSE@
+WITH_SSL_TRUE = @WITH_SSL_TRUE@
 WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
 WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
 XGETTEXT = @XGETTEXT@
diff --git a/m4/Makefile.in b/m4/Makefile.in
@@ -36,7 +36,8 @@ POST_UNINSTALL = :
 subdir = m4
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/sasl2.m4 \
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -54,6 +55,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BONOBO_ACTIVATION_IDL = @BONOBO_ACTIVATION_IDL@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -78,10 +80,9 @@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
-GNET_CFLAGS = @GNET_CFLAGS@
-GNET_LIBS = @GNET_LIBS@
 GNOME_CFLAGS = @GNOME_CFLAGS@
 GNOME_LIBS = @GNOME_LIBS@
+GOB2 = @GOB2@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 G_ASSERTIONS = @G_ASSERTIONS@
@@ -114,6 +115,7 @@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
+LIBBONOBO_IDL = @LIBBONOBO_IDL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
@@ -124,6 +126,9 @@ MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+ORBIT_IDL = @ORBIT_IDL@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -136,6 +141,8 @@ POFILES = @POFILES@
 POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SASL_CFLAGS = @SASL_CFLAGS@
+SASL_LIBS = @SASL_LIBS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SOUP_CFLAGS = @SOUP_CFLAGS@
@@ -146,6 +153,8 @@ VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
 WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
 WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
+WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
+WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
 WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
 WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
 WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
@@ -153,7 +162,15 @@ WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
 WITH_MH_FALSE = @WITH_MH_FALSE@
 WITH_MH_TRUE = @WITH_MH_TRUE@
 WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_OR_IMAP_FALSE = @WITH_POP3_OR_IMAP_FALSE@
+WITH_POP3_OR_IMAP_TRUE = @WITH_POP3_OR_IMAP_TRUE@
 WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
+WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
+WITH_SASL_FALSE = @WITH_SASL_FALSE@
+WITH_SASL_TRUE = @WITH_SASL_TRUE@
+WITH_SSL_FALSE = @WITH_SSL_FALSE@
+WITH_SSL_TRUE = @WITH_SSL_TRUE@
 WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
 WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
 XGETTEXT = @XGETTEXT@
diff --git a/m4/openssl.m4 b/m4/openssl.m4
@@ -0,0 +1,62 @@
+# $Id: openssl.m4,v 1.1 2004/08/04 22:54:08 jylefort Exp $
+#
+# This file is part of Mail Notification.
+#
+# Copyright (c) 2004 Jean-Yves Lefort.
+#
+# As a special exception to the Mail Notification licensing terms,
+# Jean-Yves Lefort gives unlimited permission to copy, distribute and
+# modify this file.
+
+dnl AM_PATH_OPENSSL([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl
+AC_DEFUN([AM_PATH_OPENSSL],
+[OPENSSL_CFLAGS=""
+OPENSSL_LIBS="-lssl -lcrypto"
+
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
+LIBS="$LIBS $OPENSSL_LIBS"
+
+# the OPENSSL_VERSION_NUMBER format we use appeared in 0.9.5b
+openssl_min_version=ifelse([$1],, 0.9.5b, [$1])
+
+AC_MSG_CHECKING([for OpenSSL - version >= $openssl_min_version])
+AC_RUN_IFELSE([
+#include <openssl/opensslv.h>
+
+int main() {
+  int n;
+  char cpatch = 0;
+  int major, minor, fix, patch = 0;
+  int openssl_major, openssl_minor, openssl_fix, openssl_patch;
+
+  n = sscanf("$openssl_min_version", "%d.%d.%d%c", &major, &minor, &fix, &cpatch);
+  if (n < 3)
+    exit(1); /* bad version string */
+  if (cpatch)
+    patch = cpatch - 96; /* letter -> number */
+
+  if (OPENSSL_VERSION_NUMBER <
+      (major << 28) + (minor << 20) + (fix << 12) + (patch << 4))
+    exit(2); /* version too old */
+
+  exit(0);
+}
+], [found=yes], [found=no], [found=yes])
+AC_MSG_RESULT($found)
+
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+
+if test $found = yes; then
+	ifelse([$2],, :, [$2])
+else
+	OPENSSL_CFLAGS=""
+	OPENSSL_LIBS=""
+	ifelse([$3],, :, [$3])
+fi
+
+AC_SUBST(OPENSSL_CFLAGS)
+AC_SUBST(OPENSSL_LIBS)])
diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
@@ -0,0 +1,57 @@
+# $Id: sasl2.m4,v 1.2 2004/08/04 22:54:08 jylefort Exp $
+#
+# This file is part of Mail Notification.
+#
+# Copyright (c) 2004 Jean-Yves Lefort.
+#
+# As a special exception to the Mail Notification licensing terms,
+# Jean-Yves Lefort gives unlimited permission to copy, distribute and
+# modify this file.
+
+dnl AM_PATH_SASL2([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl
+AC_DEFUN([AM_PATH_SASL2],
+[SASL_CFLAGS=""
+SASL_LIBS="-lsasl2"
+
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+CFLAGS="$CFLAGS $SASL_CFLAGS"
+LIBS="$LIBS $SASL_LIBS"
+
+sasl2_min_version=ifelse([$1],, 2.0, [$1])
+
+AC_MSG_CHECKING([for Cyrus SASL - version >= $sasl2_min_version])
+AC_RUN_IFELSE([
+#include <sasl/sasl.h>
+
+int main() {
+  int major, minor, step = 0, patch = 0;
+  int sasl_major, sasl_minor, sasl_step, sasl_patch;
+
+  if (sscanf("$sasl2_min_version", "%d.%d.%d.%d", &major, &minor, &step, &patch) < 2)
+    exit(1); /* bad version string */
+
+  sasl_version_info(0, 0, &sasl_major, &sasl_minor, &sasl_step, &sasl_patch);
+  if ((sasl_major << 24) + (sasl_minor << 16) + (sasl_step << 8) + sasl_patch
+      < (major << 24) + (minor << 16) + (step << 8) + patch)
+    exit(2); /* version too old */
+
+  exit(0);
+}
+], [found=yes], [found=no], [found=yes])
+AC_MSG_RESULT($found)
+
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+
+if test $found = yes; then
+	ifelse([$2],, :, [$2])
+else
+	SASL_CFLAGS=""
+	SASL_LIBS=""
+	ifelse([$3],, :, [$3])
+fi
+
+AC_SUBST(SASL_CFLAGS)
+AC_SUBST(SASL_LIBS)])
diff --git a/po/POTFILES.in b/po/POTFILES.in
@@ -1,23 +1,66 @@
+data/GNOME_MailNotification_Automation.server.in.in
+data/mail-notification-properties.desktop.in
 data/mail-notification.desktop.in
 data/mail-notification.schemas.in
+data/mail-notification.soundlist.in
+src/MNAutomation.idl
 src/eggtrayicon.c
-src/mn-gmail-mailbox.c
-src/mn-mail-icon.c
+src/eggtrayicon.h
+src/mn-about-dialog.gob
+src/mn-auth-combo-box.gob
+src/mn-autodetect-mailbox-properties.gob
+src/mn-automation.gob
+src/mn-blinking-image.gob
+src/mn-client-session.c
+src/mn-client-session.h
+src/mn-conf.c
+src/mn-conf.h
+src/mn-dialog.c
+src/mn-dialog.h
+src/mn-gmail-mailbox-properties.gob
+src/mn-gmail-mailbox.gob
+src/mn-imap-mailbox-properties.gob
+src/mn-imap-mailbox.gob
+src/mn-mail-icon.gob
 src/mn-mailbox-properties-dialog.c
-src/mn-mailbox.c
-src/mn-mailboxes.c
-src/mn-maildir-mailbox.c
+src/mn-mailbox-properties-dialog.h
+src/mn-mailbox-properties-util.c
+src/mn-mailbox-properties-util.h
+src/mn-mailbox-properties.c
+src/mn-mailbox-properties.h
+src/mn-mailbox-view.gob
+src/mn-mailbox.gob
+src/mn-mailboxes.gob
+src/mn-maildir-mailbox.gob
 src/mn-main.c
-src/mn-mbox-mailbox.c
-src/mn-mh-mailbox.c
-src/mn-pending-mailbox.c
-src/mn-pop3-mailbox.c
-src/mn-preferences.c
-src/mn-sylpheed-mailbox.c
-src/mn-ui.c
-src/mn-unsupported-mailbox.c
+src/mn-mbox-mailbox.gob
+src/mn-md5.c
+src/mn-md5.h
+src/mn-mh-mailbox.gob
+src/mn-pending-mailbox.gob
+src/mn-pi-mailbox-properties.gob
+src/mn-pop3-mailbox-properties.gob
+src/mn-pop3-mailbox.gob
+src/mn-properties.c
+src/mn-properties.h
+src/mn-sasl.c
+src/mn-sasl.h
+src/mn-shell.gob
+src/mn-soup.c
+src/mn-soup.h
+src/mn-ssl.c
+src/mn-ssl.h
+src/mn-stock.c
+src/mn-stock.h
+src/mn-sylpheed-mailbox.gob
+src/mn-system-mailbox-properties.gob
+src/mn-unsupported-mailbox.gob
+src/mn-uri.c
+src/mn-uri.h
 src/mn-util.c
+src/mn-util.h
+src/mn-vfs.c
+src/mn-vfs.h
 ui/dialog.glade
 ui/mailbox-properties.glade
-ui/menu.glade
-ui/preferences.glade
+ui/properties.glade
diff --git a/po/fr.gmo b/po/fr.gmo
Binary files differ.
diff --git a/po/fr.po b/po/fr.po
@@ -8,10 +8,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: mail-notification 0.5.0\n"
+"Project-Id-Version: mail-notification 0.6.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-07-21 18:10+0200\n"
-"PO-Revision-Date: 2004-07-21 21:58+0200\n"
+"POT-Creation-Date: 2004-08-16 18:15+0200\n"
+"PO-Revision-Date: 2004-08-16 18:12+0200\n"
 "Last-Translator: Jean-Yves Lefort <jylefort@brutele.be>\n"
 "Language-Team: Jean-Yves Lefort <jylefort@brutele.be>\n"
 "MIME-Version: 1.0\n"
@@ -19,29 +19,44 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n>1;\n"
 
-#: data/mail-notification.desktop.in.h:1
-msgid "Get notified when new mail arrives"
-msgstr "Etre notifié lorsque du nouveau courrier arrive"
+#: data/GNOME_MailNotification_Automation.server.in.in.h:1
+msgid "Mail Notification automation"
+msgstr "automation Notification de Courrier"
 
-#: data/mail-notification.desktop.in.h:2 src/mn-main.c:112 src/mn-ui.c:262
+#: data/GNOME_MailNotification_Automation.server.in.in.h:2
+msgid "Mail Notification automation factory"
+msgstr "usine d'automation Notification de Courrier"
+
+#: data/mail-notification-properties.desktop.in.h:1
+msgid "Configure Mail Notification"
+msgstr "Configurer la Notification de Courrier"
+
+#: data/mail-notification-properties.desktop.in.h:2
+#: data/mail-notification.desktop.in.h:2
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:38
+#: src/mn-mail-icon.gob:160 src/mn-main.c:212
 msgid "Mail Notification"
 msgstr "Notification de Courrier"
 
-#: data/mail-notification.schemas.in.h:1
-msgid "Clicked command"
-msgstr "Commande du click sur l'îcone"
+#: data/mail-notification.desktop.in.h:1
+msgid "Get notified when new mail arrives"
+msgstr "Etre notifié lorsque du nouveau courrier arrive"
 
-#: data/mail-notification.schemas.in.h:2
+#: data/mail-notification.schemas.in.h:1
 msgid "Delay between mail checks (minutes part)."
 msgstr "Délai entre les vérifications de courrier (partie minutes)."
 
-#: data/mail-notification.schemas.in.h:3
+#: data/mail-notification.schemas.in.h:2
 msgid "Delay between mail checks (seconds part)."
 msgstr "Délai entre les vérifications de courrier (partie secondes)."
 
+#: data/mail-notification.schemas.in.h:3
+msgid "Double-clicked command"
+msgstr "Commande associée au double-click"
+
 #: data/mail-notification.schemas.in.h:4
-msgid "Height of preferences dialog"
-msgstr "Hauteur de la boîte de dialogue contenant les préférences"
+msgid "Height of properties dialog"
+msgstr "Hauteur de la boîte de dialogue contenant les propriétés"
 
 #: data/mail-notification.schemas.in.h:5
 msgid "Mailboxes list"
@@ -60,8 +75,8 @@ msgid "Run a command when new mail arrives"
 msgstr "Exécuter une commande lorsque du nouveau courrier arrive"
 
 #: data/mail-notification.schemas.in.h:9
-msgid "Run a command when the icon is clicked"
-msgstr "Exécuter une commande lorsque l'îcone est cliquée"
+msgid "Run a command when the icon is double-clicked"
+msgstr "Exécuter une commande lorsque l'îcone est double-cliquée"
 
 #: data/mail-notification.schemas.in.h:10
 msgid "Seconds between mail checks"
@@ -72,22 +87,20 @@ msgid "The command to run when new mail arrives."
 msgstr "La commande à exécuter lorsque du nouveau courrier arrive."
 
 #: data/mail-notification.schemas.in.h:12
-msgid "The command to run when the icon is clicked."
-msgstr "La commande à exécuter lorsque l'îcone est cliquée."
+msgid "The command to run when the icon is double-clicked."
+msgstr "La commande à exécuter lorsque l'îcone est double-cliquée."
 
 #: data/mail-notification.schemas.in.h:13
-msgid "The height of the preferences dialog in pixels."
-msgstr ""
-"La hauteur de la boîte de dialogue contenant les préférences en pixels."
+msgid "The height of the properties dialog in pixels."
+msgstr "La hauteur de la boîte de dialogue contenant les propriétés en pixels."
 
 #: data/mail-notification.schemas.in.h:14
 msgid "The list of mailboxes to monitor."
 msgstr "La liste des boîtes aux lettres à surveiller."
 
 #: data/mail-notification.schemas.in.h:15
-msgid "The width of the preferences dialog in pixels."
-msgstr ""
-"La largeur de la boîte de dialogue contenant les préférences en pixels."
+msgid "The width of the properties dialog in pixels."
+msgstr "La largeur de la boîte de dialogue contenant les propriétés en pixels."
 
 #: data/mail-notification.schemas.in.h:16
 msgid "Whether to run a command when new mail arrives or not."
@@ -95,12 +108,17 @@ msgstr ""
 "Si une commande doit être exécutée lorsque du nouveau courrier arrive ou pas."
 
 #: data/mail-notification.schemas.in.h:17
-msgid "Whether to run a command when the icon is clicked or not."
-msgstr "Si une commande doit être exécutée lorsque l'îcone est cliquée ou pas."
+msgid "Whether to run a command when the icon is double-clicked or not."
+msgstr ""
+"Si une commande doit être exécutée lorsque l'îcone est double-cliquée ou pas."
 
 #: data/mail-notification.schemas.in.h:18
-msgid "Width of preferences dialog"
-msgstr "Largeur de la boîte de dialogue contenant les préférences"
+msgid "Width of properties dialog"
+msgstr "Largeur de la boîte de dialogue contenant les propriétés"
+
+#: data/mail-notification.soundlist.in.h:2
+msgid "New Mail"
+msgstr "Nouveau Courrier"
 
 #: src/eggtrayicon.c:109
 msgid "Orientation"
@@ -110,167 +128,521 @@ msgstr "Orientation"
 msgid "The orientation of the tray."
 msgstr "L'orientation du plateau."
 
-#: src/mn-gmail-mailbox.c:165
+#: src/mn-about-dialog.gob:41
+msgid "A Mail Notification Icon"
+msgstr "Une Icône de Notification de Courrier"
+
+#: src/mn-about-dialog.gob:44
+msgid "Jean-Yves Lefort <jylefort@brutele.be>"
+msgstr "Jean-Yves Lefort <jylefort@brutele.be>"
+
+#: src/mn-auth-combo-box.gob:99 src/mn-autodetect-mailbox-properties.gob:36
+msgid "<span style=\"italic\">autodetect</span>"
+msgstr "<span style=\"italic\">autodétecter</span>"
+
+#: src/mn-autodetect-mailbox-properties.gob:67
+msgid "_Location:"
+msgstr "_Emplacement:"
+
+#: src/mn-autodetect-mailbox-properties.gob:73
+msgid "_Browse..."
+msgstr "_Parcourir..."
+
+#: src/mn-autodetect-mailbox-properties.gob:80
+msgid "The URI of the mailbox"
+msgstr "L'URI de la boîte aux lettres"
+
+#: src/mn-autodetect-mailbox-properties.gob:117
+msgid "Select a File or Folder"
+msgstr "Sélectionnez un Fichier ou Dossier"
+
+#: src/mn-blinking-image.gob:30
+msgid "Whether the image is blinking or not"
+msgstr "Si l'image clignote ou pas"
+
+#: src/mn-client-session.c:196 src/mn-client-session.c:203
+#, c-format
+msgid "unable to read from server: %s"
+msgstr "impossible de lire depuis le serveur: %s"
+
+#: src/mn-client-session.c:201
+msgid "unable to read from server: EOF"
+msgstr "impossible de lire depuis le serveur: EOF"
+
+#: src/mn-client-session.c:213
+#, c-format
+msgid "unable to decode data using SASL: %s"
+msgstr "impossible de décoder les données en utilisant SASL: %s"
+
+#: src/mn-client-session.c:287
+#, c-format
+msgid "resolving %s"
+msgstr "résolution de %s en cours"
+
+#: src/mn-client-session.c:297
+#, c-format
+msgid "unable to resolve %s: %s"
+msgstr "impossible de résoudre %s: %s"
+
+#: src/mn-client-session.c:334
+#, c-format
+msgid "%s: unsupported address family"
+msgstr "%s: famille d'adresse non prise en charge"
+
+#: src/mn-client-session.c:341
+#, c-format
+msgid "%s: unable to create socket: %s"
+msgstr "%s: impossible de créer un soquet: %s"
+
+#: src/mn-client-session.c:345
+#, c-format
+msgid "connecting to %s (%s) port %i"
+msgstr "connection à %s (%s) port %i en cours"
+
+#: src/mn-client-session.c:348
+#, c-format
+msgid "unable to connect: %s"
+msgstr "impossible de se connecter: %s"
+
+#: src/mn-client-session.c:353
+msgid "connected successfully"
+msgstr "connecté avec succès"
+
+#. if reached, we couldn't find a working address
+#: src/mn-client-session.c:359
+#, c-format
+msgid "unable to connect to %s"
+msgstr "impossible de se connecter à %s"
+
+#: src/mn-client-session.c:375
+#, c-format
+msgid "unable to initialize the OpenSSL library: %s"
+msgstr "impossible d'initialiser la bibliothèque OpenSSL: %s"
+
+#: src/mn-client-session.c:383
+#, c-format
+msgid "unable to create a SSL object: %s"
+msgstr "impossible de créer un objet SSL: %s"
+
+#: src/mn-client-session.c:389
+#, c-format
+msgid "unable to set the SSL file descriptor: %s"
+msgstr "impossible de spécifier le descripteur de fichier SSL: %s"
+
+#: src/mn-client-session.c:444
+#, c-format
+msgid "response \"%s\" is not valid in current context"
+msgstr "la réponse \"%s\" n'est pas valable dans le contexte actuel"
+
+#: src/mn-client-session.c:470
+#, c-format
+msgid "unable to parse response \"%s\""
+msgstr "impossible d'interpréter la réponse \"%s\""
+
+#: src/mn-client-session.c:517
+#, c-format
+msgid "unable to encode data using SASL: %s"
+msgstr "impossible d'encoder les données en utilisant SASL: %s"
+
+#: src/mn-client-session.c:546 src/mn-client-session.c:553
+#, c-format
+msgid "unable to write to server: %s"
+msgstr "impossible d'écrire vers le serveur: %s"
+
+#: src/mn-client-session.c:551
+msgid "unable to write to server: EOF"
+msgstr "impossible d'écrire vers le serveur: EOF"
+
+#: src/mn-client-session.c:583
+#, c-format
+msgid "unable to encode Base64: %s"
+msgstr "impossible d'encoder en Base64: %s"
+
+#: src/mn-client-session.c:686
+#, c-format
+msgid "unable to initialize the SASL library: %s"
+msgstr "impossible d'initialiser la bibliothèque SASL: %s"
+
+#: src/mn-client-session.c:695
+#, c-format
+msgid "unable to retrieve local address of socket: %s"
+msgstr "impossible d'obtenir l'adresse locale du soquet: %s"
+
+#: src/mn-client-session.c:701
+#, c-format
+msgid "unable to retrieve remote address of socket: %s"
+msgstr "impossible d'obtenir l'adresse distante du soquet: %s"
+
+#: src/mn-client-session.c:735
+#, c-format
+msgid "warning: unable to set SASL security properties: %s"
+msgstr ""
+"avertissement: impossible de spécifier les propriétés de sécurité SASL: %s"
+
+#: src/mn-client-session.c:774
+msgid ""
+"unable to start SASL authentication: SASL asked for something we did not know"
+msgstr ""
+"impossible de démarrer l'authentification SASL: SASL a demandé quelque chose "
+"que nous ne connaissions pas"
+
+#: src/mn-client-session.c:778
+#, c-format
+msgid "unable to start SASL authentication: %s"
+msgstr "impossible de démarrer l'authentification SASL: %s"
+
+#: src/mn-client-session.c:782
+#, c-format
+msgid "unable to create a SASL connection: %s"
+msgstr "impossible de créer une connection SASL: %s"
+
+#: src/mn-client-session.c:832
+msgid "SASL asked for something we did not know, aborting SASL authentication"
+msgstr ""
+"SASL a demandé quelque chose que nous ne connaissions pas, annulation de "
+"l'authentification SASL"
+
+#: src/mn-client-session.c:836
+#, c-format
+msgid "%s, aborting SASL authentication"
+msgstr "%s, annulation de l'authentification SASL"
+
+#. compliance error
+#: src/mn-client-session.c:841
+#, c-format
+msgid "unable to decode Base64 input from server: %s"
+msgstr "impossible de décoder l'entrée Base64 du serveur: %s"
+
+#: src/mn-client-session.c:844
+msgid ""
+"the server sent a SASL challenge, but there was a pending initial SASL "
+"client response"
+msgstr ""
+"le serveur a envoyé un défi SASL, mais il y avait une réponse client SASL "
+"initiale en attente"
+
+#: src/mn-client-session.c:858
+msgid ""
+"the server did not send a SASL challenge, but there was no pending initial "
+"SASL client response"
+msgstr ""
+"le serveur n'a pas envoyé de défi SASL, mais il n'y avait pas de réponse "
+"client SASL initiale en attente"
+
+#: src/mn-client-session.c:881
+#, c-format
+msgid "a SASL security layer of strength factor %i is now active"
+msgstr ""
+"une couche de sécurité SASL de facteur de force %i est maintenant active"
+
+#. a security layer is active but we can't retrieve maxoutbuf -> fatal
+#: src/mn-client-session.c:886
+#, c-format
+msgid "unable to get SASL_MAXOUTBUF property: %s"
+msgstr "impossible d'obtenir la propriété SASL_MAXOUTBUF: %s"
+
+#: src/mn-client-session.c:892
+#, c-format
+msgid "warning: unable to get SASL_SSF property: %s"
+msgstr "avertissement: impossible d'obtenir la propriété SASL_SSF: %s"
+
+#: src/mn-dialog.c:108
+msgid "A fatal error has occurred in Mail Notification"
+msgstr "Une erreur fatale s'est produite dans la Notification de Courrier"
+
+#: src/mn-gmail-mailbox-properties.gob:78
+msgid "Your Gmail username"
+msgstr "Votre nom d'utilisateur Gmail"
+
+#: src/mn-gmail-mailbox-properties.gob:79
+msgid "Your Gmail password"
+msgstr "Votre mot de passe Gmail"
+
+#: src/mn-gmail-mailbox.gob:65
 msgid "unable to parse Gmail URI"
 msgstr "impossible d'interpréter l'URI Gmail"
 
-#: src/mn-gmail-mailbox.c:261
-#, c-format
-msgid "logging into Gmail as user %s"
-msgstr "ouverture de la session Gmail en tant que %s"
+#: src/mn-gmail-mailbox.gob:180
+msgid "logging in"
+msgstr "ouverture de session en cours"
 
-#: src/mn-gmail-mailbox.c:277 src/mn-gmail-mailbox.c:356
+#: src/mn-gmail-mailbox.gob:194 src/mn-gmail-mailbox.gob:233
+#: src/mn-gmail-mailbox.gob:266 src/mn-gmail-mailbox.gob:370
 #, c-format
 msgid "unable to transfer data: %s"
 msgstr "impossible de transférer des données: %s"
 
-#: src/mn-gmail-mailbox.c:283
-#, c-format
-msgid "successfully logged into Gmail as user %s"
-msgstr "ouverture de la session Gmail en tant que %s effectuée avec succès"
-
-#: src/mn-gmail-mailbox.c:288
+#: src/mn-gmail-mailbox.gob:219 src/mn-gmail-mailbox.gob:252
+#: src/mn-gmail-mailbox.gob:286
 msgid "login failed"
 msgstr "l'ouverture de session a échoué"
 
-#: src/mn-gmail-mailbox.c:341
-#, c-format
-msgid "searching for unread mail in %s"
-msgstr "recherche du courrier non lu dans %s"
+#: src/mn-gmail-mailbox.gob:280
+msgid "successfully logged in"
+msgstr "ouverture de session effectuée avec succès"
+
+#: src/mn-gmail-mailbox.gob:358
+msgid "searching for unread mail"
+msgstr "recherche du courrier non lu"
 
-#: src/mn-gmail-mailbox.c:363
+#: src/mn-gmail-mailbox.gob:377
 msgid "unable to parse Gmail data"
 msgstr "impossible d'interpréter les données Gmail"
 
-#: src/mn-mail-icon.c:130
-msgid "You have no new mail"
-msgstr "Vous n'avez pas de courrier"
+#: src/mn-imap-mailbox-properties.gob:92
+msgid "Mailbox:"
+msgstr "Boîte aux lettres:"
 
-#: src/mn-mailbox-properties-dialog.c:155
+#: src/mn-imap-mailbox-properties.gob:96
+msgid "in_box"
+msgstr "_boîte de réception"
+
+#: src/mn-imap-mailbox-properties.gob:107
+msgid "oth_er:"
+msgstr "autr_e:"
+
+#: src/mn-imap-mailbox-properties.gob:121
+msgid "The hostname or IP address of the IMAP server"
+msgstr "Le nom d'hôte ou adresse IP du serveur IMAP"
+
+#: src/mn-imap-mailbox-properties.gob:122
+msgid "Your username on the IMAP server"
+msgstr "Votre nom d'utilisateur sur le serveur IMAP"
+
+#: src/mn-imap-mailbox-properties.gob:123
+msgid "Your password on the IMAP server"
+msgstr "Votre mot de passe sur le serveur IMAP"
+
+#: src/mn-imap-mailbox-properties.gob:124
+#: src/mn-imap-mailbox-properties.gob:125
+msgid "The port number of the IMAP server"
+msgstr "Le numéro de port du serveur IMAP"
+
+#: src/mn-imap-mailbox-properties.gob:126
+msgid "The mailbox name"
+msgstr "Le nom de la boîte aux lettres"
+
+#: src/mn-imap-mailbox.gob:124 src/mn-pop3-mailbox.gob:133
+msgid "SSL support has not been compiled in"
+msgstr "le support SSL n'a pas été inclus lors de la compilation"
+
+#: src/mn-imap-mailbox.gob:128
+msgid "unable to parse IMAP URI"
+msgstr "impossible d'interpréter l'URI IMAP"
+
+#: src/mn-imap-mailbox.gob:195
+msgid "server did not send capabilities"
+msgstr "le serveur n'a pas envoyé ses possibilités"
+
+#: src/mn-imap-mailbox.gob:267
+msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
+msgstr ""
+"le serveur a annoncé LOGINDISABLED, pas d'utilisation de l'authentification "
+"LOGIN"
+
+#: src/mn-imap-mailbox.gob:268
+msgid "unable to login"
+msgstr "impossible d'ouvrir la session"
+
+#. compliance error
+#: src/mn-imap-mailbox.gob:319
+msgid "server did not send status"
+msgstr "le serveur n'a pas envoyé de status"
+
+#: src/mn-imap-mailbox.gob:537 src/mn-pop3-mailbox.gob:715
+msgid "unknown server error"
+msgstr "erreur serveur inconnue"
+
+#: src/mn-imap-mailbox.gob:603 src/mn-pop3-mailbox.gob:645
+msgid ""
+"a SASL authentication mechanism was selected but SASL support has not been "
+"compiled in"
+msgstr ""
+"un méchanisme d'authentification SASL a été sélectionné mais le support SASL "
+"n'a pas été inclus lors de la compilation"
+
+#: src/mn-imap-mailbox.gob:611 src/mn-pop3-mailbox.gob:657
+#, c-format
+msgid "unknown authentication mechanism \"%s\""
+msgstr "méchanisme d'authentification inconnu \"%s\""
+
+#: src/mn-imap-mailbox.gob:629
+msgid "falling back to IMAP LOGIN authentication"
+msgstr "rétrogradation vers l'authentification IMAP LOGIN"
+
+#: src/mn-imap-mailbox.gob:633 src/mn-pop3-mailbox.gob:691
+msgid "authentication failed"
+msgstr "l'authentification a échoué"
+
+#: src/mn-mail-icon.gob:81
+msgid "_Update"
+msgstr "_Mettre à Jour"
+
+#: src/mn-mail-icon.gob:87
+msgid "R_emove From Notification Area"
+msgstr "_Enlever de l'Aire de Notification"
+
+#: src/mn-mail-icon.gob:172
+#, c-format
+msgid "_Run %s"
+msgstr "_Exécuter %s"
+
+#: src/mn-mail-icon.gob:173
+msgid "_Run Default Action"
+msgstr "_Exécuter l'Action par Défaut"
+
+#: src/mn-mailbox-properties-dialog.c:109
 msgid "Add a Mailbox"
 msgstr "Ajouter une Boîte aux Lettres"
 
-#: src/mn-mailbox-properties-dialog.c:182
-msgid "autodetect"
-msgstr "détecter automatiquement"
-
-#: src/mn-mailbox-properties-dialog.c:394
+#: src/mn-mailbox-properties-dialog.c:331
 #, c-format
 msgid "%s Properties"
 msgstr "Propriétés de %s"
 
-#: src/mn-mailbox-properties-dialog.c:580
-msgid "Select a File or Folder"
-msgstr "Sélectionnez un Fichier ou Dossier"
+#: src/mn-mailbox-properties-util.c:75
+msgid "_Username:"
+msgstr "_Nom d'utilisateur:"
+
+#: src/mn-mailbox-properties-util.c:79
+msgid "_Password:"
+msgstr "_Mot de passe:"
+
+#: src/mn-mailbox-properties-util.c:146
+msgid "Connection type:"
+msgstr "Type de connection:"
+
+#: src/mn-mailbox-properties-util.c:153
+msgid "Port:"
+msgstr "Port:"
+
+#: src/mn-mailbox-properties-util.c:180
+msgid "_Authentication mechanism:"
+msgstr "Méchanisme d'_authentification:"
+
+#: src/mn-mailbox-properties.c:63
+msgid "Label"
+msgstr "Etiquette"
+
+#: src/mn-mailbox-properties.c:64
+msgid "The marked up text to show in the type combo box"
+msgstr "Le texte marqué à afficher dans la boîte de type"
 
-#: src/mn-mailbox.c:199
-msgid "URI"
-msgstr "URI"
+#: src/mn-mailbox-properties.c:69
+msgid "Size group"
+msgstr "Groupe de taille"
 
-#: src/mn-mailbox.c:200
+#: src/mn-mailbox-properties.c:70
+msgid "A GtkSizeGroup for aligning control labels"
+msgstr "Un GtkSizeGroup pour aligner les étiquettes des contrôles"
+
+#: src/mn-mailbox-properties.c:75
+msgid "Complete"
+msgstr "Complet"
+
+#: src/mn-mailbox-properties.c:76
+msgid "Whether the properties are completely filled or not"
+msgstr "Si les propriétés sont complètement remplies ou pas"
+
+#: src/mn-mailbox-view.gob:91
+msgid "Unable to add mailbox"
+msgstr "Impossible d'ajouter la boîte aux lettres"
+
+#: src/mn-mailbox-view.gob:91
+msgid "The mailbox is already in the list."
+msgstr "La boîte aux lettres est déjà dans la liste."
+
+#: src/mn-mailbox-view.gob:283
+msgid "Mailbox"
+msgstr "Boîte aux lettres"
+
+#: src/mn-mailbox-view.gob:297
+msgid "Format"
+msgstr "Format"
+
+#: src/mn-mailbox.gob:88
 msgid "The mailbox URI"
 msgstr "L'URI de la boîte aux lettres"
 
-#: src/mn-mailbox.c:206
-msgid "Name"
-msgstr "Nom"
-
-#: src/mn-mailbox.c:207
+#: src/mn-mailbox.gob:98
 msgid "The mailbox human-readable name"
 msgstr "Le nom, lisible par un humain, de la boîte aux lettres"
 
-#: src/mn-mailbox.c:213
-msgid "Automatic"
-msgstr "Automatique"
-
-#: src/mn-mailbox.c:214
+#: src/mn-mailbox.gob:102
 msgid "Whether the mailbox has to be manually checked or not"
 msgstr "Si la boîte aux lettres doit être vérifiée manuellement ou pas"
 
-#: src/mn-mailbox.c:220
-msgid "Has new"
-msgstr "A du nouveau"
-
-#: src/mn-mailbox.c:221
+#: src/mn-mailbox.gob:107
 msgid "Whether the mailbox has new mail or not"
 msgstr "Si la boîte aux lettres a du nouveau courrier ou pas"
 
-#: src/mn-mailbox.c:227
-msgid "Error"
-msgstr "Erreur"
-
-#: src/mn-mailbox.c:228
-msgid "The mailbox error if any"
+#: src/mn-mailbox.gob:112
+msgid "The mailbox error, if any"
 msgstr "L'erreur de la boîte aux lettres si il y en a une"
 
-#: src/mn-mailbox.c:254
-#, c-format
-msgid "unable to cancel monitoring of %s: %s"
-msgstr "impossible d'annuler la surveillance de %s: %s"
-
-#: src/mn-mailbox.c:443
+#: src/mn-mailbox.gob:218
 msgid "does not exist"
 msgstr "n'existe pas"
 
-#: src/mn-mailbox.c:460
+#: src/mn-mailbox.gob:255
 msgid "unknown format"
 msgstr "format inconnu"
 
-#: src/mn-mailbox.c:553
+#: src/mn-mailbox.gob:316
 #, c-format
 msgid "unable to monitor %s: %s"
 msgstr "impossible de surveiller %s: %s"
 
-#: src/mn-mailbox.c:567
+#: src/mn-mailbox.gob:330
 #, c-format
 msgid ""
 "As a fallback, they will be checked every %i second (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked every %i seconds (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgstr[0] ""
 "Comme solution de secours, elles seront vérifiées toutes les %i seconde (ce "
-"délai est configurable depuis les Préférences)."
+"délai est configurable depuis les Propriétés)."
 msgstr[1] ""
 "Comme solution de secours, elles seront vérifiées toutes les %i secondes (ce "
-"délai est configurable depuis les Préférences)."
+"délai est configurable depuis les Propriétés)."
 
-#: src/mn-mailbox.c:578
+#: src/mn-mailbox.gob:341
 #, c-format
 msgid ""
 "As a fallback, they will be checked every %i minute (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked every %i minutes (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgstr[0] ""
 "Comme solution de secours, elles seront vérifiées toutes les %i minutes (ce "
-"délai est configurable depuis les Préférences)."
+"délai est configurable depuis les Propriétés)."
 msgstr[1] ""
 "Comme solution de secours, elles seront vérifiées toutes les %i minutes (ce "
-"délai est configurable depuis les Préférences)."
+"délai est configurable depuis les Propriétés)."
 
-#: src/mn-mailbox.c:589
+#: src/mn-mailbox.gob:352
 #, c-format
 msgid ""
 "As a fallback, they will be checked approximately every %i minute (this "
-"delay is configurable from the Preferences Dialog)."
+"delay is configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked approximately every %i minutes (this "
-"delay is configurable from the Preferences Dialog)."
+"delay is configurable from the Properties Dialog)."
 msgstr[0] ""
 "Comme solution de secours, elles seront vérifiées approximativement toutes "
-"les %i minute (ce délai est configurable depuis les Préférences)."
+"les %i minute (ce délai est configurable depuis les Propriétés)."
 msgstr[1] ""
 "Comme solution de secours, elles seront vérifiées approximativement toutes "
-"les %i minutes (ce délai est configurable depuis les Préférences)."
+"les %i minutes (ce délai est configurable depuis les Propriétés)."
 
-#: src/mn-mailbox.c:603
-msgid "A monitoring error has occurred."
-msgstr "Une erreur de surveillance s'est produite."
+#: src/mn-mailbox.gob:366
+msgid "A monitoring error has occurred"
+msgstr "Une erreur de surveillance s'est produite"
 
-#: src/mn-mailbox.c:604
+#: src/mn-mailbox.gob:367
 #, c-format
 msgid ""
 "Mail Notification was unable to enable automatic notification for one or "
@@ -279,369 +651,389 @@ msgstr ""
 "Notification de Courrier n'a pas été en mesure d'activer la notification "
 "automatique pour une ou plusieures boîtes aux lettres. %s"
 
-#: src/mn-mailboxes.c:133
+#: src/mn-mailboxes.gob:130
+#, c-format
+msgid "%s is unsupported: %s"
+msgstr "%s n'est pas pris en charge: %s"
+
+#: src/mn-mailboxes.gob:157
 #, c-format
 msgid "%s has new mail"
 msgstr "%s a du nouveau courrier"
 
-#: src/mn-mailboxes.c:133
+#: src/mn-mailboxes.gob:157
 #, c-format
 msgid "%s has no new mail"
 msgstr "%s n'a pas de nouveau courrier"
 
-#: src/mn-mailboxes.c:143
+#: src/mn-mailboxes.gob:173
 #, c-format
 msgid "%s reported an error: %s"
 msgstr "%s a indiqué une erreur: %s"
 
-#: src/mn-maildir-mailbox.c:226 src/mn-sylpheed-mailbox.c:209
+#: src/mn-maildir-mailbox.gob:97
 #, c-format
-msgid "error while reading folder: %s"
-msgstr "erreur lors de la lecture du dossier: %s"
+msgid "unable to open folder \"new\": %s"
+msgstr "impossible d'ouvrir le dossier \"new\": %s"
+
+#: src/mn-maildir-mailbox.gob:122
+#, c-format
+msgid "error while reading folder \"new\": %s"
+msgstr "erreur lors de la lecture du dossier \"new\": %s"
+
+#: src/mn-main.c:86
+#, c-format
+msgid "Compiled-in mailbox backends: %s\n"
+msgstr "Prises en charge de boîtes aux lettres disponibles: %s\n"
 
-#: src/mn-main.c:49
-msgid "Compiled in handlers:\n"
-msgstr "Prises en charge disponibles:\n"
+#: src/mn-main.c:104
+#, c-format
+msgid "Compiled-in features: %s\n"
+msgstr "Fonctionnalités disponibles: %s\n"
 
-#: src/mn-main.c:83
+#: src/mn-main.c:133
 msgid "Enable informational output"
 msgstr "Activer la sortie informationelle"
 
-#: src/mn-main.c:92
-msgid "List compiled-in handlers and exit"
-msgstr "Afficher les prises en charge disponibles et quitter"
+#: src/mn-main.c:142
+msgid "List compiled-in features and exit"
+msgstr "Afficher les fonctionnalités disponibles et quitter"
 
-#: src/mn-main.c:124
-msgid "unable to initialize GnomeVFS"
-msgstr "impossible d'initialiser GnomeVFS"
+#: src/mn-main.c:151
+msgid "Display the properties dialog"
+msgstr "Afficher la boîte de dialogue contenant les propriétés"
 
-#: src/mn-mbox-mailbox.c:339
-#, c-format
-msgid "unable to get mailbox information: %s"
-msgstr "impossible d'obtenir les informations de la boîte aux lettres: %s"
+#: src/mn-main.c:160
+msgid "Display the about dialog"
+msgstr "Afficher la boîte de dialogue \"à propos\""
 
-#: src/mn-mbox-mailbox.c:364
-#, c-format
-msgid "unable to open mailbox: %s"
-msgstr "impossible d'ouvrir la boîte aux lettres: %s"
+#: src/mn-main.c:169
+msgid "Update the mail status"
+msgstr "Mettre à jour le status du courrier"
+
+#: src/mn-main.c:178
+msgid "Report the mail status"
+msgstr "Rapporter le status du courrier"
+
+#.
+#. * We can't use mn_error_dialog() because gtk_init() has not been
+#. * called yet.
+#.
+#: src/mn-main.c:204
+msgid "multi-threading is not available"
+msgstr "le multi-threading n'est pas disponible"
+
+#: src/mn-main.c:244
+msgid "Unable to initialize the GnomeVFS library."
+msgstr "Impossible d'initialiser la bibliothèque GnomeVFS."
+
+#: src/mn-main.c:252
+msgid ""
+"Bonobo could not locate the automation object. Please check your Mail "
+"Notification installation."
+msgstr ""
+"Bonobo n'a pas pu localiser l'objet automation. Veuillez vérifier votre "
+"installation de la Notification de Courrier."
+
+#: src/mn-main.c:263
+msgid "updating the mail status"
+msgstr "mise à jour du status du courrier"
+
+#: src/mn-main.c:279
+msgid "Mail Notification is already running"
+msgstr "La Notification de Courrier est déjà en cours d'exécution"
+
+#: src/mn-main.c:286
+msgid ""
+"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
+"Please check your Mail Notification installation."
+msgstr ""
+"Bonobo n'a pas pu localiser le fichier GNOME_MailNotification_Automation."
+"server. Veuillez vérifier votre installation de la Notification de Courrier."
+
+#: src/mn-main.c:290
+msgid ""
+"Bonobo was unable to register the automation server. Please check your Mail "
+"Notification installation."
+msgstr ""
+"Bonobo n'a pas été en mesure d'inscrire le serveur d'automation. Veuillez "
+"vérifier votre installation de la Notification de Courrier."
 
-#: src/mn-mbox-mailbox.c:401
+#: src/mn-mbox-mailbox.gob:165
 #, c-format
 msgid "error while reading mailbox: %s"
 msgstr "erreur lors de la lecture de la boîte aux lettres: %s"
 
-#: src/mn-mbox-mailbox.c:417
+#: src/mn-mbox-mailbox.gob:173
 #, c-format
-msgid "unable to close mailbox: %s"
-msgstr "impossible de fermer la boîte aux lettres: %s"
-
-#: src/mn-mh-mailbox.c:185
-#, c-format
-msgid "unable to open .mh_sequences: %s"
-msgstr "impossible d'ouvrir .mh_sequences: %s"
+msgid "unable to open mailbox: %s"
+msgstr "impossible d'ouvrir la boîte aux lettres: %s"
 
-#: src/mn-mh-mailbox.c:215
+#: src/mn-mh-mailbox.gob:111
 #, c-format
 msgid "error while reading .mh_sequences: %s"
 msgstr "erreur lors de la lecture de .mh_sequences: %s"
 
-#: src/mn-mh-mailbox.c:231
+#: src/mn-mh-mailbox.gob:119
 #, c-format
-msgid "unable to close .mh_sequences: %s"
-msgstr "impossible de fermer .mh_sequences: %s"
+msgid "unable to open .mh_sequences: %s"
+msgstr "impossible d'ouvrir .mh_sequences: %s"
 
-#: src/mn-pending-mailbox.c:64
-msgid "detecting..."
-msgstr "en cours de détection..."
+#: src/mn-pending-mailbox.gob:33
+msgid "detecting"
+msgstr "en cours de détection"
 
-#: src/mn-pop3-mailbox.c:164
-msgid "unable to parse POP3 URI"
-msgstr "impossible d'interpréter l'URI POP3"
+#: src/mn-pi-mailbox-properties.gob:75
+msgid "_Hostname:"
+msgstr "Nom d'_hôte:"
 
-#: src/mn-pop3-mailbox.c:190
-#, c-format
-msgid "connecting to POP3 server %s"
-msgstr "connection au server POP3 %s en cours"
+#: src/mn-pi-mailbox-properties.gob:93
+msgid "_Details"
+msgstr "_Détails"
 
-#: src/mn-pop3-mailbox.c:227
-#, c-format
-msgid "successfully connected to %s"
-msgstr "connecté à %s"
+#: src/mn-pi-mailbox-properties.gob:105
+msgid "sta_ndard"
+msgstr "sta_ndard"
 
-#: src/mn-pop3-mailbox.c:233
-msgid "unable to connect to server"
-msgstr "impossible de se connecter au serveur"
+#: src/mn-pi-mailbox-properties.gob:115
+msgid "_SSL"
+msgstr "_SSL"
 
-#: src/mn-pop3-mailbox.c:238
-msgid "connection to server unexpectedly closed"
-msgstr "la connection au serveur s'est close de manière inattendue"
+#: src/mn-pop3-mailbox-properties.gob:84
+msgid "The hostname or IP address of the POP3 server"
+msgstr "Le nom d'hôte ou adresse IP du serveur POP3"
 
-#: src/mn-pop3-mailbox.c:277
-#, c-format
-msgid "invalid STAT reply \"%s\""
-msgstr "réponse STAT \"%s\" invalide"
+#: src/mn-pop3-mailbox-properties.gob:85
+msgid "Your username on the POP3 server"
+msgstr "Votre nom d'utilisateur sur le serveur POP3"
+
+#: src/mn-pop3-mailbox-properties.gob:86
+msgid "Your password on the POP3 server"
+msgstr "Votre mot de passe sur le serveur POP3"
+
+#: src/mn-pop3-mailbox-properties.gob:87 src/mn-pop3-mailbox-properties.gob:88
+msgid "The port number of the POP3 server"
+msgstr "Le numéro de port du serveur POP3"
+
+#: src/mn-pop3-mailbox.gob:137
+msgid "unable to parse POP3 URI"
+msgstr "impossible d'interpréter l'URI POP3"
 
-#: src/mn-pop3-mailbox.c:296
-msgid "unknown error"
-msgstr "erreur inconnue"
+#: src/mn-pop3-mailbox.gob:267
+msgid "invalid arguments for the LOGIN-DELAY capability"
+msgstr "arguments invalides pour la possibilité LOGIN-DELAY"
 
-#: src/mn-pop3-mailbox.c:317
+#: src/mn-pop3-mailbox.gob:495
 #, c-format
-msgid "invalid reply \"%s\""
-msgstr "réponse \"%s\" invalide"
+msgid "honouring LOGIN-DELAY, sleeping for %i second"
+msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/mn-preferences.c:195
-msgid "Mailbox"
-msgstr "Boîte aux lettres"
+#: src/mn-pop3-mailbox.gob:653
+msgid "server does not support APOP authentication"
+msgstr "le serveur ne supporte pas l'authentification APOP"
 
-#: src/mn-preferences.c:209
-msgid "Format"
-msgstr "Format"
+#: src/mn-pop3-mailbox.gob:681
+msgid "falling back to APOP authentication"
+msgstr "rétrogradation vers l'authentification APOP"
 
-#: src/mn-preferences.c:361
+#: src/mn-pop3-mailbox.gob:686
+msgid "falling back to USER/PASS authentication"
+msgstr "rétrogradation vers l'authentification USER/PASS"
+
+#: src/mn-properties.c:132
 msgid "No mailbox selected."
 msgstr "Pas de boîte aux lettres sélectionnée."
 
-#: src/mn-preferences.c:366
+#: src/mn-properties.c:137
 #, c-format
 msgid "%i mailbox selected."
 msgid_plural "%i mailboxes selected."
 msgstr[0] "%i boîte aux lettres sélectionnée"
 msgstr[1] "%i boîtes aux lettres sélectionnées"
 
-#: src/mn-preferences.c:429
-msgid "Unable to add mailbox."
-msgstr "Impossible d'ajouter la boîte aux lettres."
+#: src/mn-shell.gob:191
+msgid "A command error has occurred"
+msgstr "Une erreur de commande s'est produite"
 
-#: src/mn-preferences.c:429
-msgid "The mailbox is already in the list."
-msgstr "La boîte aux lettres est déjà dans la liste."
-
-#: src/mn-ui.c:87
-msgid "A command error has occurred."
-msgstr "Une erreur de commande s'est produite."
-
-#: src/mn-ui.c:88
+#: src/mn-shell.gob:192
 #, c-format
-msgid "Unable to execute clicked command: %s."
-msgstr "Impossible d'exécuter la commande associée au click sur l'icône: %s."
+msgid "Unable to execute double-clicked command: %s."
+msgstr ""
+"Impossible d'exécuter la commande associée au double-click sur l'icône: %s."
 
-#: src/mn-ui.c:184
+#: src/mn-shell.gob:297
 msgid "The following mailbox has new mail:\n"
 msgid_plural "The following mailboxes have new mail:\n"
 msgstr[0] "La boîte aux lettres suivante a du nouveau courrier:\n"
 msgstr[1] "Les boîtes aux lettres suivantes ont du nouveau courrier:\n"
 
-#: src/mn-ui.c:191
+#: src/mn-shell.gob:301
 msgid "You have no new mail."
 msgstr "Vous n'avez pas de nouveau courrier."
 
-#: src/mn-ui.c:195
+#: src/mn-shell.gob:304
 msgid "The following mailbox reported an error:\n"
 msgid_plural "The following mailboxes reported an error:\n"
 msgstr[0] "La boîte aux lettres suivante a indiqué une erreur:\n"
 msgstr[1] "Les boîtes aux lettres suivantes ont indiqué une erreur:\n"
 
-#: src/mn-ui.c:200
+#: src/mn-shell.gob:309
 msgid "The following mailbox is unsupported:\n"
 msgid_plural "The following mailboxes are unsupported:\n"
 msgstr[0] "La boîte aux lettres suivante n'est pas prise en charge:\n"
 msgstr[1] "Les boîtes aux lettres suivantes ne sont pas prises en charge:\n"
 
-#: src/mn-ui.c:217
-msgid "No mailboxes are being monitored."
-msgstr "Aucune boîte aux lettres n'est surveillée."
+#: src/mn-shell.gob:325
+msgid "You have new mail."
+msgstr "Vous avez du nouveau courrier."
 
-#: src/mn-ui.c:265
-msgid "A Mail Notification Icon"
-msgstr "Une Icône de Notification de Courrier"
+#: src/mn-shell.gob:338
+msgid "A command error has occurred in Mail Notification"
+msgstr "Une erreur de commande s'est produite dans la Notification de Courrier"
 
-#: src/mn-ui.c:268
-msgid "Jean-Yves Lefort <jylefort@brutele.be>"
-msgstr "Jean-Yves Lefort <jylefort@brutele.be>"
+#: src/mn-shell.gob:339
+#, c-format
+msgid "Unable to execute new mail command: %s."
+msgstr ""
+"Impossible d'exécuter la commande associée à l'arrivée de nouveau courrier: %"
+"s"
 
-#: src/mn-unsupported-mailbox.c:98
-msgid "unsupported"
-msgstr "non pris en charge"
+#: src/mn-stock.c:28
+msgid "Select _All"
+msgstr "Sélectionner _Tout"
+
+#: src/mn-sylpheed-mailbox.gob:83
+#, c-format
+msgid "unable to open folder: %s"
+msgstr "impossible d'ouvrir le dossier: %s"
+
+#: src/mn-sylpheed-mailbox.gob:114
+#, c-format
+msgid "error while reading folder: %s"
+msgstr "erreur lors de la lecture du dossier: %s"
+
+#: src/mn-system-mailbox-properties.gob:33 src/mn-uri.c:617
+msgid "System Mailbox"
+msgstr "Boîte aux Lettres Système"
 
-#: src/mn-unsupported-mailbox.c:103
-msgid "Reason"
-msgstr "Raison"
+#: src/mn-system-mailbox-properties.gob:56
+#, c-format
+msgid "Your system mailbox (<span weight=\"bold\">%s</span>) will be used."
+msgstr ""
+"Votre boîte aux lettres système (<span weight=\"bold\">%s</span>) sera "
+"utilisée."
 
-#: src/mn-unsupported-mailbox.c:104
+#: src/mn-system-mailbox-properties.gob:63
+msgid ""
+"The location of your system mailbox could not be detected. Please set the "
+"MAIL environment variable."
+msgstr ""
+"L'emplacement de votre boîte aux lettres système n'a pu être détecté. "
+"Veuillez spécifier la variable d'environnement MAIL."
+
+#: src/mn-unsupported-mailbox.gob:31
 msgid "The reason why the mailbox is unsupported"
 msgstr "La raison pour laquelle la boîte aux lettres n'est pas prise en charge"
 
-#: src/mn-util.c:113
+#: src/mn-unsupported-mailbox.gob:38
+msgid "unsupported"
+msgstr "non pris en charge"
+
+#: src/mn-util.c:116
 #, c-format
 msgid "error loading image: %s"
 msgstr "erreur de chargement d'image: %s"
 
-#: src/mn-util.c:151
+#: src/mn-util.c:154
 #, c-format
 msgid "widget %s not found in interface %s"
 msgstr "élément %s non trouvé dans interface %s"
 
-#: src/mn-util.c:258
+#: src/mn-util.c:261
 msgid "received an invalid URI list"
 msgstr "une liste d'URI invalide a été reçue"
 
-#: src/mn-util.c:294
+#: src/mn-util.c:297
 msgid "received an invalid Mozilla URL"
 msgstr "une URL Mozilla invalide a été reçue"
 
-#: src/mn-util.c:386
-msgid "Unable to display help."
-msgstr "Impossible d'afficher l'aide."
-
-#: ui/mailbox-properties.glade.h:1 ui/preferences.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ui/mailbox-properties.glade.h:2
-msgid "P_ort:"
-msgstr "P_ort:"
+#: src/mn-util.c:389
+msgid "Unable to display help"
+msgstr "Impossible d'afficher l'aide"
 
-#: ui/mailbox-properties.glade.h:3
-msgid "The URI of the mailbox"
-msgstr "L'URI de la boîte aux lettres"
-
-#: ui/mailbox-properties.glade.h:4
-msgid "The hostname or IP address of the POP3 server"
-msgstr "Le nom d'hôte ou adresse IP du serveur POP3"
-
-#: ui/mailbox-properties.glade.h:5
-msgid "The port number of the POP3 server"
-msgstr "Le numéro de port du serveur POP3"
-
-#: ui/mailbox-properties.glade.h:6
-msgid ""
-"This mailbox type has not been compiled in and is therefore unsupported."
-msgstr ""
-"Ce type de boîte aux lettres n'a pas été inclus lors de la compilation et "
-"n'est donc pas pris en charge."
-
-#: ui/mailbox-properties.glade.h:7
-msgid "Your Gmail password"
-msgstr "Votre mot de passe Gmail"
-
-#: ui/mailbox-properties.glade.h:8
-msgid "Your Gmail username"
-msgstr "Votre nom d'utilisateur Gmail"
-
-#: ui/mailbox-properties.glade.h:9
-msgid "Your password on the POP3 server"
-msgstr "Votre mot de passe sur le serveur POP3"
-
-#: ui/mailbox-properties.glade.h:10
-msgid "Your username on the POP3 server"
-msgstr "Votre nom d'utilisateur sur le serveur POP3"
-
-#: ui/mailbox-properties.glade.h:11
-msgid "_Browse..."
-msgstr "_Parcourir..."
-
-#: ui/mailbox-properties.glade.h:12
-msgid "_Hostname:"
-msgstr "Nom d'_hôte:"
-
-#: ui/mailbox-properties.glade.h:13
-msgid "_Location:"
-msgstr "_Emplacement:"
-
-#: ui/mailbox-properties.glade.h:14
-msgid "_Password:"
-msgstr "_Mot de passe:"
-
-#: ui/mailbox-properties.glade.h:15
-msgid "_Type:"
-msgstr "_Type:"
-
-#: ui/mailbox-properties.glade.h:16
-msgid "_Username:"
-msgstr "_Nom d'utilisateur:"
-
-#: ui/menu.glade.h:1
-msgid "Show help"
-msgstr "Afficher l'aide"
-
-#: ui/menu.glade.h:2
-msgid "Update the icon"
-msgstr "Mettre l'icône à jour"
+#: src/mn-util.c:403
+#, c-format
+msgid "Unable to create a thread: %s."
+msgstr "Impossible de créer un thread: %s."
 
-#: ui/menu.glade.h:3
-msgid "_Help"
-msgstr "_Aide"
+#: ui/mailbox-properties.glade.h:1
+msgid "_Mailbox type:"
+msgstr "_Type de boîte aux lettres:"
 
-#: ui/menu.glade.h:4
-msgid "_Update"
-msgstr "_Mettre à jour"
-
-#: ui/preferences.glade.h:1
+#: ui/properties.glade.h:1
 msgid "    "
 msgstr "    "
 
-#: ui/preferences.glade.h:3
+#: ui/properties.glade.h:2
+msgid "*"
+msgstr "*"
+
+#: ui/properties.glade.h:3
 msgid "<span weight=\"bold\">Commands</span>"
 msgstr "<span weight=\"bold\">Commandes</span>"
 
-#: ui/preferences.glade.h:4
+#: ui/properties.glade.h:4
 msgid "<span weight=\"bold\">General</span>"
 msgstr "<span weight=\"bold\">Général</span>"
 
-#: ui/preferences.glade.h:5
+#: ui/properties.glade.h:5
 msgid "<span weight=\"bold\">Mailboxes</span>"
 msgstr "<span weight=\"bold\">Boîtes aux lettres</span>"
 
-#: ui/preferences.glade.h:6
-msgid "Mail Notification Preferences"
-msgstr "Préférences de la Notification de Courrier"
+#: ui/properties.glade.h:6
+msgid "Mail Notification Properties"
+msgstr "Propriétés de la Notification de Courrier"
 
-#: ui/preferences.glade.h:7
+#: ui/properties.glade.h:7
 msgid "The amount of time to wait between mail checks"
 msgstr "La quantité de temps à attendre entre les vérifications de courrier"
 
-#: ui/preferences.glade.h:8
+#: ui/properties.glade.h:8
 msgid "The command to run when new mail arrives"
 msgstr "La commande à exécuter lorsque du nouveau courrier arrive"
 
-#: ui/preferences.glade.h:9
-msgid "The command to run when the icon is clicked"
-msgstr "La commande à exécuter lorsque l'îcone est cliquée"
+#: ui/properties.glade.h:9
+msgid "The command to run when the icon is double-clicked"
+msgstr "La commande à exécuter lorsque l'îcone est double-cliquée"
 
-#: ui/preferences.glade.h:10
+#: ui/properties.glade.h:10
 msgid "When _new mail arrives:"
 msgstr "Lorsque du _nouveau courrier arrive:"
 
-#: ui/preferences.glade.h:11
-msgid "When click_ed:"
-msgstr "Lorsque l'îcone est cliqué_e:"
+#: ui/properties.glade.h:11
+msgid "When double-click_ed:"
+msgstr "Lorsque l'îcone est double-cliqué_e:"
 
-#: ui/preferences.glade.h:12
+#: ui/properties.glade.h:12
 msgid "Whether to run a command when new mail arrives or not"
 msgstr ""
 "Si une commande doit être exécutée lorsque du nouveau courrier arrive ou pas"
 
-#: ui/preferences.glade.h:13
-msgid "Whether to run a command when the icon is clicked or not"
-msgstr "Si une commande doit être exécutée lorsque l'îcone est cliquée ou pas"
-
-#: ui/preferences.glade.h:14
-msgid "_Add"
-msgstr "_Ajouter"
+#: ui/properties.glade.h:13
+msgid "Whether to run a command when the icon is double-clicked or not"
+msgstr ""
+"Si une commande doit être exécutée lorsque l'îcone est double-cliquée ou pas"
 
-#: ui/preferences.glade.h:15
+#: ui/properties.glade.h:14
 msgid "_Delay between mail checks:"
 msgstr "_Délai entre les vérifications de courrier:"
 
-#: ui/preferences.glade.h:16
-msgid "_Remove"
-msgstr "_Enlever"
-
-#: ui/preferences.glade.h:17
+#: ui/properties.glade.h:15
 msgid "minutes"
 msgstr "minutes"
 
-#: ui/preferences.glade.h:18
+#: ui/properties.glade.h:16
 msgid "seconds"
 msgstr "secondes"
diff --git a/po/mail-notification.pot b/po/mail-notification.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-07-21 18:10+0200\n"
+"POT-Creation-Date: 2004-08-16 18:15+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,28 +17,43 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
 
-#: data/mail-notification.desktop.in.h:1
-msgid "Get notified when new mail arrives"
+#: data/GNOME_MailNotification_Automation.server.in.in.h:1
+msgid "Mail Notification automation"
+msgstr ""
+
+#: data/GNOME_MailNotification_Automation.server.in.in.h:2
+msgid "Mail Notification automation factory"
+msgstr ""
+
+#: data/mail-notification-properties.desktop.in.h:1
+msgid "Configure Mail Notification"
 msgstr ""
 
-#: data/mail-notification.desktop.in.h:2 src/mn-main.c:112 src/mn-ui.c:262
+#: data/mail-notification-properties.desktop.in.h:2
+#: data/mail-notification.desktop.in.h:2
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:38
+#: src/mn-mail-icon.gob:160 src/mn-main.c:212
 msgid "Mail Notification"
 msgstr ""
 
+#: data/mail-notification.desktop.in.h:1
+msgid "Get notified when new mail arrives"
+msgstr ""
+
 #: data/mail-notification.schemas.in.h:1
-msgid "Clicked command"
+msgid "Delay between mail checks (minutes part)."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:2
-msgid "Delay between mail checks (minutes part)."
+msgid "Delay between mail checks (seconds part)."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:3
-msgid "Delay between mail checks (seconds part)."
+msgid "Double-clicked command"
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:4
-msgid "Height of preferences dialog"
+msgid "Height of properties dialog"
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:5
@@ -58,7 +73,7 @@ msgid "Run a command when new mail arrives"
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:9
-msgid "Run a command when the icon is clicked"
+msgid "Run a command when the icon is double-clicked"
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:10
@@ -70,11 +85,11 @@ msgid "The command to run when new mail arrives."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:12
-msgid "The command to run when the icon is clicked."
+msgid "The command to run when the icon is double-clicked."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:13
-msgid "The height of the preferences dialog in pixels."
+msgid "The height of the properties dialog in pixels."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:14
@@ -82,7 +97,7 @@ msgid "The list of mailboxes to monitor."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:15
-msgid "The width of the preferences dialog in pixels."
+msgid "The width of the properties dialog in pixels."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:16
@@ -90,11 +105,15 @@ msgid "Whether to run a command when new mail arrives or not."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:17
-msgid "Whether to run a command when the icon is clicked or not."
+msgid "Whether to run a command when the icon is double-clicked or not."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:18
-msgid "Width of preferences dialog"
+msgid "Width of properties dialog"
+msgstr ""
+
+#: data/mail-notification.soundlist.in.h:2
+msgid "New Mail"
 msgstr ""
 
 #: src/eggtrayicon.c:109
@@ -105,521 +124,869 @@ msgstr ""
 msgid "The orientation of the tray."
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:165
-msgid "unable to parse Gmail URI"
+#: src/mn-about-dialog.gob:41
+msgid "A Mail Notification Icon"
+msgstr ""
+
+#: src/mn-about-dialog.gob:44
+msgid "Jean-Yves Lefort <jylefort@brutele.be>"
+msgstr ""
+
+#: src/mn-auth-combo-box.gob:99 src/mn-autodetect-mailbox-properties.gob:36
+msgid "<span style=\"italic\">autodetect</span>"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:261
+#: src/mn-autodetect-mailbox-properties.gob:67
+msgid "_Location:"
+msgstr ""
+
+#: src/mn-autodetect-mailbox-properties.gob:73
+msgid "_Browse..."
+msgstr ""
+
+#: src/mn-autodetect-mailbox-properties.gob:80
+msgid "The URI of the mailbox"
+msgstr ""
+
+#: src/mn-autodetect-mailbox-properties.gob:117
+msgid "Select a File or Folder"
+msgstr ""
+
+#: src/mn-blinking-image.gob:30
+msgid "Whether the image is blinking or not"
+msgstr ""
+
+#: src/mn-client-session.c:196 src/mn-client-session.c:203
 #, c-format
-msgid "logging into Gmail as user %s"
+msgid "unable to read from server: %s"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:277 src/mn-gmail-mailbox.c:356
+#: src/mn-client-session.c:201
+msgid "unable to read from server: EOF"
+msgstr ""
+
+#: src/mn-client-session.c:213
 #, c-format
-msgid "unable to transfer data: %s"
+msgid "unable to decode data using SASL: %s"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:283
+#: src/mn-client-session.c:287
 #, c-format
-msgid "successfully logged into Gmail as user %s"
+msgid "resolving %s"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:288
-msgid "login failed"
+#: src/mn-client-session.c:297
+#, c-format
+msgid "unable to resolve %s: %s"
+msgstr ""
+
+#: src/mn-client-session.c:334
+#, c-format
+msgid "%s: unsupported address family"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:341
+#: src/mn-client-session.c:341
 #, c-format
-msgid "searching for unread mail in %s"
+msgid "%s: unable to create socket: %s"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:363
+#: src/mn-client-session.c:345
+#, c-format
+msgid "connecting to %s (%s) port %i"
+msgstr ""
+
+#: src/mn-client-session.c:348
+#, c-format
+msgid "unable to connect: %s"
+msgstr ""
+
+#: src/mn-client-session.c:353
+msgid "connected successfully"
+msgstr ""
+
+#. if reached, we couldn't find a working address
+#: src/mn-client-session.c:359
+#, c-format
+msgid "unable to connect to %s"
+msgstr ""
+
+#: src/mn-client-session.c:375
+#, c-format
+msgid "unable to initialize the OpenSSL library: %s"
+msgstr ""
+
+#: src/mn-client-session.c:383
+#, c-format
+msgid "unable to create a SSL object: %s"
+msgstr ""
+
+#: src/mn-client-session.c:389
+#, c-format
+msgid "unable to set the SSL file descriptor: %s"
+msgstr ""
+
+#: src/mn-client-session.c:444
+#, c-format
+msgid "response \"%s\" is not valid in current context"
+msgstr ""
+
+#: src/mn-client-session.c:470
+#, c-format
+msgid "unable to parse response \"%s\""
+msgstr ""
+
+#: src/mn-client-session.c:517
+#, c-format
+msgid "unable to encode data using SASL: %s"
+msgstr ""
+
+#: src/mn-client-session.c:546 src/mn-client-session.c:553
+#, c-format
+msgid "unable to write to server: %s"
+msgstr ""
+
+#: src/mn-client-session.c:551
+msgid "unable to write to server: EOF"
+msgstr ""
+
+#: src/mn-client-session.c:583
+#, c-format
+msgid "unable to encode Base64: %s"
+msgstr ""
+
+#: src/mn-client-session.c:686
+#, c-format
+msgid "unable to initialize the SASL library: %s"
+msgstr ""
+
+#: src/mn-client-session.c:695
+#, c-format
+msgid "unable to retrieve local address of socket: %s"
+msgstr ""
+
+#: src/mn-client-session.c:701
+#, c-format
+msgid "unable to retrieve remote address of socket: %s"
+msgstr ""
+
+#: src/mn-client-session.c:735
+#, c-format
+msgid "warning: unable to set SASL security properties: %s"
+msgstr ""
+
+#: src/mn-client-session.c:774
+msgid ""
+"unable to start SASL authentication: SASL asked for something we did not know"
+msgstr ""
+
+#: src/mn-client-session.c:778
+#, c-format
+msgid "unable to start SASL authentication: %s"
+msgstr ""
+
+#: src/mn-client-session.c:782
+#, c-format
+msgid "unable to create a SASL connection: %s"
+msgstr ""
+
+#: src/mn-client-session.c:832
+msgid "SASL asked for something we did not know, aborting SASL authentication"
+msgstr ""
+
+#: src/mn-client-session.c:836
+#, c-format
+msgid "%s, aborting SASL authentication"
+msgstr ""
+
+#. compliance error
+#: src/mn-client-session.c:841
+#, c-format
+msgid "unable to decode Base64 input from server: %s"
+msgstr ""
+
+#: src/mn-client-session.c:844
+msgid ""
+"the server sent a SASL challenge, but there was a pending initial SASL "
+"client response"
+msgstr ""
+
+#: src/mn-client-session.c:858
+msgid ""
+"the server did not send a SASL challenge, but there was no pending initial "
+"SASL client response"
+msgstr ""
+
+#: src/mn-client-session.c:881
+#, c-format
+msgid "a SASL security layer of strength factor %i is now active"
+msgstr ""
+
+#. a security layer is active but we can't retrieve maxoutbuf -> fatal
+#: src/mn-client-session.c:886
+#, c-format
+msgid "unable to get SASL_MAXOUTBUF property: %s"
+msgstr ""
+
+#: src/mn-client-session.c:892
+#, c-format
+msgid "warning: unable to get SASL_SSF property: %s"
+msgstr ""
+
+#: src/mn-dialog.c:108
+msgid "A fatal error has occurred in Mail Notification"
+msgstr ""
+
+#: src/mn-gmail-mailbox-properties.gob:78
+msgid "Your Gmail username"
+msgstr ""
+
+#: src/mn-gmail-mailbox-properties.gob:79
+msgid "Your Gmail password"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:65
+msgid "unable to parse Gmail URI"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:180
+msgid "logging in"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:194 src/mn-gmail-mailbox.gob:233
+#: src/mn-gmail-mailbox.gob:266 src/mn-gmail-mailbox.gob:370
+#, c-format
+msgid "unable to transfer data: %s"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:219 src/mn-gmail-mailbox.gob:252
+#: src/mn-gmail-mailbox.gob:286
+msgid "login failed"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:280
+msgid "successfully logged in"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:358
+msgid "searching for unread mail"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:377
 msgid "unable to parse Gmail data"
 msgstr ""
 
-#: src/mn-mail-icon.c:130
-msgid "You have no new mail"
+#: src/mn-imap-mailbox-properties.gob:92
+msgid "Mailbox:"
 msgstr ""
 
-#: src/mn-mailbox-properties-dialog.c:155
-msgid "Add a Mailbox"
+#: src/mn-imap-mailbox-properties.gob:96
+msgid "in_box"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:107
+msgid "oth_er:"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:121
+msgid "The hostname or IP address of the IMAP server"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:122
+msgid "Your username on the IMAP server"
 msgstr ""
 
-#: src/mn-mailbox-properties-dialog.c:182
-msgid "autodetect"
+#: src/mn-imap-mailbox-properties.gob:123
+msgid "Your password on the IMAP server"
 msgstr ""
 
-#: src/mn-mailbox-properties-dialog.c:394
+#: src/mn-imap-mailbox-properties.gob:124
+#: src/mn-imap-mailbox-properties.gob:125
+msgid "The port number of the IMAP server"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:126
+msgid "The mailbox name"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:124 src/mn-pop3-mailbox.gob:133
+msgid "SSL support has not been compiled in"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:128
+msgid "unable to parse IMAP URI"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:195
+msgid "server did not send capabilities"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:267
+msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:268
+msgid "unable to login"
+msgstr ""
+
+#. compliance error
+#: src/mn-imap-mailbox.gob:319
+msgid "server did not send status"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:537 src/mn-pop3-mailbox.gob:715
+msgid "unknown server error"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:603 src/mn-pop3-mailbox.gob:645
+msgid ""
+"a SASL authentication mechanism was selected but SASL support has not been "
+"compiled in"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:611 src/mn-pop3-mailbox.gob:657
+#, c-format
+msgid "unknown authentication mechanism \"%s\""
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:629
+msgid "falling back to IMAP LOGIN authentication"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:633 src/mn-pop3-mailbox.gob:691
+msgid "authentication failed"
+msgstr ""
+
+#: src/mn-mail-icon.gob:81
+msgid "_Update"
+msgstr ""
+
+#: src/mn-mail-icon.gob:87
+msgid "R_emove From Notification Area"
+msgstr ""
+
+#: src/mn-mail-icon.gob:172
+#, c-format
+msgid "_Run %s"
+msgstr ""
+
+#: src/mn-mail-icon.gob:173
+msgid "_Run Default Action"
+msgstr ""
+
+#: src/mn-mailbox-properties-dialog.c:109
+msgid "Add a Mailbox"
+msgstr ""
+
+#: src/mn-mailbox-properties-dialog.c:331
 #, c-format
 msgid "%s Properties"
 msgstr ""
 
-#: src/mn-mailbox-properties-dialog.c:580
-msgid "Select a File or Folder"
+#: src/mn-mailbox-properties-util.c:75
+msgid "_Username:"
 msgstr ""
 
-#: src/mn-mailbox.c:199
-msgid "URI"
+#: src/mn-mailbox-properties-util.c:79
+msgid "_Password:"
 msgstr ""
 
-#: src/mn-mailbox.c:200
-msgid "The mailbox URI"
+#: src/mn-mailbox-properties-util.c:146
+msgid "Connection type:"
 msgstr ""
 
-#: src/mn-mailbox.c:206
-msgid "Name"
+#: src/mn-mailbox-properties-util.c:153
+msgid "Port:"
 msgstr ""
 
-#: src/mn-mailbox.c:207
-msgid "The mailbox human-readable name"
+#: src/mn-mailbox-properties-util.c:180
+msgid "_Authentication mechanism:"
 msgstr ""
 
-#: src/mn-mailbox.c:213
-msgid "Automatic"
+#: src/mn-mailbox-properties.c:63
+msgid "Label"
 msgstr ""
 
-#: src/mn-mailbox.c:214
-msgid "Whether the mailbox has to be manually checked or not"
+#: src/mn-mailbox-properties.c:64
+msgid "The marked up text to show in the type combo box"
 msgstr ""
 
-#: src/mn-mailbox.c:220
-msgid "Has new"
+#: src/mn-mailbox-properties.c:69
+msgid "Size group"
 msgstr ""
 
-#: src/mn-mailbox.c:221
-msgid "Whether the mailbox has new mail or not"
+#: src/mn-mailbox-properties.c:70
+msgid "A GtkSizeGroup for aligning control labels"
 msgstr ""
 
-#: src/mn-mailbox.c:227
-msgid "Error"
+#: src/mn-mailbox-properties.c:75
+msgid "Complete"
 msgstr ""
 
-#: src/mn-mailbox.c:228
-msgid "The mailbox error if any"
+#: src/mn-mailbox-properties.c:76
+msgid "Whether the properties are completely filled or not"
 msgstr ""
 
-#: src/mn-mailbox.c:254
-#, c-format
-msgid "unable to cancel monitoring of %s: %s"
+#: src/mn-mailbox-view.gob:91
+msgid "Unable to add mailbox"
+msgstr ""
+
+#: src/mn-mailbox-view.gob:91
+msgid "The mailbox is already in the list."
+msgstr ""
+
+#: src/mn-mailbox-view.gob:283
+msgid "Mailbox"
+msgstr ""
+
+#: src/mn-mailbox-view.gob:297
+msgid "Format"
+msgstr ""
+
+#: src/mn-mailbox.gob:88
+msgid "The mailbox URI"
+msgstr ""
+
+#: src/mn-mailbox.gob:98
+msgid "The mailbox human-readable name"
+msgstr ""
+
+#: src/mn-mailbox.gob:102
+msgid "Whether the mailbox has to be manually checked or not"
 msgstr ""
 
-#: src/mn-mailbox.c:443
+#: src/mn-mailbox.gob:107
+msgid "Whether the mailbox has new mail or not"
+msgstr ""
+
+#: src/mn-mailbox.gob:112
+msgid "The mailbox error, if any"
+msgstr ""
+
+#: src/mn-mailbox.gob:218
 msgid "does not exist"
 msgstr ""
 
-#: src/mn-mailbox.c:460
+#: src/mn-mailbox.gob:255
 msgid "unknown format"
 msgstr ""
 
-#: src/mn-mailbox.c:553
+#: src/mn-mailbox.gob:316
 #, c-format
 msgid "unable to monitor %s: %s"
 msgstr ""
 
-#: src/mn-mailbox.c:567
+#: src/mn-mailbox.gob:330
 #, c-format
 msgid ""
 "As a fallback, they will be checked every %i second (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked every %i seconds (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-mailbox.c:578
+#: src/mn-mailbox.gob:341
 #, c-format
 msgid ""
 "As a fallback, they will be checked every %i minute (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked every %i minutes (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-mailbox.c:589
+#: src/mn-mailbox.gob:352
 #, c-format
 msgid ""
 "As a fallback, they will be checked approximately every %i minute (this "
-"delay is configurable from the Preferences Dialog)."
+"delay is configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked approximately every %i minutes (this "
-"delay is configurable from the Preferences Dialog)."
+"delay is configurable from the Properties Dialog)."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-mailbox.c:603
-msgid "A monitoring error has occurred."
+#: src/mn-mailbox.gob:366
+msgid "A monitoring error has occurred"
 msgstr ""
 
-#: src/mn-mailbox.c:604
+#: src/mn-mailbox.gob:367
 #, c-format
 msgid ""
 "Mail Notification was unable to enable automatic notification for one or "
 "more mailboxes. %s"
 msgstr ""
 
-#: src/mn-mailboxes.c:133
+#: src/mn-mailboxes.gob:130
+#, c-format
+msgid "%s is unsupported: %s"
+msgstr ""
+
+#: src/mn-mailboxes.gob:157
 #, c-format
 msgid "%s has new mail"
 msgstr ""
 
-#: src/mn-mailboxes.c:133
+#: src/mn-mailboxes.gob:157
 #, c-format
 msgid "%s has no new mail"
 msgstr ""
 
-#: src/mn-mailboxes.c:143
+#: src/mn-mailboxes.gob:173
 #, c-format
 msgid "%s reported an error: %s"
 msgstr ""
 
-#: src/mn-maildir-mailbox.c:226 src/mn-sylpheed-mailbox.c:209
+#: src/mn-maildir-mailbox.gob:97
 #, c-format
-msgid "error while reading folder: %s"
+msgid "unable to open folder \"new\": %s"
+msgstr ""
+
+#: src/mn-maildir-mailbox.gob:122
+#, c-format
+msgid "error while reading folder \"new\": %s"
+msgstr ""
+
+#: src/mn-main.c:86
+#, c-format
+msgid "Compiled-in mailbox backends: %s\n"
 msgstr ""
 
-#: src/mn-main.c:49
-msgid "Compiled in handlers:\n"
+#: src/mn-main.c:104
+#, c-format
+msgid "Compiled-in features: %s\n"
 msgstr ""
 
-#: src/mn-main.c:83
+#: src/mn-main.c:133
 msgid "Enable informational output"
 msgstr ""
 
-#: src/mn-main.c:92
-msgid "List compiled-in handlers and exit"
+#: src/mn-main.c:142
+msgid "List compiled-in features and exit"
 msgstr ""
 
-#: src/mn-main.c:124
-msgid "unable to initialize GnomeVFS"
+#: src/mn-main.c:151
+msgid "Display the properties dialog"
 msgstr ""
 
-#: src/mn-mbox-mailbox.c:339
-#, c-format
-msgid "unable to get mailbox information: %s"
+#: src/mn-main.c:160
+msgid "Display the about dialog"
 msgstr ""
 
-#: src/mn-mbox-mailbox.c:364
-#, c-format
-msgid "unable to open mailbox: %s"
+#: src/mn-main.c:169
+msgid "Update the mail status"
 msgstr ""
 
-#: src/mn-mbox-mailbox.c:401
-#, c-format
-msgid "error while reading mailbox: %s"
+#: src/mn-main.c:178
+msgid "Report the mail status"
+msgstr ""
+
+#.
+#. * We can't use mn_error_dialog() because gtk_init() has not been
+#. * called yet.
+#.
+#: src/mn-main.c:204
+msgid "multi-threading is not available"
+msgstr ""
+
+#: src/mn-main.c:244
+msgid "Unable to initialize the GnomeVFS library."
+msgstr ""
+
+#: src/mn-main.c:252
+msgid ""
+"Bonobo could not locate the automation object. Please check your Mail "
+"Notification installation."
+msgstr ""
+
+#: src/mn-main.c:263
+msgid "updating the mail status"
+msgstr ""
+
+#: src/mn-main.c:279
+msgid "Mail Notification is already running"
+msgstr ""
+
+#: src/mn-main.c:286
+msgid ""
+"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
+"Please check your Mail Notification installation."
+msgstr ""
+
+#: src/mn-main.c:290
+msgid ""
+"Bonobo was unable to register the automation server. Please check your Mail "
+"Notification installation."
 msgstr ""
 
-#: src/mn-mbox-mailbox.c:417
+#: src/mn-mbox-mailbox.gob:165
 #, c-format
-msgid "unable to close mailbox: %s"
+msgid "error while reading mailbox: %s"
 msgstr ""
 
-#: src/mn-mh-mailbox.c:185
+#: src/mn-mbox-mailbox.gob:173
 #, c-format
-msgid "unable to open .mh_sequences: %s"
+msgid "unable to open mailbox: %s"
 msgstr ""
 
-#: src/mn-mh-mailbox.c:215
+#: src/mn-mh-mailbox.gob:111
 #, c-format
 msgid "error while reading .mh_sequences: %s"
 msgstr ""
 
-#: src/mn-mh-mailbox.c:231
+#: src/mn-mh-mailbox.gob:119
 #, c-format
-msgid "unable to close .mh_sequences: %s"
+msgid "unable to open .mh_sequences: %s"
 msgstr ""
 
-#: src/mn-pending-mailbox.c:64
-msgid "detecting..."
+#: src/mn-pending-mailbox.gob:33
+msgid "detecting"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:164
-msgid "unable to parse POP3 URI"
+#: src/mn-pi-mailbox-properties.gob:75
+msgid "_Hostname:"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:190
-#, c-format
-msgid "connecting to POP3 server %s"
+#: src/mn-pi-mailbox-properties.gob:93
+msgid "_Details"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:227
-#, c-format
-msgid "successfully connected to %s"
+#: src/mn-pi-mailbox-properties.gob:105
+msgid "sta_ndard"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:233
-msgid "unable to connect to server"
+#: src/mn-pi-mailbox-properties.gob:115
+msgid "_SSL"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:238
-msgid "connection to server unexpectedly closed"
+#: src/mn-pop3-mailbox-properties.gob:84
+msgid "The hostname or IP address of the POP3 server"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:277
-#, c-format
-msgid "invalid STAT reply \"%s\""
+#: src/mn-pop3-mailbox-properties.gob:85
+msgid "Your username on the POP3 server"
+msgstr ""
+
+#: src/mn-pop3-mailbox-properties.gob:86
+msgid "Your password on the POP3 server"
+msgstr ""
+
+#: src/mn-pop3-mailbox-properties.gob:87 src/mn-pop3-mailbox-properties.gob:88
+msgid "The port number of the POP3 server"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:296
-msgid "unknown error"
+#: src/mn-pop3-mailbox.gob:137
+msgid "unable to parse POP3 URI"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:317
+#: src/mn-pop3-mailbox.gob:267
+msgid "invalid arguments for the LOGIN-DELAY capability"
+msgstr ""
+
+#: src/mn-pop3-mailbox.gob:495
 #, c-format
-msgid "invalid reply \"%s\""
+msgid "honouring LOGIN-DELAY, sleeping for %i second"
+msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/mn-pop3-mailbox.gob:653
+msgid "server does not support APOP authentication"
 msgstr ""
 
-#: src/mn-preferences.c:195
-msgid "Mailbox"
+#: src/mn-pop3-mailbox.gob:681
+msgid "falling back to APOP authentication"
 msgstr ""
 
-#: src/mn-preferences.c:209
-msgid "Format"
+#: src/mn-pop3-mailbox.gob:686
+msgid "falling back to USER/PASS authentication"
 msgstr ""
 
-#: src/mn-preferences.c:361
+#: src/mn-properties.c:132
 msgid "No mailbox selected."
 msgstr ""
 
-#: src/mn-preferences.c:366
+#: src/mn-properties.c:137
 #, c-format
 msgid "%i mailbox selected."
 msgid_plural "%i mailboxes selected."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-preferences.c:429
-msgid "Unable to add mailbox."
+#: src/mn-shell.gob:191
+msgid "A command error has occurred"
 msgstr ""
 
-#: src/mn-preferences.c:429
-msgid "The mailbox is already in the list."
-msgstr ""
-
-#: src/mn-ui.c:87
-msgid "A command error has occurred."
-msgstr ""
-
-#: src/mn-ui.c:88
+#: src/mn-shell.gob:192
 #, c-format
-msgid "Unable to execute clicked command: %s."
+msgid "Unable to execute double-clicked command: %s."
 msgstr ""
 
-#: src/mn-ui.c:184
+#: src/mn-shell.gob:297
 msgid "The following mailbox has new mail:\n"
 msgid_plural "The following mailboxes have new mail:\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-ui.c:191
+#: src/mn-shell.gob:301
 msgid "You have no new mail."
 msgstr ""
 
-#: src/mn-ui.c:195
+#: src/mn-shell.gob:304
 msgid "The following mailbox reported an error:\n"
 msgid_plural "The following mailboxes reported an error:\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-ui.c:200
+#: src/mn-shell.gob:309
 msgid "The following mailbox is unsupported:\n"
 msgid_plural "The following mailboxes are unsupported:\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-ui.c:217
-msgid "No mailboxes are being monitored."
-msgstr ""
-
-#: src/mn-ui.c:265
-msgid "A Mail Notification Icon"
+#: src/mn-shell.gob:325
+msgid "You have new mail."
 msgstr ""
 
-#: src/mn-ui.c:268
-msgid "Jean-Yves Lefort <jylefort@brutele.be>"
+#: src/mn-shell.gob:338
+msgid "A command error has occurred in Mail Notification"
 msgstr ""
 
-#: src/mn-unsupported-mailbox.c:98
-msgid "unsupported"
+#: src/mn-shell.gob:339
+#, c-format
+msgid "Unable to execute new mail command: %s."
 msgstr ""
 
-#: src/mn-unsupported-mailbox.c:103
-msgid "Reason"
+#: src/mn-stock.c:28
+msgid "Select _All"
 msgstr ""
 
-#: src/mn-unsupported-mailbox.c:104
-msgid "The reason why the mailbox is unsupported"
-msgstr ""
-
-#: src/mn-util.c:113
+#: src/mn-sylpheed-mailbox.gob:83
 #, c-format
-msgid "error loading image: %s"
+msgid "unable to open folder: %s"
 msgstr ""
 
-#: src/mn-util.c:151
+#: src/mn-sylpheed-mailbox.gob:114
 #, c-format
-msgid "widget %s not found in interface %s"
-msgstr ""
-
-#: src/mn-util.c:258
-msgid "received an invalid URI list"
-msgstr ""
-
-#: src/mn-util.c:294
-msgid "received an invalid Mozilla URL"
-msgstr ""
-
-#: src/mn-util.c:386
-msgid "Unable to display help."
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:1 ui/preferences.glade.h:2
-msgid "*"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:2
-msgid "P_ort:"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:3
-msgid "The URI of the mailbox"
+msgid "error while reading folder: %s"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:4
-msgid "The hostname or IP address of the POP3 server"
+#: src/mn-system-mailbox-properties.gob:33 src/mn-uri.c:617
+msgid "System Mailbox"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:5
-msgid "The port number of the POP3 server"
+#: src/mn-system-mailbox-properties.gob:56
+#, c-format
+msgid "Your system mailbox (<span weight=\"bold\">%s</span>) will be used."
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:6
+#: src/mn-system-mailbox-properties.gob:63
 msgid ""
-"This mailbox type has not been compiled in and is therefore unsupported."
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:7
-msgid "Your Gmail password"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:8
-msgid "Your Gmail username"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:9
-msgid "Your password on the POP3 server"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:10
-msgid "Your username on the POP3 server"
+"The location of your system mailbox could not be detected. Please set the "
+"MAIL environment variable."
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:11
-msgid "_Browse..."
+#: src/mn-unsupported-mailbox.gob:31
+msgid "The reason why the mailbox is unsupported"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:12
-msgid "_Hostname:"
+#: src/mn-unsupported-mailbox.gob:38
+msgid "unsupported"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:13
-msgid "_Location:"
+#: src/mn-util.c:116
+#, c-format
+msgid "error loading image: %s"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:14
-msgid "_Password:"
+#: src/mn-util.c:154
+#, c-format
+msgid "widget %s not found in interface %s"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:15
-msgid "_Type:"
+#: src/mn-util.c:261
+msgid "received an invalid URI list"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:16
-msgid "_Username:"
+#: src/mn-util.c:297
+msgid "received an invalid Mozilla URL"
 msgstr ""
 
-#: ui/menu.glade.h:1
-msgid "Show help"
+#: src/mn-util.c:389
+msgid "Unable to display help"
 msgstr ""
 
-#: ui/menu.glade.h:2
-msgid "Update the icon"
+#: src/mn-util.c:403
+#, c-format
+msgid "Unable to create a thread: %s."
 msgstr ""
 
-#: ui/menu.glade.h:3
-msgid "_Help"
+#: ui/mailbox-properties.glade.h:1
+msgid "_Mailbox type:"
 msgstr ""
 
-#: ui/menu.glade.h:4
-msgid "_Update"
+#: ui/properties.glade.h:1
+msgid "    "
 msgstr ""
 
-#: ui/preferences.glade.h:1
-msgid "    "
+#: ui/properties.glade.h:2
+msgid "*"
 msgstr ""
 
-#: ui/preferences.glade.h:3
+#: ui/properties.glade.h:3
 msgid "<span weight=\"bold\">Commands</span>"
 msgstr ""
 
-#: ui/preferences.glade.h:4
+#: ui/properties.glade.h:4
 msgid "<span weight=\"bold\">General</span>"
 msgstr ""
 
-#: ui/preferences.glade.h:5
+#: ui/properties.glade.h:5
 msgid "<span weight=\"bold\">Mailboxes</span>"
 msgstr ""
 
-#: ui/preferences.glade.h:6
-msgid "Mail Notification Preferences"
+#: ui/properties.glade.h:6
+msgid "Mail Notification Properties"
 msgstr ""
 
-#: ui/preferences.glade.h:7
+#: ui/properties.glade.h:7
 msgid "The amount of time to wait between mail checks"
 msgstr ""
 
-#: ui/preferences.glade.h:8
+#: ui/properties.glade.h:8
 msgid "The command to run when new mail arrives"
 msgstr ""
 
-#: ui/preferences.glade.h:9
-msgid "The command to run when the icon is clicked"
+#: ui/properties.glade.h:9
+msgid "The command to run when the icon is double-clicked"
 msgstr ""
 
-#: ui/preferences.glade.h:10
+#: ui/properties.glade.h:10
 msgid "When _new mail arrives:"
 msgstr ""
 
-#: ui/preferences.glade.h:11
-msgid "When click_ed:"
+#: ui/properties.glade.h:11
+msgid "When double-click_ed:"
 msgstr ""
 
-#: ui/preferences.glade.h:12
+#: ui/properties.glade.h:12
 msgid "Whether to run a command when new mail arrives or not"
 msgstr ""
 
-#: ui/preferences.glade.h:13
-msgid "Whether to run a command when the icon is clicked or not"
-msgstr ""
-
-#: ui/preferences.glade.h:14
-msgid "_Add"
+#: ui/properties.glade.h:13
+msgid "Whether to run a command when the icon is double-clicked or not"
 msgstr ""
 
-#: ui/preferences.glade.h:15
+#: ui/properties.glade.h:14
 msgid "_Delay between mail checks:"
 msgstr ""
 
-#: ui/preferences.glade.h:16
-msgid "_Remove"
-msgstr ""
-
-#: ui/preferences.glade.h:17
+#: ui/properties.glade.h:15
 msgid "minutes"
 msgstr ""
 
-#: ui/preferences.glade.h:18
+#: ui/properties.glade.h:16
 msgid "seconds"
 msgstr ""
diff --git a/po/ru.gmo b/po/ru.gmo
Binary files differ.
diff --git a/po/ru.po b/po/ru.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: mail-notification 0.5.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-07-21 18:10+0200\n"
+"POT-Creation-Date: 2004-08-16 18:15+0200\n"
 "PO-Revision-Date: 2004-07-21 21:58+0200\n"
 "Last-Translator: Dan Korostelev <dan@ats.energo.ru>\n"
 "Language-Team: Russian\n"
@@ -20,29 +20,47 @@ msgstr ""
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
 "10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
+#: data/GNOME_MailNotification_Automation.server.in.in.h:1
+#, fuzzy
+msgid "Mail Notification automation"
+msgstr "Иконка входÑщих Ñообщений"
+
+#: data/GNOME_MailNotification_Automation.server.in.in.h:2
+#, fuzzy
+msgid "Mail Notification automation factory"
+msgstr "Иконка входÑщих Ñообщений"
+
+#: data/mail-notification-properties.desktop.in.h:1
+#, fuzzy
+msgid "Configure Mail Notification"
+msgstr "Иконка входÑщих Ñообщений"
+
+#: data/mail-notification-properties.desktop.in.h:2
+#: data/mail-notification.desktop.in.h:2
+#: data/mail-notification.soundlist.in.h:1 src/mn-about-dialog.gob:38
+#: src/mn-mail-icon.gob:160 src/mn-main.c:212
+msgid "Mail Notification"
+msgstr "Иконка входÑщих Ñообщений"
+
 #: data/mail-notification.desktop.in.h:1
 msgid "Get notified when new mail arrives"
 msgstr ""
 "Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
-#: data/mail-notification.desktop.in.h:2 src/mn-main.c:112 src/mn-ui.c:262
-msgid "Mail Notification"
-msgstr "Иконка входÑщих Ñообщений"
-
 #: data/mail-notification.schemas.in.h:1
-msgid "Clicked command"
+msgid "Delay between mail checks (minutes part)."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:2
-msgid "Delay between mail checks (minutes part)."
+msgid "Delay between mail checks (seconds part)."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:3
-msgid "Delay between mail checks (seconds part)."
+msgid "Double-clicked command"
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:4
-msgid "Height of preferences dialog"
+msgid "Height of properties dialog"
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:5
@@ -64,8 +82,10 @@ msgstr ""
 "Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
 #: data/mail-notification.schemas.in.h:9
-msgid "Run a command when the icon is clicked"
+#, fuzzy
+msgid "Run a command when the icon is double-clicked"
 msgstr ""
+"Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
 #: data/mail-notification.schemas.in.h:10
 msgid "Seconds between mail checks"
@@ -78,11 +98,13 @@ msgstr ""
 "Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
 #: data/mail-notification.schemas.in.h:12
-msgid "The command to run when the icon is clicked."
+#, fuzzy
+msgid "The command to run when the icon is double-clicked."
 msgstr ""
+"Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
 #: data/mail-notification.schemas.in.h:13
-msgid "The height of the preferences dialog in pixels."
+msgid "The height of the properties dialog in pixels."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:14
@@ -90,7 +112,7 @@ msgid "The list of mailboxes to monitor."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:15
-msgid "The width of the preferences dialog in pixels."
+msgid "The width of the properties dialog in pixels."
 msgstr ""
 
 #: data/mail-notification.schemas.in.h:16
@@ -100,11 +122,17 @@ msgstr ""
 "Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
 #: data/mail-notification.schemas.in.h:17
-msgid "Whether to run a command when the icon is clicked or not."
+#, fuzzy
+msgid "Whether to run a command when the icon is double-clicked or not."
 msgstr ""
+"Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
 #: data/mail-notification.schemas.in.h:18
-msgid "Width of preferences dialog"
+msgid "Width of properties dialog"
+msgstr ""
+
+#: data/mail-notification.soundlist.in.h:2
+msgid "New Mail"
 msgstr ""
 
 #: src/eggtrayicon.c:109
@@ -115,521 +143,875 @@ msgstr ""
 msgid "The orientation of the tray."
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:165
-msgid "unable to parse Gmail URI"
+#: src/mn-about-dialog.gob:41
+msgid "A Mail Notification Icon"
+msgstr ""
+
+#: src/mn-about-dialog.gob:44
+msgid "Jean-Yves Lefort <jylefort@brutele.be>"
+msgstr "Dan Korostelev <dan@ats.energo.ru>"
+
+#: src/mn-auth-combo-box.gob:99 src/mn-autodetect-mailbox-properties.gob:36
+msgid "<span style=\"italic\">autodetect</span>"
+msgstr ""
+
+#: src/mn-autodetect-mailbox-properties.gob:67
+msgid "_Location:"
+msgstr ""
+
+#: src/mn-autodetect-mailbox-properties.gob:73
+msgid "_Browse..."
+msgstr ""
+
+#: src/mn-autodetect-mailbox-properties.gob:80
+msgid "The URI of the mailbox"
+msgstr ""
+
+#: src/mn-autodetect-mailbox-properties.gob:117
+msgid "Select a File or Folder"
+msgstr ""
+
+#: src/mn-blinking-image.gob:30
+msgid "Whether the image is blinking or not"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:261
+#: src/mn-client-session.c:196 src/mn-client-session.c:203
 #, c-format
-msgid "logging into Gmail as user %s"
+msgid "unable to read from server: %s"
+msgstr ""
+
+#: src/mn-client-session.c:201
+msgid "unable to read from server: EOF"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:277 src/mn-gmail-mailbox.c:356
+#: src/mn-client-session.c:213
 #, c-format
-msgid "unable to transfer data: %s"
+msgid "unable to decode data using SASL: %s"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:283
+#: src/mn-client-session.c:287
 #, c-format
-msgid "successfully logged into Gmail as user %s"
+msgid "resolving %s"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:288
-msgid "login failed"
+#: src/mn-client-session.c:297
+#, c-format
+msgid "unable to resolve %s: %s"
+msgstr ""
+
+#: src/mn-client-session.c:334
+#, c-format
+msgid "%s: unsupported address family"
+msgstr ""
+
+#: src/mn-client-session.c:341
+#, c-format
+msgid "%s: unable to create socket: %s"
+msgstr ""
+
+#: src/mn-client-session.c:345
+#, c-format
+msgid "connecting to %s (%s) port %i"
+msgstr ""
+
+#: src/mn-client-session.c:348
+#, c-format
+msgid "unable to connect: %s"
+msgstr ""
+
+#: src/mn-client-session.c:353
+msgid "connected successfully"
+msgstr ""
+
+#. if reached, we couldn't find a working address
+#: src/mn-client-session.c:359
+#, c-format
+msgid "unable to connect to %s"
+msgstr ""
+
+#: src/mn-client-session.c:375
+#, c-format
+msgid "unable to initialize the OpenSSL library: %s"
+msgstr ""
+
+#: src/mn-client-session.c:383
+#, c-format
+msgid "unable to create a SSL object: %s"
+msgstr ""
+
+#: src/mn-client-session.c:389
+#, c-format
+msgid "unable to set the SSL file descriptor: %s"
+msgstr ""
+
+#: src/mn-client-session.c:444
+#, c-format
+msgid "response \"%s\" is not valid in current context"
+msgstr ""
+
+#: src/mn-client-session.c:470
+#, c-format
+msgid "unable to parse response \"%s\""
+msgstr ""
+
+#: src/mn-client-session.c:517
+#, c-format
+msgid "unable to encode data using SASL: %s"
+msgstr ""
+
+#: src/mn-client-session.c:546 src/mn-client-session.c:553
+#, c-format
+msgid "unable to write to server: %s"
+msgstr ""
+
+#: src/mn-client-session.c:551
+msgid "unable to write to server: EOF"
+msgstr ""
+
+#: src/mn-client-session.c:583
+#, c-format
+msgid "unable to encode Base64: %s"
+msgstr ""
+
+#: src/mn-client-session.c:686
+#, c-format
+msgid "unable to initialize the SASL library: %s"
+msgstr ""
+
+#: src/mn-client-session.c:695
+#, c-format
+msgid "unable to retrieve local address of socket: %s"
+msgstr ""
+
+#: src/mn-client-session.c:701
+#, c-format
+msgid "unable to retrieve remote address of socket: %s"
+msgstr ""
+
+#: src/mn-client-session.c:735
+#, c-format
+msgid "warning: unable to set SASL security properties: %s"
+msgstr ""
+
+#: src/mn-client-session.c:774
+msgid ""
+"unable to start SASL authentication: SASL asked for something we did not know"
+msgstr ""
+
+#: src/mn-client-session.c:778
+#, c-format
+msgid "unable to start SASL authentication: %s"
+msgstr ""
+
+#: src/mn-client-session.c:782
+#, c-format
+msgid "unable to create a SASL connection: %s"
+msgstr ""
+
+#: src/mn-client-session.c:832
+msgid "SASL asked for something we did not know, aborting SASL authentication"
+msgstr ""
+
+#: src/mn-client-session.c:836
+#, c-format
+msgid "%s, aborting SASL authentication"
+msgstr ""
+
+#. compliance error
+#: src/mn-client-session.c:841
+#, c-format
+msgid "unable to decode Base64 input from server: %s"
+msgstr ""
+
+#: src/mn-client-session.c:844
+msgid ""
+"the server sent a SASL challenge, but there was a pending initial SASL "
+"client response"
+msgstr ""
+
+#: src/mn-client-session.c:858
+msgid ""
+"the server did not send a SASL challenge, but there was no pending initial "
+"SASL client response"
+msgstr ""
+
+#: src/mn-client-session.c:881
+#, c-format
+msgid "a SASL security layer of strength factor %i is now active"
+msgstr ""
+
+#. a security layer is active but we can't retrieve maxoutbuf -> fatal
+#: src/mn-client-session.c:886
+#, c-format
+msgid "unable to get SASL_MAXOUTBUF property: %s"
+msgstr ""
+
+#: src/mn-client-session.c:892
+#, c-format
+msgid "warning: unable to get SASL_SSF property: %s"
+msgstr ""
+
+#: src/mn-dialog.c:108
+msgid "A fatal error has occurred in Mail Notification"
+msgstr ""
+
+#: src/mn-gmail-mailbox-properties.gob:78
+msgid "Your Gmail username"
+msgstr ""
+
+#: src/mn-gmail-mailbox-properties.gob:79
+msgid "Your Gmail password"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:65
+msgid "unable to parse Gmail URI"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:180
+msgid "logging in"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:341
+#: src/mn-gmail-mailbox.gob:194 src/mn-gmail-mailbox.gob:233
+#: src/mn-gmail-mailbox.gob:266 src/mn-gmail-mailbox.gob:370
 #, c-format
-msgid "searching for unread mail in %s"
+msgid "unable to transfer data: %s"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:219 src/mn-gmail-mailbox.gob:252
+#: src/mn-gmail-mailbox.gob:286
+msgid "login failed"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:280
+msgid "successfully logged in"
 msgstr ""
 
-#: src/mn-gmail-mailbox.c:363
+#: src/mn-gmail-mailbox.gob:358
+msgid "searching for unread mail"
+msgstr ""
+
+#: src/mn-gmail-mailbox.gob:377
 msgid "unable to parse Gmail data"
 msgstr ""
 
-#: src/mn-mail-icon.c:130
-msgid "You have no new mail"
+#: src/mn-imap-mailbox-properties.gob:92
+msgid "Mailbox:"
 msgstr ""
 
-#: src/mn-mailbox-properties-dialog.c:155
-msgid "Add a Mailbox"
+#: src/mn-imap-mailbox-properties.gob:96
+msgid "in_box"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:107
+msgid "oth_er:"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:121
+msgid "The hostname or IP address of the IMAP server"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:122
+msgid "Your username on the IMAP server"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:123
+msgid "Your password on the IMAP server"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:124
+#: src/mn-imap-mailbox-properties.gob:125
+msgid "The port number of the IMAP server"
+msgstr ""
+
+#: src/mn-imap-mailbox-properties.gob:126
+msgid "The mailbox name"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:124 src/mn-pop3-mailbox.gob:133
+msgid "SSL support has not been compiled in"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:128
+msgid "unable to parse IMAP URI"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:195
+msgid "server did not send capabilities"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:267
+msgid "server advertised LOGINDISABLED, not using LOGIN authentication"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:268
+msgid "unable to login"
+msgstr ""
+
+#. compliance error
+#: src/mn-imap-mailbox.gob:319
+msgid "server did not send status"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:537 src/mn-pop3-mailbox.gob:715
+msgid "unknown server error"
 msgstr ""
 
-#: src/mn-mailbox-properties-dialog.c:182
-msgid "autodetect"
+#: src/mn-imap-mailbox.gob:603 src/mn-pop3-mailbox.gob:645
+msgid ""
+"a SASL authentication mechanism was selected but SASL support has not been "
+"compiled in"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:611 src/mn-pop3-mailbox.gob:657
+#, c-format
+msgid "unknown authentication mechanism \"%s\""
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:629
+msgid "falling back to IMAP LOGIN authentication"
+msgstr ""
+
+#: src/mn-imap-mailbox.gob:633 src/mn-pop3-mailbox.gob:691
+msgid "authentication failed"
+msgstr ""
+
+#: src/mn-mail-icon.gob:81
+msgid "_Update"
+msgstr ""
+
+#: src/mn-mail-icon.gob:87
+msgid "R_emove From Notification Area"
+msgstr ""
+
+#: src/mn-mail-icon.gob:172
+#, c-format
+msgid "_Run %s"
+msgstr ""
+
+#: src/mn-mail-icon.gob:173
+msgid "_Run Default Action"
 msgstr ""
 
-#: src/mn-mailbox-properties-dialog.c:394
+#: src/mn-mailbox-properties-dialog.c:109
+msgid "Add a Mailbox"
+msgstr ""
+
+#: src/mn-mailbox-properties-dialog.c:331
 #, c-format
 msgid "%s Properties"
 msgstr ""
 
-#: src/mn-mailbox-properties-dialog.c:580
-msgid "Select a File or Folder"
+#: src/mn-mailbox-properties-util.c:75
+msgid "_Username:"
 msgstr ""
 
-#: src/mn-mailbox.c:199
-msgid "URI"
+#: src/mn-mailbox-properties-util.c:79
+msgid "_Password:"
 msgstr ""
 
-#: src/mn-mailbox.c:200
-msgid "The mailbox URI"
+#: src/mn-mailbox-properties-util.c:146
+msgid "Connection type:"
 msgstr ""
 
-#: src/mn-mailbox.c:206
-msgid "Name"
+#: src/mn-mailbox-properties-util.c:153
+msgid "Port:"
 msgstr ""
 
-#: src/mn-mailbox.c:207
-msgid "The mailbox human-readable name"
+#: src/mn-mailbox-properties-util.c:180
+msgid "_Authentication mechanism:"
 msgstr ""
 
-#: src/mn-mailbox.c:213
-msgid "Automatic"
+#: src/mn-mailbox-properties.c:63
+msgid "Label"
 msgstr ""
 
-#: src/mn-mailbox.c:214
-msgid "Whether the mailbox has to be manually checked or not"
+#: src/mn-mailbox-properties.c:64
+msgid "The marked up text to show in the type combo box"
 msgstr ""
 
-#: src/mn-mailbox.c:220
-msgid "Has new"
+#: src/mn-mailbox-properties.c:69
+msgid "Size group"
 msgstr ""
 
-#: src/mn-mailbox.c:221
-msgid "Whether the mailbox has new mail or not"
+#: src/mn-mailbox-properties.c:70
+msgid "A GtkSizeGroup for aligning control labels"
 msgstr ""
 
-#: src/mn-mailbox.c:227
-msgid "Error"
+#: src/mn-mailbox-properties.c:75
+msgid "Complete"
 msgstr ""
 
-#: src/mn-mailbox.c:228
-msgid "The mailbox error if any"
+#: src/mn-mailbox-properties.c:76
+msgid "Whether the properties are completely filled or not"
 msgstr ""
 
-#: src/mn-mailbox.c:254
-#, c-format
-msgid "unable to cancel monitoring of %s: %s"
+#: src/mn-mailbox-view.gob:91
+msgid "Unable to add mailbox"
+msgstr ""
+
+#: src/mn-mailbox-view.gob:91
+msgid "The mailbox is already in the list."
+msgstr ""
+
+#: src/mn-mailbox-view.gob:283
+msgid "Mailbox"
+msgstr ""
+
+#: src/mn-mailbox-view.gob:297
+msgid "Format"
+msgstr ""
+
+#: src/mn-mailbox.gob:88
+msgid "The mailbox URI"
+msgstr ""
+
+#: src/mn-mailbox.gob:98
+msgid "The mailbox human-readable name"
+msgstr ""
+
+#: src/mn-mailbox.gob:102
+msgid "Whether the mailbox has to be manually checked or not"
 msgstr ""
 
-#: src/mn-mailbox.c:443
+#: src/mn-mailbox.gob:107
+msgid "Whether the mailbox has new mail or not"
+msgstr ""
+
+#: src/mn-mailbox.gob:112
+msgid "The mailbox error, if any"
+msgstr ""
+
+#: src/mn-mailbox.gob:218
 msgid "does not exist"
 msgstr ""
 
-#: src/mn-mailbox.c:460
+#: src/mn-mailbox.gob:255
 msgid "unknown format"
 msgstr ""
 
-#: src/mn-mailbox.c:553
+#: src/mn-mailbox.gob:316
 #, c-format
 msgid "unable to monitor %s: %s"
 msgstr ""
 
-#: src/mn-mailbox.c:567
+#: src/mn-mailbox.gob:330
 #, c-format
 msgid ""
 "As a fallback, they will be checked every %i second (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked every %i seconds (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-mailbox.c:578
+#: src/mn-mailbox.gob:341
 #, c-format
 msgid ""
 "As a fallback, they will be checked every %i minute (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked every %i minutes (this delay is "
-"configurable from the Preferences Dialog)."
+"configurable from the Properties Dialog)."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-mailbox.c:589
+#: src/mn-mailbox.gob:352
 #, c-format
 msgid ""
 "As a fallback, they will be checked approximately every %i minute (this "
-"delay is configurable from the Preferences Dialog)."
+"delay is configurable from the Properties Dialog)."
 msgid_plural ""
 "As a fallback, they will be checked approximately every %i minutes (this "
-"delay is configurable from the Preferences Dialog)."
+"delay is configurable from the Properties Dialog)."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-mailbox.c:603
-msgid "A monitoring error has occurred."
+#: src/mn-mailbox.gob:366
+msgid "A monitoring error has occurred"
 msgstr ""
 
-#: src/mn-mailbox.c:604
+#: src/mn-mailbox.gob:367
 #, c-format
 msgid ""
 "Mail Notification was unable to enable automatic notification for one or "
 "more mailboxes. %s"
 msgstr ""
 
-#: src/mn-mailboxes.c:133
+#: src/mn-mailboxes.gob:130
+#, c-format
+msgid "%s is unsupported: %s"
+msgstr ""
+
+#: src/mn-mailboxes.gob:157
 #, c-format
 msgid "%s has new mail"
 msgstr ""
 
-#: src/mn-mailboxes.c:133
+#: src/mn-mailboxes.gob:157
 #, c-format
 msgid "%s has no new mail"
 msgstr ""
 
-#: src/mn-mailboxes.c:143
+#: src/mn-mailboxes.gob:173
 #, c-format
 msgid "%s reported an error: %s"
 msgstr ""
 
-#: src/mn-maildir-mailbox.c:226 src/mn-sylpheed-mailbox.c:209
+#: src/mn-maildir-mailbox.gob:97
 #, c-format
-msgid "error while reading folder: %s"
+msgid "unable to open folder \"new\": %s"
+msgstr ""
+
+#: src/mn-maildir-mailbox.gob:122
+#, c-format
+msgid "error while reading folder \"new\": %s"
 msgstr ""
 
-#: src/mn-main.c:49
-msgid "Compiled in handlers:\n"
+#: src/mn-main.c:86
+#, c-format
+msgid "Compiled-in mailbox backends: %s\n"
+msgstr ""
+
+#: src/mn-main.c:104
+#, c-format
+msgid "Compiled-in features: %s\n"
 msgstr ""
 
-#: src/mn-main.c:83
+#: src/mn-main.c:133
 msgid "Enable informational output"
 msgstr ""
 
-#: src/mn-main.c:92
-msgid "List compiled-in handlers and exit"
+#: src/mn-main.c:142
+msgid "List compiled-in features and exit"
 msgstr ""
 
-#: src/mn-main.c:124
-msgid "unable to initialize GnomeVFS"
+#: src/mn-main.c:151
+msgid "Display the properties dialog"
 msgstr ""
 
-#: src/mn-mbox-mailbox.c:339
-#, c-format
-msgid "unable to get mailbox information: %s"
+#: src/mn-main.c:160
+msgid "Display the about dialog"
 msgstr ""
 
-#: src/mn-mbox-mailbox.c:364
-#, c-format
-msgid "unable to open mailbox: %s"
+#: src/mn-main.c:169
+msgid "Update the mail status"
 msgstr ""
 
-#: src/mn-mbox-mailbox.c:401
-#, c-format
-msgid "error while reading mailbox: %s"
+#: src/mn-main.c:178
+msgid "Report the mail status"
 msgstr ""
 
-#: src/mn-mbox-mailbox.c:417
+#.
+#. * We can't use mn_error_dialog() because gtk_init() has not been
+#. * called yet.
+#.
+#: src/mn-main.c:204
+msgid "multi-threading is not available"
+msgstr ""
+
+#: src/mn-main.c:244
+msgid "Unable to initialize the GnomeVFS library."
+msgstr ""
+
+#: src/mn-main.c:252
+msgid ""
+"Bonobo could not locate the automation object. Please check your Mail "
+"Notification installation."
+msgstr ""
+
+#: src/mn-main.c:263
+msgid "updating the mail status"
+msgstr ""
+
+#: src/mn-main.c:279
+#, fuzzy
+msgid "Mail Notification is already running"
+msgstr "Иконка входÑщих Ñообщений"
+
+#: src/mn-main.c:286
+msgid ""
+"Bonobo could not locate the GNOME_MailNotification_Automation.server file. "
+"Please check your Mail Notification installation."
+msgstr ""
+
+#: src/mn-main.c:290
+msgid ""
+"Bonobo was unable to register the automation server. Please check your Mail "
+"Notification installation."
+msgstr ""
+
+#: src/mn-mbox-mailbox.gob:165
 #, c-format
-msgid "unable to close mailbox: %s"
+msgid "error while reading mailbox: %s"
 msgstr ""
 
-#: src/mn-mh-mailbox.c:185
+#: src/mn-mbox-mailbox.gob:173
 #, c-format
-msgid "unable to open .mh_sequences: %s"
+msgid "unable to open mailbox: %s"
 msgstr ""
 
-#: src/mn-mh-mailbox.c:215
+#: src/mn-mh-mailbox.gob:111
 #, c-format
 msgid "error while reading .mh_sequences: %s"
 msgstr ""
 
-#: src/mn-mh-mailbox.c:231
+#: src/mn-mh-mailbox.gob:119
 #, c-format
-msgid "unable to close .mh_sequences: %s"
+msgid "unable to open .mh_sequences: %s"
 msgstr ""
 
-#: src/mn-pending-mailbox.c:64
-msgid "detecting..."
+#: src/mn-pending-mailbox.gob:33
+msgid "detecting"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:164
-msgid "unable to parse POP3 URI"
+#: src/mn-pi-mailbox-properties.gob:75
+msgid "_Hostname:"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:190
-#, c-format
-msgid "connecting to POP3 server %s"
+#: src/mn-pi-mailbox-properties.gob:93
+msgid "_Details"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:227
-#, c-format
-msgid "successfully connected to %s"
+#: src/mn-pi-mailbox-properties.gob:105
+msgid "sta_ndard"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:233
-msgid "unable to connect to server"
+#: src/mn-pi-mailbox-properties.gob:115
+msgid "_SSL"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:238
-msgid "connection to server unexpectedly closed"
+#: src/mn-pop3-mailbox-properties.gob:84
+msgid "The hostname or IP address of the POP3 server"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:277
-#, c-format
-msgid "invalid STAT reply \"%s\""
+#: src/mn-pop3-mailbox-properties.gob:85
+msgid "Your username on the POP3 server"
+msgstr ""
+
+#: src/mn-pop3-mailbox-properties.gob:86
+msgid "Your password on the POP3 server"
+msgstr ""
+
+#: src/mn-pop3-mailbox-properties.gob:87 src/mn-pop3-mailbox-properties.gob:88
+msgid "The port number of the POP3 server"
+msgstr ""
+
+#: src/mn-pop3-mailbox.gob:137
+msgid "unable to parse POP3 URI"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:296
-msgid "unknown error"
+#: src/mn-pop3-mailbox.gob:267
+msgid "invalid arguments for the LOGIN-DELAY capability"
 msgstr ""
 
-#: src/mn-pop3-mailbox.c:317
+#: src/mn-pop3-mailbox.gob:495
 #, c-format
-msgid "invalid reply \"%s\""
+msgid "honouring LOGIN-DELAY, sleeping for %i second"
+msgid_plural "honouring LOGIN-DELAY, sleeping for %i seconds"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/mn-pop3-mailbox.gob:653
+msgid "server does not support APOP authentication"
 msgstr ""
 
-#: src/mn-preferences.c:195
-msgid "Mailbox"
+#: src/mn-pop3-mailbox.gob:681
+msgid "falling back to APOP authentication"
 msgstr ""
 
-#: src/mn-preferences.c:209
-msgid "Format"
+#: src/mn-pop3-mailbox.gob:686
+msgid "falling back to USER/PASS authentication"
 msgstr ""
 
-#: src/mn-preferences.c:361
+#: src/mn-properties.c:132
 msgid "No mailbox selected."
 msgstr ""
 
-#: src/mn-preferences.c:366
+#: src/mn-properties.c:137
 #, c-format
 msgid "%i mailbox selected."
 msgid_plural "%i mailboxes selected."
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-preferences.c:429
-msgid "Unable to add mailbox."
-msgstr ""
-
-#: src/mn-preferences.c:429
-msgid "The mailbox is already in the list."
-msgstr ""
-
-#: src/mn-ui.c:87
-msgid "A command error has occurred."
+#: src/mn-shell.gob:191
+msgid "A command error has occurred"
 msgstr ""
 
-#: src/mn-ui.c:88
+#: src/mn-shell.gob:192
 #, c-format
-msgid "Unable to execute clicked command: %s."
+msgid "Unable to execute double-clicked command: %s."
 msgstr ""
 
-#: src/mn-ui.c:184
+#: src/mn-shell.gob:297
 msgid "The following mailbox has new mail:\n"
 msgid_plural "The following mailboxes have new mail:\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-ui.c:191
+#: src/mn-shell.gob:301
 msgid "You have no new mail."
 msgstr ""
 
-#: src/mn-ui.c:195
+#: src/mn-shell.gob:304
 msgid "The following mailbox reported an error:\n"
 msgid_plural "The following mailboxes reported an error:\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-ui.c:200
+#: src/mn-shell.gob:309
 msgid "The following mailbox is unsupported:\n"
 msgid_plural "The following mailboxes are unsupported:\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/mn-ui.c:217
-msgid "No mailboxes are being monitored."
+#: src/mn-shell.gob:325
+msgid "You have new mail."
 msgstr ""
 
-#: src/mn-ui.c:265
-msgid "A Mail Notification Icon"
+#: src/mn-shell.gob:338
+msgid "A command error has occurred in Mail Notification"
 msgstr ""
 
-#: src/mn-ui.c:268
-msgid "Jean-Yves Lefort <jylefort@brutele.be>"
-msgstr "Dan Korostelev <dan@ats.energo.ru>"
-
-#: src/mn-unsupported-mailbox.c:98
-msgid "unsupported"
-msgstr ""
-
-#: src/mn-unsupported-mailbox.c:103
-msgid "Reason"
+#: src/mn-shell.gob:339
+#, c-format
+msgid "Unable to execute new mail command: %s."
 msgstr ""
 
-#: src/mn-unsupported-mailbox.c:104
-msgid "The reason why the mailbox is unsupported"
+#: src/mn-stock.c:28
+msgid "Select _All"
 msgstr ""
 
-#: src/mn-util.c:113
+#: src/mn-sylpheed-mailbox.gob:83
 #, c-format
-msgid "error loading image: %s"
+msgid "unable to open folder: %s"
 msgstr ""
 
-#: src/mn-util.c:151
+#: src/mn-sylpheed-mailbox.gob:114
 #, c-format
-msgid "widget %s not found in interface %s"
-msgstr ""
-
-#: src/mn-util.c:258
-msgid "received an invalid URI list"
-msgstr ""
-
-#: src/mn-util.c:294
-msgid "received an invalid Mozilla URL"
-msgstr ""
-
-#: src/mn-util.c:386
-msgid "Unable to display help."
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:1 ui/preferences.glade.h:2
-msgid "*"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:2
-msgid "P_ort:"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:3
-msgid "The URI of the mailbox"
+msgid "error while reading folder: %s"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:4
-msgid "The hostname or IP address of the POP3 server"
+#: src/mn-system-mailbox-properties.gob:33 src/mn-uri.c:617
+msgid "System Mailbox"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:5
-msgid "The port number of the POP3 server"
+#: src/mn-system-mailbox-properties.gob:56
+#, c-format
+msgid "Your system mailbox (<span weight=\"bold\">%s</span>) will be used."
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:6
+#: src/mn-system-mailbox-properties.gob:63
 msgid ""
-"This mailbox type has not been compiled in and is therefore unsupported."
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:7
-msgid "Your Gmail password"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:8
-msgid "Your Gmail username"
+"The location of your system mailbox could not be detected. Please set the "
+"MAIL environment variable."
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:9
-msgid "Your password on the POP3 server"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:10
-msgid "Your username on the POP3 server"
-msgstr ""
-
-#: ui/mailbox-properties.glade.h:11
-msgid "_Browse..."
+#: src/mn-unsupported-mailbox.gob:31
+msgid "The reason why the mailbox is unsupported"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:12
-msgid "_Hostname:"
+#: src/mn-unsupported-mailbox.gob:38
+msgid "unsupported"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:13
-msgid "_Location:"
+#: src/mn-util.c:116
+#, c-format
+msgid "error loading image: %s"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:14
-msgid "_Password:"
+#: src/mn-util.c:154
+#, c-format
+msgid "widget %s not found in interface %s"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:15
-msgid "_Type:"
+#: src/mn-util.c:261
+msgid "received an invalid URI list"
 msgstr ""
 
-#: ui/mailbox-properties.glade.h:16
-msgid "_Username:"
+#: src/mn-util.c:297
+msgid "received an invalid Mozilla URL"
 msgstr ""
 
-#: ui/menu.glade.h:1
-msgid "Show help"
+#: src/mn-util.c:389
+msgid "Unable to display help"
 msgstr ""
 
-#: ui/menu.glade.h:2
-msgid "Update the icon"
+#: src/mn-util.c:403
+#, c-format
+msgid "Unable to create a thread: %s."
 msgstr ""
 
-#: ui/menu.glade.h:3
-msgid "_Help"
+#: ui/mailbox-properties.glade.h:1
+msgid "_Mailbox type:"
 msgstr ""
 
-#: ui/menu.glade.h:4
-msgid "_Update"
+#: ui/properties.glade.h:1
+msgid "    "
 msgstr ""
 
-#: ui/preferences.glade.h:1
-msgid "    "
+#: ui/properties.glade.h:2
+msgid "*"
 msgstr ""
 
-#: ui/preferences.glade.h:3
+#: ui/properties.glade.h:3
 msgid "<span weight=\"bold\">Commands</span>"
 msgstr ""
 
-#: ui/preferences.glade.h:4
+#: ui/properties.glade.h:4
 msgid "<span weight=\"bold\">General</span>"
 msgstr ""
 
-#: ui/preferences.glade.h:5
+#: ui/properties.glade.h:5
 msgid "<span weight=\"bold\">Mailboxes</span>"
 msgstr ""
 
-#: ui/preferences.glade.h:6
-msgid "Mail Notification Preferences"
-msgstr ""
+#: ui/properties.glade.h:6
+#, fuzzy
+msgid "Mail Notification Properties"
+msgstr "Иконка входÑщих Ñообщений"
 
-#: ui/preferences.glade.h:7
+#: ui/properties.glade.h:7
 msgid "The amount of time to wait between mail checks"
 msgstr ""
 
-#: ui/preferences.glade.h:8
+#: ui/properties.glade.h:8
 msgid "The command to run when new mail arrives"
 msgstr ""
 
-#: ui/preferences.glade.h:9
-msgid "The command to run when the icon is clicked"
+#: ui/properties.glade.h:9
+#, fuzzy
+msgid "The command to run when the icon is double-clicked"
 msgstr ""
+"Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
-#: ui/preferences.glade.h:10
+#: ui/properties.glade.h:10
 msgid "When _new mail arrives:"
 msgstr ""
 
-#: ui/preferences.glade.h:11
-msgid "When click_ed:"
+#: ui/properties.glade.h:11
+msgid "When double-click_ed:"
 msgstr ""
 
-#: ui/preferences.glade.h:12
+#: ui/properties.glade.h:12
 msgid "Whether to run a command when new mail arrives or not"
 msgstr ""
 
-#: ui/preferences.glade.h:13
-msgid "Whether to run a command when the icon is clicked or not"
-msgstr ""
-
-#: ui/preferences.glade.h:14
-msgid "_Add"
+#: ui/properties.glade.h:13
+#, fuzzy
+msgid "Whether to run a command when the icon is double-clicked or not"
 msgstr ""
+"Иконка в облаÑти ÑƒÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ð½ÐµÐ»Ð¸, уведомлÑÑŽÑ‰Ð°Ñ Ð¾ приходе новой почты."
 
-#: ui/preferences.glade.h:15
+#: ui/properties.glade.h:14
 msgid "_Delay between mail checks:"
 msgstr ""
 
-#: ui/preferences.glade.h:16
-msgid "_Remove"
-msgstr ""
-
-#: ui/preferences.glade.h:17
+#: ui/properties.glade.h:15
 msgid "minutes"
 msgstr ""
 
-#: ui/preferences.glade.h:18
+#: ui/properties.glade.h:16
 msgid "seconds"
 msgstr ""
diff --git a/src/MNAutomation.idl b/src/MNAutomation.idl
@@ -0,0 +1,30 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+#include <Bonobo.idl>
+
+module GNOME 
+{
+  interface MNAutomation : Bonobo::Unknown 
+  {
+    void update ();
+    void report (out string report);
+    void displayProperties ();
+    void displayAbout ();
+  };
+};
diff --git a/src/Makefile.am b/src/Makefile.am
@@ -1,76 +1,229 @@
 bin_PROGRAMS = mail-notification
 
 if WITH_MBOX
-mbox_sources = mn-mbox-mailbox.c mn-mbox-mailbox.h
+mbox_gob_sources = mn-mbox-mailbox.gob
+mbox_gob_built_sources = \
+	mn-mbox-mailbox-private.h	\
+	mn-mbox-mailbox.c		\
+	mn-mbox-mailbox.h
 endif
+
 if WITH_MH
-mh_sources = mn-mh-mailbox.c mn-mh-mailbox.h
+mh_gob_sources = mn-mh-mailbox.gob
+mh_gob_built_sources = \
+	mn-mh-mailbox-private.h		\
+	mn-mh-mailbox.c			\
+	mn-mh-mailbox.h
 endif
+
 if WITH_MAILDIR
-maildir_sources = mn-maildir-mailbox.c mn-maildir-mailbox.h
+maildir_gob_sources = mn-maildir-mailbox.gob
+maildir_gob_built_sources = \
+	mn-maildir-mailbox-private.h	\
+	mn-maildir-mailbox.c		\
+	mn-maildir-mailbox.h
 endif
+
 if WITH_POP3
-pop3_sources = mn-pop3-mailbox.c mn-pop3-mailbox.h
+pop3_gob_sources = \
+	mn-pop3-mailbox-properties.gob	\
+	mn-pop3-mailbox.gob
+pop3_gob_built_sources = \
+	mn-pop3-mailbox-properties-private.h	\
+	mn-pop3-mailbox-properties.c		\
+	mn-pop3-mailbox-properties.h		\
+	mn-pop3-mailbox-private.h		\
+	mn-pop3-mailbox.c			\
+	mn-pop3-mailbox.h
+md5_sources = mn-md5.c mn-md5.h
 endif
+
+if WITH_IMAP
+imap_gob_sources = \
+	mn-imap-mailbox-properties.gob	\
+	mn-imap-mailbox.gob
+imap_gob_built_sources = \
+	mn-imap-mailbox-properties-private.h	\
+	mn-imap-mailbox-properties.c		\
+	mn-imap-mailbox-properties.h		\
+	mn-imap-mailbox-private.h		\
+	mn-imap-mailbox.c			\
+	mn-imap-mailbox.h
+endif
+
+if WITH_POP3_OR_IMAP
+client_session_sources = mn-client-session.c mn-client-session.h
+pi_gob_sources = \
+	mn-auth-combo-box.gob			\
+	mn-pi-mailbox-properties.gob
+pi_gob_built_sources = \
+	mn-auth-combo-box-private.h		\
+	mn-auth-combo-box.c			\
+	mn-auth-combo-box.h			\
+	mn-pi-mailbox-properties-private.h	\
+	mn-pi-mailbox-properties.c		\
+	mn-pi-mailbox-properties.h
+endif
+
 if WITH_SYLPHEED
-sylpheed_sources = mn-sylpheed-mailbox.c mn-sylpheed-mailbox.h
+sylpheed_gob_sources = mn-sylpheed-mailbox.gob
+sylpheed_gob_built_sources = \
+	mn-sylpheed-mailbox-private.h	\
+	mn-sylpheed-mailbox.c		\
+	mn-sylpheed-mailbox.h
 endif
+
 if WITH_GMAIL
-gmail_sources = mn-gmail-mailbox.c mn-gmail-mailbox.h
+gmail_gob_sources = \
+	mn-gmail-mailbox-properties.gob	\
+	mn-gmail-mailbox.gob
+gmail_gob_built_sources = \
+	mn-gmail-mailbox-properties-private.h	\
+	mn-gmail-mailbox-properties.c		\
+	mn-gmail-mailbox-properties.h		\
+	mn-gmail-mailbox-private.h		\
+	mn-gmail-mailbox.c			\
+	mn-gmail-mailbox.h
 endif
+
 if HAVE_SOUP
 soup_sources = mn-soup.c mn-soup.h
 endif
 
+if WITH_SSL
+ssl_sources = mn-ssl.c mn-ssl.h
+endif
+
+if WITH_SASL
+sasl_sources = mn-sasl.c mn-sasl.h
+endif
+
+idl_sources = MNAutomation.idl
+idl_built_sources = \
+	MNAutomation-common.c			\
+	MNAutomation-stubs.c			\
+	MNAutomation-skels.c			\
+	MNAutomation.h
+
+gob_sources = \
+	$(mbox_gob_sources)			\
+	$(mh_gob_sources)			\
+	$(maildir_gob_sources)			\
+	$(pop3_gob_sources)			\
+	$(imap_gob_sources)			\
+	$(pi_gob_sources)			\
+	$(sylpheed_gob_sources)			\
+	$(gmail_gob_sources)			\
+	mn-about-dialog.gob			\
+	mn-autodetect-mailbox-properties.gob	\
+	mn-automation.gob			\
+	mn-blinking-image.gob			\
+	mn-mail-icon.gob			\
+	mn-mailbox-view.gob			\
+	mn-mailbox.gob				\
+	mn-mailboxes.gob			\
+	mn-pending-mailbox.gob			\
+	mn-shell.gob				\
+	mn-system-mailbox-properties.gob	\
+	mn-unsupported-mailbox.gob
+gob_built_sources = \
+	$(mbox_gob_built_sources)			\
+	$(mh_gob_built_sources)				\
+	$(maildir_gob_built_sources)			\
+	$(pop3_gob_built_sources)			\
+	$(imap_gob_built_sources)			\
+	$(pi_gob_built_sources)				\
+	$(sylpheed_gob_built_sources)			\
+	$(gmail_gob_built_sources)			\
+	mn-about-dialog-private.h			\
+	mn-about-dialog.c				\
+	mn-about-dialog.h				\
+	mn-autodetect-mailbox-properties-private.h	\
+	mn-autodetect-mailbox-properties.c		\
+	mn-autodetect-mailbox-properties.h		\
+	mn-automation-private.h				\
+	mn-automation.c					\
+	mn-automation.h					\
+	mn-blinking-image-private.h			\
+	mn-blinking-image.c				\
+	mn-blinking-image.h				\
+	mn-mail-icon-private.h				\
+	mn-mail-icon.c					\
+	mn-mail-icon.h					\
+	mn-mailbox-view-private.h			\
+	mn-mailbox-view.c				\
+	mn-mailbox-view.h				\
+	mn-mailbox-private.h				\
+	mn-mailbox.c					\
+	mn-mailbox.h					\
+	mn-mailboxes-private.h				\
+	mn-mailboxes.c					\
+	mn-mailboxes.h					\
+	mn-pending-mailbox-private.h			\
+	mn-pending-mailbox.c				\
+	mn-pending-mailbox.h				\
+	mn-shell-private.h				\
+	mn-shell.c					\
+	mn-shell.h					\
+	mn-system-mailbox-properties-private.h		\
+	mn-system-mailbox-properties.c			\
+	mn-system-mailbox-properties.h			\
+	mn-unsupported-mailbox-private.h		\
+	mn-unsupported-mailbox.c			\
+	mn-unsupported-mailbox.h
+
+nodist_mail_notification_SOURCES = $(idl_built_sources)
 mail_notification_SOURCES = \
+	$(idl_sources)			\
+	$(gob_sources)			\
+	$(gob_built_sources)		\
+	$(md5_sources)			\
+	$(client_session_sources)	\
+	$(soup_sources)			\
+	$(ssl_sources)			\
+	$(sasl_sources)			\
 	eggtrayicon.c			\
 	eggtrayicon.h			\
 	mn-conf.c			\
 	mn-conf.h			\
 	mn-dialog.c			\
 	mn-dialog.h			\
-	mn-mail-icon.c			\
-	mn-mail-icon.h			\
 	mn-mailbox-properties-dialog.c	\
 	mn-mailbox-properties-dialog.h	\
-	mn-mailbox.c			\
-	mn-mailbox.h			\
-	mn-mailboxes.c			\
-	mn-mailboxes.h			\
-	$(mbox_sources)			\
-	$(mh_sources)			\
-	$(maildir_sources)		\
-	$(pop3_sources)			\
-	$(sylpheed_sources)		\
-	$(gmail_sources)		\
-	$(soup_sources)			\
+	mn-mailbox-properties-util.c	\
+	mn-mailbox-properties-util.h	\
+	mn-mailbox-properties.c		\
+	mn-mailbox-properties.h		\
 	mn-main.c			\
-	mn-pending-mailbox.c		\
-	mn-pending-mailbox.h		\
-	mn-preferences.c		\
-	mn-preferences.h		\
+	mn-properties.c			\
+	mn-properties.h			\
 	mn-stock.c			\
 	mn-stock.h			\
-	mn-ui.c				\
-	mn-ui.h				\
-	mn-unsupported-mailbox.c	\
-	mn-unsupported-mailbox.h	\
 	mn-uri.c			\
 	mn-uri.h			\
 	mn-util.c			\
 	mn-util.h			\
 	mn-vfs.c			\
 	mn-vfs.h
+BUILT_SOURCES = $(idl_built_sources) $(gob_built_sources)
 
-mail_notification_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(GNET_LIBS) $(SOUP_LIBS)
+mail_notification_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(SOUP_LIBS) $(OPENSSL_LIBS) $(SASL_LIBS)
 
 gnomelocaledir = $(datadir)/locale
-
-AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GNOME_CFLAGS) $(GNET_CFLAGS) $(SOUP_CFLAGS) \
+AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GNOME_CFLAGS) $(SOUP_CFLAGS) $(OPENSSL_CFLAGS) $(SASL_CFLAGS) \
 	-I$(top_srcdir) \
 	-DPREFIX="\"$(prefix)\"" \
 	-DSYSCONFDIR="\"$(sysconfdir)\"" \
 	-DDATADIR="\"$(datadir)\"" \
 	-DLIBDIR="\"$(libdir)\"" \
 	-DGNOMELOCALEDIR="\"$(gnomelocaledir)\"" \
-	-DUIDIR="\"$(pkgdatadir)/ui\""
+	-DUIDIR="\"$(pkgdatadir)/ui\"" \
+	-DG_LOG_DOMAIN="\"$(PACKAGE)\""
+
+CLEANFILES = $(idl_built_sources)
+MAINTAINERCLEANFILES = $(gob_built_sources)
+
+%.c %.h %-private.h: %.gob
+	$(GOB2) --always-private-header --exit-on-warn $<
+%-common.c %-stubs.c %-skels.c %.h: %.idl $(ORBIT_IDL)
+	$(ORBIT_IDL) -I$(LIBBONOBO_IDL) -I$(BONOBO_ACTIVATION_IDL) $<
diff --git a/src/Makefile.in b/src/Makefile.in
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-SOURCES = $(mail_notification_SOURCES)
+SOURCES = $(mail_notification_SOURCES) $(nodist_mail_notification_SOURCES)
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -40,7 +40,8 @@ bin_PROGRAMS = mail-notification$(EXEEXT)
 subdir = src
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/pkg.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/openssl.m4 \
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/sasl2.m4 \
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -50,59 +51,143 @@ CONFIG_CLEAN_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
-am__mail_notification_SOURCES_DIST = eggtrayicon.c eggtrayicon.h \
-	mn-conf.c mn-conf.h mn-dialog.c mn-dialog.h mn-mail-icon.c \
-	mn-mail-icon.h mn-mailbox-properties-dialog.c \
-	mn-mailbox-properties-dialog.h mn-mailbox.c mn-mailbox.h \
-	mn-mailboxes.c mn-mailboxes.h mn-mbox-mailbox.c \
-	mn-mbox-mailbox.h mn-mh-mailbox.c mn-mh-mailbox.h \
-	mn-maildir-mailbox.c mn-maildir-mailbox.h mn-pop3-mailbox.c \
-	mn-pop3-mailbox.h mn-sylpheed-mailbox.c mn-sylpheed-mailbox.h \
-	mn-gmail-mailbox.c mn-gmail-mailbox.h mn-soup.c mn-soup.h \
-	mn-main.c mn-pending-mailbox.c mn-pending-mailbox.h \
-	mn-preferences.c mn-preferences.h mn-stock.c mn-stock.h \
-	mn-ui.c mn-ui.h mn-unsupported-mailbox.c \
-	mn-unsupported-mailbox.h mn-uri.c mn-uri.h mn-util.c mn-util.h \
-	mn-vfs.c mn-vfs.h
-@WITH_MBOX_TRUE@am__objects_1 = mn-mbox-mailbox.$(OBJEXT)
-@WITH_MH_TRUE@am__objects_2 = mn-mh-mailbox.$(OBJEXT)
-@WITH_MAILDIR_TRUE@am__objects_3 = mn-maildir-mailbox.$(OBJEXT)
-@WITH_POP3_TRUE@am__objects_4 = mn-pop3-mailbox.$(OBJEXT)
-@WITH_SYLPHEED_TRUE@am__objects_5 = mn-sylpheed-mailbox.$(OBJEXT)
-@WITH_GMAIL_TRUE@am__objects_6 = mn-gmail-mailbox.$(OBJEXT)
-@HAVE_SOUP_TRUE@am__objects_7 = mn-soup.$(OBJEXT)
-am_mail_notification_OBJECTS = eggtrayicon.$(OBJEXT) mn-conf.$(OBJEXT) \
-	mn-dialog.$(OBJEXT) mn-mail-icon.$(OBJEXT) \
-	mn-mailbox-properties-dialog.$(OBJEXT) mn-mailbox.$(OBJEXT) \
-	mn-mailboxes.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
-	$(am__objects_3) $(am__objects_4) $(am__objects_5) \
-	$(am__objects_6) $(am__objects_7) mn-main.$(OBJEXT) \
-	mn-pending-mailbox.$(OBJEXT) mn-preferences.$(OBJEXT) \
-	mn-stock.$(OBJEXT) mn-ui.$(OBJEXT) \
-	mn-unsupported-mailbox.$(OBJEXT) mn-uri.$(OBJEXT) \
+am__mail_notification_SOURCES_DIST = MNAutomation.idl \
+	mn-mbox-mailbox.gob mn-mh-mailbox.gob mn-maildir-mailbox.gob \
+	mn-pop3-mailbox-properties.gob mn-pop3-mailbox.gob \
+	mn-imap-mailbox-properties.gob mn-imap-mailbox.gob \
+	mn-auth-combo-box.gob mn-pi-mailbox-properties.gob \
+	mn-sylpheed-mailbox.gob mn-gmail-mailbox-properties.gob \
+	mn-gmail-mailbox.gob mn-about-dialog.gob \
+	mn-autodetect-mailbox-properties.gob mn-automation.gob \
+	mn-blinking-image.gob mn-mail-icon.gob mn-mailbox-view.gob \
+	mn-mailbox.gob mn-mailboxes.gob mn-pending-mailbox.gob \
+	mn-shell.gob mn-system-mailbox-properties.gob \
+	mn-unsupported-mailbox.gob mn-mbox-mailbox-private.h \
+	mn-mbox-mailbox.c mn-mbox-mailbox.h mn-mh-mailbox-private.h \
+	mn-mh-mailbox.c mn-mh-mailbox.h mn-maildir-mailbox-private.h \
+	mn-maildir-mailbox.c mn-maildir-mailbox.h \
+	mn-pop3-mailbox-properties-private.h \
+	mn-pop3-mailbox-properties.c mn-pop3-mailbox-properties.h \
+	mn-pop3-mailbox-private.h mn-pop3-mailbox.c mn-pop3-mailbox.h \
+	mn-imap-mailbox-properties-private.h \
+	mn-imap-mailbox-properties.c mn-imap-mailbox-properties.h \
+	mn-imap-mailbox-private.h mn-imap-mailbox.c mn-imap-mailbox.h \
+	mn-auth-combo-box-private.h mn-auth-combo-box.c \
+	mn-auth-combo-box.h mn-pi-mailbox-properties-private.h \
+	mn-pi-mailbox-properties.c mn-pi-mailbox-properties.h \
+	mn-sylpheed-mailbox-private.h mn-sylpheed-mailbox.c \
+	mn-sylpheed-mailbox.h mn-gmail-mailbox-properties-private.h \
+	mn-gmail-mailbox-properties.c mn-gmail-mailbox-properties.h \
+	mn-gmail-mailbox-private.h mn-gmail-mailbox.c \
+	mn-gmail-mailbox.h mn-about-dialog-private.h mn-about-dialog.c \
+	mn-about-dialog.h mn-autodetect-mailbox-properties-private.h \
+	mn-autodetect-mailbox-properties.c \
+	mn-autodetect-mailbox-properties.h mn-automation-private.h \
+	mn-automation.c mn-automation.h mn-blinking-image-private.h \
+	mn-blinking-image.c mn-blinking-image.h mn-mail-icon-private.h \
+	mn-mail-icon.c mn-mail-icon.h mn-mailbox-view-private.h \
+	mn-mailbox-view.c mn-mailbox-view.h mn-mailbox-private.h \
+	mn-mailbox.c mn-mailbox.h mn-mailboxes-private.h \
+	mn-mailboxes.c mn-mailboxes.h mn-pending-mailbox-private.h \
+	mn-pending-mailbox.c mn-pending-mailbox.h mn-shell-private.h \
+	mn-shell.c mn-shell.h mn-system-mailbox-properties-private.h \
+	mn-system-mailbox-properties.c mn-system-mailbox-properties.h \
+	mn-unsupported-mailbox-private.h mn-unsupported-mailbox.c \
+	mn-unsupported-mailbox.h mn-md5.c mn-md5.h mn-client-session.c \
+	mn-client-session.h mn-soup.c mn-soup.h mn-ssl.c mn-ssl.h \
+	mn-sasl.c mn-sasl.h eggtrayicon.c eggtrayicon.h mn-conf.c \
+	mn-conf.h mn-dialog.c mn-dialog.h \
+	mn-mailbox-properties-dialog.c mn-mailbox-properties-dialog.h \
+	mn-mailbox-properties-util.c mn-mailbox-properties-util.h \
+	mn-mailbox-properties.c mn-mailbox-properties.h mn-main.c \
+	mn-properties.c mn-properties.h mn-stock.c mn-stock.h mn-uri.c \
+	mn-uri.h mn-util.c mn-util.h mn-vfs.c mn-vfs.h
+am__objects_1 =
+am__objects_2 = $(am__objects_1) $(am__objects_1) $(am__objects_1) \
+	$(am__objects_1) $(am__objects_1) $(am__objects_1) \
+	$(am__objects_1) $(am__objects_1)
+@WITH_MBOX_TRUE@am__objects_3 = mn-mbox-mailbox.$(OBJEXT)
+@WITH_MH_TRUE@am__objects_4 = mn-mh-mailbox.$(OBJEXT)
+@WITH_MAILDIR_TRUE@am__objects_5 = mn-maildir-mailbox.$(OBJEXT)
+@WITH_POP3_TRUE@am__objects_6 = mn-pop3-mailbox-properties.$(OBJEXT) \
+@WITH_POP3_TRUE@	mn-pop3-mailbox.$(OBJEXT)
+@WITH_IMAP_TRUE@am__objects_7 = mn-imap-mailbox-properties.$(OBJEXT) \
+@WITH_IMAP_TRUE@	mn-imap-mailbox.$(OBJEXT)
+@WITH_POP3_OR_IMAP_TRUE@am__objects_8 = mn-auth-combo-box.$(OBJEXT) \
+@WITH_POP3_OR_IMAP_TRUE@	mn-pi-mailbox-properties.$(OBJEXT)
+@WITH_SYLPHEED_TRUE@am__objects_9 = mn-sylpheed-mailbox.$(OBJEXT)
+@WITH_GMAIL_TRUE@am__objects_10 =  \
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox-properties.$(OBJEXT) \
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox.$(OBJEXT)
+am__objects_11 = $(am__objects_3) $(am__objects_4) $(am__objects_5) \
+	$(am__objects_6) $(am__objects_7) $(am__objects_8) \
+	$(am__objects_9) $(am__objects_10) mn-about-dialog.$(OBJEXT) \
+	mn-autodetect-mailbox-properties.$(OBJEXT) \
+	mn-automation.$(OBJEXT) mn-blinking-image.$(OBJEXT) \
+	mn-mail-icon.$(OBJEXT) mn-mailbox-view.$(OBJEXT) \
+	mn-mailbox.$(OBJEXT) mn-mailboxes.$(OBJEXT) \
+	mn-pending-mailbox.$(OBJEXT) mn-shell.$(OBJEXT) \
+	mn-system-mailbox-properties.$(OBJEXT) \
+	mn-unsupported-mailbox.$(OBJEXT)
+@WITH_POP3_TRUE@am__objects_12 = mn-md5.$(OBJEXT)
+@WITH_POP3_OR_IMAP_TRUE@am__objects_13 = mn-client-session.$(OBJEXT)
+@HAVE_SOUP_TRUE@am__objects_14 = mn-soup.$(OBJEXT)
+@WITH_SSL_TRUE@am__objects_15 = mn-ssl.$(OBJEXT)
+@WITH_SASL_TRUE@am__objects_16 = mn-sasl.$(OBJEXT)
+am_mail_notification_OBJECTS = $(am__objects_1) $(am__objects_2) \
+	$(am__objects_11) $(am__objects_12) $(am__objects_13) \
+	$(am__objects_14) $(am__objects_15) $(am__objects_16) \
+	eggtrayicon.$(OBJEXT) mn-conf.$(OBJEXT) mn-dialog.$(OBJEXT) \
+	mn-mailbox-properties-dialog.$(OBJEXT) \
+	mn-mailbox-properties-util.$(OBJEXT) \
+	mn-mailbox-properties.$(OBJEXT) mn-main.$(OBJEXT) \
+	mn-properties.$(OBJEXT) mn-stock.$(OBJEXT) mn-uri.$(OBJEXT) \
 	mn-util.$(OBJEXT) mn-vfs.$(OBJEXT)
-mail_notification_OBJECTS = $(am_mail_notification_OBJECTS)
+am__objects_17 = MNAutomation-common.$(OBJEXT) \
+	MNAutomation-stubs.$(OBJEXT) MNAutomation-skels.$(OBJEXT)
+nodist_mail_notification_OBJECTS = $(am__objects_17)
+mail_notification_OBJECTS = $(am_mail_notification_OBJECTS) \
+	$(nodist_mail_notification_OBJECTS)
 mail_notification_LDADD = $(LDADD)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/eggtrayicon.Po \
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/MNAutomation-common.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/MNAutomation-skels.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/MNAutomation-stubs.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/eggtrayicon.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-about-dialog.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-auth-combo-box.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-autodetect-mailbox-properties.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-automation.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-blinking-image.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-client-session.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-conf.Po ./$(DEPDIR)/mn-dialog.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-gmail-mailbox-properties.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-gmail-mailbox.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-imap-mailbox-properties.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-imap-mailbox.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-mail-icon.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-mailbox-properties-dialog.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-mailbox-properties-util.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-mailbox-properties.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-mailbox-view.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-mailbox.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-mailboxes.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-maildir-mailbox.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-main.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-mbox-mailbox.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/mn-mh-mailbox.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-md5.Po ./$(DEPDIR)/mn-mh-mailbox.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-pending-mailbox.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-pi-mailbox-properties.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-pop3-mailbox-properties.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-pop3-mailbox.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/mn-preferences.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/mn-soup.Po ./$(DEPDIR)/mn-stock.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-properties.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-sasl.Po ./$(DEPDIR)/mn-shell.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-soup.Po ./$(DEPDIR)/mn-ssl.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-stock.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-sylpheed-mailbox.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/mn-ui.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/mn-system-mailbox-properties.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-unsupported-mailbox.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-uri.Po ./$(DEPDIR)/mn-util.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/mn-vfs.Po
@@ -110,7 +195,8 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(mail_notification_SOURCES)
+SOURCES = $(mail_notification_SOURCES) \
+	$(nodist_mail_notification_SOURCES)
 DIST_SOURCES = $(am__mail_notification_SOURCES_DIST)
 ETAGS = etags
 CTAGS = ctags
@@ -123,6 +209,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BONOBO_ACTIVATION_IDL = @BONOBO_ACTIVATION_IDL@
 CATALOGS = @CATALOGS@
 CATOBJEXT = @CATOBJEXT@
 CC = @CC@
@@ -147,10 +234,9 @@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@
 GMSGFMT = @GMSGFMT@
-GNET_CFLAGS = @GNET_CFLAGS@
-GNET_LIBS = @GNET_LIBS@
 GNOME_CFLAGS = @GNOME_CFLAGS@
 GNOME_LIBS = @GNOME_LIBS@
+GOB2 = @GOB2@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
 G_ASSERTIONS = @G_ASSERTIONS@
@@ -183,6 +269,7 @@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
 LDFLAGS = @LDFLAGS@
+LIBBONOBO_IDL = @LIBBONOBO_IDL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LTLIBOBJS = @LTLIBOBJS@
@@ -193,6 +280,9 @@ MAKEINFO = @MAKEINFO@
 MKINSTALLDIRS = @MKINSTALLDIRS@
 MSGFMT = @MSGFMT@
 OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+ORBIT_IDL = @ORBIT_IDL@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
@@ -205,6 +295,8 @@ POFILES = @POFILES@
 POSUB = @POSUB@
 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+SASL_CFLAGS = @SASL_CFLAGS@
+SASL_LIBS = @SASL_LIBS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 SOUP_CFLAGS = @SOUP_CFLAGS@
@@ -215,6 +307,8 @@ VERSION = @VERSION@
 WARN_CFLAGS = @WARN_CFLAGS@
 WITH_GMAIL_FALSE = @WITH_GMAIL_FALSE@
 WITH_GMAIL_TRUE = @WITH_GMAIL_TRUE@
+WITH_IMAP_FALSE = @WITH_IMAP_FALSE@
+WITH_IMAP_TRUE = @WITH_IMAP_TRUE@
 WITH_MAILDIR_FALSE = @WITH_MAILDIR_FALSE@
 WITH_MAILDIR_TRUE = @WITH_MAILDIR_TRUE@
 WITH_MBOX_FALSE = @WITH_MBOX_FALSE@
@@ -222,7 +316,15 @@ WITH_MBOX_TRUE = @WITH_MBOX_TRUE@
 WITH_MH_FALSE = @WITH_MH_FALSE@
 WITH_MH_TRUE = @WITH_MH_TRUE@
 WITH_POP3_FALSE = @WITH_POP3_FALSE@
+WITH_POP3_OR_IMAP_FALSE = @WITH_POP3_OR_IMAP_FALSE@
+WITH_POP3_OR_IMAP_TRUE = @WITH_POP3_OR_IMAP_TRUE@
 WITH_POP3_TRUE = @WITH_POP3_TRUE@
+WITH_REGRESSION_TESTS_FALSE = @WITH_REGRESSION_TESTS_FALSE@
+WITH_REGRESSION_TESTS_TRUE = @WITH_REGRESSION_TESTS_TRUE@
+WITH_SASL_FALSE = @WITH_SASL_FALSE@
+WITH_SASL_TRUE = @WITH_SASL_TRUE@
+WITH_SSL_FALSE = @WITH_SSL_FALSE@
+WITH_SSL_TRUE = @WITH_SSL_TRUE@
 WITH_SYLPHEED_FALSE = @WITH_SYLPHEED_FALSE@
 WITH_SYLPHEED_TRUE = @WITH_SYLPHEED_TRUE@
 XGETTEXT = @XGETTEXT@
@@ -253,46 +355,185 @@ sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-@WITH_MBOX_TRUE@mbox_sources = mn-mbox-mailbox.c mn-mbox-mailbox.h
-@WITH_MH_TRUE@mh_sources = mn-mh-mailbox.c mn-mh-mailbox.h
-@WITH_MAILDIR_TRUE@maildir_sources = mn-maildir-mailbox.c mn-maildir-mailbox.h
-@WITH_POP3_TRUE@pop3_sources = mn-pop3-mailbox.c mn-pop3-mailbox.h
-@WITH_SYLPHEED_TRUE@sylpheed_sources = mn-sylpheed-mailbox.c mn-sylpheed-mailbox.h
-@WITH_GMAIL_TRUE@gmail_sources = mn-gmail-mailbox.c mn-gmail-mailbox.h
+@WITH_MBOX_TRUE@mbox_gob_sources = mn-mbox-mailbox.gob
+@WITH_MBOX_TRUE@mbox_gob_built_sources = \
+@WITH_MBOX_TRUE@	mn-mbox-mailbox-private.h	\
+@WITH_MBOX_TRUE@	mn-mbox-mailbox.c		\
+@WITH_MBOX_TRUE@	mn-mbox-mailbox.h
+
+@WITH_MH_TRUE@mh_gob_sources = mn-mh-mailbox.gob
+@WITH_MH_TRUE@mh_gob_built_sources = \
+@WITH_MH_TRUE@	mn-mh-mailbox-private.h		\
+@WITH_MH_TRUE@	mn-mh-mailbox.c			\
+@WITH_MH_TRUE@	mn-mh-mailbox.h
+
+@WITH_MAILDIR_TRUE@maildir_gob_sources = mn-maildir-mailbox.gob
+@WITH_MAILDIR_TRUE@maildir_gob_built_sources = \
+@WITH_MAILDIR_TRUE@	mn-maildir-mailbox-private.h	\
+@WITH_MAILDIR_TRUE@	mn-maildir-mailbox.c		\
+@WITH_MAILDIR_TRUE@	mn-maildir-mailbox.h
+
+@WITH_POP3_TRUE@pop3_gob_sources = \
+@WITH_POP3_TRUE@	mn-pop3-mailbox-properties.gob	\
+@WITH_POP3_TRUE@	mn-pop3-mailbox.gob
+
+@WITH_POP3_TRUE@pop3_gob_built_sources = \
+@WITH_POP3_TRUE@	mn-pop3-mailbox-properties-private.h	\
+@WITH_POP3_TRUE@	mn-pop3-mailbox-properties.c		\
+@WITH_POP3_TRUE@	mn-pop3-mailbox-properties.h		\
+@WITH_POP3_TRUE@	mn-pop3-mailbox-private.h		\
+@WITH_POP3_TRUE@	mn-pop3-mailbox.c			\
+@WITH_POP3_TRUE@	mn-pop3-mailbox.h
+
+@WITH_POP3_TRUE@md5_sources = mn-md5.c mn-md5.h
+@WITH_IMAP_TRUE@imap_gob_sources = \
+@WITH_IMAP_TRUE@	mn-imap-mailbox-properties.gob	\
+@WITH_IMAP_TRUE@	mn-imap-mailbox.gob
+
+@WITH_IMAP_TRUE@imap_gob_built_sources = \
+@WITH_IMAP_TRUE@	mn-imap-mailbox-properties-private.h	\
+@WITH_IMAP_TRUE@	mn-imap-mailbox-properties.c		\
+@WITH_IMAP_TRUE@	mn-imap-mailbox-properties.h		\
+@WITH_IMAP_TRUE@	mn-imap-mailbox-private.h		\
+@WITH_IMAP_TRUE@	mn-imap-mailbox.c			\
+@WITH_IMAP_TRUE@	mn-imap-mailbox.h
+
+@WITH_POP3_OR_IMAP_TRUE@client_session_sources = mn-client-session.c mn-client-session.h
+@WITH_POP3_OR_IMAP_TRUE@pi_gob_sources = \
+@WITH_POP3_OR_IMAP_TRUE@	mn-auth-combo-box.gob			\
+@WITH_POP3_OR_IMAP_TRUE@	mn-pi-mailbox-properties.gob
+
+@WITH_POP3_OR_IMAP_TRUE@pi_gob_built_sources = \
+@WITH_POP3_OR_IMAP_TRUE@	mn-auth-combo-box-private.h		\
+@WITH_POP3_OR_IMAP_TRUE@	mn-auth-combo-box.c			\
+@WITH_POP3_OR_IMAP_TRUE@	mn-auth-combo-box.h			\
+@WITH_POP3_OR_IMAP_TRUE@	mn-pi-mailbox-properties-private.h	\
+@WITH_POP3_OR_IMAP_TRUE@	mn-pi-mailbox-properties.c		\
+@WITH_POP3_OR_IMAP_TRUE@	mn-pi-mailbox-properties.h
+
+@WITH_SYLPHEED_TRUE@sylpheed_gob_sources = mn-sylpheed-mailbox.gob
+@WITH_SYLPHEED_TRUE@sylpheed_gob_built_sources = \
+@WITH_SYLPHEED_TRUE@	mn-sylpheed-mailbox-private.h	\
+@WITH_SYLPHEED_TRUE@	mn-sylpheed-mailbox.c		\
+@WITH_SYLPHEED_TRUE@	mn-sylpheed-mailbox.h
+
+@WITH_GMAIL_TRUE@gmail_gob_sources = \
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox-properties.gob	\
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox.gob
+
+@WITH_GMAIL_TRUE@gmail_gob_built_sources = \
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox-properties-private.h	\
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox-properties.c		\
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox-properties.h		\
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox-private.h		\
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox.c			\
+@WITH_GMAIL_TRUE@	mn-gmail-mailbox.h
+
 @HAVE_SOUP_TRUE@soup_sources = mn-soup.c mn-soup.h
+@WITH_SSL_TRUE@ssl_sources = mn-ssl.c mn-ssl.h
+@WITH_SASL_TRUE@sasl_sources = mn-sasl.c mn-sasl.h
+idl_sources = MNAutomation.idl
+idl_built_sources = \
+	MNAutomation-common.c			\
+	MNAutomation-stubs.c			\
+	MNAutomation-skels.c			\
+	MNAutomation.h
+
+gob_sources = \
+	$(mbox_gob_sources)			\
+	$(mh_gob_sources)			\
+	$(maildir_gob_sources)			\
+	$(pop3_gob_sources)			\
+	$(imap_gob_sources)			\
+	$(pi_gob_sources)			\
+	$(sylpheed_gob_sources)			\
+	$(gmail_gob_sources)			\
+	mn-about-dialog.gob			\
+	mn-autodetect-mailbox-properties.gob	\
+	mn-automation.gob			\
+	mn-blinking-image.gob			\
+	mn-mail-icon.gob			\
+	mn-mailbox-view.gob			\
+	mn-mailbox.gob				\
+	mn-mailboxes.gob			\
+	mn-pending-mailbox.gob			\
+	mn-shell.gob				\
+	mn-system-mailbox-properties.gob	\
+	mn-unsupported-mailbox.gob
+
+gob_built_sources = \
+	$(mbox_gob_built_sources)			\
+	$(mh_gob_built_sources)				\
+	$(maildir_gob_built_sources)			\
+	$(pop3_gob_built_sources)			\
+	$(imap_gob_built_sources)			\
+	$(pi_gob_built_sources)				\
+	$(sylpheed_gob_built_sources)			\
+	$(gmail_gob_built_sources)			\
+	mn-about-dialog-private.h			\
+	mn-about-dialog.c				\
+	mn-about-dialog.h				\
+	mn-autodetect-mailbox-properties-private.h	\
+	mn-autodetect-mailbox-properties.c		\
+	mn-autodetect-mailbox-properties.h		\
+	mn-automation-private.h				\
+	mn-automation.c					\
+	mn-automation.h					\
+	mn-blinking-image-private.h			\
+	mn-blinking-image.c				\
+	mn-blinking-image.h				\
+	mn-mail-icon-private.h				\
+	mn-mail-icon.c					\
+	mn-mail-icon.h					\
+	mn-mailbox-view-private.h			\
+	mn-mailbox-view.c				\
+	mn-mailbox-view.h				\
+	mn-mailbox-private.h				\
+	mn-mailbox.c					\
+	mn-mailbox.h					\
+	mn-mailboxes-private.h				\
+	mn-mailboxes.c					\
+	mn-mailboxes.h					\
+	mn-pending-mailbox-private.h			\
+	mn-pending-mailbox.c				\
+	mn-pending-mailbox.h				\
+	mn-shell-private.h				\
+	mn-shell.c					\
+	mn-shell.h					\
+	mn-system-mailbox-properties-private.h		\
+	mn-system-mailbox-properties.c			\
+	mn-system-mailbox-properties.h			\
+	mn-unsupported-mailbox-private.h		\
+	mn-unsupported-mailbox.c			\
+	mn-unsupported-mailbox.h
+
+nodist_mail_notification_SOURCES = $(idl_built_sources)
 mail_notification_SOURCES = \
+	$(idl_sources)			\
+	$(gob_sources)			\
+	$(gob_built_sources)		\
+	$(md5_sources)			\
+	$(client_session_sources)	\
+	$(soup_sources)			\
+	$(ssl_sources)			\
+	$(sasl_sources)			\
 	eggtrayicon.c			\
 	eggtrayicon.h			\
 	mn-conf.c			\
 	mn-conf.h			\
 	mn-dialog.c			\
 	mn-dialog.h			\
-	mn-mail-icon.c			\
-	mn-mail-icon.h			\
 	mn-mailbox-properties-dialog.c	\
 	mn-mailbox-properties-dialog.h	\
-	mn-mailbox.c			\
-	mn-mailbox.h			\
-	mn-mailboxes.c			\
-	mn-mailboxes.h			\
-	$(mbox_sources)			\
-	$(mh_sources)			\
-	$(maildir_sources)		\
-	$(pop3_sources)			\
-	$(sylpheed_sources)		\
-	$(gmail_sources)		\
-	$(soup_sources)			\
+	mn-mailbox-properties-util.c	\
+	mn-mailbox-properties-util.h	\
+	mn-mailbox-properties.c		\
+	mn-mailbox-properties.h		\
 	mn-main.c			\
-	mn-pending-mailbox.c		\
-	mn-pending-mailbox.h		\
-	mn-preferences.c		\
-	mn-preferences.h		\
+	mn-properties.c			\
+	mn-properties.h			\
 	mn-stock.c			\
 	mn-stock.h			\
-	mn-ui.c				\
-	mn-ui.h				\
-	mn-unsupported-mailbox.c	\
-	mn-unsupported-mailbox.h	\
 	mn-uri.c			\
 	mn-uri.h			\
 	mn-util.c			\
@@ -300,18 +541,23 @@ mail_notification_SOURCES = \
 	mn-vfs.c			\
 	mn-vfs.h
 
-mail_notification_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(GNET_LIBS) $(SOUP_LIBS)
+BUILT_SOURCES = $(idl_built_sources) $(gob_built_sources)
+mail_notification_LDFLAGS = $(INTLLIBS) $(GNOME_LIBS) $(SOUP_LIBS) $(OPENSSL_LIBS) $(SASL_LIBS)
 gnomelocaledir = $(datadir)/locale
-AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GNOME_CFLAGS) $(GNET_CFLAGS) $(SOUP_CFLAGS) \
+AM_CPPFLAGS = $(WARN_CFLAGS) $(G_ASSERTIONS) $(GNOME_CFLAGS) $(SOUP_CFLAGS) $(OPENSSL_CFLAGS) $(SASL_CFLAGS) \
 	-I$(top_srcdir) \
 	-DPREFIX="\"$(prefix)\"" \
 	-DSYSCONFDIR="\"$(sysconfdir)\"" \
 	-DDATADIR="\"$(datadir)\"" \
 	-DLIBDIR="\"$(libdir)\"" \
 	-DGNOMELOCALEDIR="\"$(gnomelocaledir)\"" \
-	-DUIDIR="\"$(pkgdatadir)/ui\""
+	-DUIDIR="\"$(pkgdatadir)/ui\"" \
+	-DG_LOG_DOMAIN="\"$(PACKAGE)\""
 
-all: all-am
+CLEANFILES = $(idl_built_sources)
+MAINTAINERCLEANFILES = $(gob_built_sources)
+all: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) all-am
 
 .SUFFIXES:
 .SUFFIXES: .c .o .obj
@@ -377,25 +623,46 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNAutomation-common.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNAutomation-skels.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNAutomation-stubs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eggtrayicon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-about-dialog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-auth-combo-box.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-autodetect-mailbox-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-automation.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-blinking-image.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-client-session.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-conf.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-dialog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-gmail-mailbox-properties.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-gmail-mailbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-imap-mailbox-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-imap-mailbox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mail-icon.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailbox-properties-dialog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailbox-properties-util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailbox-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailbox-view.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailbox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mailboxes.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-maildir-mailbox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-main.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mbox-mailbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-md5.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-mh-mailbox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-pending-mailbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-pi-mailbox-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-pop3-mailbox-properties.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-pop3-mailbox.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-preferences.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-properties.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-sasl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-shell.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-soup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-ssl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-stock.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-sylpheed-mailbox.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-ui.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-system-mailbox-properties.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-unsupported-mailbox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-uri.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mn-util.Po@am__quote@
@@ -494,13 +761,15 @@ distdir: $(DISTFILES)
 	  fi; \
 	done
 check-am: all-am
-check: check-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
 	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
 	done
-install: install-am
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
 install-exec: install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
@@ -517,6 +786,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
 	-rm -f $(CONFIG_CLEAN_FILES)
@@ -524,6 +794,8 @@ distclean-generic:
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
@@ -584,6 +856,11 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am
 	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
 	uninstall-am uninstall-binPROGRAMS uninstall-info-am
 
+
+%.c %.h %-private.h: %.gob
+	$(GOB2) --always-private-header --exit-on-warn $<
+%-common.c %-stubs.c %-skels.c %.h: %.idl $(ORBIT_IDL)
+	$(ORBIT_IDL) -I$(LIBBONOBO_IDL) -I$(BONOBO_ACTIVATION_IDL) $<
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/src/mn-about-dialog-private.h b/src/mn-about-dialog-private.h
@@ -0,0 +1,17 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#ifndef __MN_ABOUT_DIALOG_PRIVATE_H__
+#define __MN_ABOUT_DIALOG_PRIVATE_H__
+
+#include "mn-about-dialog.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-about-dialog.c b/src/mn-about-dialog.c
@@ -0,0 +1,151 @@
+/* Generated by GOB (v2.0.9) on Mon Aug 16 18:13:52 2004
+   (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 9
+
+#define selfp (self->_priv)
+
+#include "mn-about-dialog.h"
+
+#include "mn-about-dialog-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 23 "mn-about-dialog.gob"
+
+#include "mn-util.h"
+
+#line 29 "mn-about-dialog.c"
+/* self casting macros */
+#define SELF(x) MN_ABOUT_DIALOG(x)
+#define SELF_CONST(x) MN_ABOUT_DIALOG_CONST(x)
+#define IS_SELF(x) MN_IS_ABOUT_DIALOG(x)
+#define TYPE_SELF MN_TYPE_ABOUT_DIALOG
+#define SELF_CLASS(x) MN_ABOUT_DIALOG_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_ABOUT_DIALOG_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNAboutDialog Self;
+typedef MNAboutDialogClass SelfClass;
+
+/* here are local prototypes */
+static void mn_about_dialog_class_init (MNAboutDialogClass * c) G_GNUC_UNUSED;
+static void mn_about_dialog_init (MNAboutDialog * self) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static GnomeAboutClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_new mn_about_dialog_new
+GType
+mn_about_dialog_get_type (void)
+{
+	static GType type = 0;
+
+	if ___GOB_UNLIKELY(type == 0) {
+		static const GTypeInfo info = {
+			sizeof (MNAboutDialogClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) mn_about_dialog_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL /* class_data */,
+			sizeof (MNAboutDialog),
+			0 /* n_preallocs */,
+			(GInstanceInitFunc) mn_about_dialog_init,
+			NULL
+		};
+
+		type = g_type_register_static (GNOME_TYPE_ABOUT, "MNAboutDialog", &info, (GTypeFlags)0);
+	}
+
+	return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNAboutDialog *)g_object_new(mn_about_dialog_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNAboutDialog * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNAboutDialog *
+GET_NEW_VARG (const char *first, ...)
+{
+	MNAboutDialog *ret;
+	va_list ap;
+	va_start (ap, first);
+	ret = (MNAboutDialog *)g_object_new_valist (mn_about_dialog_get_type (), first, ap);
+	va_end (ap);
+	return ret;
+}
+
+static void 
+mn_about_dialog_class_init (MNAboutDialogClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:About:Dialog::class_init"
+
+	parent_class = g_type_class_ref (GNOME_TYPE_ABOUT);
+
+}
+#undef __GOB_FUNCTION__
+#line 29 "mn-about-dialog.gob"
+static void 
+mn_about_dialog_init (MNAboutDialog * self G_GNUC_UNUSED)
+#line 106 "mn-about-dialog.c"
+{
+#define __GOB_FUNCTION__ "MN:About:Dialog::init"
+ {
+#line 30 "mn-about-dialog.gob"
+
+    const char *authors[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
+    const char *documenters[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
+    GdkPixbuf *logo;
+    GdkPixbuf *icon;
+
+    logo = mn_pixbuf_new("logo.png");
+    gnome_about_construct(GNOME_ABOUT(self),
+			  _("Mail Notification"),
+			  VERSION,
+			  "Copyright \302\251 2003, 2004 Jean-Yves Lefort",
+			  _("A Mail Notification Icon"),
+			  authors,
+			  documenters,
+			  _("Jean-Yves Lefort <jylefort@brutele.be>"),
+			  logo);
+    g_object_unref(logo);
+
+    icon = mn_pixbuf_new("about-icon.png");
+    gtk_window_set_icon(GTK_WINDOW(self), icon);
+    g_object_unref(icon);
+  
+#line 133 "mn-about-dialog.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 53 "mn-about-dialog.gob"
+GtkWidget * 
+mn_about_dialog_new (void)
+#line 143 "mn-about-dialog.c"
+{
+#define __GOB_FUNCTION__ "MN:About:Dialog::new"
+{
+#line 55 "mn-about-dialog.gob"
+	
+    return GTK_WIDGET(GET_NEW);
+  }}
+#line 151 "mn-about-dialog.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-about-dialog.gob b/src/mn-about-dialog.gob
@@ -0,0 +1,58 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+%headertop{
+#include "config.h"
+#include <gnome.h>
+%}
+%{
+#include "mn-util.h"
+%}
+
+class MN:About:Dialog from Gnome:About
+{
+  init (self)
+  {
+    const char *authors[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
+    const char *documenters[] = { "Jean-Yves Lefort <jylefort@brutele.be>", NULL };
+    GdkPixbuf *logo;
+    GdkPixbuf *icon;
+
+    logo = mn_pixbuf_new("logo.png");
+    gnome_about_construct(GNOME_ABOUT(self),
+			  _("Mail Notification"),
+			  VERSION,
+			  "Copyright \302\251 2003, 2004 Jean-Yves Lefort",
+			  _("A Mail Notification Icon"),
+			  authors,
+			  documenters,
+			  _("Jean-Yves Lefort <jylefort@brutele.be>"),
+			  logo);
+    g_object_unref(logo);
+
+    icon = mn_pixbuf_new("about-icon.png");
+    gtk_window_set_icon(GTK_WINDOW(self), icon);
+    g_object_unref(icon);
+  }
+
+  public GtkWidget *
+    new (void) 
+  {
+    return GTK_WIDGET(GET_NEW);
+  }
+}
diff --git a/src/mn-about-dialog.h b/src/mn-about-dialog.h
@@ -0,0 +1,59 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include "config.h"
+#include <gnome.h>
+
+#ifndef __MN_ABOUT_DIALOG_H__
+#define __MN_ABOUT_DIALOG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_ABOUT_DIALOG	(mn_about_dialog_get_type())
+#define MN_ABOUT_DIALOG(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_about_dialog_get_type(), MNAboutDialog)
+#define MN_ABOUT_DIALOG_CONST(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_about_dialog_get_type(), MNAboutDialog const)
+#define MN_ABOUT_DIALOG_CLASS(klass)	G_TYPE_CHECK_CLASS_CAST((klass), mn_about_dialog_get_type(), MNAboutDialogClass)
+#define MN_IS_ABOUT_DIALOG(obj)	G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_about_dialog_get_type ())
+
+#define MN_ABOUT_DIALOG_GET_CLASS(obj)	G_TYPE_INSTANCE_GET_CLASS((obj), mn_about_dialog_get_type(), MNAboutDialogClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_ABOUT_DIALOG__
+#define __TYPEDEF_MN_ABOUT_DIALOG__
+typedef struct _MNAboutDialog MNAboutDialog;
+#endif
+struct _MNAboutDialog {
+	GnomeAbout __parent__;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNAboutDialogClass MNAboutDialogClass;
+struct _MNAboutDialogClass {
+	GnomeAboutClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType	mn_about_dialog_get_type	(void);
+GtkWidget * 	mn_about_dialog_new	(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-auth-combo-box-private.h b/src/mn-auth-combo-box-private.h
@@ -0,0 +1,17 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#ifndef __MN_AUTH_COMBO_BOX_PRIVATE_H__
+#define __MN_AUTH_COMBO_BOX_PRIVATE_H__
+
+#include "mn-auth-combo-box.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-auth-combo-box.c b/src/mn-auth-combo-box.c
@@ -0,0 +1,361 @@
+/* Generated by GOB (v2.0.9) on Mon Aug 16 18:13:52 2004
+   (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 9
+
+#define selfp (self->_priv)
+
+#include "mn-auth-combo-box.h"
+
+#include "mn-auth-combo-box-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 22 "mn-auth-combo-box.gob"
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+#ifdef WITH_SASL
+#include <sasl/sasl.h>
+#include "mn-sasl.h"
+#endif /* WITH_SASL */
+
+  enum 
+  {
+    COLUMN_MECHANISM,
+    COLUMN_LABEL,
+    N_COLUMNS
+  };
+
+#line 41 "mn-auth-combo-box.c"
+/* self casting macros */
+#define SELF(x) MN_AUTH_COMBO_BOX(x)
+#define SELF_CONST(x) MN_AUTH_COMBO_BOX_CONST(x)
+#define IS_SELF(x) MN_IS_AUTH_COMBO_BOX(x)
+#define TYPE_SELF MN_TYPE_AUTH_COMBO_BOX
+#define SELF_CLASS(x) MN_AUTH_COMBO_BOX_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_AUTH_COMBO_BOX_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNAuthComboBox Self;
+typedef MNAuthComboBoxClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_auth_combo_box_class_init (MNAuthComboBoxClass * c) G_GNUC_UNUSED;
+static void mn_auth_combo_box_init (MNAuthComboBox * self) G_GNUC_UNUSED;
+
+enum {
+	PROP_0,
+	PROP_ACTIVE_MECHANISM
+};
+
+/* pointer to the class of our parent */
+static GtkComboBoxClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_get_active_mechanism mn_auth_combo_box_get_active_mechanism
+#define self_set_active_mechanism mn_auth_combo_box_set_active_mechanism
+#define self_append mn_auth_combo_box_append
+#define self_new mn_auth_combo_box_new
+GType
+mn_auth_combo_box_get_type (void)
+{
+	static GType type = 0;
+
+	if ___GOB_UNLIKELY(type == 0) {
+		static const GTypeInfo info = {
+			sizeof (MNAuthComboBoxClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) mn_auth_combo_box_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL /* class_data */,
+			sizeof (MNAuthComboBox),
+			0 /* n_preallocs */,
+			(GInstanceInitFunc) mn_auth_combo_box_init,
+			NULL
+		};
+
+		type = g_type_register_static (GTK_TYPE_COMBO_BOX, "MNAuthComboBox", &info, (GTypeFlags)0);
+	}
+
+	return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNAuthComboBox *)g_object_new(mn_auth_combo_box_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNAuthComboBox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNAuthComboBox *
+GET_NEW_VARG (const char *first, ...)
+{
+	MNAuthComboBox *ret;
+	va_list ap;
+	va_start (ap, first);
+	ret = (MNAuthComboBox *)g_object_new_valist (mn_auth_combo_box_get_type (), first, ap);
+	va_end (ap);
+	return ret;
+}
+
+static void 
+mn_auth_combo_box_class_init (MNAuthComboBoxClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::class_init"
+	GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+
+	parent_class = g_type_class_ref (GTK_TYPE_COMBO_BOX);
+
+	g_object_class->get_property = ___object_get_property;
+	g_object_class->set_property = ___object_set_property;
+    {
+	GParamSpec   *param_spec;
+
+	param_spec = g_param_spec_string
+		("active_mechanism" /* name */,
+		 NULL /* nick */,
+		 NULL /* blurb */,
+		 NULL /* default_value */,
+		 (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (g_object_class,
+		PROP_ACTIVE_MECHANISM,
+		param_spec);
+    }
+}
+#undef __GOB_FUNCTION__
+#line 84 "mn-auth-combo-box.gob"
+static void 
+mn_auth_combo_box_init (MNAuthComboBox * self G_GNUC_UNUSED)
+#line 144 "mn-auth-combo-box.c"
+{
+#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::init"
+ {
+#line 85 "mn-auth-combo-box.gob"
+
+    GtkListStore *store;
+    GtkCellRenderer *renderer;
+
+    store = gtk_list_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
+    gtk_combo_box_set_model(GTK_COMBO_BOX(self), GTK_TREE_MODEL(store));
+    g_object_unref(store);
+
+    renderer = gtk_cell_renderer_text_new();
+    gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(self), renderer, TRUE);
+    gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(self), renderer,
+				   "markup", COLUMN_LABEL,
+				   NULL);
+    
+    self_append(self, NULL, _("<span style=\"italic\">autodetect</span>"));
+#ifdef WITH_SASL
+    if (mn_sasl_use(NULL))
+      {
+        const char **mechanisms;
+
+	mechanisms = sasl_global_listmech();
+	if (mechanisms)
+	  {
+	    int i;
+
+	    for (i = 0; mechanisms[i]; i++)
+	      {
+		char *escaped = g_markup_escape_text(mechanisms[i], -1);
+		self_append(self, mechanisms[i], escaped);
+		g_free(escaped);
+	      }
+	  }
+	mn_sasl_unuse();
+      }
+#endif /* WITH_SASL */
+
+    self_set_active_mechanism(self, NULL);
+  
+#line 187 "mn-auth-combo-box.c"
+ }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_set_property (GObject *object,
+	guint property_id,
+	const GValue *VAL G_GNUC_UNUSED,
+	GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::set_property"
+{
+	MNAuthComboBox *self G_GNUC_UNUSED;
+
+	self = MN_AUTH_COMBO_BOX (object);
+
+	switch (property_id) {
+	case PROP_ACTIVE_MECHANISM:
+		{
+#line 42 "mn-auth-combo-box.gob"
+
+      const char *mechanism = g_value_get_string(VAL);
+      GtkTreeModel *model;
+      GtkTreeIter iter;
+      gboolean valid;
+
+      model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
+      valid = gtk_tree_model_get_iter_first(model, &iter);
+    
+      while (valid)
+	{
+	  char *this_mech;
+	  gboolean found;
+	  
+	  gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &this_mech, -1);
+	  found = (! this_mech && ! mechanism)
+	    || (this_mech && mechanism && ! strcmp(this_mech, mechanism));
+	  g_free(this_mech);
+	  
+	  if (found)
+	    {
+	      gtk_combo_box_set_active_iter(GTK_COMBO_BOX(self), &iter);
+	      break;
+	    }
+	  
+	  valid = gtk_tree_model_iter_next(model, &iter);
+	}
+    
+#line 235 "mn-auth-combo-box.c"
+		}
+		break;
+	default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+#  undef G_STRLOC
+#  define G_STRLOC	__FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+	guint property_id,
+	GValue *VAL G_GNUC_UNUSED,
+	GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::get_property"
+{
+	MNAuthComboBox *self G_GNUC_UNUSED;
+
+	self = MN_AUTH_COMBO_BOX (object);
+
+	switch (property_id) {
+	case PROP_ACTIVE_MECHANISM:
+		{
+#line 71 "mn-auth-combo-box.gob"
+
+      char *mechanism = NULL;
+      GtkTreeModel *model;
+      GtkTreeIter iter;
+
+      model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
+      if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(self), &iter))
+	gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &mechanism, -1);
+
+      g_value_set_string(VAL, mechanism);
+      g_free(mechanism);
+    
+#line 277 "mn-auth-combo-box.c"
+		}
+		break;
+	default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+#  undef G_STRLOC
+#  define G_STRLOC	__FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+#undef __GOB_FUNCTION__
+
+
+#line 71 "mn-auth-combo-box.gob"
+gchar * 
+mn_auth_combo_box_get_active_mechanism (MNAuthComboBox * self)
+#line 296 "mn-auth-combo-box.c"
+{
+#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::get_active_mechanism"
+{
+#line 40 "mn-auth-combo-box.gob"
+		gchar* val; g_object_get (G_OBJECT (self), "active_mechanism", &val, NULL); return val;
+}}
+#line 303 "mn-auth-combo-box.c"
+#undef __GOB_FUNCTION__
+
+#line 42 "mn-auth-combo-box.gob"
+void 
+mn_auth_combo_box_set_active_mechanism (MNAuthComboBox * self, gchar * val)
+#line 309 "mn-auth-combo-box.c"
+{
+#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::set_active_mechanism"
+{
+#line 40 "mn-auth-combo-box.gob"
+		g_object_set (G_OBJECT (self), "active_mechanism", val, NULL);
+}}
+#line 316 "mn-auth-combo-box.c"
+#undef __GOB_FUNCTION__
+
+
+#line 124 "mn-auth-combo-box.gob"
+void 
+mn_auth_combo_box_append (MNAuthComboBox * self, const char * mechanism, const char * label)
+#line 323 "mn-auth-combo-box.c"
+{
+#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::append"
+#line 124 "mn-auth-combo-box.gob"
+	g_return_if_fail (self != NULL);
+#line 124 "mn-auth-combo-box.gob"
+	g_return_if_fail (MN_IS_AUTH_COMBO_BOX (self));
+#line 124 "mn-auth-combo-box.gob"
+	g_return_if_fail (label != NULL);
+#line 332 "mn-auth-combo-box.c"
+{
+#line 126 "mn-auth-combo-box.gob"
+	
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+
+    model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
+    
+    gtk_list_store_append(GTK_LIST_STORE(model), &iter);
+    gtk_list_store_set(GTK_LIST_STORE(model), &iter,
+		       COLUMN_MECHANISM, mechanism,
+		       COLUMN_LABEL, label,
+		       -1);
+  }}
+#line 347 "mn-auth-combo-box.c"
+#undef __GOB_FUNCTION__
+
+#line 139 "mn-auth-combo-box.gob"
+GtkWidget * 
+mn_auth_combo_box_new (void)
+#line 353 "mn-auth-combo-box.c"
+{
+#define __GOB_FUNCTION__ "MN:Auth:Combo:Box::new"
+{
+#line 141 "mn-auth-combo-box.gob"
+	
+    return GTK_WIDGET(GET_NEW);
+  }}
+#line 361 "mn-auth-combo-box.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-auth-combo-box.gob b/src/mn-auth-combo-box.gob
@@ -0,0 +1,144 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+%headertop{
+#include <gtk/gtk.h>
+%}
+%{
+#include "config.h"
+#include <glib/gi18n-lib.h>
+#ifdef WITH_SASL
+#include <sasl/sasl.h>
+#include "mn-sasl.h"
+#endif /* WITH_SASL */
+
+  enum 
+  {
+    COLUMN_MECHANISM,
+    COLUMN_LABEL,
+    N_COLUMNS
+  };
+%}
+
+class MN:Auth:Combo:Box from Gtk:Combo:Box
+{
+  property STRING active_mechanism (export)
+    set
+    {
+      const char *mechanism = g_value_get_string(VAL);
+      GtkTreeModel *model;
+      GtkTreeIter iter;
+      gboolean valid;
+
+      model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
+      valid = gtk_tree_model_get_iter_first(model, &iter);
+    
+      while (valid)
+	{
+	  char *this_mech;
+	  gboolean found;
+	  
+	  gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &this_mech, -1);
+	  found = (! this_mech && ! mechanism)
+	    || (this_mech && mechanism && ! strcmp(this_mech, mechanism));
+	  g_free(this_mech);
+	  
+	  if (found)
+	    {
+	      gtk_combo_box_set_active_iter(GTK_COMBO_BOX(self), &iter);
+	      break;
+	    }
+	  
+	  valid = gtk_tree_model_iter_next(model, &iter);
+	}
+    }
+    get
+    {
+      char *mechanism = NULL;
+      GtkTreeModel *model;
+      GtkTreeIter iter;
+
+      model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
+      if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(self), &iter))
+	gtk_tree_model_get(model, &iter, COLUMN_MECHANISM, &mechanism, -1);
+
+      g_value_set_string(VAL, mechanism);
+      g_free(mechanism);
+    };
+  
+  init (self)
+  {
+    GtkListStore *store;
+    GtkCellRenderer *renderer;
+
+    store = gtk_list_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
+    gtk_combo_box_set_model(GTK_COMBO_BOX(self), GTK_TREE_MODEL(store));
+    g_object_unref(store);
+
+    renderer = gtk_cell_renderer_text_new();
+    gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(self), renderer, TRUE);
+    gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(self), renderer,
+				   "markup", COLUMN_LABEL,
+				   NULL);
+    
+    self_append(self, NULL, _("<span style=\"italic\">autodetect</span>"));
+#ifdef WITH_SASL
+    if (mn_sasl_use(NULL))
+      {
+        const char **mechanisms;
+
+	mechanisms = sasl_global_listmech();
+	if (mechanisms)
+	  {
+	    int i;
+
+	    for (i = 0; mechanisms[i]; i++)
+	      {
+		char *escaped = g_markup_escape_text(mechanisms[i], -1);
+		self_append(self, mechanisms[i], escaped);
+		g_free(escaped);
+	      }
+	  }
+	mn_sasl_unuse();
+      }
+#endif /* WITH_SASL */
+
+    self_set_active_mechanism(self, NULL);
+  }
+
+  public void
+    append (self, const char *mechanism, const char *label (check null))
+  {
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+
+    model = gtk_combo_box_get_model(GTK_COMBO_BOX(self));
+    
+    gtk_list_store_append(GTK_LIST_STORE(model), &iter);
+    gtk_list_store_set(GTK_LIST_STORE(model), &iter,
+		       COLUMN_MECHANISM, mechanism,
+		       COLUMN_LABEL, label,
+		       -1);
+  }
+
+  public GtkWidget *
+    new (void)
+  {
+    return GTK_WIDGET(GET_NEW);
+  }
+}
diff --git a/src/mn-auth-combo-box.h b/src/mn-auth-combo-box.h
@@ -0,0 +1,76 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+
+#ifndef __MN_AUTH_COMBO_BOX_H__
+#define __MN_AUTH_COMBO_BOX_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_AUTH_COMBO_BOX	(mn_auth_combo_box_get_type())
+#define MN_AUTH_COMBO_BOX(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_auth_combo_box_get_type(), MNAuthComboBox)
+#define MN_AUTH_COMBO_BOX_CONST(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_auth_combo_box_get_type(), MNAuthComboBox const)
+#define MN_AUTH_COMBO_BOX_CLASS(klass)	G_TYPE_CHECK_CLASS_CAST((klass), mn_auth_combo_box_get_type(), MNAuthComboBoxClass)
+#define MN_IS_AUTH_COMBO_BOX(obj)	G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_auth_combo_box_get_type ())
+
+#define MN_AUTH_COMBO_BOX_GET_CLASS(obj)	G_TYPE_INSTANCE_GET_CLASS((obj), mn_auth_combo_box_get_type(), MNAuthComboBoxClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_AUTH_COMBO_BOX__
+#define __TYPEDEF_MN_AUTH_COMBO_BOX__
+typedef struct _MNAuthComboBox MNAuthComboBox;
+#endif
+struct _MNAuthComboBox {
+	GtkComboBox __parent__;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNAuthComboBoxClass MNAuthComboBoxClass;
+struct _MNAuthComboBoxClass {
+	GtkComboBoxClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType	mn_auth_combo_box_get_type	(void);
+gchar * 	mn_auth_combo_box_get_active_mechanism	(MNAuthComboBox * self);
+void 	mn_auth_combo_box_set_active_mechanism	(MNAuthComboBox * self,
+					gchar * val);
+void 	mn_auth_combo_box_append	(MNAuthComboBox * self,
+					const char * mechanism,
+					const char * label);
+GtkWidget * 	mn_auth_combo_box_new	(void);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_AUTH_COMBO_BOX_PROP_ACTIVE_MECHANISM(arg)    	"active_mechanism", __extension__ ({gchar *z = (arg); z;})
+#define MN_AUTH_COMBO_BOX_GET_PROP_ACTIVE_MECHANISM(arg)	"active_mechanism", __extension__ ({gchar **z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_AUTH_COMBO_BOX_PROP_ACTIVE_MECHANISM(arg)    	"active_mechanism",(gchar *)(arg)
+#define MN_AUTH_COMBO_BOX_GET_PROP_ACTIVE_MECHANISM(arg)	"active_mechanism",(gchar **)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-autodetect-mailbox-properties-private.h b/src/mn-autodetect-mailbox-properties-private.h
@@ -0,0 +1,26 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#ifndef __MN_AUTODETECT_MAILBOX_PROPERTIES_PRIVATE_H__
+#define __MN_AUTODETECT_MAILBOX_PROPERTIES_PRIVATE_H__
+
+#include "mn-autodetect-mailbox-properties.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct _MNAutodetectMailboxPropertiesPrivate {
+#line 38 "mn-autodetect-mailbox-properties.gob"
+	GtkSizeGroup * size_group;
+#line 50 "mn-autodetect-mailbox-properties.gob"
+	GtkTooltips * tooltips;
+#line 51 "mn-autodetect-mailbox-properties.gob"
+	GtkWidget * location_entry;
+#line 20 "mn-autodetect-mailbox-properties-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-autodetect-mailbox-properties.c b/src/mn-autodetect-mailbox-properties.c
@@ -0,0 +1,490 @@
+/* Generated by GOB (v2.0.9) on Mon Aug 16 18:13:52 2004
+   (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 9
+
+#define selfp (self->_priv)
+
+#include "mn-autodetect-mailbox-properties.h"
+
+#include "mn-autodetect-mailbox-properties-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 22 "mn-autodetect-mailbox-properties.gob"
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+#include "mn-mailbox-properties.h"
+#include "mn-mailbox-properties-util.h"
+#include "mn-uri.h"
+#include "mn-util.h"
+
+  static char *current_folder_uri = NULL;
+
+#line 36 "mn-autodetect-mailbox-properties.c"
+/* self casting macros */
+#define SELF(x) MN_AUTODETECT_MAILBOX_PROPERTIES(x)
+#define SELF_CONST(x) MN_AUTODETECT_MAILBOX_PROPERTIES_CONST(x)
+#define IS_SELF(x) MN_IS_AUTODETECT_MAILBOX_PROPERTIES(x)
+#define TYPE_SELF MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES
+#define SELF_CLASS(x) MN_AUTODETECT_MAILBOX_PROPERTIES_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_AUTODETECT_MAILBOX_PROPERTIES_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNAutodetectMailboxProperties Self;
+typedef MNAutodetectMailboxPropertiesClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_autodetect_mailbox_properties_init (MNAutodetectMailboxProperties * o) G_GNUC_UNUSED;
+static void mn_autodetect_mailbox_properties_class_init (MNAutodetectMailboxPropertiesClass * c) G_GNUC_UNUSED;
+static GObject * ___1_mn_autodetect_mailbox_properties_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static void mn_autodetect_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data) G_GNUC_UNUSED;
+static void mn_autodetect_mailbox_properties_browse_clicked_h (GtkButton * button, gpointer user_data) G_GNUC_UNUSED;
+static void mn_autodetect_mailbox_properties_current_folder_changed_h (GtkFileChooser * chooser, gpointer user_data) G_GNUC_UNUSED;
+static gboolean mn_autodetect_mailbox_properties_set_uri (MNMailboxProperties * self, const char * uri) G_GNUC_UNUSED;
+static char * mn_autodetect_mailbox_properties_get_uri (MNMailboxProperties * self) G_GNUC_UNUSED;
+
+enum {
+	PROP_0,
+	PROP_LABEL,
+	PROP_SIZE_GROUP,
+	PROP_COMPLETE
+};
+
+/* pointer to the class of our parent */
+static GtkHBoxClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_entry_changed_h mn_autodetect_mailbox_properties_entry_changed_h
+#define self_browse_clicked_h mn_autodetect_mailbox_properties_browse_clicked_h
+#define self_current_folder_changed_h mn_autodetect_mailbox_properties_current_folder_changed_h
+#define self_set_uri mn_autodetect_mailbox_properties_set_uri
+#define self_get_uri mn_autodetect_mailbox_properties_get_uri
+
+
+static void
+___MN_Mailbox_Properties_init (MNMailboxPropertiesIface *iface)
+{
+#line 156 "mn-autodetect-mailbox-properties.gob"
+	iface->set_uri = self_set_uri;
+#line 164 "mn-autodetect-mailbox-properties.gob"
+	iface->get_uri = self_get_uri;
+#line 87 "mn-autodetect-mailbox-properties.c"
+}
+
+GType
+mn_autodetect_mailbox_properties_get_type (void)
+{
+	static GType type = 0;
+
+	if ___GOB_UNLIKELY(type == 0) {
+		static const GTypeInfo info = {
+			sizeof (MNAutodetectMailboxPropertiesClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) mn_autodetect_mailbox_properties_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL /* class_data */,
+			sizeof (MNAutodetectMailboxProperties),
+			0 /* n_preallocs */,
+			(GInstanceInitFunc) mn_autodetect_mailbox_properties_init,
+			NULL
+		};
+
+		static const GInterfaceInfo MN_Mailbox_Properties_info = {
+			(GInterfaceInitFunc) ___MN_Mailbox_Properties_init,
+			NULL,
+			NULL
+		};
+
+		type = g_type_register_static (GTK_TYPE_HBOX, "MNAutodetectMailboxProperties", &info, (GTypeFlags)0);
+		g_type_add_interface_static (type,
+			MN_TYPE_MAILBOX_PROPERTIES,
+			&MN_Mailbox_Properties_info);
+	}
+
+	return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNAutodetectMailboxProperties *)g_object_new(mn_autodetect_mailbox_properties_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNAutodetectMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNAutodetectMailboxProperties *
+GET_NEW_VARG (const char *first, ...)
+{
+	MNAutodetectMailboxProperties *ret;
+	va_list ap;
+	va_start (ap, first);
+	ret = (MNAutodetectMailboxProperties *)g_object_new_valist (mn_autodetect_mailbox_properties_get_type (), first, ap);
+	va_end (ap);
+	return ret;
+}
+
+
+static void
+___dispose (GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::dispose"
+	MNAutodetectMailboxProperties *self G_GNUC_UNUSED = MN_AUTODETECT_MAILBOX_PROPERTIES (obj_self);
+	if (G_OBJECT_CLASS (parent_class)->dispose) \
+		(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
+#line 38 "mn-autodetect-mailbox-properties.gob"
+	if(self->_priv->size_group) { ((*(void (*)(void *))g_object_unref)) (self->_priv->size_group); self->_priv->size_group = NULL; }
+#line 151 "mn-autodetect-mailbox-properties.c"
+#line 50 "mn-autodetect-mailbox-properties.gob"
+	if(self->_priv->tooltips) { ((*(void (*)(void *))g_object_unref)) (self->_priv->tooltips); self->_priv->tooltips = NULL; }
+#line 154 "mn-autodetect-mailbox-properties.c"
+}
+#undef __GOB_FUNCTION__
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::finalize"
+	MNAutodetectMailboxProperties *self  G_GNUC_UNUSED = MN_AUTODETECT_MAILBOX_PROPERTIES (obj_self);
+	gpointer priv = self->_priv;
+	if(G_OBJECT_CLASS(parent_class)->finalize) \
+		(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+	g_free (priv);
+}
+#undef __GOB_FUNCTION__
+
+static void 
+mn_autodetect_mailbox_properties_init (MNAutodetectMailboxProperties * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::init"
+	o->_priv = g_new0 (MNAutodetectMailboxPropertiesPrivate, 1);
+#line 50 "mn-autodetect-mailbox-properties.gob"
+	o->_priv->tooltips = mn_tooltips_new();
+#line 178 "mn-autodetect-mailbox-properties.c"
+}
+#undef __GOB_FUNCTION__
+static void 
+mn_autodetect_mailbox_properties_class_init (MNAutodetectMailboxPropertiesClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::class_init"
+	GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+
+	parent_class = g_type_class_ref (GTK_TYPE_HBOX);
+
+#line 53 "mn-autodetect-mailbox-properties.gob"
+	g_object_class->constructor = ___1_mn_autodetect_mailbox_properties_constructor;
+#line 191 "mn-autodetect-mailbox-properties.c"
+	g_object_class->dispose = ___dispose;
+	g_object_class->finalize = ___finalize;
+	g_object_class->get_property = ___object_get_property;
+	g_object_class->set_property = ___object_set_property;
+    {
+	g_object_class_override_property (g_object_class,
+		PROP_LABEL,
+		"label");
+	g_object_class_override_property (g_object_class,
+		PROP_SIZE_GROUP,
+		"size_group");
+	g_object_class_override_property (g_object_class,
+		PROP_COMPLETE,
+		"complete");
+    }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_set_property (GObject *object,
+	guint property_id,
+	const GValue *VAL G_GNUC_UNUSED,
+	GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::set_property"
+{
+	MNAutodetectMailboxProperties *self G_GNUC_UNUSED;
+
+	self = MN_AUTODETECT_MAILBOX_PROPERTIES (object);
+
+	switch (property_id) {
+	case PROP_SIZE_GROUP:
+		{
+#line 39 "mn-autodetect-mailbox-properties.gob"
+{ GObject *___old = (GObject *)self->_priv->size_group; self->_priv->size_group = (void *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
+#line 226 "mn-autodetect-mailbox-properties.c"
+		}
+		break;
+	default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+#  undef G_STRLOC
+#  define G_STRLOC	__FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+	guint property_id,
+	GValue *VAL G_GNUC_UNUSED,
+	GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::get_property"
+{
+	MNAutodetectMailboxProperties *self G_GNUC_UNUSED;
+
+	self = MN_AUTODETECT_MAILBOX_PROPERTIES (object);
+
+	switch (property_id) {
+	case PROP_LABEL:
+		{
+#line 36 "mn-autodetect-mailbox-properties.gob"
+ g_value_set_string(VAL, _("<span style=\"italic\">autodetect</span>")); 
+#line 257 "mn-autodetect-mailbox-properties.c"
+		}
+		break;
+	case PROP_SIZE_GROUP:
+		{
+#line 39 "mn-autodetect-mailbox-properties.gob"
+g_value_set_object (VAL, (gpointer)self->_priv->size_group);
+#line 264 "mn-autodetect-mailbox-properties.c"
+		}
+		break;
+	case PROP_COMPLETE:
+		{
+#line 43 "mn-autodetect-mailbox-properties.gob"
+
+      const char *location;
+      
+      location = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->location_entry));
+      g_value_set_boolean(VAL, *location != 0);
+    
+#line 276 "mn-autodetect-mailbox-properties.c"
+		}
+		break;
+	default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+#  undef G_STRLOC
+#  define G_STRLOC	__FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 53 "mn-autodetect-mailbox-properties.gob"
+static GObject * 
+___1_mn_autodetect_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
+#line 296 "mn-autodetect-mailbox-properties.c"
+#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
+	((G_OBJECT_CLASS(parent_class)->constructor)? \
+		(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
+		((GObject * )0))
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::constructor"
+{
+#line 55 "mn-autodetect-mailbox-properties.gob"
+	
+    GObject *object;
+    Self *self;
+    GtkWidget *hbox;
+    GtkWidget *label;
+    GtkWidget *button;
+
+    object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+    self = SELF(object);
+
+    gtk_box_set_spacing(GTK_BOX(self), 12);
+    
+    label = gtk_label_new_with_mnemonic(_("_Location:"));
+    gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
+    
+    hbox = gtk_hbox_new(FALSE, 6);
+    
+    selfp->location_entry = gtk_entry_new();
+    button = gtk_button_new_with_mnemonic(_("_Browse..."));
+    
+    gtk_label_set_mnemonic_widget(GTK_LABEL(label), selfp->location_entry);
+    gtk_entry_set_activates_default(GTK_ENTRY(selfp->location_entry), TRUE);
+
+    mn_tooltips_set_tip(selfp->tooltips,
+			selfp->location_entry,
+			_("The URI of the mailbox"));
+
+    gtk_box_pack_start(GTK_BOX(hbox), selfp->location_entry, TRUE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+    
+    gtk_box_pack_start(GTK_BOX(self), label, FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(self), hbox, TRUE, TRUE, 0);
+    
+    gtk_widget_show(label);
+    gtk_widget_show_all(hbox);
+
+    gtk_size_group_add_widget(selfp->size_group, label);
+
+    g_signal_connect(G_OBJECT(selfp->location_entry), "changed", G_CALLBACK(self_entry_changed_h), self);
+    g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(self_browse_clicked_h), self);
+
+    return object;
+  }}
+#line 348 "mn-autodetect-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 99 "mn-autodetect-mailbox-properties.gob"
+static void 
+mn_autodetect_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data)
+#line 355 "mn-autodetect-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::entry_changed_h"
+#line 99 "mn-autodetect-mailbox-properties.gob"
+	g_return_if_fail (editable != NULL);
+#line 99 "mn-autodetect-mailbox-properties.gob"
+	g_return_if_fail (GTK_IS_EDITABLE (editable));
+#line 99 "mn-autodetect-mailbox-properties.gob"
+	g_return_if_fail (user_data != NULL);
+#line 364 "mn-autodetect-mailbox-properties.c"
+{
+#line 102 "mn-autodetect-mailbox-properties.gob"
+	
+    Self *self = user_data;
+    g_object_notify(G_OBJECT(self), "complete");
+  }}
+#line 371 "mn-autodetect-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 107 "mn-autodetect-mailbox-properties.gob"
+static void 
+mn_autodetect_mailbox_properties_browse_clicked_h (GtkButton * button, gpointer user_data)
+#line 377 "mn-autodetect-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::browse_clicked_h"
+#line 107 "mn-autodetect-mailbox-properties.gob"
+	g_return_if_fail (button != NULL);
+#line 107 "mn-autodetect-mailbox-properties.gob"
+	g_return_if_fail (GTK_IS_BUTTON (button));
+#line 107 "mn-autodetect-mailbox-properties.gob"
+	g_return_if_fail (user_data != NULL);
+#line 386 "mn-autodetect-mailbox-properties.c"
+{
+#line 110 "mn-autodetect-mailbox-properties.gob"
+	
+    Self *self = user_data;
+    GtkWidget *toplevel;
+    GtkWidget *chooser;
+    const char *location;
+
+    toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
+    chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
+						       GTK_WINDOW(toplevel),
+						       GTK_FILE_CHOOSER_ACTION_OPEN,
+						       "gnome-vfs",
+						       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+						       GTK_STOCK_OPEN, 1,
+						       NULL);
+    
+    gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), FALSE);
+    mn_file_chooser_dialog_allow_select_folder(GTK_FILE_CHOOSER_DIALOG(chooser), 1);
+
+    location = gtk_entry_get_text(GTK_ENTRY(selfp->location_entry));
+    if (*location)
+      gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(chooser), location);
+    else if (current_folder_uri)
+      gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(chooser), current_folder_uri);
+      
+    g_signal_connect(G_OBJECT(chooser), "current-folder-changed", G_CALLBACK(self_current_folder_changed_h), self);
+
+    if (gtk_dialog_run(GTK_DIALOG(chooser)) == 1)
+      {
+	char *uri;
+	
+	uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(chooser));
+	gtk_entry_set_text(GTK_ENTRY(selfp->location_entry), uri);
+	g_free(uri);
+      }
+    
+    gtk_widget_destroy(chooser);
+  }}
+#line 426 "mn-autodetect-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 148 "mn-autodetect-mailbox-properties.gob"
+static void 
+mn_autodetect_mailbox_properties_current_folder_changed_h (GtkFileChooser * chooser, gpointer user_data)
+#line 432 "mn-autodetect-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::current_folder_changed_h"
+#line 148 "mn-autodetect-mailbox-properties.gob"
+	g_return_if_fail (chooser != NULL);
+#line 148 "mn-autodetect-mailbox-properties.gob"
+	g_return_if_fail (GTK_IS_FILE_CHOOSER (chooser));
+#line 439 "mn-autodetect-mailbox-properties.c"
+{
+#line 151 "mn-autodetect-mailbox-properties.gob"
+	
+    g_free(current_folder_uri);
+    current_folder_uri = gtk_file_chooser_get_current_folder_uri(chooser);
+  }}
+#line 446 "mn-autodetect-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 156 "mn-autodetect-mailbox-properties.gob"
+static gboolean 
+mn_autodetect_mailbox_properties_set_uri (MNMailboxProperties * self, const char * uri)
+#line 452 "mn-autodetect-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::set_uri"
+#line 156 "mn-autodetect-mailbox-properties.gob"
+	g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 156 "mn-autodetect-mailbox-properties.gob"
+	g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (gboolean )0);
+#line 156 "mn-autodetect-mailbox-properties.gob"
+	g_return_val_if_fail (uri != NULL, (gboolean )0);
+#line 461 "mn-autodetect-mailbox-properties.c"
+{
+#line 159 "mn-autodetect-mailbox-properties.gob"
+	
+    gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->location_entry), uri);
+    return TRUE;
+  }}
+#line 468 "mn-autodetect-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 164 "mn-autodetect-mailbox-properties.gob"
+static char * 
+mn_autodetect_mailbox_properties_get_uri (MNMailboxProperties * self)
+#line 474 "mn-autodetect-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Autodetect:Mailbox:Properties::get_uri"
+#line 164 "mn-autodetect-mailbox-properties.gob"
+	g_return_val_if_fail (self != NULL, (char * )0);
+#line 164 "mn-autodetect-mailbox-properties.gob"
+	g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (char * )0);
+#line 481 "mn-autodetect-mailbox-properties.c"
+{
+#line 166 "mn-autodetect-mailbox-properties.gob"
+	
+    const char *location;
+
+    location = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->location_entry));
+    return g_strdup(location);
+  }}
+#line 490 "mn-autodetect-mailbox-properties.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-autodetect-mailbox-properties.gob b/src/mn-autodetect-mailbox-properties.gob
@@ -0,0 +1,172 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+%headertop{
+#include <gtk/gtk.h>
+%}
+%{
+#include "config.h"
+#include <glib/gi18n-lib.h>
+#include "mn-mailbox-properties.h"
+#include "mn-mailbox-properties-util.h"
+#include "mn-uri.h"
+#include "mn-util.h"
+
+  static char *current_folder_uri = NULL;
+%}
+
+class MN:Autodetect:Mailbox:Properties from Gtk:HBox (interface MN:Mailbox:Properties)
+{
+  property STRING label (override)
+    get { g_value_set_string(VAL, _("<span style=\"italic\">autodetect</span>")); };
+  
+  private GtkSizeGroup *size_group unrefwith g_object_unref;
+  property OBJECT size_group (override, link);
+  
+  property BOOLEAN complete (override)
+    get
+    {
+      const char *location;
+      
+      location = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->location_entry));
+      g_value_set_boolean(VAL, *location != 0);
+    };
+
+  private GtkTooltips *tooltips = {mn_tooltips_new()} unrefwith g_object_unref;
+  private GtkWidget *location_entry;
+
+  override (G:Object) GObject *
+    constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+  {
+    GObject *object;
+    Self *self;
+    GtkWidget *hbox;
+    GtkWidget *label;
+    GtkWidget *button;
+
+    object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+    self = SELF(object);
+
+    gtk_box_set_spacing(GTK_BOX(self), 12);
+    
+    label = gtk_label_new_with_mnemonic(_("_Location:"));
+    gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
+    
+    hbox = gtk_hbox_new(FALSE, 6);
+    
+    selfp->location_entry = gtk_entry_new();
+    button = gtk_button_new_with_mnemonic(_("_Browse..."));
+    
+    gtk_label_set_mnemonic_widget(GTK_LABEL(label), selfp->location_entry);
+    gtk_entry_set_activates_default(GTK_ENTRY(selfp->location_entry), TRUE);
+
+    mn_tooltips_set_tip(selfp->tooltips,
+			selfp->location_entry,
+			_("The URI of the mailbox"));
+
+    gtk_box_pack_start(GTK_BOX(hbox), selfp->location_entry, TRUE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0);
+    
+    gtk_box_pack_start(GTK_BOX(self), label, FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(self), hbox, TRUE, TRUE, 0);
+    
+    gtk_widget_show(label);
+    gtk_widget_show_all(hbox);
+
+    gtk_size_group_add_widget(selfp->size_group, label);
+
+    g_signal_connect(G_OBJECT(selfp->location_entry), "changed", G_CALLBACK(self_entry_changed_h), self);
+    g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(self_browse_clicked_h), self);
+
+    return object;
+  }
+
+  private void
+    entry_changed_h (Gtk:Editable *editable (check null type),
+		     gpointer user_data (check null))
+  {
+    Self *self = user_data;
+    g_object_notify(G_OBJECT(self), "complete");
+  }
+
+  private void
+    browse_clicked_h (Gtk:Button *button (check null type),
+		      gpointer user_data (check null))
+  {
+    Self *self = user_data;
+    GtkWidget *toplevel;
+    GtkWidget *chooser;
+    const char *location;
+
+    toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
+    chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
+						       GTK_WINDOW(toplevel),
+						       GTK_FILE_CHOOSER_ACTION_OPEN,
+						       "gnome-vfs",
+						       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+						       GTK_STOCK_OPEN, 1,
+						       NULL);
+    
+    gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(chooser), FALSE);
+    mn_file_chooser_dialog_allow_select_folder(GTK_FILE_CHOOSER_DIALOG(chooser), 1);
+
+    location = gtk_entry_get_text(GTK_ENTRY(selfp->location_entry));
+    if (*location)
+      gtk_file_chooser_set_uri(GTK_FILE_CHOOSER(chooser), location);
+    else if (current_folder_uri)
+      gtk_file_chooser_set_current_folder_uri(GTK_FILE_CHOOSER(chooser), current_folder_uri);
+      
+    g_signal_connect(G_OBJECT(chooser), "current-folder-changed", G_CALLBACK(self_current_folder_changed_h), self);
+
+    if (gtk_dialog_run(GTK_DIALOG(chooser)) == 1)
+      {
+	char *uri;
+	
+	uri = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(chooser));
+	gtk_entry_set_text(GTK_ENTRY(selfp->location_entry), uri);
+	g_free(uri);
+      }
+    
+    gtk_widget_destroy(chooser);
+  }
+  
+  private void
+    current_folder_changed_h (Gtk:File:Chooser *chooser (check null type),
+			      gpointer user_data)
+  {
+    g_free(current_folder_uri);
+    current_folder_uri = gtk_file_chooser_get_current_folder_uri(chooser);
+  }
+  
+  interface MN:Mailbox:Properties private gboolean
+    set_uri (MN:Mailbox:Properties *self (check null type),
+	     const char *uri (check null))
+  {
+    gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->location_entry), uri);
+    return TRUE;
+  }
+
+  interface MN:Mailbox:Properties private char *
+    get_uri (MN:Mailbox:Properties *self (check null type))
+  {
+    const char *location;
+
+    location = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->location_entry));
+    return g_strdup(location);
+  }
+}
diff --git a/src/mn-autodetect-mailbox-properties.h b/src/mn-autodetect-mailbox-properties.h
@@ -0,0 +1,78 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+
+#ifndef __MN_AUTODETECT_MAILBOX_PROPERTIES_H__
+#define __MN_AUTODETECT_MAILBOX_PROPERTIES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_AUTODETECT_MAILBOX_PROPERTIES	(mn_autodetect_mailbox_properties_get_type())
+#define MN_AUTODETECT_MAILBOX_PROPERTIES(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_autodetect_mailbox_properties_get_type(), MNAutodetectMailboxProperties)
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_CONST(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_autodetect_mailbox_properties_get_type(), MNAutodetectMailboxProperties const)
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_CLASS(klass)	G_TYPE_CHECK_CLASS_CAST((klass), mn_autodetect_mailbox_properties_get_type(), MNAutodetectMailboxPropertiesClass)
+#define MN_IS_AUTODETECT_MAILBOX_PROPERTIES(obj)	G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_autodetect_mailbox_properties_get_type ())
+
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_CLASS(obj)	G_TYPE_INSTANCE_GET_CLASS((obj), mn_autodetect_mailbox_properties_get_type(), MNAutodetectMailboxPropertiesClass)
+
+/* Private structure type */
+typedef struct _MNAutodetectMailboxPropertiesPrivate MNAutodetectMailboxPropertiesPrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_AUTODETECT_MAILBOX_PROPERTIES__
+#define __TYPEDEF_MN_AUTODETECT_MAILBOX_PROPERTIES__
+typedef struct _MNAutodetectMailboxProperties MNAutodetectMailboxProperties;
+#endif
+struct _MNAutodetectMailboxProperties {
+	GtkHBox __parent__;
+	/*< private >*/
+	MNAutodetectMailboxPropertiesPrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNAutodetectMailboxPropertiesClass MNAutodetectMailboxPropertiesClass;
+struct _MNAutodetectMailboxPropertiesClass {
+	GtkHBoxClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType	mn_autodetect_mailbox_properties_get_type	(void);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_LABEL(arg)	"label", __extension__ ({gchar **z = (arg); z;})
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_PROP_SIZE_GROUP(arg)    	"size_group", __extension__ ({GObject *z = (arg); z;})
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_SIZE_GROUP(arg)	"size_group", __extension__ ({GObject **z = (arg); z;})
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg)	"complete", __extension__ ({gboolean *z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_LABEL(arg)	"label",(gchar **)(arg)
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_PROP_SIZE_GROUP(arg)    	"size_group",(GObject *)(arg)
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_SIZE_GROUP(arg)	"size_group",(GObject **)(arg)
+#define MN_AUTODETECT_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg)	"complete",(gboolean *)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-automation-private.h b/src/mn-automation-private.h
@@ -0,0 +1,17 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#ifndef __MN_AUTOMATION_PRIVATE_H__
+#define __MN_AUTOMATION_PRIVATE_H__
+
+#include "mn-automation.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-automation.c b/src/mn-automation.c
@@ -0,0 +1,205 @@
+/* Generated by GOB (v2.0.9) on Mon Aug 16 18:13:52 2004
+   (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 9
+
+#define selfp (self->_priv)
+
+#include "mn-automation.h"
+
+#include "mn-automation-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 23 "mn-automation.gob"
+
+#include "mn-properties.h"
+#include "mn-shell.h"
+
+#line 30 "mn-automation.c"
+/* self casting macros */
+#define SELF(x) MN_AUTOMATION(x)
+#define SELF_CONST(x) MN_AUTOMATION_CONST(x)
+#define IS_SELF(x) MN_IS_AUTOMATION(x)
+#define TYPE_SELF MN_TYPE_AUTOMATION
+#define SELF_CLASS(x) MN_AUTOMATION_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_AUTOMATION_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNAutomation Self;
+typedef MNAutomationClass SelfClass;
+
+/* here are local prototypes */
+static void mn_automation_init (MNAutomation * o) G_GNUC_UNUSED;
+static void mn_automation_class_init (MNAutomationClass * c) G_GNUC_UNUSED;
+static void mn_automation_update (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
+static void mn_automation_report (PortableServer_Servant servant, CORBA_char ** report, CORBA_Environment * env) G_GNUC_UNUSED;
+static void mn_automation_displayProperties (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
+static void mn_automation_displayAbout (PortableServer_Servant servant, CORBA_Environment * env) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static BonoboObjectClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_update mn_automation_update
+#define self_report mn_automation_report
+#define self_displayProperties mn_automation_displayProperties
+#define self_displayAbout mn_automation_displayAbout
+#define self_new mn_automation_new
+GType
+mn_automation_get_type (void)
+{
+	static GType type = 0;
+
+	if ___GOB_UNLIKELY(type == 0) {
+		static const GTypeInfo info = {
+			sizeof (MNAutomationClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) mn_automation_class_init,
+			NULL, /* class_finalize */
+			NULL, /* class_data */
+			sizeof (MNAutomation),
+			0, /* n_preallocs */
+			(GInstanceInitFunc)  mn_automation_init,
+			NULL
+		};
+
+		type = bonobo_type_unique (
+			BONOBO_OBJECT_TYPE,
+			POA_GNOME_MNAutomation__init, NULL,
+			G_STRUCT_OFFSET (MNAutomationClass, _epv),
+			&info, "MNAutomation");
+	}
+
+	return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNAutomation *)g_object_new(mn_automation_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNAutomation * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNAutomation *
+GET_NEW_VARG (const char *first, ...)
+{
+	MNAutomation *ret;
+	va_list ap;
+	va_start (ap, first);
+	ret = (MNAutomation *)g_object_new_valist (mn_automation_get_type (), first, ap);
+	va_end (ap);
+	return ret;
+}
+
+static void 
+mn_automation_init (MNAutomation * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Automation::init"
+}
+#undef __GOB_FUNCTION__
+static void 
+mn_automation_class_init (MNAutomationClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Automation::class_init"
+
+	parent_class = g_type_class_ref (BONOBO_TYPE_OBJECT);
+
+#line 30 "mn-automation.gob"
+	c->_epv.update = self_update;
+#line 37 "mn-automation.gob"
+	c->_epv.report = self_report;
+#line 46 "mn-automation.gob"
+	c->_epv.displayProperties = self_displayProperties;
+#line 53 "mn-automation.gob"
+	c->_epv.displayAbout = self_displayAbout;
+#line 128 "mn-automation.c"
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 30 "mn-automation.gob"
+static void 
+mn_automation_update (PortableServer_Servant servant, CORBA_Environment * env)
+#line 137 "mn-automation.c"
+{
+#define __GOB_FUNCTION__ "MN:Automation::update"
+{
+#line 32 "mn-automation.gob"
+	
+    g_return_if_fail(mn_shell != NULL);
+    mn_mailboxes_check(mn_shell->mailboxes);
+  }}
+#line 146 "mn-automation.c"
+#undef __GOB_FUNCTION__
+
+#line 37 "mn-automation.gob"
+static void 
+mn_automation_report (PortableServer_Servant servant, CORBA_char ** report, CORBA_Environment * env)
+#line 152 "mn-automation.c"
+{
+#define __GOB_FUNCTION__ "MN:Automation::report"
+{
+#line 41 "mn-automation.gob"
+	
+    g_return_if_fail(mn_shell != NULL);
+    mn_shell_report(mn_shell, report);
+  }}
+#line 161 "mn-automation.c"
+#undef __GOB_FUNCTION__
+
+#line 46 "mn-automation.gob"
+static void 
+mn_automation_displayProperties (PortableServer_Servant servant, CORBA_Environment * env)
+#line 167 "mn-automation.c"
+{
+#define __GOB_FUNCTION__ "MN:Automation::displayProperties"
+{
+#line 48 "mn-automation.gob"
+	
+    g_return_if_fail(mn_shell != NULL);
+    mn_properties_display();
+  }}
+#line 176 "mn-automation.c"
+#undef __GOB_FUNCTION__
+
+#line 53 "mn-automation.gob"
+static void 
+mn_automation_displayAbout (PortableServer_Servant servant, CORBA_Environment * env)
+#line 182 "mn-automation.c"
+{
+#define __GOB_FUNCTION__ "MN:Automation::displayAbout"
+{
+#line 55 "mn-automation.gob"
+	
+    g_return_if_fail(mn_shell != NULL);
+    mn_shell_display_about(mn_shell);
+  }}
+#line 191 "mn-automation.c"
+#undef __GOB_FUNCTION__
+
+#line 60 "mn-automation.gob"
+MNAutomation * 
+mn_automation_new (void)
+#line 197 "mn-automation.c"
+{
+#define __GOB_FUNCTION__ "MN:Automation::new"
+{
+#line 62 "mn-automation.gob"
+	
+    return GET_NEW;
+  }}
+#line 205 "mn-automation.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-automation.gob b/src/mn-automation.gob
@@ -0,0 +1,65 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+%headertop{
+#include <libbonobo.h>
+#include "MNAutomation.h"
+%}
+%{
+#include "mn-properties.h"
+#include "mn-shell.h"
+%}
+  
+class MN:Automation from Bonobo:Object (BonoboObject GNOME_MNAutomation)
+{
+  BonoboObject private void
+    update (PortableServer_Servant servant, CORBA_Environment *env)
+  {
+    g_return_if_fail(mn_shell != NULL);
+    mn_mailboxes_check(mn_shell->mailboxes);
+  }
+
+  BonoboObject private void
+    report (PortableServer_Servant servant,
+	    CORBA_char **report,
+	    CORBA_Environment *env)
+  {
+    g_return_if_fail(mn_shell != NULL);
+    mn_shell_report(mn_shell, report);
+  }
+
+  BonoboObject private void
+    displayProperties (PortableServer_Servant servant, CORBA_Environment *env)
+  {
+    g_return_if_fail(mn_shell != NULL);
+    mn_properties_display();
+  }
+
+  BonoboObject private void
+    displayAbout (PortableServer_Servant servant, CORBA_Environment *env)
+  {
+    g_return_if_fail(mn_shell != NULL);
+    mn_shell_display_about(mn_shell);
+  }
+
+  public MNAutomation *
+    new (void)
+  {
+    return GET_NEW;
+  }
+}
diff --git a/src/mn-automation.h b/src/mn-automation.h
@@ -0,0 +1,61 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <libbonobo.h>
+#include "MNAutomation.h"
+
+#ifndef __MN_AUTOMATION_H__
+#define __MN_AUTOMATION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_AUTOMATION	(mn_automation_get_type())
+#define MN_AUTOMATION(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_automation_get_type(), MNAutomation)
+#define MN_AUTOMATION_CONST(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_automation_get_type(), MNAutomation const)
+#define MN_AUTOMATION_CLASS(klass)	G_TYPE_CHECK_CLASS_CAST((klass), mn_automation_get_type(), MNAutomationClass)
+#define MN_IS_AUTOMATION(obj)	G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_automation_get_type ())
+
+#define MN_AUTOMATION_GET_CLASS(obj)	G_TYPE_INSTANCE_GET_CLASS((obj), mn_automation_get_type(), MNAutomationClass)
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_AUTOMATION__
+#define __TYPEDEF_MN_AUTOMATION__
+typedef struct _MNAutomation MNAutomation;
+#endif
+struct _MNAutomation {
+	BonoboObject __parent__;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNAutomationClass MNAutomationClass;
+struct _MNAutomationClass {
+	BonoboObjectClass __parent__;
+	/* Bonobo object epv */
+	POA_GNOME_MNAutomation__epv _epv;
+};
+
+
+/*
+ * Public methods
+ */
+GType	mn_automation_get_type	(void);
+MNAutomation * 	mn_automation_new	(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-blinking-image-private.h b/src/mn-blinking-image-private.h
@@ -0,0 +1,30 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#ifndef __MN_BLINKING_IMAGE_PRIVATE_H__
+#define __MN_BLINKING_IMAGE_PRIVATE_H__
+
+#include "mn-blinking-image.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct _MNBlinkingImagePrivate {
+#line 29 "mn-blinking-image.gob"
+	gboolean blinking;
+#line 49 "mn-blinking-image.gob"
+	unsigned int timeout_id;
+#line 50 "mn-blinking-image.gob"
+	gboolean is_on;
+#line 51 "mn-blinking-image.gob"
+	GdkPixbuf * on_pixbuf;
+#line 52 "mn-blinking-image.gob"
+	GdkPixbuf * off_pixbuf;
+#line 24 "mn-blinking-image-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-blinking-image.c b/src/mn-blinking-image.c
@@ -0,0 +1,365 @@
+/* Generated by GOB (v2.0.9) on Mon Aug 16 18:13:53 2004
+   (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 9
+
+#define selfp (self->_priv)
+
+#include <string.h> /* memset() */
+
+#include "mn-blinking-image.h"
+
+#include "mn-blinking-image-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 22 "mn-blinking-image.gob"
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+
+#line 32 "mn-blinking-image.c"
+/* self casting macros */
+#define SELF(x) MN_BLINKING_IMAGE(x)
+#define SELF_CONST(x) MN_BLINKING_IMAGE_CONST(x)
+#define IS_SELF(x) MN_IS_BLINKING_IMAGE(x)
+#define TYPE_SELF MN_TYPE_BLINKING_IMAGE
+#define SELF_CLASS(x) MN_BLINKING_IMAGE_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_BLINKING_IMAGE_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNBlinkingImage Self;
+typedef MNBlinkingImageClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_blinking_image_init (MNBlinkingImage * o) G_GNUC_UNUSED;
+static void mn_blinking_image_class_init (MNBlinkingImageClass * c) G_GNUC_UNUSED;
+static void mn_blinking_image_update (MNBlinkingImage * self, gboolean is_on) G_GNUC_UNUSED;
+static gboolean mn_blinking_image_timeout_cb (gpointer data) G_GNUC_UNUSED;
+
+enum {
+	PROP_0,
+	PROP_BLINKING
+};
+
+/* pointer to the class of our parent */
+static GtkImageClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_get_blinking mn_blinking_image_get_blinking
+#define self_set_blinking mn_blinking_image_set_blinking
+#define self_update mn_blinking_image_update
+#define self_timeout_cb mn_blinking_image_timeout_cb
+#define self_new_from_stock mn_blinking_image_new_from_stock
+GType
+mn_blinking_image_get_type (void)
+{
+	static GType type = 0;
+
+	if ___GOB_UNLIKELY(type == 0) {
+		static const GTypeInfo info = {
+			sizeof (MNBlinkingImageClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) mn_blinking_image_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL /* class_data */,
+			sizeof (MNBlinkingImage),
+			0 /* n_preallocs */,
+			(GInstanceInitFunc) mn_blinking_image_init,
+			NULL
+		};
+
+		type = g_type_register_static (GTK_TYPE_IMAGE, "MNBlinkingImage", &info, (GTypeFlags)0);
+	}
+
+	return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNBlinkingImage *)g_object_new(mn_blinking_image_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNBlinkingImage * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNBlinkingImage *
+GET_NEW_VARG (const char *first, ...)
+{
+	MNBlinkingImage *ret;
+	va_list ap;
+	va_start (ap, first);
+	ret = (MNBlinkingImage *)g_object_new_valist (mn_blinking_image_get_type (), first, ap);
+	va_end (ap);
+	return ret;
+}
+
+
+static void
+___dispose (GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::dispose"
+	MNBlinkingImage *self G_GNUC_UNUSED = MN_BLINKING_IMAGE (obj_self);
+	if (G_OBJECT_CLASS (parent_class)->dispose) \
+		(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
+#line 51 "mn-blinking-image.gob"
+	if(self->_priv->on_pixbuf) { ((*(void (*)(void *))g_object_unref)) (self->_priv->on_pixbuf); self->_priv->on_pixbuf = NULL; }
+#line 120 "mn-blinking-image.c"
+#line 52 "mn-blinking-image.gob"
+	if(self->_priv->off_pixbuf) { ((*(void (*)(void *))g_object_unref)) (self->_priv->off_pixbuf); self->_priv->off_pixbuf = NULL; }
+#line 123 "mn-blinking-image.c"
+}
+#undef __GOB_FUNCTION__
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::finalize"
+	MNBlinkingImage *self  G_GNUC_UNUSED = MN_BLINKING_IMAGE (obj_self);
+	gpointer priv = self->_priv;
+	if(G_OBJECT_CLASS(parent_class)->finalize) \
+		(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+#define timeout_id (self->_priv->timeout_id)
+#define VAR timeout_id
+	{
+#line 49 "mn-blinking-image.gob"
+	 g_source_remove(VAR); }
+#line 141 "mn-blinking-image.c"
+	memset(&timeout_id, 0, sizeof(timeout_id));
+#undef VAR
+#undef timeout_id
+	g_free (priv);
+}
+#undef __GOB_FUNCTION__
+
+static void 
+mn_blinking_image_init (MNBlinkingImage * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::init"
+	o->_priv = g_new0 (MNBlinkingImagePrivate, 1);
+#line 49 "mn-blinking-image.gob"
+	o->_priv->is_on = TRUE;
+#line 156 "mn-blinking-image.c"
+}
+#undef __GOB_FUNCTION__
+static void 
+mn_blinking_image_class_init (MNBlinkingImageClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::class_init"
+	GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+
+	parent_class = g_type_class_ref (GTK_TYPE_IMAGE);
+
+	g_object_class->dispose = ___dispose;
+	g_object_class->finalize = ___finalize;
+	g_object_class->get_property = ___object_get_property;
+	g_object_class->set_property = ___object_set_property;
+    {
+	GParamSpec   *param_spec;
+
+	param_spec = g_param_spec_boolean
+		("blinking" /* name */,
+		 NULL /* nick */,
+		 _("Whether the image is blinking or not") /* blurb */,
+		 FALSE /* default_value */,
+		 (GParamFlags)(G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (g_object_class,
+		PROP_BLINKING,
+		param_spec);
+    }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_set_property (GObject *object,
+	guint property_id,
+	const GValue *VAL G_GNUC_UNUSED,
+	GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Blinking:Image::set_property"
+{
+	MNBlinkingImage *self G_GNUC_UNUSED;
+
+	self = MN_BLINKING_IMAGE (object);
+
+	switch (property_id) {
+	case PROP_BLINKING:
+		{
+#line 33 "mn-blinking-image.gob"
+
+      if (selfp->blinking)
+	{
+	  g_source_remove(selfp->timeout_id);
+	  self_update(self, TRUE);
+	}
+
+      selfp->blinking = g_value_get_boolean(VAL);
+      if (selfp->blinking)
+	selfp->timeout_id = g_timeout_add(500, self_timeout_cb, self);
+    
+#line 213 "mn-blinking-image.c"
+		}
+		break;
+	default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+#  undef G_STRLOC
+#  define G_STRLOC	__FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+	guint property_id,
+	GValue *VAL G_GNUC_UNUSED,
+	GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Blinking:Image::get_property"
+{
+	MNBlinkingImage *self G_GNUC_UNUSED;
+
+	self = MN_BLINKING_IMAGE (object);
+
+	switch (property_id) {
+	case PROP_BLINKING:
+		{
+#line 45 "mn-blinking-image.gob"
+
+      g_value_set_boolean(VAL, selfp->blinking);
+    
+#line 246 "mn-blinking-image.c"
+		}
+		break;
+	default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+#  undef G_STRLOC
+#  define G_STRLOC	__FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 45 "mn-blinking-image.gob"
+gboolean 
+mn_blinking_image_get_blinking (MNBlinkingImage * self)
+#line 266 "mn-blinking-image.c"
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::get_blinking"
+{
+#line 30 "mn-blinking-image.gob"
+		gboolean val; g_object_get (G_OBJECT (self), "blinking", &val, NULL); return val;
+}}
+#line 273 "mn-blinking-image.c"
+#undef __GOB_FUNCTION__
+
+#line 33 "mn-blinking-image.gob"
+void 
+mn_blinking_image_set_blinking (MNBlinkingImage * self, gboolean val)
+#line 279 "mn-blinking-image.c"
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::set_blinking"
+{
+#line 30 "mn-blinking-image.gob"
+		g_object_set (G_OBJECT (self), "blinking", val, NULL);
+}}
+#line 286 "mn-blinking-image.c"
+#undef __GOB_FUNCTION__
+
+#line 54 "mn-blinking-image.gob"
+static void 
+mn_blinking_image_update (MNBlinkingImage * self, gboolean is_on)
+#line 292 "mn-blinking-image.c"
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::update"
+#line 54 "mn-blinking-image.gob"
+	g_return_if_fail (self != NULL);
+#line 54 "mn-blinking-image.gob"
+	g_return_if_fail (MN_IS_BLINKING_IMAGE (self));
+#line 299 "mn-blinking-image.c"
+{
+#line 56 "mn-blinking-image.gob"
+	
+    gtk_image_set_from_pixbuf(GTK_IMAGE(self), is_on ? selfp->on_pixbuf : selfp->off_pixbuf);
+    selfp->is_on = is_on;
+  }}
+#line 306 "mn-blinking-image.c"
+#undef __GOB_FUNCTION__
+
+#line 61 "mn-blinking-image.gob"
+static gboolean 
+mn_blinking_image_timeout_cb (gpointer data)
+#line 312 "mn-blinking-image.c"
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::timeout_cb"
+#line 61 "mn-blinking-image.gob"
+	g_return_val_if_fail (data != NULL, (gboolean )0);
+#line 317 "mn-blinking-image.c"
+{
+#line 63 "mn-blinking-image.gob"
+	
+    Self *self = data;
+
+    GDK_THREADS_ENTER();
+    self_update(self, ! selfp->is_on);
+    GDK_THREADS_LEAVE();
+
+    return TRUE;
+  }}
+#line 329 "mn-blinking-image.c"
+#undef __GOB_FUNCTION__
+
+#line 73 "mn-blinking-image.gob"
+GtkWidget * 
+mn_blinking_image_new_from_stock (const char * stock_id, GtkIconSize icon_size)
+#line 335 "mn-blinking-image.c"
+{
+#define __GOB_FUNCTION__ "MN:Blinking:Image::new_from_stock"
+#line 73 "mn-blinking-image.gob"
+	g_return_val_if_fail (stock_id != NULL, (GtkWidget * )0);
+#line 340 "mn-blinking-image.c"
+{
+#line 76 "mn-blinking-image.gob"
+	
+    Self *self;
+    int width, height;
+
+    self = GET_NEW;
+
+    selfp->on_pixbuf = gtk_widget_render_icon(GTK_WIDGET(self),
+					      stock_id,
+					      icon_size,
+					      NULL);
+    g_return_val_if_fail(selfp->on_pixbuf != NULL, NULL);
+
+    width = gdk_pixbuf_get_width(selfp->on_pixbuf);
+    height = gdk_pixbuf_get_height(selfp->on_pixbuf);
+    
+    selfp->off_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
+    gdk_pixbuf_fill(selfp->off_pixbuf, 0); /* fill with transparency */
+
+    self_update(self, selfp->is_on);
+
+    return GTK_WIDGET(self);
+  }}
+#line 365 "mn-blinking-image.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-blinking-image.gob b/src/mn-blinking-image.gob
@@ -0,0 +1,98 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+%headertop{
+#include <gtk/gtk.h>
+%}
+%{
+#include "config.h"
+#include <glib/gi18n-lib.h>
+%}
+
+class MN:Blinking:Image from Gtk:Image
+{
+  private gboolean blinking;
+  property BOOLEAN blinking (blurb = _("Whether the image is blinking or not"),
+			     export)
+    set
+    {
+      if (selfp->blinking)
+	{
+	  g_source_remove(selfp->timeout_id);
+	  self_update(self, TRUE);
+	}
+
+      selfp->blinking = g_value_get_boolean(VAL);
+      if (selfp->blinking)
+	selfp->timeout_id = g_timeout_add(500, self_timeout_cb, self);
+    }
+    get
+    {
+      g_value_set_boolean(VAL, selfp->blinking);
+    };
+
+  private unsigned int timeout_id destroy { g_source_remove(VAR); };
+  private gboolean is_on = TRUE; /* is currently displaying the on pixbuf? */
+  private GdkPixbuf *on_pixbuf unrefwith g_object_unref;
+  private GdkPixbuf *off_pixbuf unrefwith g_object_unref;
+
+  private void
+    update (self, gboolean is_on)
+  {
+    gtk_image_set_from_pixbuf(GTK_IMAGE(self), is_on ? selfp->on_pixbuf : selfp->off_pixbuf);
+    selfp->is_on = is_on;
+  }
+
+  private gboolean
+    timeout_cb (gpointer data (check null))
+  {
+    Self *self = data;
+
+    GDK_THREADS_ENTER();
+    self_update(self, ! selfp->is_on);
+    GDK_THREADS_LEAVE();
+
+    return TRUE;
+  }
+
+  public GtkWidget *
+    new_from_stock (const char *stock_id (check null),
+		    GtkIconSize icon_size)
+  {
+    Self *self;
+    int width, height;
+
+    self = GET_NEW;
+
+    selfp->on_pixbuf = gtk_widget_render_icon(GTK_WIDGET(self),
+					      stock_id,
+					      icon_size,
+					      NULL);
+    g_return_val_if_fail(selfp->on_pixbuf != NULL, NULL);
+
+    width = gdk_pixbuf_get_width(selfp->on_pixbuf);
+    height = gdk_pixbuf_get_height(selfp->on_pixbuf);
+    
+    selfp->off_pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
+    gdk_pixbuf_fill(selfp->off_pixbuf, 0); /* fill with transparency */
+
+    self_update(self, selfp->is_on);
+
+    return GTK_WIDGET(self);
+  }
+}
diff --git a/src/mn-blinking-image.h b/src/mn-blinking-image.h
@@ -0,0 +1,79 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+
+#ifndef __MN_BLINKING_IMAGE_H__
+#define __MN_BLINKING_IMAGE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_BLINKING_IMAGE	(mn_blinking_image_get_type())
+#define MN_BLINKING_IMAGE(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_blinking_image_get_type(), MNBlinkingImage)
+#define MN_BLINKING_IMAGE_CONST(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_blinking_image_get_type(), MNBlinkingImage const)
+#define MN_BLINKING_IMAGE_CLASS(klass)	G_TYPE_CHECK_CLASS_CAST((klass), mn_blinking_image_get_type(), MNBlinkingImageClass)
+#define MN_IS_BLINKING_IMAGE(obj)	G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_blinking_image_get_type ())
+
+#define MN_BLINKING_IMAGE_GET_CLASS(obj)	G_TYPE_INSTANCE_GET_CLASS((obj), mn_blinking_image_get_type(), MNBlinkingImageClass)
+
+/* Private structure type */
+typedef struct _MNBlinkingImagePrivate MNBlinkingImagePrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_BLINKING_IMAGE__
+#define __TYPEDEF_MN_BLINKING_IMAGE__
+typedef struct _MNBlinkingImage MNBlinkingImage;
+#endif
+struct _MNBlinkingImage {
+	GtkImage __parent__;
+	/*< private >*/
+	MNBlinkingImagePrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNBlinkingImageClass MNBlinkingImageClass;
+struct _MNBlinkingImageClass {
+	GtkImageClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType	mn_blinking_image_get_type	(void);
+gboolean 	mn_blinking_image_get_blinking	(MNBlinkingImage * self);
+void 	mn_blinking_image_set_blinking	(MNBlinkingImage * self,
+					gboolean val);
+GtkWidget * 	mn_blinking_image_new_from_stock	(const char * stock_id,
+					GtkIconSize icon_size);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_BLINKING_IMAGE_PROP_BLINKING(arg)    	"blinking", __extension__ ({gboolean z = (arg); z;})
+#define MN_BLINKING_IMAGE_GET_PROP_BLINKING(arg)	"blinking", __extension__ ({gboolean *z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_BLINKING_IMAGE_PROP_BLINKING(arg)    	"blinking",(gboolean )(arg)
+#define MN_BLINKING_IMAGE_GET_PROP_BLINKING(arg)	"blinking",(gboolean *)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-client-session.c b/src/mn-client-session.c
@@ -0,0 +1,938 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include <stdio.h>		/* required by stdlib.h on Darwin */
+#include <stdlib.h>		/* required by sys/socket.h on Darwin */
+#include <stdarg.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <unistd.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <sys/param.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <glib.h>
+#include <glib/gi18n-lib.h>
+#ifdef WITH_SSL
+#include <openssl/err.h>
+#include "mn-ssl.h"
+#endif /* WITH_SSL */
+#ifdef WITH_SASL
+#include <sasl/sasl.h>
+#include <sasl/saslutil.h>
+#include "mn-sasl.h"
+#endif /* WITH_SASL */
+#include "mn-util.h"
+#include "mn-client-session.h"
+
+/*** cpp *********************************************************************/
+
+#define READ_BUFSIZE				2048
+
+/*** types *******************************************************************/
+
+struct _MNClientSession
+{
+  MNClientSessionState		*states;
+  MNClientSessionCallbacks	*callbacks;
+  char				*hostname;
+  int				port;
+  char				*username;
+  char				*password;
+  int				s;
+  MNClientSessionState		*state;
+  char				*error;
+  MNClientSessionPrivate	*private;
+  
+#ifdef WITH_SSL
+  gboolean			use_ssl;
+  SSL				*ssl;
+#endif
+
+#ifdef WITH_SASL
+  gboolean			sasl_available;
+  sasl_conn_t			*sasl_conn;
+  const char			*sasl_initial_clientout;
+  unsigned int			sasl_initial_clientoutlen;
+  const char			*sasl_clientout;
+  unsigned int			sasl_clientoutlen;
+  int				sasl_ssf;
+  unsigned int			sasl_maxoutbuf;
+#endif /* WITH_SASL */
+};
+
+/*** variables ***************************************************************/
+
+#ifdef WITH_SASL
+static sasl_callback_t sasl_callbacks[] = {
+  { SASL_CB_USER, NULL, NULL },
+  { SASL_CB_AUTHNAME, NULL, NULL },
+  { SASL_CB_PASS, NULL, NULL },
+
+  { SASL_CB_LIST_END, NULL, NULL }
+};
+#endif /* WITH_SASL */
+
+/*** functions ***************************************************************/
+
+static struct addrinfo *mn_client_session_resolve (MNClientSession *session);
+static int mn_client_session_connect (MNClientSession *session, struct addrinfo *addrinfo);
+
+#ifdef WITH_SSL
+static gboolean mn_client_session_init_ssl (MNClientSession *session);
+#endif
+
+static int mn_client_session_enter_state (MNClientSession *session, int id);
+static gboolean mn_client_session_handle_input (MNClientSession *session, const char *input);
+
+#ifdef WITH_SASL
+static int mn_client_session_write_base64 (MNClientSession *session,
+					   const char *buf,
+					   unsigned int len);
+static gboolean mn_client_session_sasl_fill_interact (MNClientSession *session,
+						      sasl_interact_t *interact);
+static char *mn_client_session_sasl_get_ip_port (const struct sockaddr *addr);
+#endif /* WITH_SASL */
+
+/*** implementation **********************************************************/
+
+gboolean
+mn_client_session_run (MNClientSessionState *states,
+		       MNClientSessionCallbacks *callbacks,
+#ifdef WITH_SSL
+		       gboolean use_ssl,
+#endif
+		       const char *hostname,
+		       int port,
+		       const char *username,
+		       const char *password,
+		       MNClientSessionPrivate *private,
+		       GError **err)
+{
+  MNClientSession session;
+  struct addrinfo *addrinfo;
+  GString *input_buffer;
+
+  g_return_val_if_fail(states != NULL, FALSE);
+  g_return_val_if_fail(callbacks != NULL, FALSE);
+  g_return_val_if_fail(callbacks->response_new != NULL, FALSE);
+  g_return_val_if_fail(callbacks->response_free != NULL, FALSE);
+  g_return_val_if_fail(hostname != NULL, FALSE);
+  g_return_val_if_fail(username != NULL, FALSE);
+  g_return_val_if_fail(password != NULL, FALSE);
+
+  memset(&session, 0, sizeof(session));
+  session.states = states;
+  session.callbacks = callbacks;
+  session.hostname = g_strdup(hostname);
+  session.port = port;
+  session.username = g_strdup(username);
+  session.password = g_strdup(password);
+  session.private = private;
+
+#ifdef WITH_SSL
+  session.use_ssl = use_ssl;
+#endif
+
+  addrinfo = mn_client_session_resolve(&session);
+  if (! addrinfo)
+    goto end;
+
+  session.s = mn_client_session_connect(&session, addrinfo);
+  freeaddrinfo(addrinfo);
+  if (session.s < 0)
+    goto end;
+
+#ifdef WITH_SSL
+  if (session.use_ssl)
+    {
+      if (! mn_client_session_init_ssl(&session))
+	goto end;
+    }
+#endif /* WITH_SSL */
+
+  mn_client_session_enter_state(&session, MN_CLIENT_SESSION_INITIAL_STATE);
+
+  input_buffer = g_string_new(NULL);
+  while (TRUE)
+    {
+      char buf[READ_BUFSIZE];
+      ssize_t bytes_read;
+      const char *in = NULL;
+      unsigned int inlen;
+      char *terminator;
+      gboolean cont = TRUE;
+
+#ifdef WITH_SSL
+      if (session.use_ssl)
+	bytes_read = SSL_read(session.ssl, buf, sizeof(buf));
+      else
+#endif /* WITH_SSL */
+	bytes_read = read(session.s, buf, sizeof(buf));
+	  
+      if (bytes_read <= 0)
+	{
+#ifdef WITH_SSL
+	  if (session.use_ssl)
+	    mn_client_session_error(&session, _("unable to read from server: %s"), ERR_reason_error_string(ERR_get_error()));
+	  else
+#endif /* WITH_SSL */
+	    {
+	      if (bytes_read == 0)
+		mn_client_session_error(&session, _("unable to read from server: EOF"));
+	      else
+		mn_client_session_error(&session, _("unable to read from server: %s"), g_strerror(errno));
+	    }
+	  break;		/* end */
+	}
+
+#ifdef WITH_SASL
+      if (session.sasl_ssf)
+	{
+	  if (sasl_decode(session.sasl_conn, buf, bytes_read, &in, &inlen) != SASL_OK)
+	    {
+	      mn_client_session_error(&session, _("unable to decode data using SASL: %s"), sasl_errdetail(session.sasl_conn));
+	      break;		/* end */
+	    }
+	}
+#endif /* WITH_SASL */
+
+      if (! in)
+	{
+	  in = buf;
+	  inlen = bytes_read;
+	}
+      
+      g_string_append_len(input_buffer, in, inlen);
+      while (cont && (terminator = strstr(input_buffer->str, "\r\n")))
+	{
+	  *terminator = 0;
+	  cont = mn_client_session_handle_input(&session, input_buffer->str);
+	  g_string_erase(input_buffer, 0, terminator - input_buffer->str + 2);
+	}
+      
+      if (! cont)
+	break;
+    }
+  g_string_free(input_buffer, TRUE);
+  
+ end:
+  g_free(session.hostname);
+  g_free(session.username);
+  g_free(session.password);
+  if (session.s >= 0)
+    close(session.s);
+#ifdef WITH_SSL
+  if (session.use_ssl)
+    {
+      if (session.ssl)
+	SSL_free(session.ssl);
+    }
+#endif /* WITH_SSL */
+#ifdef WITH_SASL
+  if (session.sasl_available)
+    {
+      if (session.sasl_conn)
+	sasl_dispose(&session.sasl_conn);
+      mn_sasl_unuse();
+    }
+#endif /* WITH_SASL */
+  if (session.error)
+    {
+      g_set_error(err, 0, 0, session.error);
+      g_free(session.error);
+      return FALSE;
+    }
+  else
+    return TRUE;
+}
+
+static struct addrinfo *
+mn_client_session_resolve (MNClientSession *session)
+{
+  char *servname;
+  struct addrinfo hints;
+  struct addrinfo *addrinfo;
+  int status;
+
+  g_return_val_if_fail(session != NULL, NULL);
+
+  memset(&hints, 0, sizeof(hints));
+#ifdef WITH_IPV6
+  hints.ai_family = PF_UNSPEC;
+#else
+  hints.ai_family = PF_INET;
+#endif /* WITH_IPV6 */
+  hints.ai_socktype = SOCK_STREAM;
+
+  mn_client_session_notice(session, _("resolving %s"), session->hostname);
+
+  servname = g_strdup_printf("%i", session->port);
+  status = getaddrinfo(session->hostname, servname, &hints, &addrinfo);
+  g_free(servname);
+
+  if (status == 0)
+    return addrinfo;
+  else
+    {
+      mn_client_session_error(session, _("unable to resolve %s: %s"), session->hostname, gai_strerror(status));
+      return NULL;
+    }
+}
+
+static int
+mn_client_session_connect (MNClientSession *session, struct addrinfo *addrinfo)
+{
+  struct addrinfo *a;
+
+  g_return_val_if_fail(session != NULL, -1);
+  g_return_val_if_fail(addrinfo != NULL, -1);
+
+  /* iterate over addrinfo to find a working address (RFC 3484) */
+  for (a = addrinfo; a; a = a->ai_next)
+    {
+      int status;
+      int s;
+      char ip[NI_MAXHOST];
+
+      status = getnameinfo(a->ai_addr,
+			   a->ai_addrlen,
+			   ip,
+			   sizeof(ip),
+			   NULL,
+			   0,
+			   NI_NUMERICHOST);
+      g_return_val_if_fail(status == 0, -1);
+      
+      if (a->ai_family == AF_INET)
+	((struct sockaddr_in *) a->ai_addr)->sin_port = g_htons(session->port);
+#ifdef WITH_IPV6
+      else if (a->ai_family == AF_INET6)
+	((struct sockaddr_in6 *) a->ai_addr)->sin6_port = g_htons(session->port);
+#endif /* WITH_IPV6 */
+      else
+	{
+	  mn_client_session_notice(session, _("%s: unsupported address family"), ip);
+	  continue;
+	}
+
+      s = socket(a->ai_family, SOCK_STREAM, 0);
+      if (s < 0)
+	{
+	  mn_client_session_notice(session, _("%s: unable to create socket: %s"), ip, g_strerror(errno));
+	  continue;
+	}
+
+      mn_client_session_notice(session, _("connecting to %s (%s) port %i"), session->hostname, ip, session->port);
+      if (connect(s, a->ai_addr, a->ai_addrlen) < 0)
+	{
+	  mn_client_session_notice(session, _("unable to connect: %s"), g_strerror(errno));
+	  close(s);
+	}
+      else
+	{
+	  mn_client_session_notice(session, _("connected successfully"));
+	  return s;		/* success */
+	}
+    }
+  
+  /* if reached, we couldn't find a working address */
+  mn_client_session_error(session, _("unable to connect to %s"), session->hostname);
+  return -1;
+}
+
+#ifdef WITH_SSL
+static gboolean
+mn_client_session_init_ssl (MNClientSession *session)
+{
+  SSL_CTX *ctx;
+  GError *err = NULL;
+  
+  g_return_val_if_fail(session != NULL, FALSE);
+
+  ctx = mn_ssl_init(&err);
+  if (! ctx)
+    {
+      mn_client_session_error(session, _("unable to initialize the OpenSSL library: %s"), err->message);
+      g_error_free(err);
+      return FALSE;
+    }
+  
+  session->ssl = SSL_new(ctx);
+  if (! session->ssl)
+    {
+      mn_client_session_error(session, _("unable to create a SSL object: %s"), ERR_reason_error_string(ERR_get_error()));
+      return FALSE;
+    }
+
+  if (! SSL_set_fd(session->ssl, session->s))
+    {
+      mn_client_session_error(session, _("unable to set the SSL file descriptor: %s"), ERR_reason_error_string(ERR_get_error()));
+      return FALSE;
+    }
+
+  SSL_set_connect_state(session->ssl);
+
+  return TRUE;
+}
+#endif /* WITH_SSL */
+
+static int
+mn_client_session_enter_state (MNClientSession *session, int id)
+{
+  int i;
+  
+  g_return_val_if_fail(session != NULL, 0);
+
+  for (i = 0; session->states[i].id; i++)
+    if (session->states[i].id == id)
+      {
+	session->state = &session->states[i];
+	return session->state->enter_cb
+	  ? session->state->enter_cb(session, session->private)
+	  : MN_CLIENT_SESSION_RESULT_CONTINUE;
+      }
+
+  g_return_val_if_reached(0);
+}
+
+static gboolean
+mn_client_session_handle_input (MNClientSession *session, const char *input)
+{
+  MNClientSessionResponse *response;
+  gboolean cont = TRUE;
+
+  g_return_val_if_fail(session != NULL, FALSE);
+  g_return_val_if_fail(input != NULL, FALSE);
+
+  mn_client_session_notice(session, "< %s", input);
+
+  response = session->callbacks->response_new(session, input, session->private);
+  if (response)
+    {
+      int result;
+
+      g_return_val_if_fail(session->state->handle_cb != NULL, FALSE);
+      result = session->state->handle_cb(session, response, session->private);
+
+    loop:
+      switch (result)
+	{
+	case MN_CLIENT_SESSION_RESULT_CONTINUE:
+	  break;
+
+	case MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT:
+	  mn_client_session_error(session, _("response \"%s\" is not valid in current context"), input);
+	  cont = FALSE;
+	  break;
+	  
+	case MN_CLIENT_SESSION_RESULT_END:
+	  cont = FALSE;
+	  break;
+	  
+	case 0:			/* assertion failed somewhere */
+	  g_return_val_if_reached(FALSE);
+
+	default:
+	  if (result > 0)	/* state */
+	    result = mn_client_session_enter_state(session, result);
+	  else			/* custom result */
+	    {
+	      g_return_val_if_fail(session->callbacks->custom_handler != NULL, NULL);
+	      result = session->callbacks->custom_handler(session, response, result, session->private);
+	    }
+	  goto loop;
+	}
+
+      session->callbacks->response_free(session, response, session->private);
+    }
+  else
+    {
+      mn_client_session_error(session, _("unable to parse response \"%s\""), input);
+      cont = FALSE;
+    }
+
+  return cont;
+}
+
+int
+mn_client_session_write (MNClientSession *session,
+			 const char *format,
+			 ...)
+{
+  va_list args;
+  char *str;
+  char *full;
+  unsigned int len;
+  GByteArray *array = NULL;
+  ssize_t bytes_written;
+  int result = MN_CLIENT_SESSION_RESULT_CONTINUE;
+  
+  g_return_val_if_fail(session != NULL, 0);
+  g_return_val_if_fail(format != NULL, 0);
+  
+  va_start(args, format);
+  str = g_strdup_vprintf(format, args);
+  va_end(args);
+
+  mn_client_session_notice(session, "> %s", str);
+  full = g_strconcat(str, "\r\n", NULL);
+  g_free(str);
+  len = strlen(full);
+
+#ifdef WITH_SASL
+  if (session->sasl_ssf)
+    {
+      unsigned int start = 0;
+
+      array = g_byte_array_new();
+      while (len > 0)
+	{
+	  unsigned int chunk_len;
+	  const char *out;
+	  unsigned int outlen;
+	  
+	  chunk_len = MIN(len, session->sasl_maxoutbuf);
+	  if (sasl_encode(session->sasl_conn, full + start, chunk_len, &out, &outlen) != SASL_OK)
+	    {
+	      result = mn_client_session_error(session, _("unable to encode data using SASL: %s"), sasl_errdetail(session->sasl_conn));
+	      goto end;
+	    }
+	  
+	  g_byte_array_append(array, out, outlen);
+
+	  start += chunk_len;
+	  len -= chunk_len;
+	}
+    }
+#endif /* WITH_SASL */
+
+  if (! array)
+    {
+      array = g_byte_array_sized_new(len);
+      g_byte_array_append(array, full, len);
+    }
+  
+#ifdef WITH_SSL
+  if (session->use_ssl)
+    bytes_written = SSL_write(session->ssl, array->data, array->len);
+  else
+#endif /* WITH_SSL */
+    bytes_written = write(session->s, array->data, array->len);
+
+  if (bytes_written <= 0)
+    {
+#ifdef WITH_SSL
+      if (session->use_ssl)
+	result = mn_client_session_error(session, _("unable to write to server: %s"), ERR_reason_error_string(ERR_get_error()));
+      else
+#endif /* WITH_SSL */
+	{
+	  if (bytes_written == 0)
+	    result = mn_client_session_error(session, _("unable to write to server: EOF"));
+	  else
+	    result = mn_client_session_error(session, _("unable to write to server: %s"), g_strerror(errno));
+	}
+    }
+
+#ifdef WITH_SASL
+ end:
+#endif
+  g_free(full);
+  g_byte_array_free(array, TRUE);
+
+  return result;
+}
+
+#ifdef WITH_SASL
+static int
+mn_client_session_write_base64 (MNClientSession *session,
+				const char *buf,
+				unsigned int len)
+{
+  unsigned int buf64len = len * 2; /* Base64 is 33% larger than the data it encodes */
+  char buf64[buf64len];
+  unsigned int outlen;
+  char *str;
+  int result;
+
+  g_return_val_if_fail(session != NULL, 0);
+  g_return_val_if_fail(buf != NULL, 0);
+  
+  result = sasl_encode64(buf, len, buf64, buf64len, &outlen);
+  if (result != SASL_OK)
+    return mn_client_session_error(session, _("unable to encode Base64: %s"), sasl_errstring(result, NULL, NULL));
+  
+  str = g_strndup(buf64, outlen);
+  result = mn_client_session_write(session, "%s", str);
+  g_free(str);
+
+  return result;
+}
+
+static gboolean
+mn_client_session_sasl_fill_interact (MNClientSession *session,
+				      sasl_interact_t *interact)
+{
+  sasl_interact_t *i;
+
+  g_return_val_if_fail(session != NULL, FALSE);
+  g_return_val_if_fail(interact != NULL, FALSE);
+
+  for (i = interact; i->id; i++)
+    {
+      const char *data = NULL;
+
+      switch (i->id)
+	{
+	case SASL_CB_USER:
+	case SASL_CB_AUTHNAME:
+	  data = session->username;
+	  break;
+	  
+	case SASL_CB_PASS:
+	  data = session->password;
+	  break;
+	};
+
+      if (data)
+	{
+	  i->result = data;
+	  i->len = strlen(data);
+	}
+      else
+	return FALSE;
+    }
+
+  return TRUE;
+}
+
+static char *
+mn_client_session_sasl_get_ip_port (const struct sockaddr *addr)
+{
+#ifdef WITH_IPV6
+  char buf[INET6_ADDRSTRLEN];
+#else
+  char buf[INET_ADDRSTRLEN];
+#endif /* WITH_IPV6 */
+  int port;
+
+  g_return_val_if_fail(addr != NULL, NULL);
+
+  if (addr->sa_family == AF_INET)
+    {
+      struct sockaddr_in *in = (struct sockaddr_in *) addr;
+
+      if (! inet_ntop(addr->sa_family, &in->sin_addr, buf, sizeof(buf)))
+	return NULL;
+      port = g_ntohs(in->sin_port);
+    }
+#ifdef WITH_IPV6
+  else if (addr->sa_family == AF_INET6)
+    {
+      struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) addr;
+
+      if (! inet_ntop(addr->sa_family, &in6->sin6_addr, buf, sizeof(buf)))
+	return NULL;
+      port = g_ntohs(in6->sin6_port);
+    }
+#endif
+  else
+    return NULL;
+  
+  return g_strdup_printf("%s;%i", buf, port);
+}
+
+gboolean
+mn_client_session_sasl_authentication_start (MNClientSession *session,
+					     const char *service,
+					     GSList *mechanisms,
+					     const char *forced_mechanism,
+					     const char **used_mechanism)
+{
+  GError *err = NULL;
+  int result;
+  struct sockaddr name;
+  socklen_t namelen;
+  char *local_ip_port = NULL;
+  char *remote_ip_port = NULL;
+
+  g_return_val_if_fail(session != NULL, 0);
+  g_return_val_if_fail(service != NULL, 0);
+  g_return_val_if_fail(mechanisms != NULL, 0);
+
+  session->sasl_available = mn_sasl_use(&err);
+  if (! session->sasl_available)
+    {
+      mn_client_session_notice(session, _("unable to initialize the SASL library: %s"), err->message);
+      g_error_free(err);
+      return FALSE;
+    }
+  
+  namelen = sizeof(name);
+  if (getsockname(session->s, &name, &namelen) >= 0)
+    local_ip_port = mn_client_session_sasl_get_ip_port(&name);
+  else
+    mn_client_session_notice(session, _("unable to retrieve local address of socket: %s"), g_strerror(errno));
+  
+  namelen = sizeof(name);
+  if (getpeername(session->s, &name, &namelen) >= 0)
+    remote_ip_port = mn_client_session_sasl_get_ip_port(&name);
+  else
+    mn_client_session_notice(session, _("unable to retrieve remote address of socket: %s"), g_strerror(errno));
+
+  result = sasl_client_new(service,
+			   session->hostname,
+			   local_ip_port,
+			   remote_ip_port,
+			   sasl_callbacks,
+			   0,
+			   &session->sasl_conn);
+
+  g_free(local_ip_port);
+  g_free(remote_ip_port);
+
+  if (result == SASL_OK)
+    {
+      sasl_security_properties_t security;
+      sasl_interact_t *interact = NULL;
+      GString *mechanisms_string;
+      GSList *l;
+      
+      security.min_ssf = 0;
+      security.max_ssf = 256;
+      security.maxbufsize = READ_BUFSIZE;
+      /* only permit plaintext mechanisms if SSL is in use */
+#ifdef WITH_SSL
+      if (session->use_ssl)
+	security.security_flags = 0;
+      else
+#endif /* WITH_SSL */
+	security.security_flags = SASL_SEC_NOPLAINTEXT;
+      security.property_names = NULL;
+      security.property_values = NULL;
+
+      if (sasl_setprop(session->sasl_conn, SASL_SEC_PROPS, &security) != SASL_OK)
+	mn_client_session_notice(session, _("warning: unable to set SASL security properties: %s"), sasl_errdetail(session->sasl_conn));
+      
+      mechanisms_string = g_string_new(NULL);
+      if (forced_mechanism)
+	g_string_append(mechanisms_string, forced_mechanism);
+      else
+	MN_LIST_FOREACH(l, mechanisms)
+          {
+	    if (*mechanisms_string->str)
+	      g_string_append_c(mechanisms_string, ' ');
+	    g_string_append(mechanisms_string, l->data);
+	  }
+
+      do
+	{
+	  result = sasl_client_start(session->sasl_conn,
+				     mechanisms_string->str,
+				     &interact,
+				     &session->sasl_initial_clientout,
+				     &session->sasl_initial_clientoutlen,
+				     used_mechanism);
+
+	  if (result == SASL_INTERACT)
+	    {
+	      if (! mn_client_session_sasl_fill_interact(session, interact))
+		break;
+	    }
+	}
+      while (result == SASL_INTERACT);
+
+      g_string_free(mechanisms_string, TRUE);
+
+      switch (result)
+	{
+	case SASL_OK:
+	case SASL_CONTINUE:
+	  return TRUE;
+
+	case SASL_INTERACT:
+	  mn_client_session_notice(session, _("unable to start SASL authentication: SASL asked for something we did not know"));
+	  break;
+
+	default:
+	  mn_client_session_notice(session, _("unable to start SASL authentication: %s"), sasl_errdetail(session->sasl_conn));
+	}
+    }
+  else
+    mn_client_session_notice(session, _("unable to create a SASL connection: %s"), sasl_errdetail(session->sasl_conn));
+
+  return FALSE;
+}
+
+int
+mn_client_session_sasl_authentication_step (MNClientSession *session,
+					    const char *input)
+{
+  g_return_val_if_fail(session != NULL, 0);
+  g_return_val_if_fail(input != NULL, 0);
+  
+  if (*input)
+    {
+      if (! session->sasl_initial_clientout)
+	{
+	  unsigned int inlen = strlen(input);
+	  char buf[inlen];
+	  unsigned int outlen;
+	  int result;
+	  
+	  result = sasl_decode64(input, inlen, buf, inlen, &outlen);
+	  if (result == SASL_OK)
+	    {
+	      sasl_interact_t *interact = NULL;
+	      
+	      do 
+		{
+		  result = sasl_client_step(session->sasl_conn,
+					    buf,
+					    outlen,
+					    &interact,
+					    &session->sasl_clientout,
+					    &session->sasl_clientoutlen);
+		  
+		  if (result == SASL_INTERACT)
+		    {
+		      if (! mn_client_session_sasl_fill_interact(session, interact))
+			break;
+		    }
+		}
+	      while (result == SASL_INTERACT);
+	      
+	      switch (result)
+		{
+		case SASL_OK:
+		case SASL_CONTINUE:
+		  return mn_client_session_write_base64(session, session->sasl_clientout, session->sasl_clientoutlen);
+		  
+		case SASL_INTERACT:
+		  mn_client_session_notice(session, _("SASL asked for something we did not know, aborting SASL authentication"));
+		  return mn_client_session_write(session, "*");
+		  
+		default:
+		  mn_client_session_notice(session, _("%s, aborting SASL authentication"), sasl_errdetail(session->sasl_conn));
+		  return mn_client_session_write(session, "*");
+		}
+	    }
+	  else			/* compliance error */
+	    return mn_client_session_error(session, _("unable to decode Base64 input from server: %s"), sasl_errstring(result, NULL, NULL));
+	}
+      else
+	return mn_client_session_error(session, _("the server sent a SASL challenge, but there was a pending initial SASL client response"));
+    }
+  else
+    {
+      if (session->sasl_initial_clientout)
+	{
+	  int result;
+	  
+	  result = mn_client_session_write_base64(session, session->sasl_initial_clientout, session->sasl_initial_clientoutlen);
+	  session->sasl_initial_clientout = NULL;
+	  session->sasl_initial_clientoutlen = 0;
+	  return result;
+	}
+      else
+	return mn_client_session_error(session, _("the server did not send a SASL challenge, but there was no pending initial SASL client response"));
+    }
+}
+
+gboolean
+mn_client_session_sasl_authentication_done (MNClientSession *session)
+{
+  int *ssf;
+
+  g_return_val_if_fail(session != NULL, FALSE);
+
+  if (sasl_getprop(session->sasl_conn, SASL_SSF, (const void **) &ssf) == SASL_OK)
+    {
+      if (*ssf)
+	{
+	  unsigned int *maxoutbuf;
+
+	  if (sasl_getprop(session->sasl_conn, SASL_MAXOUTBUF, (const void **) &maxoutbuf) == SASL_OK)
+	    {
+	      session->sasl_ssf = *ssf;
+	      session->sasl_maxoutbuf = *maxoutbuf;
+
+	      if (session->sasl_ssf)
+		mn_client_session_notice(session, _("a SASL security layer of strength factor %i is now active"), session->sasl_ssf);
+	    }
+	  else
+	    {
+	      /* a security layer is active but we can't retrieve maxoutbuf -> fatal */
+	      mn_client_session_error(session, _("unable to get SASL_MAXOUTBUF property: %s"), sasl_errdetail(session->sasl_conn));
+	      return FALSE;
+	    }
+	}
+    }
+  else
+    mn_client_session_notice(session, _("warning: unable to get SASL_SSF property: %s"), sasl_errdetail(session->sasl_conn));
+
+  return TRUE;
+}
+#endif /* WITH_SASL */
+
+void
+mn_client_session_notice (MNClientSession *session,
+			  const char *format,
+			  ...)
+{
+  g_return_if_fail(session != NULL);
+  g_return_if_fail(format != NULL);
+
+  if (session->callbacks->notice)
+    {
+      va_list args;
+      char *str;
+
+      va_start(args, format);
+      str = g_strdup_vprintf(format, args);
+      va_end(args);
+
+      session->callbacks->notice(session, str, session->private);
+      g_free(str);
+    }
+}
+
+int
+mn_client_session_error (MNClientSession *session,
+			 const char *format,
+			 ...)
+{
+  g_return_val_if_fail(session != NULL, 0);
+  g_return_val_if_fail(format != NULL, 0);
+
+  if (! session->error)
+    {
+      va_list args;
+
+      va_start(args, format);
+      session->error = g_strdup_vprintf(format, args);
+      va_end(args);
+    }
+
+  return MN_CLIENT_SESSION_RESULT_END;
+}
diff --git a/src/mn-client-session.h b/src/mn-client-session.h
@@ -0,0 +1,102 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+#ifndef _MN_CLIENT_SESSION_H
+#define _MN_CLIENT_SESSION_H
+
+#include "config.h"
+#include <glib.h>
+
+typedef struct _MNClientSession MNClientSession;
+typedef struct _MNClientSessionPrivate MNClientSessionPrivate;
+typedef struct _MNClientSessionResponse MNClientSessionResponse;
+
+enum
+{
+  MN_CLIENT_SESSION_RESULT_CONTINUE			= -1001,
+  MN_CLIENT_SESSION_RESULT_BAD_RESPONSE_FOR_CONTEXT	= -1002,
+  MN_CLIENT_SESSION_RESULT_END				= -1003,
+};
+    
+typedef struct
+{
+  unsigned int	id;
+  int		(*enter_cb)	(MNClientSession	  *session,
+				 MNClientSessionPrivate	  *private);
+  int		(*handle_cb)	(MNClientSession	  *session,
+				 MNClientSessionResponse  *response,
+				 MNClientSessionPrivate	  *private);
+} MNClientSessionState;
+
+#define MN_CLIENT_SESSION_INITIAL_STATE		1
+#define MN_CLIENT_SESSION_STATES_END		{ 0, NULL, NULL }
+
+typedef struct
+{
+  void      (*notice)		(MNClientSession	  *session,
+				 const char		  *str,
+				 MNClientSessionPrivate	  *private);
+
+  MNClientSessionResponse *(*response_new) (MNClientSession         *session,
+					    const char              *input,
+					    MNClientSessionPrivate  *private);
+  void      (*response_free)	(MNClientSession	  *session,
+				 MNClientSessionResponse  *response,
+				 MNClientSessionPrivate   *private);
+
+  int       (*custom_handler)	(MNClientSession	  *session,
+				 MNClientSessionResponse  *response,
+				 int			  result,
+				 MNClientSessionPrivate   *private);
+} MNClientSessionCallbacks;
+
+gboolean mn_client_session_run (MNClientSessionState *states,
+				MNClientSessionCallbacks *callbacks,
+#ifdef WITH_SSL
+				gboolean use_ssl,
+#endif
+				const char *hostname,
+				int port,
+				const char *username,
+				const char *password,
+				MNClientSessionPrivate *private,
+				GError **err);
+
+int mn_client_session_write (MNClientSession *session,
+			     const char *format,
+			     ...);
+
+#ifdef WITH_SASL
+gboolean mn_client_session_sasl_authentication_start (MNClientSession *session,
+						      const char *service,
+						      GSList *mechanisms,
+						      const char *forced_mechanism,
+						      const char **used_mechanism);
+int mn_client_session_sasl_authentication_step (MNClientSession *session,
+						const char *input);
+gboolean mn_client_session_sasl_authentication_done (MNClientSession *session);
+#endif /* WITH_SASL */
+
+void mn_client_session_notice (MNClientSession *session,
+			       const char *format,
+			       ...);
+int mn_client_session_error (MNClientSession *session,
+			     const char *format,
+			     ...);
+
+#endif /* _MN_CLIENT_SESSION_H */
diff --git a/src/mn-conf.c b/src/mn-conf.c
@@ -19,7 +19,6 @@
 #include "config.h"
 #include <stdarg.h>
 #include <eel/eel.h>
-#include "mn-mailboxes.h"
 #include "mn-util.h"
 #include "mn-conf.h"
 
@@ -30,15 +29,6 @@
 
 /*** functions ***************************************************************/
 
-static void	mn_conf_notify_delay_cb		(GConfClient	*client,
-						 guint		cnxn_id,
-						 GConfEntry	*entry,
-						 gpointer	user_data);
-static void	mn_conf_notify_mailboxes_cb	(GConfClient	*client,
-						 guint		cnxn_id,
-						 GConfEntry	*entry,
-						 gpointer	user_data);
-
 static gboolean mn_conf_link_window_h (GtkWidget *widget,
 				       GdkEventConfigure *event,
 				       gpointer user_data);
@@ -72,24 +62,6 @@ static void mn_conf_link_weak_notify_cb (gpointer data,
 
 /*** implementation **********************************************************/
 
-static void
-mn_conf_notify_delay_cb (GConfClient *client,
-			 guint cnxn_id,
-			 GConfEntry *entry,
-			 gpointer user_data)
-{
-  mn_mailboxes_install_timeout();
-}
-
-static void
-mn_conf_notify_mailboxes_cb (GConfClient *client,
-			     guint cnxn_id,
-			     GConfEntry *entry,
-			     gpointer user_data)
-{
-  mn_mailboxes_register();
-}
-
 void
 mn_conf_init (void)
 {
@@ -115,14 +87,11 @@ mn_conf_init (void)
       l->data = uri;
     }
   eel_gconf_set_string_list(MN_CONF_MAILBOXES, gconf_mailboxes);
-  mn_slist_free(gconf_mailboxes);
+  mn_pointers_free(gconf_mailboxes);
   
-  /* monitor some keys */
+  /* monitor our namespace */
 
   eel_gconf_monitor_add(MN_CONF_NAMESPACE);
-
-  eel_gconf_notification_add(MN_CONF_DELAY_NAMESPACE, mn_conf_notify_delay_cb, NULL);
-  eel_gconf_notification_add(MN_CONF_MAILBOXES, mn_conf_notify_mailboxes_cb, NULL);
 }
 
 void
@@ -290,9 +259,10 @@ mn_conf_link_entry_notify_cb (GConfClient *client,
 {
   GConfValue *value = gconf_entry_get_value(entry);
   GtkEntry *entry_widget = user_data;
-  const char *str;
+  const char *str = NULL;
 
-  str = gconf_value_get_string(value);
+  if (value)
+    str = gconf_value_get_string(value);
   gtk_entry_set_text(entry_widget, str ? str : "");
 }
 
diff --git a/src/mn-conf.h b/src/mn-conf.h
@@ -36,11 +36,14 @@
 #define MN_CONF_DELAY_SECONDS			MN_CONF_DELAY_NAMESPACE "/seconds"
 #define MN_CONF_COMMANDS_NEW_MAIL_ENABLED	MN_CONF_NAMESPACE "/commands/new-mail/enabled"
 #define MN_CONF_COMMANDS_NEW_MAIL_COMMAND	MN_CONF_NAMESPACE "/commands/new-mail/command"
-#define MN_CONF_COMMANDS_CLICKED_ENABLED	MN_CONF_NAMESPACE "/commands/clicked/enabled"
-#define MN_CONF_COMMANDS_CLICKED_COMMAND	MN_CONF_NAMESPACE "/commands/clicked/command"
+#define MN_CONF_COMMANDS_CLICKED_ENABLED	MN_CONF_NAMESPACE "/commands/clicked/enabled"	/* obsolete */
+#define MN_CONF_COMMANDS_CLICKED_COMMAND	MN_CONF_NAMESPACE "/commands/clicked/command"	/* obsolete */
+#define MN_CONF_COMMANDS_DOUBLE_CLICKED_ENABLED	MN_CONF_NAMESPACE "/commands/double-clicked/enabled"
+#define MN_CONF_COMMANDS_DOUBLE_CLICKED_COMMAND	MN_CONF_NAMESPACE "/commands/double-clicked/command"
 #define MN_CONF_MAILBOXES			MN_CONF_NAMESPACE "/mailboxes"
 #define MN_CONF_UI_NAMESPACE			MN_CONF_NAMESPACE "/ui"
-#define MN_CONF_PREFERENCES_DIALOG		MN_CONF_UI_NAMESPACE "/preferences-dialog"
+#define MN_CONF_PREFERENCES_DIALOG		MN_CONF_UI_NAMESPACE "/preferences-dialog"	/* obsolete */
+#define MN_CONF_PROPERTIES_DIALOG		MN_CONF_UI_NAMESPACE "/properties-dialog"
 
 void		mn_conf_init		(void);
 
diff --git a/src/mn-dialog.c b/src/mn-dialog.c
@@ -92,3 +92,21 @@ mn_error_dialog (const char *help_link_id,
 
   gtk_widget_destroy(dialog);
 }
+
+void
+mn_fatal_error_dialog (const char *format, ...)
+{
+  va_list args;
+  char *secondary;
+
+  g_return_if_fail(format != NULL);
+
+  va_start(args, format);
+  secondary = g_strdup_vprintf(format, args);
+  va_end(args);
+
+  mn_error_dialog(NULL, _("A fatal error has occurred in Mail Notification"), "%s", secondary);
+  g_free(secondary);
+
+  exit(1);  
+}
diff --git a/src/mn-dialog.h b/src/mn-dialog.h
@@ -21,9 +21,11 @@
 
 #include <stdarg.h>
 
-void mn_error_dialog	(const char	*help_link_id,
-			 const char	*primary,
-			 const char	*format,
-			 ...);
+void mn_error_dialog		(const char	*help_link_id,
+				 const char	*primary,
+				 const char	*format,
+				 ...);
+void mn_fatal_error_dialog	(const char	*format,
+				 ...);
 
 #endif /* _MN_DIALOG_H */
diff --git a/src/mn-gmail-mailbox-private.h b/src/mn-gmail-mailbox-private.h
@@ -0,0 +1,28 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#ifndef __MN_GMAIL_MAILBOX_PRIVATE_H__
+#define __MN_GMAIL_MAILBOX_PRIVATE_H__
+
+#include "mn-gmail-mailbox.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct _MNGmailMailboxPrivate {
+#line 38 "mn-gmail-mailbox.gob"
+	char * username;
+#line 39 "mn-gmail-mailbox.gob"
+	char * password;
+#line 40 "mn-gmail-mailbox.gob"
+	GHashTable * cookies;
+#line 41 "mn-gmail-mailbox.gob"
+	gboolean logged_in;
+#line 22 "mn-gmail-mailbox-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-gmail-mailbox-properties-private.h b/src/mn-gmail-mailbox-properties-private.h
@@ -0,0 +1,28 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#ifndef __MN_GMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
+#define __MN_GMAIL_MAILBOX_PROPERTIES_PRIVATE_H__
+
+#include "mn-gmail-mailbox-properties.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct _MNGmailMailboxPropertiesPrivate {
+#line 36 "mn-gmail-mailbox-properties.gob"
+	GtkSizeGroup * size_group;
+#line 51 "mn-gmail-mailbox-properties.gob"
+	GtkWidget * username_entry;
+#line 52 "mn-gmail-mailbox-properties.gob"
+	GtkWidget * password_entry;
+#line 53 "mn-gmail-mailbox-properties.gob"
+	GtkTooltips * tooltips;
+#line 22 "mn-gmail-mailbox-properties-private.h"
+};
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-gmail-mailbox-properties.c b/src/mn-gmail-mailbox-properties.c
@@ -0,0 +1,419 @@
+/* Generated by GOB (v2.0.9) on Mon Aug 16 18:13:52 2004
+   (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 9
+
+#define selfp (self->_priv)
+
+#include "mn-gmail-mailbox-properties.h"
+
+#include "mn-gmail-mailbox-properties-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 22 "mn-gmail-mailbox-properties.gob"
+
+#include "config.h"
+#include <glib/gi18n-lib.h>
+#include "mn-mailbox-properties.h"
+#include "mn-mailbox-properties-util.h"
+#include "mn-uri.h"
+#include "mn-util.h"
+
+#line 34 "mn-gmail-mailbox-properties.c"
+/* self casting macros */
+#define SELF(x) MN_GMAIL_MAILBOX_PROPERTIES(x)
+#define SELF_CONST(x) MN_GMAIL_MAILBOX_PROPERTIES_CONST(x)
+#define IS_SELF(x) MN_IS_GMAIL_MAILBOX_PROPERTIES(x)
+#define TYPE_SELF MN_TYPE_GMAIL_MAILBOX_PROPERTIES
+#define SELF_CLASS(x) MN_GMAIL_MAILBOX_PROPERTIES_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_GMAIL_MAILBOX_PROPERTIES_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNGmailMailboxProperties Self;
+typedef MNGmailMailboxPropertiesClass SelfClass;
+
+/* here are local prototypes */
+static void ___object_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec);
+static void ___object_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);
+static void mn_gmail_mailbox_properties_init (MNGmailMailboxProperties * o) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * c) G_GNUC_UNUSED;
+static GObject * ___1_mn_gmail_mailbox_properties_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data) G_GNUC_UNUSED;
+static gboolean mn_gmail_mailbox_properties_set_uri (MNMailboxProperties * self, const char * uri) G_GNUC_UNUSED;
+static char * mn_gmail_mailbox_properties_get_uri (MNMailboxProperties * self) G_GNUC_UNUSED;
+
+enum {
+	PROP_0,
+	PROP_LABEL,
+	PROP_SIZE_GROUP,
+	PROP_COMPLETE
+};
+
+/* pointer to the class of our parent */
+static GtkVBoxClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_entry_changed_h mn_gmail_mailbox_properties_entry_changed_h
+#define self_set_uri mn_gmail_mailbox_properties_set_uri
+#define self_get_uri mn_gmail_mailbox_properties_get_uri
+
+
+static void
+___MN_Mailbox_Properties_init (MNMailboxPropertiesIface *iface)
+{
+#line 100 "mn-gmail-mailbox-properties.gob"
+	iface->set_uri = self_set_uri;
+#line 121 "mn-gmail-mailbox-properties.gob"
+	iface->get_uri = self_get_uri;
+#line 81 "mn-gmail-mailbox-properties.c"
+}
+
+GType
+mn_gmail_mailbox_properties_get_type (void)
+{
+	static GType type = 0;
+
+	if ___GOB_UNLIKELY(type == 0) {
+		static const GTypeInfo info = {
+			sizeof (MNGmailMailboxPropertiesClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) mn_gmail_mailbox_properties_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL /* class_data */,
+			sizeof (MNGmailMailboxProperties),
+			0 /* n_preallocs */,
+			(GInstanceInitFunc) mn_gmail_mailbox_properties_init,
+			NULL
+		};
+
+		static const GInterfaceInfo MN_Mailbox_Properties_info = {
+			(GInterfaceInitFunc) ___MN_Mailbox_Properties_init,
+			NULL,
+			NULL
+		};
+
+		type = g_type_register_static (GTK_TYPE_VBOX, "MNGmailMailboxProperties", &info, (GTypeFlags)0);
+		g_type_add_interface_static (type,
+			MN_TYPE_MAILBOX_PROPERTIES,
+			&MN_Mailbox_Properties_info);
+	}
+
+	return type;
+}
+
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNGmailMailboxProperties *)g_object_new(mn_gmail_mailbox_properties_get_type(), NULL))
+
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNGmailMailboxProperties * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNGmailMailboxProperties *
+GET_NEW_VARG (const char *first, ...)
+{
+	MNGmailMailboxProperties *ret;
+	va_list ap;
+	va_start (ap, first);
+	ret = (MNGmailMailboxProperties *)g_object_new_valist (mn_gmail_mailbox_properties_get_type (), first, ap);
+	va_end (ap);
+	return ret;
+}
+
+
+static void
+___dispose (GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::dispose"
+	MNGmailMailboxProperties *self G_GNUC_UNUSED = MN_GMAIL_MAILBOX_PROPERTIES (obj_self);
+	if (G_OBJECT_CLASS (parent_class)->dispose) \
+		(* G_OBJECT_CLASS (parent_class)->dispose) (obj_self);
+#line 36 "mn-gmail-mailbox-properties.gob"
+	if(self->_priv->size_group) { ((*(void (*)(void *))g_object_unref)) (self->_priv->size_group); self->_priv->size_group = NULL; }
+#line 145 "mn-gmail-mailbox-properties.c"
+#line 53 "mn-gmail-mailbox-properties.gob"
+	if(self->_priv->tooltips) { ((*(void (*)(void *))g_object_unref)) (self->_priv->tooltips); self->_priv->tooltips = NULL; }
+#line 148 "mn-gmail-mailbox-properties.c"
+}
+#undef __GOB_FUNCTION__
+
+
+static void
+___finalize(GObject *obj_self)
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::finalize"
+	MNGmailMailboxProperties *self  G_GNUC_UNUSED = MN_GMAIL_MAILBOX_PROPERTIES (obj_self);
+	gpointer priv = self->_priv;
+	if(G_OBJECT_CLASS(parent_class)->finalize) \
+		(* G_OBJECT_CLASS(parent_class)->finalize)(obj_self);
+	g_free (priv);
+}
+#undef __GOB_FUNCTION__
+
+static void 
+mn_gmail_mailbox_properties_init (MNGmailMailboxProperties * o G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::init"
+	o->_priv = g_new0 (MNGmailMailboxPropertiesPrivate, 1);
+#line 53 "mn-gmail-mailbox-properties.gob"
+	o->_priv->tooltips = mn_tooltips_new();
+#line 172 "mn-gmail-mailbox-properties.c"
+}
+#undef __GOB_FUNCTION__
+static void 
+mn_gmail_mailbox_properties_class_init (MNGmailMailboxPropertiesClass * c G_GNUC_UNUSED)
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::class_init"
+	GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) c;
+
+	parent_class = g_type_class_ref (GTK_TYPE_VBOX);
+
+#line 55 "mn-gmail-mailbox-properties.gob"
+	g_object_class->constructor = ___1_mn_gmail_mailbox_properties_constructor;
+#line 185 "mn-gmail-mailbox-properties.c"
+	g_object_class->dispose = ___dispose;
+	g_object_class->finalize = ___finalize;
+	g_object_class->get_property = ___object_get_property;
+	g_object_class->set_property = ___object_set_property;
+    {
+	g_object_class_override_property (g_object_class,
+		PROP_LABEL,
+		"label");
+	g_object_class_override_property (g_object_class,
+		PROP_SIZE_GROUP,
+		"size_group");
+	g_object_class_override_property (g_object_class,
+		PROP_COMPLETE,
+		"complete");
+    }
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_set_property (GObject *object,
+	guint property_id,
+	const GValue *VAL G_GNUC_UNUSED,
+	GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::set_property"
+{
+	MNGmailMailboxProperties *self G_GNUC_UNUSED;
+
+	self = MN_GMAIL_MAILBOX_PROPERTIES (object);
+
+	switch (property_id) {
+	case PROP_SIZE_GROUP:
+		{
+#line 37 "mn-gmail-mailbox-properties.gob"
+{ GObject *___old = (GObject *)self->_priv->size_group; self->_priv->size_group = (void *)g_value_dup_object (VAL); if (___old != NULL) { g_object_unref (G_OBJECT (___old)); } }
+#line 220 "mn-gmail-mailbox-properties.c"
+		}
+		break;
+	default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+#  undef G_STRLOC
+#  define G_STRLOC	__FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+#undef __GOB_FUNCTION__
+
+static void
+___object_get_property (GObject *object,
+	guint property_id,
+	GValue *VAL G_GNUC_UNUSED,
+	GParamSpec *pspec G_GNUC_UNUSED)
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::get_property"
+{
+	MNGmailMailboxProperties *self G_GNUC_UNUSED;
+
+	self = MN_GMAIL_MAILBOX_PROPERTIES (object);
+
+	switch (property_id) {
+	case PROP_LABEL:
+		{
+#line 34 "mn-gmail-mailbox-properties.gob"
+ g_value_set_string(VAL, "Gmail"); 
+#line 251 "mn-gmail-mailbox-properties.c"
+		}
+		break;
+	case PROP_SIZE_GROUP:
+		{
+#line 37 "mn-gmail-mailbox-properties.gob"
+g_value_set_object (VAL, (gpointer)self->_priv->size_group);
+#line 258 "mn-gmail-mailbox-properties.c"
+		}
+		break;
+	case PROP_COMPLETE:
+		{
+#line 41 "mn-gmail-mailbox-properties.gob"
+
+      const char *username;
+      const char *password;
+
+      username = gtk_entry_get_text(GTK_ENTRY(selfp->username_entry));
+      password = gtk_entry_get_text(GTK_ENTRY(selfp->password_entry));
+      
+      g_value_set_boolean(VAL, *username && *password);
+    
+#line 273 "mn-gmail-mailbox-properties.c"
+		}
+		break;
+	default:
+/* Apparently in g++ this is needed, glib is b0rk */
+#ifndef __PRETTY_FUNCTION__
+#  undef G_STRLOC
+#  define G_STRLOC	__FILE__ ":" G_STRINGIFY (__LINE__)
+#endif
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+#undef __GOB_FUNCTION__
+
+
+
+#line 55 "mn-gmail-mailbox-properties.gob"
+static GObject * 
+___1_mn_gmail_mailbox_properties_constructor (GType type G_GNUC_UNUSED, guint n_construct_properties, GObjectConstructParam * construct_params)
+#line 293 "mn-gmail-mailbox-properties.c"
+#define PARENT_HANDLER(___type,___n_construct_properties,___construct_params) \
+	((G_OBJECT_CLASS(parent_class)->constructor)? \
+		(* G_OBJECT_CLASS(parent_class)->constructor)(___type,___n_construct_properties,___construct_params): \
+		((GObject * )0))
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::constructor"
+{
+#line 57 "mn-gmail-mailbox-properties.gob"
+	
+    GObject *object;
+    Self *self;
+    GtkWidget *label1;
+    GtkWidget *label2;
+
+    object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+    self = SELF(object);
+
+    gtk_box_set_spacing(GTK_BOX(self), 6);
+
+    mn_mailbox_properties_credentials_new(GTK_VBOX(self),
+					  &label1,
+					  &selfp->username_entry,
+					  &label2,
+					  &selfp->password_entry);
+
+    gtk_size_group_add_widget(selfp->size_group, label1);
+    gtk_size_group_add_widget(selfp->size_group, label2);
+
+    mn_tooltips_set_tips(selfp->tooltips,
+			 selfp->username_entry, _("Your Gmail username"),
+			 selfp->password_entry, _("Your Gmail password"),
+			 NULL);
+
+    mn_mailbox_properties_link_entries(GTK_ENTRY(selfp->username_entry),
+				       GTK_ENTRY(selfp->password_entry),
+				       NULL);
+
+    g_signal_connect(G_OBJECT(selfp->username_entry), "changed", G_CALLBACK(self_entry_changed_h), self);
+    g_signal_connect(G_OBJECT(selfp->password_entry), "changed", G_CALLBACK(self_entry_changed_h), self);
+    
+    return object;
+  }}
+#line 336 "mn-gmail-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+#undef PARENT_HANDLER
+
+#line 92 "mn-gmail-mailbox-properties.gob"
+static void 
+mn_gmail_mailbox_properties_entry_changed_h (GtkEditable * editable, gpointer user_data)
+#line 343 "mn-gmail-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::entry_changed_h"
+#line 92 "mn-gmail-mailbox-properties.gob"
+	g_return_if_fail (editable != NULL);
+#line 92 "mn-gmail-mailbox-properties.gob"
+	g_return_if_fail (GTK_IS_EDITABLE (editable));
+#line 92 "mn-gmail-mailbox-properties.gob"
+	g_return_if_fail (user_data != NULL);
+#line 352 "mn-gmail-mailbox-properties.c"
+{
+#line 95 "mn-gmail-mailbox-properties.gob"
+	
+    Self *self = user_data;
+    g_object_notify(G_OBJECT(self), "complete");
+  }}
+#line 359 "mn-gmail-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 100 "mn-gmail-mailbox-properties.gob"
+static gboolean 
+mn_gmail_mailbox_properties_set_uri (MNMailboxProperties * self, const char * uri)
+#line 365 "mn-gmail-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::set_uri"
+#line 100 "mn-gmail-mailbox-properties.gob"
+	g_return_val_if_fail (self != NULL, (gboolean )0);
+#line 100 "mn-gmail-mailbox-properties.gob"
+	g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (gboolean )0);
+#line 100 "mn-gmail-mailbox-properties.gob"
+	g_return_val_if_fail (uri != NULL, (gboolean )0);
+#line 374 "mn-gmail-mailbox-properties.c"
+{
+#line 103 "mn-gmail-mailbox-properties.gob"
+	
+    char *username;
+    char *password;
+
+    if (mn_uri_parse_gmail(uri, &username, &password))
+      {
+	gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->username_entry), username);
+	gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->password_entry), password);
+
+	g_free(username);
+	g_free(password);
+
+	return TRUE;
+      }
+    else
+      return FALSE;
+  }}
+#line 394 "mn-gmail-mailbox-properties.c"
+#undef __GOB_FUNCTION__
+
+#line 121 "mn-gmail-mailbox-properties.gob"
+static char * 
+mn_gmail_mailbox_properties_get_uri (MNMailboxProperties * self)
+#line 400 "mn-gmail-mailbox-properties.c"
+{
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox:Properties::get_uri"
+#line 121 "mn-gmail-mailbox-properties.gob"
+	g_return_val_if_fail (self != NULL, (char * )0);
+#line 121 "mn-gmail-mailbox-properties.gob"
+	g_return_val_if_fail (MN_IS_MAILBOX_PROPERTIES (self), (char * )0);
+#line 407 "mn-gmail-mailbox-properties.c"
+{
+#line 123 "mn-gmail-mailbox-properties.gob"
+	
+    const char *username;
+    const char *password;
+
+    username = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->username_entry));
+    password = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->password_entry));
+
+    return mn_uri_build_gmail(username, password);
+  }}
+#line 419 "mn-gmail-mailbox-properties.c"
+#undef __GOB_FUNCTION__
diff --git a/src/mn-gmail-mailbox-properties.gob b/src/mn-gmail-mailbox-properties.gob
@@ -0,0 +1,132 @@
+/* 
+ * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
+ *
+ * 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.
+ */
+
+%headertop{
+#include <gtk/gtk.h>
+%}
+%{
+#include "config.h"
+#include <glib/gi18n-lib.h>
+#include "mn-mailbox-properties.h"
+#include "mn-mailbox-properties-util.h"
+#include "mn-uri.h"
+#include "mn-util.h"
+%}
+
+class MN:Gmail:Mailbox:Properties from Gtk:VBox (interface MN:Mailbox:Properties)
+{
+  property STRING label (override)
+    get { g_value_set_string(VAL, "Gmail"); };
+
+  private GtkSizeGroup *size_group unrefwith g_object_unref;
+  property OBJECT size_group (override, link);
+
+  property BOOLEAN complete (override)
+    get
+    {
+      const char *username;
+      const char *password;
+
+      username = gtk_entry_get_text(GTK_ENTRY(selfp->username_entry));
+      password = gtk_entry_get_text(GTK_ENTRY(selfp->password_entry));
+      
+      g_value_set_boolean(VAL, *username && *password);
+    };
+      
+  private GtkWidget *username_entry;
+  private GtkWidget *password_entry;
+  private GtkTooltips *tooltips = {mn_tooltips_new()} unrefwith g_object_unref;
+  
+  override (G:Object) GObject *
+    constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_params)
+  {
+    GObject *object;
+    Self *self;
+    GtkWidget *label1;
+    GtkWidget *label2;
+
+    object = PARENT_HANDLER(type, n_construct_properties, construct_params);
+    self = SELF(object);
+
+    gtk_box_set_spacing(GTK_BOX(self), 6);
+
+    mn_mailbox_properties_credentials_new(GTK_VBOX(self),
+					  &label1,
+					  &selfp->username_entry,
+					  &label2,
+					  &selfp->password_entry);
+
+    gtk_size_group_add_widget(selfp->size_group, label1);
+    gtk_size_group_add_widget(selfp->size_group, label2);
+
+    mn_tooltips_set_tips(selfp->tooltips,
+			 selfp->username_entry, _("Your Gmail username"),
+			 selfp->password_entry, _("Your Gmail password"),
+			 NULL);
+
+    mn_mailbox_properties_link_entries(GTK_ENTRY(selfp->username_entry),
+				       GTK_ENTRY(selfp->password_entry),
+				       NULL);
+
+    g_signal_connect(G_OBJECT(selfp->username_entry), "changed", G_CALLBACK(self_entry_changed_h), self);
+    g_signal_connect(G_OBJECT(selfp->password_entry), "changed", G_CALLBACK(self_entry_changed_h), self);
+    
+    return object;
+  }
+
+  private void
+    entry_changed_h (Gtk:Editable *editable (check null type),
+		     gpointer user_data (check null))
+  {
+    Self *self = user_data;
+    g_object_notify(G_OBJECT(self), "complete");
+  }
+  
+  interface MN:Mailbox:Properties private gboolean
+    set_uri (MN:Mailbox:Properties *self (check null type),
+	     const char *uri (check null))
+  {
+    char *username;
+    char *password;
+
+    if (mn_uri_parse_gmail(uri, &username, &password))
+      {
+	gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->username_entry), username);
+	gtk_entry_set_text(GTK_ENTRY(SELF(self)->_priv->password_entry), password);
+
+	g_free(username);
+	g_free(password);
+
+	return TRUE;
+      }
+    else
+      return FALSE;
+  }
+  
+  interface MN:Mailbox:Properties private char *
+    get_uri (MN:Mailbox:Properties *self (check null type))
+  {
+    const char *username;
+    const char *password;
+
+    username = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->username_entry));
+    password = gtk_entry_get_text(GTK_ENTRY(SELF(self)->_priv->password_entry));
+
+    return mn_uri_build_gmail(username, password);
+  }
+}
diff --git a/src/mn-gmail-mailbox-properties.h b/src/mn-gmail-mailbox-properties.h
@@ -0,0 +1,78 @@
+/* Generated by GOB (v2.0.9)   (do not edit directly) */
+
+#include <glib.h>
+#include <glib-object.h>
+
+
+#include <gtk/gtk.h>
+
+#ifndef __MN_GMAIL_MAILBOX_PROPERTIES_H__
+#define __MN_GMAIL_MAILBOX_PROPERTIES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+
+/*
+ * Type checking and casting macros
+ */
+#define MN_TYPE_GMAIL_MAILBOX_PROPERTIES	(mn_gmail_mailbox_properties_get_type())
+#define MN_GMAIL_MAILBOX_PROPERTIES(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_gmail_mailbox_properties_get_type(), MNGmailMailboxProperties)
+#define MN_GMAIL_MAILBOX_PROPERTIES_CONST(obj)	G_TYPE_CHECK_INSTANCE_CAST((obj), mn_gmail_mailbox_properties_get_type(), MNGmailMailboxProperties const)
+#define MN_GMAIL_MAILBOX_PROPERTIES_CLASS(klass)	G_TYPE_CHECK_CLASS_CAST((klass), mn_gmail_mailbox_properties_get_type(), MNGmailMailboxPropertiesClass)
+#define MN_IS_GMAIL_MAILBOX_PROPERTIES(obj)	G_TYPE_CHECK_INSTANCE_TYPE((obj), mn_gmail_mailbox_properties_get_type ())
+
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_CLASS(obj)	G_TYPE_INSTANCE_GET_CLASS((obj), mn_gmail_mailbox_properties_get_type(), MNGmailMailboxPropertiesClass)
+
+/* Private structure type */
+typedef struct _MNGmailMailboxPropertiesPrivate MNGmailMailboxPropertiesPrivate;
+
+/*
+ * Main object structure
+ */
+#ifndef __TYPEDEF_MN_GMAIL_MAILBOX_PROPERTIES__
+#define __TYPEDEF_MN_GMAIL_MAILBOX_PROPERTIES__
+typedef struct _MNGmailMailboxProperties MNGmailMailboxProperties;
+#endif
+struct _MNGmailMailboxProperties {
+	GtkVBox __parent__;
+	/*< private >*/
+	MNGmailMailboxPropertiesPrivate *_priv;
+};
+
+/*
+ * Class definition
+ */
+typedef struct _MNGmailMailboxPropertiesClass MNGmailMailboxPropertiesClass;
+struct _MNGmailMailboxPropertiesClass {
+	GtkVBoxClass __parent__;
+};
+
+
+/*
+ * Public methods
+ */
+GType	mn_gmail_mailbox_properties_get_type	(void);
+
+/*
+ * Argument wrapping macros
+ */
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_LABEL(arg)	"label", __extension__ ({gchar **z = (arg); z;})
+#define MN_GMAIL_MAILBOX_PROPERTIES_PROP_SIZE_GROUP(arg)    	"size_group", __extension__ ({GObject *z = (arg); z;})
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_SIZE_GROUP(arg)	"size_group", __extension__ ({GObject **z = (arg); z;})
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg)	"complete", __extension__ ({gboolean *z = (arg); z;})
+#else /* __GNUC__ && !__STRICT_ANSI__ */
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_LABEL(arg)	"label",(gchar **)(arg)
+#define MN_GMAIL_MAILBOX_PROPERTIES_PROP_SIZE_GROUP(arg)    	"size_group",(GObject *)(arg)
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_SIZE_GROUP(arg)	"size_group",(GObject **)(arg)
+#define MN_GMAIL_MAILBOX_PROPERTIES_GET_PROP_COMPLETE(arg)	"complete",(gboolean *)(arg)
+#endif /* __GNUC__ && !__STRICT_ANSI__ */
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
diff --git a/src/mn-gmail-mailbox.c b/src/mn-gmail-mailbox.c
@@ -1,20 +1,27 @@
-/* 
- * Copyright (c) 2004 Jean-Yves Lefort <jylefort@brutele.be>
- *
- * 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.
- */
+/* Generated by GOB (v2.0.9) on Mon Aug 16 18:13:52 2004
+   (do not edit directly) */
+
+/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
+
+#define GOB_VERSION_MAJOR 2
+#define GOB_VERSION_MINOR 0
+#define GOB_VERSION_PATCHLEVEL 9
+
+#define selfp (self->_priv)
+
+#include "mn-gmail-mailbox.h"
+
+#include "mn-gmail-mailbox-private.h"
+
+#ifdef G_LIKELY
+#define ___GOB_LIKELY(expr) G_LIKELY(expr)
+#define ___GOB_UNLIKELY(expr) G_UNLIKELY(expr)
+#else /* ! G_LIKELY */
+#define ___GOB_LIKELY(expr) (expr)
+#define ___GOB_UNLIKELY(expr) (expr)
+#endif /* G_LIKELY */
+
+#line 22 "mn-gmail-mailbox.gob"
 
 #include "config.h"
 #include <string.h>
@@ -22,378 +29,730 @@
 #include <glib/gi18n-lib.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 #include <libsoup/soup.h>
-#include "mn-gmail-mailbox.h"
+#include "mn-mailbox-private.h"
 #include "mn-uri.h"
 #include "mn-util.h"
 #include "mn-stock.h"
 #include "mn-soup.h"
 
-/*** types *******************************************************************/
-
-struct _MNGmailMailboxPrivate
-{
-  char		*username;
-  char		*password;
-  char		*cookie;
-};
-
-/*** variables ***************************************************************/
-
-static GObjectClass *parent_class = NULL;
-
-/*** functions ***************************************************************/
-
-static void mn_gmail_mailbox_class_init (MNGmailMailboxClass *class);
-static void mn_gmail_mailbox_init (MNGmailMailbox *mailbox);
-static void mn_gmail_mailbox_finalize (GObject *object);
-
-static GObject *mn_gmail_mailbox_constructor (GType type,
-					      guint n_construct_properties,
-					      GObjectConstructParam *construct_params);
-
-static void mn_gmail_mailbox_is (const char *uri,
-				 MNMailboxIsCallback *callback,
-				 gpointer user_data);
-static void mn_gmail_mailbox_check (MNMailbox *mailbox);
-
-static SoupMessage *mn_gmail_mailbox_soup_message_new (const char *uri,
-						       const char *method);
-
-static char *mn_gmail_mailbox_get_token (const char *str,
-					 const char *pre,
-					 const char *post,
-					 gboolean include_pre,
-					 gboolean include_post);
-
-static void mn_gmail_mailbox_login (MNGmailMailbox *mailbox);
-static void mn_gmail_mailbox_login_cb (SoupMessage *message, gpointer user_data);
-
-static char *mn_gmail_mailbox_get_cookie (SoupMessage *message);
-
-static void mn_gmail_mailbox_check_internal (MNGmailMailbox *mailbox);
-static void mn_gmail_mailbox_check_internal_cb (SoupMessage *message,
-						gpointer user_data);
-
-static int mn_gmail_mailbox_get_unread_count (SoupMessage *message);
-
-/*** implementation **********************************************************/
-
+#line 39 "mn-gmail-mailbox.c"
+/* self casting macros */
+#define SELF(x) MN_GMAIL_MAILBOX(x)
+#define SELF_CONST(x) MN_GMAIL_MAILBOX_CONST(x)
+#define IS_SELF(x) MN_IS_GMAIL_MAILBOX(x)
+#define TYPE_SELF MN_TYPE_GMAIL_MAILBOX
+#define SELF_CLASS(x) MN_GMAIL_MAILBOX_CLASS(x)
+
+#define SELF_GET_CLASS(x) MN_GMAIL_MAILBOX_GET_CLASS(x)
+
+/* self typedefs */
+typedef MNGmailMailbox Self;
+typedef MNGmailMailboxClass SelfClass;
+
+/* here are local prototypes */
+static void mn_gmail_mailbox_init (MNGmailMailbox * o) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_class_init (MNGmailMailboxClass * class) G_GNUC_UNUSED;
+static GObject * ___2_mn_gmail_mailbox_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_params) G_GNUC_UNUSED;
+static void ___3_mn_gmail_mailbox_finalize (GObject * object) G_GNUC_UNUSED;
+static gboolean ___4_mn_gmail_mailbox_impl_is (MNMailbox * dummy, const char * uri) G_GNUC_UNUSED;
+static void ___5_mn_gmail_mailbox_impl_check (MNMailbox * mailbox) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_get (MNGmailMailbox * self, const char * uri, SoupCallbackFn callback) G_GNUC_UNUSED;
+static char * mn_gmail_mailbox_get_token (const char * str, const char * pre, const char * post, gboolean include_pre, gboolean include_post) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_login (MNGmailMailbox * self) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_login_cb1 (SoupMessage * message, gpointer user_data) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_login_cb2 (SoupMessage * message, gpointer user_data) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_login_cb3 (SoupMessage * message, gpointer user_data) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_update_cookies (MNGmailMailbox * self, SoupMessage * message) G_GNUC_UNUSED;
+static char * mn_gmail_mailbox_build_cookie (MNGmailMailbox * self) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_build_cookie_cb (gpointer key, gpointer value, gpointer user_data) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_check_internal (MNGmailMailbox * self) G_GNUC_UNUSED;
+static void mn_gmail_mailbox_check_internal_cb (SoupMessage * message, gpointer user_data) G_GNUC_UNUSED;
+static int mn_gmail_mailbox_get_unread_count (SoupMessage * message) G_GNUC_UNUSED;
+
+/* pointer to the class of our parent */
+static MNMailboxClass *parent_class = NULL;
+
+/* Short form macros */
+#define self_get mn_gmail_mailbox_get
+#define self_get_token mn_gmail_mailbox_get_token
+#define self_login mn_gmail_mailbox_login
+#define self_login_cb1 mn_gmail_mailbox_login_cb1
+#define self_login_cb2 mn_gmail_mailbox_login_cb2
+#define self_login_cb3 mn_gmail_mailbox_login_cb3
+#define self_update_cookies mn_gmail_mailbox_update_cookies
+#define self_build_cookie mn_gmail_mailbox_build_cookie
+#define self_build_cookie_cb mn_gmail_mailbox_build_cookie_cb
+#define self_check_internal mn_gmail_mailbox_check_internal
+#define self_check_internal_cb mn_gmail_mailbox_check_internal_cb
+#define self_get_unread_count mn_gmail_mailbox_get_unread_count
 GType
 mn_gmail_mailbox_get_type (void)
 {
-  static GType gmail_mailbox_type = 0;
-  
-  if (! gmail_mailbox_type)
-    {
-      static const GTypeInfo gmail_mailbox_info = {
-	sizeof(MNGmailMailboxClass),
-	NULL,
-	NULL,
-	(GClassInitFunc) mn_gmail_mailbox_class_init,
-	NULL,
-	NULL,
-	sizeof(MNGmailMailbox),
-	0,
-	(GInstanceInitFunc) mn_gmail_mailbox_init,
-      };
-      
-      gmail_mailbox_type = g_type_register_static(MN_TYPE_MAILBOX,
-						  "MNGmailMailbox",
-						  &gmail_mailbox_info,
-						  0);
-    }
-  
-  return gmail_mailbox_type;
-}
-
-static void
-mn_gmail_mailbox_class_init (MNGmailMailboxClass *class)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS(class);
-  MNMailboxClass *mailbox_class = MN_MAILBOX_CLASS(class);
-
-  parent_class = g_type_class_peek_parent(class);
-
-  object_class->constructor = mn_gmail_mailbox_constructor;
-  object_class->finalize = mn_gmail_mailbox_finalize;
+	static GType type = 0;
+
+	if ___GOB_UNLIKELY(type == 0) {
+		static const GTypeInfo info = {
+			sizeof (MNGmailMailboxClass),
+			(GBaseInitFunc) NULL,
+			(GBaseFinalizeFunc) NULL,
+			(GClassInitFunc) mn_gmail_mailbox_class_init,
+			(GClassFinalizeFunc) NULL,
+			NULL /* class_data */,
+			sizeof (MNGmailMailbox),
+			0 /* n_preallocs */,
+			(GInstanceInitFunc) mn_gmail_mailbox_init,
+			NULL
+		};
+
+		type = g_type_register_static (MN_TYPE_MAILBOX, "MNGmailMailbox", &info, (GTypeFlags)0);
+	}
 
-  mailbox_class->stock_id = MN_STOCK_GMAIL;
-  mailbox_class->format = "Gmail";
-  mailbox_class->is = mn_gmail_mailbox_is;
-  mailbox_class->check = mn_gmail_mailbox_check;
+	return type;
 }
 
-static void
-mn_gmail_mailbox_init (MNGmailMailbox *mailbox)
-{
-  mn_soup_use();
-  mailbox->priv = g_new0(MNGmailMailboxPrivate, 1);
-}
+/* a macro for creating a new object of our type */
+#define GET_NEW ((MNGmailMailbox *)g_object_new(mn_gmail_mailbox_get_type(), NULL))
 
-static void
-mn_gmail_mailbox_finalize (GObject *object)
+/* a function for creating a new object of our type */
+#include <stdarg.h>
+static MNGmailMailbox * GET_NEW_VARG (const char *first, ...) G_GNUC_UNUSED;
+static MNGmailMailbox *
+GET_NEW_VARG (const char *first, ...)
 {
-  MNGmailMailbox *gmail_mailbox = MN_GMAIL_MAILBOX(object);
-
-  g_free(gmail_mailbox->priv->username);
-  g_free(gmail_mailbox->priv->password);
-  g_free(gmail_mailbox->priv->cookie);
-  g_free(gmail_mailbox->priv);
-  mn_soup_unuse();
-
-  G_OBJECT_CLASS(parent_class)->finalize(object);
+	MNGmailMailbox *ret;
+	va_list ap;
+	va_start (ap, first);
+	ret = (MNGmailMailbox *)g_object_new_valist (mn_gmail_mailbox_get_type (), first, ap);
+	va_end (ap);
+	return ret;
 }
 
-static GObject *
-mn_gmail_mailbox_constructor (GType type,
-			      guint n_construct_properties,
-			      GObjectConstructParam *construct_params)
-{
-  GObject *object;
-  MNMailbox *mailbox;
-  MNGmailMailbox *gmail_mailbox;
-
-  object = G_OBJECT_CLASS(parent_class)->constructor(type,
-						     n_construct_properties,
-						     construct_params);
-  mailbox = MN_MAILBOX(object);
-  gmail_mailbox = MN_GMAIL_MAILBOX(object);
-
-  if (! mn_uri_parse_gmail(mn_mailbox_get_uri(mailbox),
-			   &gmail_mailbox->priv->username,
-			   &gmail_mailbox->priv->password))
-    mn_mailbox_set_init_error(mailbox, _("unable to parse Gmail URI"));
-  
-  return object;
-}
 
 static void
-mn_gmail_mailbox_is (const char *uri,
-		     MNMailboxIsCallback *callback,
-		     gpointer user_data)
+___finalize(GObject *obj_self)
 {
-  char *scheme;
-  gboolean is;
-
-  scheme = gnome_vfs_get_uri_scheme(uri);
-  is = scheme && ! strcmp(scheme, "gmail");
-  g_free(scheme);
-
-  callback(is, user_data);
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::finalize"
+	MNGmailMailbox *self  G_GNUC_UNUSED = MN_GMAIL_MAILBOX (obj_self);
+	gpointer priv = self->_priv;
+#line 70 "mn-gmail-mailbox.gob"
+	___3_mn_gmail_mailbox_finalize(obj_self);
+#line 140 "mn-gmail-mailbox.c"
+#line 38 "mn-gmail-mailbox.gob"
+	if(self->_priv->username) { ((*(void (*)(void *))g_free)) (self->_priv->username); self->_priv->username = NULL; }
+#line 143 "mn-gmail-mailbox.c"
+#line 39 "mn-gmail-mailbox.gob"
+	if(self->_priv->password) { ((*(void (*)(void *))g_free)) (self->_priv->password); self->_priv->password = NULL; }
+#line 146 "mn-gmail-mailbox.c"
+#line 40 "mn-gmail-mailbox.gob"
+	if(self->_priv->cookies) { ((*(void (*)(void *))g_hash_table_destroy)) (self->_priv->cookies); self->_priv->cookies = NULL; }
+#line 149 "mn-gmail-mailbox.c"
+	g_free (priv);
 }
+#undef __GOB_FUNCTION__
 
-static void
-mn_gmail_mailbox_check (MNMailbox *mailbox)
+static void 
+mn_gmail_mailbox_init (MNGmailMailbox * o G_GNUC_UNUSED)
 {
-  MNGmailMailbox *gmail_mailbox = MN_GMAIL_MAILBOX(mailbox);
-  
-  if (gmail_mailbox->priv->cookie)
-    mn_gmail_mailbox_check_internal(gmail_mailbox);
-  else
-    mn_gmail_mailbox_login(gmail_mailbox);
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::init"
+	o->_priv = g_new0 (MNGmailMailboxPrivate, 1);
 }
-
-static SoupMessage *
-mn_gmail_mailbox_soup_message_new (const char *uri, const char *method)
+#undef __GOB_FUNCTION__
+#line 43 "mn-gmail-mailbox.gob"
+static void 
+mn_gmail_mailbox_class_init (MNGmailMailboxClass * class G_GNUC_UNUSED)
+#line 164 "mn-gmail-mailbox.c"
 {
-  SoupContext *context;
-  SoupMessage *message;
-
-  context = soup_context_get(uri);
-  message = soup_message_new(context, method);
-  soup_context_unref(context);
-
-  soup_message_add_header(message->request_headers, "User-Agent", "Mail Notification");
-
-  return message;
+#define __GOB_FUNCTION__ "MN:Gmail:Mailbox::class_init"
+	GObjectClass *g_object_class G_GNUC_UNUSED = (GObjectClass*) class;
+	MNMailboxClass *mn_mailbox_class = (MNMailboxClass *)class;
+
+	parent_class = g_type_class_ref (MN_TYPE_MAILBOX);
+
+#line 49 "mn-gmail-mailbox.gob"
+	g_object_class->constructor = ___2_mn_gmail_mailbox_constructor;
+#line 70 "mn-gmail-mailbox.gob"
+	g_object_class->finalize = ___finalize;
+#line 77 "mn-gmail-mailbox.gob"
+	mn_mailbox_class->impl_is = ___4_mn_gmail_mailbox_impl_is;
+#line 90 "mn-gmail-mailbox.gob"
+	mn_mailbox_class->impl_check = ___5_mn_gmail_mailbox_impl_check;
+#line 180 "mn-gmail-mailbox.c"
+ {
+#line 44 "mn-gmail-mailbox.gob"
+
+    MN_MAILBOX_CLASS(class)->stock_id = MN_STOCK_GMAIL;
+    MN_MAILBOX_CLASS(class)->format = "Gmail";
+  
+#line 187 "mn-gmail-mailbox.c"
+ }
 }
+#undef __GOB_FUNCTION__
 
-/*
- * Gets the token of STR included between the first occurrence of PRE
- * and the last occurrence of POST.
- *
- * If INCLUDE_PRE is true, include PRE in the result.