aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog22
-rw-r--r--mail/GNOME_Evolution_Mail.server.in.in15
-rw-r--r--mail/Makefile.am8
-rw-r--r--mail/e-searching-tokenizer.c4
-rw-r--r--mail/em-account-prefs.c3
-rw-r--r--mail/em-camel-stream.h2
-rw-r--r--mail/em-composer-prefs.c2
-rw-r--r--mail/em-config.c2
-rw-r--r--mail/em-event.c2
-rw-r--r--mail/em-filter-folder-element.c2
-rw-r--r--mail/em-filter-source-element.c4
-rw-r--r--mail/em-folder-browser.c2
-rw-r--r--mail/em-format-hook.h2
-rw-r--r--mail/em-format-html-display.c2
-rw-r--r--mail/em-format-html.c8
-rw-r--r--mail/em-format-quote.c2
-rw-r--r--mail/em-format.c2
-rw-r--r--mail/em-format.h2
-rw-r--r--mail/em-icon-stream.c2
-rw-r--r--mail/em-mailer-prefs.c2
-rw-r--r--mail/em-menu.c2
-rw-r--r--mail/em-migrate.c83
-rw-r--r--mail/em-popup.c2
-rw-r--r--mail/importers/Makefile.am1
-rw-r--r--mail/importers/mail-importer.c1
-rw-r--r--mail/mail-account-editor.c183
-rw-r--r--mail/mail-account-editor.h68
-rw-r--r--mail/mail-account-gui.h145
-rw-r--r--mail/mail-component-factory.c4
-rw-r--r--mail/mail-config-druid.c768
-rw-r--r--mail/mail-config-druid.h57
-rw-r--r--mail/mail-mt.c2
-rw-r--r--mail/mail-mt.h2
-rw-r--r--mail/mail-ops.h2
-rw-r--r--mail/mail-session.c6
-rw-r--r--mail/message-list.c2
36 files changed, 135 insertions, 1283 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4c105fa850..784825e1e1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -96,6 +96,28 @@
Fixes #61065
+2004-11-16 Not Zed <NotZed@Ximian.com>
+
+ * Makefile.am:
+ * importers/Makefile.am: Removed camel linking.
+
+2004-11-15 Not Zed <NotZed@Ximian.com>
+
+ * *.c: Moved various things from e-util to libedataserver.
+
+ * GNOME_Evolution_Mail.server.in.in: remove the startup wizard stuff.
+
+ * mail-config-druid.[ch]:
+ * mail-account-editor.[ch]:
+ * mail-account-gui.[ch]: removed & deleted.
+
+ * mail-session.c (mail_session_init): and here too.
+ * em-migrate.c (em_migrate_1_4): init camel-provider library too.
+ (e_path_to_physical): copy from e-util/e-path.c.
+
+ * Makefile.am (libevolution_mail_la_LIBADD): link to new libcamel
+ provider too.
+
2004-11-12 Not Zed <NotZed@Ximian.com>
* filtertypes.xml:
diff --git a/mail/GNOME_Evolution_Mail.server.in.in b/mail/GNOME_Evolution_Mail.server.in.in
index 047da4919b..d313817c5c 100644
--- a/mail/GNOME_Evolution_Mail.server.in.in
+++ b/mail/GNOME_Evolution_Mail.server.in.in
@@ -79,21 +79,6 @@
_value="Evolution Mail composer"/>
</oaf_server>
- <!-- Startup Wizard -->
- <!-- (wizard) -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/Evolution/StartupWizard:@VERSION@"/>
- </oaf_attribute>
-
- <oaf_attribute name="evolution:startup_wizard:priority" type="number"
- value="1"/>
- </oaf_server>
-
-
<!-- Configuration pages -->
<!-- Account Editor -->
diff --git a/mail/Makefile.am b/mail/Makefile.am
index e8c684011c..953781fe71 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -4,7 +4,6 @@ INCLUDES = \
-I$(top_srcdir)/widgets \
-I$(top_srcdir)/widgets/e-text \
-I$(top_srcdir)/widgets/misc \
- -I$(top_srcdir)/camel \
-I$(top_srcdir) \
-I$(top_srcdir)/composer \
-I$(top_builddir)/composer \
@@ -146,17 +145,11 @@ libevolution_mail_la_SOURCES = \
em-vfolder-rule.h \
em-vfs-stream.c \
em-vfs-stream.h \
- mail-account-editor.c \
- mail-account-editor.h \
- mail-account-gui.c \
- mail-account-gui.h \
mail-autofilter.c \
mail-autofilter.h \
mail-component-factory.c \
mail-component.c \
mail-component.h \
- mail-config-druid.c \
- mail-config-druid.h \
mail-config-factory.c \
mail-config-factory.h \
mail-config.c \
@@ -196,7 +189,6 @@ endif
libevolution_mail_la_LIBADD = \
$(top_builddir)/shell/importer/libevolution-importer.la \
$(top_builddir)/mail/importers/libevolution-mail-importers.la\
- $(top_builddir)/camel/libcamel.la \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/shell/libeshell.la \
$(top_builddir)/composer/libcomposer.la \
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
index d7d30801d9..370ab02747 100644
--- a/mail/e-searching-tokenizer.c
+++ b/mail/e-searching-tokenizer.c
@@ -38,8 +38,8 @@
#include "e-searching-tokenizer.h"
-#include "e-util/e-memory.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-memory.h"
+#include "libedataserver/e-msgport.h"
#define d(x)
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c
index 2966171472..36e50be9f1 100644
--- a/mail/em-account-prefs.c
+++ b/mail/em-account-prefs.c
@@ -26,6 +26,7 @@
#include <camel/camel-url.h>
+#include <gtk/gtkdialog.h>
#include <gtk/gtkliststore.h>
#include <gtk/gtktreeselection.h>
#include <gtk/gtkscrolledwindow.h>
@@ -36,8 +37,6 @@
#include "mail-component.h"
#include "mail-config.h"
-#include "mail-config-druid.h"
-#include "mail-account-editor.h"
#include "mail-ops.h"
#include "mail-send-recv.h"
diff --git a/mail/em-camel-stream.h b/mail/em-camel-stream.h
index 955a15a5e2..249e335efb 100644
--- a/mail/em-camel-stream.h
+++ b/mail/em-camel-stream.h
@@ -37,7 +37,7 @@ struct _GtkHTML;
struct _GtkHTMLStream;
#include <camel/camel-stream.h>
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
typedef struct _EMCamelStream {
CamelStream parent_stream;
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c
index 19d072f1cd..f9e1750251 100644
--- a/mail/em-composer-prefs.c
+++ b/mail/em-composer-prefs.c
@@ -38,7 +38,7 @@
#include <bonobo/bonobo-generic-factory.h>
-#include <gal/util/e-iconv.h>
+#include <libedataserver/e-iconv.h>
#include <gal/widgets/e-gui-utils.h>
#include <gtk/gtktreemodel.h>
diff --git a/mail/em-config.c b/mail/em-config.c
index 79a6ca0199..1728fffb81 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -42,7 +42,7 @@
#include <libgnomevfs/gnome-vfs-mime.h>
#include "em-config.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include <e-util/e-icon-factory.h>
#include "em-utils.h"
#include "em-composer-utils.h"
diff --git a/mail/em-event.c b/mail/em-event.c
index b7b811d6aa..9ca6d8e940 100644
--- a/mail/em-event.c
+++ b/mail/em-event.c
@@ -30,7 +30,7 @@
#include <glib.h>
#include "em-event.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include <e-util/e-icon-factory.h>
#include <camel/camel-store.h>
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index c335be630d..5a985de62c 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -33,7 +33,7 @@
#include "mail/em-folder-selection-button.h"
#include "mail/mail-component.h"
#include "mail/em-utils.h"
-#include "e-util/e-sexp.h"
+#include "libedataserver/e-sexp.h"
#include "widgets/misc/e-error.h"
#define d(x)
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index 5c7c7cb10a..2d186e9e5f 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -32,8 +32,8 @@
#include <gtk/gtk.h>
#include <e-util/e-url.h>
-#include <e-util/e-sexp.h>
-#include <e-util/e-account-list.h>
+#include <libedataserver/e-sexp.h>
+#include <libedataserver/e-account-list.h>
#include <camel/camel-url.h>
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 141d675e0d..84362dc26c 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -60,7 +60,7 @@
#include <bonobo/bonobo-ui-util.h>
/* for efilterbar stuff */
-#include <e-util/e-sexp.h>
+#include <libedataserver/e-sexp.h>
#include "mail-vfolder.h"
#include "em-vfolder-rule.h"
#include <widgets/misc/e-filter-bar.h>
diff --git a/mail/em-format-hook.h b/mail/em-format-hook.h
index 20010604f5..c2f2348a28 100644
--- a/mail/em-format-hook.h
+++ b/mail/em-format-hook.h
@@ -24,7 +24,7 @@
#define __EM_FORMAT_HOOK_H__
#include <glib-object.h>
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include "e-util/e-plugin.h"
#include "em-format.h"
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index dee72303d6..131f2cab99 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -72,7 +72,7 @@
/* should this be in e-util rather than gal? */
#include <gal/util/e-util.h>
-#include <e-util/e-msgport.h>
+#include <libedataserver/e-msgport.h>
#include <e-util/e-gui-utils.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-icon-factory.h>
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 1ede7873b7..35c98414c8 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -31,9 +31,9 @@
#include <fcntl.h>
#include <ctype.h>
-#include <gal/util/e-iconv.h>
-#include <gal/util/e-util.h> /* for e_utf8_strftime, what about e_time_format_time? */
-#include "e-util/e-time-utils.h"
+#include <libedataserver/e-iconv.h>
+#include <libedataserver/e-util.h> /* for e_utf8_strftime, what about e_time_format_time? */
+#include <libedataserver/e-time-utils.h>
#include "e-util/e-icon-factory.h"
#include <gtkhtml/gtkhtml.h>
@@ -59,7 +59,7 @@
#include <camel/camel-data-cache.h>
#include <camel/camel-file-utils.h>
-#include <e-util/e-msgport.h>
+#include <libedataserver/e-msgport.h>
#include "mail-component.h"
#include "mail-config.h"
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index 88dcfdc7c8..602c57ed3d 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -34,7 +34,7 @@
#include <camel/camel-mime-message.h>
#include <camel/camel-url.h>
-#include <gal/util/e-iconv.h>
+#include <libedataserver/e-iconv.h>
#include <libgnome/gnome-i18n.h>
#include "em-stripsig-filter.h"
diff --git a/mail/em-format.c b/mail/em-format.c
index db3983bb1a..e331a03493 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -33,7 +33,7 @@
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <libgnome/gnome-i18n.h>
-#include <e-util/e-msgport.h>
+#include <libedataserver/e-msgport.h>
#include <camel/camel-url.h>
#include <camel/camel-stream.h>
#include <camel/camel-stream-mem.h>
diff --git a/mail/em-format.h b/mail/em-format.h
index 2d28eca231..a822809bc1 100644
--- a/mail/em-format.h
+++ b/mail/em-format.h
@@ -28,7 +28,7 @@
#define _EM_FORMAT_H
#include <glib-object.h>
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
struct _CamelStream;
struct _CamelMimePart;
diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c
index c35026267c..fb76177722 100644
--- a/mail/em-icon-stream.c
+++ b/mail/em-icon-stream.c
@@ -34,7 +34,7 @@
#include <gtk/gtkimage.h>
#include "em-icon-stream.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#define d(x)
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index ce6482b4e9..d5b4a746ed 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -29,7 +29,7 @@
#include "em-mailer-prefs.h"
#include "em-format.h"
-#include <gal/util/e-iconv.h>
+#include <libedataserver/e-iconv.h>
#include <gtkhtml/gtkhtml-properties.h>
#include <libxml/tree.h>
#include "widgets/misc/e-charset-picker.h"
diff --git a/mail/em-menu.c b/mail/em-menu.c
index bf2eb19fe6..c7e70b272f 100644
--- a/mail/em-menu.c
+++ b/mail/em-menu.c
@@ -42,7 +42,7 @@
#include <libgnomevfs/gnome-vfs-mime.h>
#include "em-menu.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include <e-util/e-icon-factory.h>
#include "em-utils.h"
#include "em-composer-utils.h"
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index 87d200e2b8..d2c9c1909c 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -42,6 +42,7 @@
#include <libgnome/gnome-config.h>
#include <camel/camel.h>
+#include <camel/camel-store.h>
#include <camel/camel-session.h>
#include <camel/camel-file-utils.h>
#include <camel/camel-disco-folder.h>
@@ -53,13 +54,12 @@
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
-#include <gal/util/e-iconv.h>
+#include <libedataserver/e-iconv.h>
#include <gal/util/e-xml-utils.h>
#include "e-util/e-bconf-map.h"
#include "e-util/e-account-list.h"
#include "e-util/e-signature-list.h"
-#include "e-util/e-path.h"
#include "widgets/misc/e-error.h"
#include "mail-config.h"
@@ -2315,6 +2315,84 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
return 0;
}
+#define SUBFOLDER_DIR_NAME "subfolders"
+#define SUBFOLDER_DIR_NAME_LEN 10
+
+static char *
+e_path_to_physical (const char *prefix, const char *vpath)
+{
+ const char *p, *newp;
+ char *dp;
+ char *ppath;
+ int ppath_len;
+ int prefix_len;
+
+ while (*vpath == '/')
+ vpath++;
+ if (!prefix)
+ prefix = "";
+
+ /* Calculate the length of the real path. */
+ ppath_len = strlen (vpath);
+ ppath_len++; /* For the ending zero. */
+
+ prefix_len = strlen (prefix);
+ ppath_len += prefix_len;
+ ppath_len++; /* For the separating slash. */
+
+ /* Take account of the fact that we need to translate every
+ * separator into `subfolders/'.
+ */
+ p = vpath;
+ while (1) {
+ newp = strchr (p, '/');
+ if (newp == NULL)
+ break;
+
+ ppath_len += SUBFOLDER_DIR_NAME_LEN;
+ ppath_len++; /* For the separating slash. */
+
+ /* Skip consecutive slashes. */
+ while (*newp == '/')
+ newp++;
+
+ p = newp;
+ };
+
+ ppath = g_malloc (ppath_len);
+ dp = ppath;
+
+ memcpy (dp, prefix, prefix_len);
+ dp += prefix_len;
+ *(dp++) = '/';
+
+ /* Copy the mangled path. */
+ p = vpath;
+ while (1) {
+ newp = strchr (p, '/');
+ if (newp == NULL) {
+ strcpy (dp, p);
+ break;
+ }
+
+ memcpy (dp, p, newp - p + 1); /* `+ 1' to copy the slash too. */
+ dp += newp - p + 1;
+
+ memcpy (dp, SUBFOLDER_DIR_NAME, SUBFOLDER_DIR_NAME_LEN);
+ dp += SUBFOLDER_DIR_NAME_LEN;
+
+ *(dp++) = '/';
+
+ /* Skip consecutive slashes. */
+ while (*newp == '/')
+ newp++;
+
+ p = newp;
+ }
+
+ return ppath;
+}
+
static int
em_migrate_imap_cmeta_1_4(const char *evolution_dir, CamelException *ex)
{
@@ -2403,6 +2481,7 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
path = g_build_filename (evolution_dir, "mail", NULL);
camel_init (path, TRUE);
+ camel_provider_init();
session = (EMMigrateSession *) em_migrate_session_new (path);
g_free (path);
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 7ecc258417..9c9ed7a369 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -43,7 +43,7 @@
#include <libgnome/gnome-i18n.h>
#include "em-popup.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include <e-util/e-icon-factory.h>
#include "em-utils.h"
#include "em-composer-utils.h"
diff --git a/mail/importers/Makefile.am b/mail/importers/Makefile.am
index e713241f59..f567e6e0db 100644
--- a/mail/importers/Makefile.am
+++ b/mail/importers/Makefile.am
@@ -23,7 +23,6 @@ libevolution_mail_importers_la_SOURCES = \
libevolution_mail_importers_la_LIBADD = \
$(top_builddir)/shell/importer/libevolution-importer.la \
- $(top_builddir)/camel/libcamel.la \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/filter/libfilter.la \
$(top_builddir)/shell/libeshell.la \
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index 7cc6482c84..7bd2fffcc3 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -43,7 +43,6 @@
#include <camel/camel-mime-parser.h>
#include <camel/camel-exception.h>
#include <camel/camel-stream-mem.h>
-#include <e-util/e-path.h>
#include "mail/mail-mt.h"
#include "mail/mail-component.h"
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
deleted file mode 100644
index 347c78f90a..0000000000
--- a/mail/mail-account-editor.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * 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.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <camel/camel-url.h>
-
-#include <e-util/e-dialog-utils.h>
-#include <e-util/e-account.h>
-
-#include <gtk/gtknotebook.h>
-#include <gtk/gtkstock.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "widgets/misc/e-error.h"
-
-#include "em-account-prefs.h"
-#include "mail-config.h"
-#include "mail-account-editor.h"
-#include "mail-account-gui.h"
-#include "mail-session.h"
-
-static void mail_account_editor_class_init (MailAccountEditorClass *class);
-static void mail_account_editor_finalize (GObject *obj);
-
-static GtkDialogClass *parent_class = NULL;
-
-GType
-mail_account_editor_get_type ()
-{
- static GtkType type = 0;
-
- if (!type) {
- GTypeInfo type_info = {
- sizeof (MailAccountEditorClass),
- NULL, NULL,
- (GClassInitFunc) mail_account_editor_class_init,
- NULL, NULL,
- sizeof (MailAccountEditor),
- 0,
- NULL
- };
-
- type = g_type_register_static (gtk_dialog_get_type (), "MailAccountEditor", &type_info, 0);
- }
-
- return type;
-}
-
-static void
-mail_account_editor_class_init (MailAccountEditorClass *klass)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref(gtk_dialog_get_type ());
-
- gobject_class->finalize = mail_account_editor_finalize;
-}
-
-static void
-mail_account_editor_finalize (GObject *obj)
-{
- MailAccountEditor *editor = (MailAccountEditor *) obj;
-
- mail_account_gui_destroy (editor->gui);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static gboolean
-apply_changes (MailAccountEditor *editor)
-{
- GtkWidget *incomplete;
- int page = -1;
-
- if (!mail_account_gui_identity_complete (editor->gui, &incomplete) ||
- !mail_account_gui_management_complete (editor->gui, &incomplete))
- page = 0;
- else if (!mail_account_gui_source_complete (editor->gui, &incomplete))
- page = 1;
- else if (!mail_account_gui_transport_complete (editor->gui, &incomplete))
- page = 3;
-
- if (page != -1) {
- gtk_notebook_set_current_page (editor->notebook, page);
- gtk_widget_grab_focus (incomplete);
- e_error_run((GtkWindow *)editor, "mail:account-incomplete", NULL);
- return FALSE;
- }
-
- if (mail_account_gui_save (editor->gui) == FALSE)
- return FALSE;
-
- /* save any changes we may have */
- mail_config_write ();
-
- return TRUE;
-}
-
-static void
-editor_response_cb (GtkWidget *widget, int button, gpointer user_data)
-{
- MailAccountEditor *editor = user_data;
-
- switch (button) {
- case GTK_RESPONSE_OK:
- apply_changes (editor);
- default:
- gtk_widget_destroy (GTK_WIDGET (editor));
- }
-}
-
-static void
-construct (MailAccountEditor *editor, EAccount *account, EMAccountPrefs *dialog)
-{
- EAccountService *source = account->source;
-
- gtk_widget_realize (GTK_WIDGET (editor));
- gtk_dialog_set_has_separator (GTK_DIALOG (editor), FALSE);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (editor)->action_area), 12);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (editor)->vbox), 0);
-
- editor->gui = mail_account_gui_new (account, dialog);
-
- /* get our toplevel widget and reparent it */
- editor->notebook = GTK_NOTEBOOK (glade_xml_get_widget (editor->gui->xml, "account_editor_notebook"));
- gtk_widget_reparent (GTK_WIDGET (editor->notebook), GTK_DIALOG (editor)->vbox);
-
- /* give our dialog an OK button and title */
- gtk_window_set_title (GTK_WINDOW (editor), _("Evolution Account Editor"));
- gtk_window_set_resizable (GTK_WINDOW (editor), TRUE);
- gtk_window_set_modal (GTK_WINDOW (editor), FALSE);
- gtk_dialog_add_buttons (GTK_DIALOG (editor),
- GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- g_signal_connect (editor, "response", G_CALLBACK (editor_response_cb), editor);
-
- mail_account_gui_setup (editor->gui, GTK_WIDGET (editor));
-
- mail_account_gui_build_extra_conf (editor->gui, source->url);
-
- gtk_widget_grab_focus (GTK_WIDGET (editor->gui->account_name));
-}
-
-MailAccountEditor *
-mail_account_editor_new (EAccount *account, GtkWindow *parent, EMAccountPrefs *dialog)
-{
- MailAccountEditor *new;
-
- new = (MailAccountEditor *) g_object_new (mail_account_editor_get_type (), NULL);
- gtk_window_set_transient_for ((GtkWindow *) new, parent);
- construct (new, account, dialog);
-
- return new;
-}
diff --git a/mail/mail-account-editor.h b/mail/mail-account-editor.h
deleted file mode 100644
index b2343390bf..0000000000
--- a/mail/mail-account-editor.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * 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 MAIL_ACCOUNT_EDITOR_H
-#define MAIL_ACCOUNT_EDITOR_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gtk/gtkdialog.h>
-
-struct _GtkNotebook;
-struct _MailAccountGui;
-struct _GtkWindow;
-struct _EMAccountPrefs;
-
-#define MAIL_ACCOUNT_EDITOR_TYPE (mail_account_editor_get_type ())
-#define MAIL_ACCOUNT_EDITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditor))
-#define MAIL_ACCOUNT_EDITOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_ACCOUNT_EDITOR_TYPE, MailAccountEditorClass))
-#define MAIL_IS_ACCOUNT_EDITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_ACCOUNT_EDITOR_TYPE))
-#define MAIL_IS_ACCOUNT_EDITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNT_EDITOR_TYPE))
-
-struct _MailAccountEditor {
- GtkDialog parent_object;
-
- struct _MailAccountGui *gui;
- struct _GtkNotebook *notebook;
-};
-
-typedef struct _MailAccountEditor MailAccountEditor;
-
-typedef struct {
- GtkDialogClass parent_class;
-
- /* signals */
-
-} MailAccountEditorClass;
-
-GType mail_account_editor_get_type (void);
-
-MailAccountEditor *mail_account_editor_new (struct _EAccount *account, struct _GtkWindow *parent, struct _EMAccountPrefs *dialog);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_ACCOUNT_EDITOR_H */
diff --git a/mail/mail-account-gui.h b/mail/mail-account-gui.h
deleted file mode 100644
index 044b1e4689..0000000000
--- a/mail/mail-account-gui.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@ximian.com>
- *
- * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * 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 MAIL_ACCOUNT_GUI_H
-#define MAIL_ACCOUNT_GUI_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <camel/camel-provider.h>
-
-struct _EAccount;
-struct _EMAccountPrefs;
-
-typedef struct _MailAccountGuiService {
- struct _GtkWidget *container;
-
- struct _GtkOptionMenu *type;
- struct _GtkLabel *description;
- struct _GtkEntry *hostname;
- struct _GtkEntry *username;
- struct _GtkEntry *path;
- struct _GtkWidget *ssl_frame;
- struct _GtkOptionMenu *use_ssl;
- struct _GtkWidget *ssl_selected;
- struct _GtkWidget *ssl_hbox;
- struct _GtkWidget *no_ssl;
- struct _GtkOptionMenu *authtype;
- struct _GtkWidget *authitem;
- struct _GtkToggleButton *remember;
- struct _GtkButton *check_supported;
-
- CamelProvider *provider;
- CamelProviderType provider_type;
-} MailAccountGuiService;
-
-typedef struct _MailAccountGui {
- struct _EAccount *account;
- struct _EMAccountPrefs *dialog;
- struct _GladeXML *xml;
-
- /* identity */
- struct _GtkEntry *full_name;
- struct _GtkEntry *email_address;
- struct _GtkEntry *reply_to;
- struct _GtkEntry *organization;
-
- /* signatures */
- struct _GtkOptionMenu *sig_menu;
- guint sig_added_id;
- guint sig_removed_id;
- guint sig_changed_id;
- const char *sig_uid;
-
- /* incoming mail */
- MailAccountGuiService source;
- struct _GtkToggleButton *source_auto_check;
- struct _GtkSpinButton *source_auto_check_min;
-
- /* extra incoming config */
- GHashTable *extra_config;
-
- /* outgoing mail */
- MailAccountGuiService transport;
- struct _GtkToggleButton *transport_needs_auth;
-
- /* account management */
- struct _GtkEntry *account_name;
- struct _GtkToggleButton *default_account;
-
- /* special folders */
- struct _GtkButton *drafts_folder_button;
- char *drafts_folder_uri;
- struct _GtkButton *sent_folder_button;
- char *sent_folder_uri;
- struct _GtkButton *restore_folders_button;
-
- /* always cc/bcc */
- struct _GtkToggleButton *always_cc;
- struct _GtkEntry *cc_addrs;
- struct _GtkToggleButton *always_bcc;
- struct _GtkEntry *bcc_addrs;
-
- /* Security */
- struct _GtkEntry *pgp_key;
- struct _GtkToggleButton *pgp_encrypt_to_self;
- struct _GtkToggleButton *pgp_always_sign;
- struct _GtkToggleButton *pgp_no_imip_sign;
- struct _GtkToggleButton *pgp_always_trust;
-
- struct _GtkToggleButton *smime_sign_default;
- struct _GtkEntry *smime_sign_key;
- struct _GtkButton *smime_sign_key_select;
- struct _GtkButton *smime_sign_key_clear;
- struct _GtkButton *smime_sign_select;
- struct _GtkToggleButton *smime_encrypt_default;
- struct _GtkToggleButton *smime_encrypt_to_self;
- struct _GtkEntry *smime_encrypt_key;
- struct _GtkButton *smime_encrypt_key_select;
- struct _GtkButton *smime_encrypt_key_clear;
-} MailAccountGui;
-
-
-MailAccountGui *mail_account_gui_new (struct _EAccount *account, struct _EMAccountPrefs *dialog);
-void mail_account_gui_setup (MailAccountGui *gui, struct _GtkWidget *top);
-gboolean mail_account_gui_save (MailAccountGui *gui);
-void mail_account_gui_destroy (MailAccountGui *gui);
-
-gboolean mail_account_gui_identity_complete (MailAccountGui *gui, struct _GtkWidget **incomplete);
-gboolean mail_account_gui_source_complete (MailAccountGui *gui, struct _GtkWidget **incomplete);
-gboolean mail_account_gui_transport_complete (MailAccountGui *gui, struct _GtkWidget **incomplete);
-gboolean mail_account_gui_management_complete (MailAccountGui *gui, struct _GtkWidget **incomplete);
-
-void mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url);
-
-void mail_account_gui_auto_detect_extra_conf (MailAccountGui *gui);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_ACCOUNT_GUI_H */
diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c
index 87620e7ecd..435c0339c5 100644
--- a/mail/mail-component-factory.c
+++ b/mail/mail-component-factory.c
@@ -31,7 +31,6 @@
#include "em-mailer-prefs.h"
#include "em-composer-prefs.h"
-#include "mail-config-druid.h"
#include "mail-config-factory.h"
#include "mail-config.h"
#include "mail-mt.h"
@@ -49,7 +48,6 @@
#define COMPONENT_ID "OAFIID:GNOME_Evolution_Mail_Component:" BASE_VERSION
#define COMPOSER_ID "OAFIID:GNOME_Evolution_Mail_Composer:" BASE_VERSION
#define FOLDER_INFO_ID "OAFIID:GNOME_Evolution_FolderInfo:" BASE_VERSION
-#define WIZARD_ID "OAFIID:GNOME_Evolution_Mail_Wizard:" BASE_VERSION
static BonoboObject *
factory(BonoboGenericFactory *factory, const char *component_id, void *closure)
@@ -61,8 +59,6 @@ factory(BonoboGenericFactory *factory, const char *component_id, void *closure)
bonobo_object_ref (BONOBO_OBJECT (component));
return BONOBO_OBJECT (component);
- } else if (strcmp(component_id, WIZARD_ID) == 0) {
- return evolution_mail_config_wizard_new();
} else if (strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID) == 0
|| strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID) == 0
|| strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID) == 0) {
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
deleted file mode 100644
index 22f26b69ea..0000000000
--- a/mail/mail-config-druid.c
+++ /dev/null
@@ -1,768 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- * Dan Winship <danw@ximian.com>
- * Iain Holmes <iain@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * 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.
- *
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/utsname.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <gal/util/e-util.h>
-#include <glade/glade.h>
-#include <gtkhtml/gtkhtml.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-druid.h>
-#include <libgnomeui/gnome-druid-page-standard.h>
-#include <bonobo/bonobo-exception.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "mail-config-druid.h"
-#include "mail-config.h"
-#include "mail-ops.h"
-#include "mail-session.h"
-#include "mail-account-gui.h"
-
-#include <evolution-wizard.h>
-#include <e-util/e-account.h>
-#include <e-util/e-icon-factory.h>
-
-typedef enum {
- MAIL_CONFIG_WIZARD_PAGE_NONE = -1,
- MAIL_CONFIG_WIZARD_PAGE_IDENTITY,
- MAIL_CONFIG_WIZARD_PAGE_SOURCE,
- MAIL_CONFIG_WIZARD_PAGE_EXTRA,
- MAIL_CONFIG_WIZARD_PAGE_TRANSPORT,
- MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT,
-
- MAIL_CONFIG_WIZARD_NUM_PAGES
-} MailConfigWizardPage;
-
-typedef struct {
- /* Only one of these will be set */
- GnomeDruid *druid;
- EvolutionWizard *corba_wizard;
-
- MailAccountGui *gui;
-
- GPtrArray *interior_pages;
- GnomeDruidPage *last_page;
-
- gboolean identity_copied;
- CamelProvider *last_source;
- MailConfigWizardPage page;
-} MailConfigWizard;
-
-static void
-config_wizard_set_buttons_sensitive (MailConfigWizard *mcw,
- gboolean prev_sensitive,
- gboolean next_sensitive)
-{
- if (mcw->corba_wizard) {
- evolution_wizard_set_buttons_sensitive (mcw->corba_wizard,
- prev_sensitive,
- next_sensitive,
- TRUE, NULL);
- } else {
- gnome_druid_set_buttons_sensitive (mcw->druid,
- prev_sensitive,
- next_sensitive,
- TRUE, FALSE);
- }
-}
-
-static void
-config_wizard_set_page (MailConfigWizard *mcw, MailConfigWizardPage page)
-{
- if (mcw->corba_wizard)
- evolution_wizard_set_page (mcw->corba_wizard, page, NULL);
- else {
- if (page < mcw->interior_pages->len)
- gnome_druid_set_page (mcw->druid, mcw->interior_pages->pdata[page]);
- else
- gnome_druid_set_page (mcw->druid, mcw->last_page);
- }
-}
-
-/* Identity Page */
-static void
-identity_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *mcw = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- if (mcw->page != MAIL_CONFIG_WIZARD_PAGE_IDENTITY)
- return;
-
- next_sensitive = mail_account_gui_identity_complete (mcw->gui, &incomplete);
-
- config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-}
-
-static void
-identity_prepare (MailConfigWizard *mcw)
-{
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_IDENTITY;
-
- if (!gtk_entry_get_text (mcw->gui->full_name)) {
- char *uname;
-
- uname = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
- gtk_entry_set_text (mcw->gui->full_name, uname ? uname : "");
- g_free (uname);
- }
- identity_changed (NULL, mcw);
-}
-
-static gboolean
-identity_next (MailConfigWizard *mcw)
-{
- if (!mcw->identity_copied) {
- char *username;
- const char *user;
-
- /* Copy the username part of the email address into
- * the Username field of the source and transport pages.
- */
- user = gtk_entry_get_text (mcw->gui->email_address);
- username = g_strndup (user, strcspn (user, "@"));
- gtk_entry_set_text (mcw->gui->source.username, username);
- gtk_entry_set_text (mcw->gui->transport.username, username);
- g_free (username);
-
- mcw->identity_copied = TRUE;
- }
-
- return FALSE;
-}
-
-static void
-identity_activate_cb (GtkEntry *ent, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- if (mail_account_gui_identity_complete (mcw->gui, NULL) &&
- !identity_next (mcw))
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_SOURCE);
-}
-
-/* Incoming mail Page */
-static void
-source_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *mcw = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- if (mcw->page != MAIL_CONFIG_WIZARD_PAGE_SOURCE)
- return;
-
- next_sensitive = mail_account_gui_source_complete (mcw->gui, &incomplete);
-
- config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-}
-
-static void
-source_prepare (MailConfigWizard *mcw)
-{
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_SOURCE;
- source_changed (NULL, mcw);
-}
-
-static gboolean
-source_next (MailConfigWizard *mcw)
-{
- /* FIXME: if online, check that the data is good. */
-
- if (mcw->gui->source.provider && mcw->gui->source.provider->extra_conf)
- return FALSE;
-
- /* Otherwise, skip to transport page. */
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_TRANSPORT);
- return TRUE;
-}
-
-static void
-source_activate_cb (GtkEntry *ent, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- if (mail_account_gui_source_complete (mcw->gui, NULL) &&
- !source_next (mcw))
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_EXTRA);
-}
-
-/* Extra Config Page */
-static void
-extra_prepare (MailConfigWizard *mcw)
-{
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_EXTRA;
- if (mcw->gui->source.provider != mcw->last_source) {
- mcw->last_source = mcw->gui->source.provider;
- mail_account_gui_auto_detect_extra_conf (mcw->gui);
- }
-}
-
-/* Transport Page */
-static gboolean
-transport_next (MailConfigWizard *mcw)
-{
- /* FIXME: if online, check that the data is good. */
- return FALSE;
-}
-
-static gboolean
-transport_back (MailConfigWizard *mcw)
-{
- if (mcw->gui->source.provider && mcw->gui->source.provider->extra_conf)
- return FALSE;
- else {
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_SOURCE);
- return TRUE;
- }
-}
-
-static void
-transport_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *mcw = data;
- GtkWidget *incomplete;
- gboolean next_sensitive;
-
- if (mcw->page != MAIL_CONFIG_WIZARD_PAGE_TRANSPORT)
- return;
-
- next_sensitive = mail_account_gui_transport_complete (mcw->gui, &incomplete);
-
- config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
-}
-
-static void
-transport_prepare (MailConfigWizard *mcw)
-{
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_TRANSPORT;
- transport_changed (NULL, mcw);
-}
-
-static void
-transport_activate_cb (GtkEntry *ent, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- if (mail_account_gui_transport_complete (mcw->gui, NULL) &&
- !transport_next (mcw))
- config_wizard_set_page (mcw, MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT);
-}
-
-/* Management page */
-static gboolean
-management_check (MailConfigWizard *mcw)
-{
- gboolean next_sensitive;
- const char *text;
-
- text = gtk_entry_get_text (mcw->gui->account_name);
- next_sensitive = text && *text;
-
- /* no accounts with the same name */
- if (next_sensitive && mail_config_get_account_by_name (text))
- next_sensitive = FALSE;
-
- config_wizard_set_buttons_sensitive (mcw, TRUE, next_sensitive);
- return next_sensitive;
-}
-
-static void
-management_prepare (MailConfigWizard *mcw)
-{
- const char *name, *text;
-
- mcw->page = MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT;
-
- text = gtk_entry_get_text (mcw->gui->account_name);
- if (!text || *text == '\0') {
- name = gtk_entry_get_text(mcw->gui->email_address);
- if (name && *name) {
- if (mail_config_get_account_by_name (name)) {
- char *template;
- unsigned int i = 1, len;
-
- /* length of name + 1 char for ' ' + 1 char
- for '(' + 10 chars for %d + 1 char for ')'
- + 1 char for nul */
- len = strlen (name);
- template = alloca (len + 14);
- strcpy (template, name);
- name = template;
- do {
- sprintf (template + len, " (%d)", i++);
- } while (mail_config_get_account_by_name (name) && i != 0);
- }
-
- gtk_entry_set_text(mcw->gui->account_name, name);
- }
- }
-
- management_check (mcw);
-}
-
-static void
-management_changed (GtkWidget *widget, gpointer data)
-{
- MailConfigWizard *mcw = data;
-
- if (mcw->page != MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT)
- return;
-
- management_check (mcw);
-}
-
-static void
-management_activate_cb (GtkEntry *ent, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- if (management_check (mcw))
- config_wizard_set_page (mcw, mcw->page + 1);
-}
-
-static struct {
- const char *page_name, *title, *icon_name;
- void (*prepare_func) (MailConfigWizard *mcw);
- gboolean (*back_func) (MailConfigWizard *mcw);
- gboolean (*next_func) (MailConfigWizard *mcw);
- const char *help_text;
-} wizard_pages[] = {
- { "identity_page", N_("Identity"), "stock_contact",
- identity_prepare, NULL, identity_next,
- N_("Please enter your name and email address below. "
- "The \"optional\" fields below do not need to be "
- "filled in, unless you wish to include this "
- "information in email you send.")
- },
-
- { "source_page", N_("Receiving Mail"), "stock_mail-receive",
- source_prepare, NULL, source_next,
- N_("Please enter information about your incoming "
- "mail server below. If you are not sure, ask your "
- "system administrator or Internet Service Provider.")
- },
-
- { "extra_page", N_("Receiving Mail"), "stock_mail-receive",
- extra_prepare, NULL, NULL,
- N_("Please select among the following options")
- },
-
- { "transport_page", N_("Sending Mail"), "stock_mail-send",
- transport_prepare, transport_back, transport_next,
- N_("Please enter information about the way you will "
- "send mail. If you are not sure, ask your system "
- "administrator or Internet Service Provider.")
- },
-
- { "management_page", N_("Account Management"), "stock_person",
- management_prepare, NULL, NULL,
- N_("You are almost done with the mail configuration "
- "process. The identity, incoming mail server and "
- "outgoing mail transport method which you provided "
- "will be grouped together to make an Evolution mail "
- "account. Please enter a name for this account in "
- "the space below. This name will be used for display "
- "purposes only.")
- }
-};
-static const int num_wizard_pages = sizeof (wizard_pages) / sizeof (wizard_pages[0]);
-
-static GtkWidget *
-get_page (GladeXML *xml, int page_num)
-{
- GtkWidget *vbox, *widget;
-
- vbox = gtk_vbox_new (FALSE, 4);
-
- widget = gtk_label_new (_(wizard_pages[page_num].help_text));
- gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE);
- gtk_label_set_justify (GTK_LABEL (widget), GTK_JUSTIFY_FILL);
- gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
- gtk_widget_show_all (vbox);
-
- switch (page_num) {
- case MAIL_CONFIG_WIZARD_PAGE_IDENTITY:
- widget = glade_xml_get_widget (xml, "identity_required_frame");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- gtk_box_set_child_packing (GTK_BOX (vbox), widget, FALSE, FALSE, 0, GTK_PACK_START);
- widget = glade_xml_get_widget (xml, "identity_optional_frame");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- gtk_box_set_child_packing (GTK_BOX (vbox), widget, FALSE, FALSE, 0, GTK_PACK_START);
- break;
-
- case MAIL_CONFIG_WIZARD_PAGE_SOURCE:
- widget = glade_xml_get_widget (xml, "source_vbox");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- break;
-
- case MAIL_CONFIG_WIZARD_PAGE_EXTRA:
- widget = glade_xml_get_widget (xml, "extra_table");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- break;
-
- case MAIL_CONFIG_WIZARD_PAGE_TRANSPORT:
- widget = glade_xml_get_widget (xml, "transport_vbox");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- break;
-
- case MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT:
- widget = glade_xml_get_widget (xml, "management_frame");
- gtk_container_set_border_width (GTK_CONTAINER (widget), 0);
- gtk_widget_reparent (widget, vbox);
- break;
-
- default:
- g_return_val_if_reached (NULL);
- }
-
- return vbox;
-}
-
-
-static MailConfigWizard *
-config_wizard_new (void)
-{
- MailConfigWizard *mcw;
- const char *user;
- EAccountService *xport;
- struct utsname uts;
- EAccount *account;
-
- /* Create a new account object with some defaults */
- account = e_account_new ();
- account->enabled = TRUE;
-
- account->id->name = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
- user = g_get_user_name ();
- if (user && !uname (&uts) && strchr (uts.nodename, '.'))
- account->id->address = g_strdup_printf ("%s@%s", user, uts.nodename);
-
- if ((xport = mail_config_get_default_transport ())) {
- account->transport->url = g_strdup (xport->url);
- account->transport->save_passwd = xport->save_passwd;
- }
-
- /* Create the config wizard object */
- mcw = g_new0 (MailConfigWizard, 1);
- mcw->gui = mail_account_gui_new (account, NULL);
- g_object_unref (account);
-
- /* Set up gui */
- g_signal_connect (mcw->gui->account_name, "changed",
- G_CALLBACK (management_changed), mcw);
- g_signal_connect (mcw->gui->full_name, "changed",
- G_CALLBACK (identity_changed), mcw);
- g_signal_connect (mcw->gui->email_address, "changed",
- G_CALLBACK (identity_changed), mcw);
- g_signal_connect (mcw->gui->reply_to,"changed",
- G_CALLBACK (identity_changed), mcw);
- g_signal_connect (mcw->gui->source.hostname, "changed",
- G_CALLBACK (source_changed), mcw);
- g_signal_connect (mcw->gui->source.username, "changed",
- G_CALLBACK (source_changed), mcw);
- g_signal_connect (mcw->gui->source.path, "changed",
- G_CALLBACK (source_changed), mcw);
- g_signal_connect (mcw->gui->transport.hostname, "changed",
- G_CALLBACK (transport_changed), mcw);
- g_signal_connect (mcw->gui->transport.username, "changed",
- G_CALLBACK (transport_changed), mcw);
- g_signal_connect (mcw->gui->transport_needs_auth, "toggled",
- G_CALLBACK (transport_changed), mcw);
-
- g_signal_connect (mcw->gui->account_name, "activate",
- G_CALLBACK (management_activate_cb), mcw);
-
- g_signal_connect (mcw->gui->full_name, "activate",
- G_CALLBACK (identity_activate_cb), mcw);
- g_signal_connect (mcw->gui->email_address, "activate",
- G_CALLBACK (identity_activate_cb), mcw);
- g_signal_connect (mcw->gui->reply_to,"activate",
- G_CALLBACK (identity_activate_cb), mcw);
- g_signal_connect (mcw->gui->organization, "activate",
- G_CALLBACK (identity_activate_cb), mcw);
-
- g_signal_connect (mcw->gui->source.hostname, "activate",
- G_CALLBACK (source_activate_cb), mcw);
- g_signal_connect (mcw->gui->source.username, "activate",
- G_CALLBACK (source_activate_cb), mcw);
- g_signal_connect (mcw->gui->source.path, "activate",
- G_CALLBACK (source_activate_cb), mcw);
-
- g_signal_connect (mcw->gui->transport.hostname, "activate",
- G_CALLBACK (transport_activate_cb), mcw);
- g_signal_connect (mcw->gui->transport.username, "activate",
- G_CALLBACK (transport_activate_cb), mcw);
-
- return mcw;
-}
-
-static void
-free_config_wizard (MailConfigWizard *mcw)
-{
- mail_account_gui_destroy (mcw->gui);
-
- if (mcw->interior_pages)
- g_ptr_array_free (mcw->interior_pages, TRUE);
-
- g_free (mcw);
-}
-
-/* In-proc config druid */
-
-static void
-druid_cancel (GnomeDruid *druid, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
- GtkWidget *window;
-
- window = glade_xml_get_widget (mcw->gui->xml, "account_druid");
- gtk_widget_destroy (window);
-
- free_config_wizard (mcw);
-}
-
-static void
-druid_finish (GnomeDruidPage *page, GnomeDruid *druid, gpointer user_data)
-{
- MailConfigWizard *mcw = user_data;
-
- mail_account_gui_save (mcw->gui);
- druid_cancel (druid, user_data);
-}
-
-static void
-druid_prepare (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
-{
- MailConfigWizard *mcw = g_object_get_data (G_OBJECT (druid), "MailConfigWizard");
- int page_num = GPOINTER_TO_INT (data);
-
- if (wizard_pages[page_num].prepare_func)
- wizard_pages[page_num].prepare_func (mcw);
-}
-
-static gboolean
-druid_back (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
-{
- MailConfigWizard *mcw = g_object_get_data (G_OBJECT (druid), "MailConfigWizard");
- int page_num = GPOINTER_TO_INT (data);
-
- if (wizard_pages[page_num].back_func)
- return wizard_pages[page_num].back_func (mcw);
- else
- return FALSE;
-}
-
-static gboolean
-druid_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
-{
- MailConfigWizard *mcw = g_object_get_data (G_OBJECT (druid), "MailConfigWizard");
- int page_num = GPOINTER_TO_INT (data);
-
- if (wizard_pages[page_num].next_func)
- return wizard_pages[page_num].next_func (mcw);
- else
- return FALSE;
-}
-
-
-MailConfigDruid *
-mail_config_druid_new (void)
-{
- MailConfigWizard *mcw;
- GtkWidget *new, *page;
- GdkPixbuf *icon;
- int i;
-
- mcw = config_wizard_new ();
- mcw->druid = (GnomeDruid *)glade_xml_get_widget (mcw->gui->xml, "druid");
- g_object_set_data (G_OBJECT (mcw->druid), "MailConfigWizard", mcw);
- gtk_widget_show_all (GTK_WIDGET (mcw->druid));
-
- mcw->interior_pages = g_ptr_array_new ();
- for (i = 0; i < num_wizard_pages; i++) {
- page = glade_xml_get_widget (mcw->gui->xml,
- wizard_pages[i].page_name);
- icon = e_icon_factory_get_icon (wizard_pages[i].icon_name, E_ICON_SIZE_DIALOG);
- gnome_druid_page_standard_set_logo (GNOME_DRUID_PAGE_STANDARD (page), icon);
- g_object_unref (icon);
- g_ptr_array_add (mcw->interior_pages, page);
- gtk_box_pack_start (GTK_BOX (GNOME_DRUID_PAGE_STANDARD (page)->vbox),
- get_page (mcw->gui->xml, i),
- FALSE, FALSE, 0);
- g_signal_connect (page, "back", G_CALLBACK (druid_back),
- GINT_TO_POINTER (i));
- g_signal_connect (page, "next", G_CALLBACK (druid_next),
- GINT_TO_POINTER (i));
-
- /* At least in 2.0 (and probably 2.2 too),
- * GnomeDruidPageStandard is broken and you need to
- * connect_after to "prepare" or else its default
- * method will run after your signal handler and
- * undo its button sensitivity changes.
- */
- g_signal_connect_after (page, "prepare",
- G_CALLBACK (druid_prepare),
- GINT_TO_POINTER (i));
- }
- g_signal_connect (mcw->druid, "cancel", G_CALLBACK (druid_cancel), mcw);
-
- mcw->last_page = (GnomeDruidPage *)glade_xml_get_widget (mcw->gui->xml, "finish_page");
- g_signal_connect (mcw->last_page, "finish", G_CALLBACK (druid_finish), mcw);
-
- gnome_druid_set_buttons_sensitive (mcw->druid, FALSE, TRUE, TRUE, FALSE);
- /*gtk_widget_show_all (GTK_WIDGET (mcw->druid));*/
- mail_account_gui_setup (mcw->gui, NULL);
-
- new = glade_xml_get_widget (mcw->gui->xml, "account_druid");
- gtk_window_set_type_hint ((GtkWindow *) new, GDK_WINDOW_TYPE_HINT_DIALOG);
-
- return (MailConfigDruid *) new;
-}
-
-
-/* CORBA wizard */
-
-static void
-wizard_next_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *mcw)
-{
- if (page_num >= MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT)
- return;
-
- if (wizard_pages[page_num].next_func &&
- wizard_pages[page_num].next_func (mcw))
- return;
-
- evolution_wizard_set_page (wizard, page_num + 1, NULL);
-}
-
-static void
-wizard_prepare_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *mcw)
-{
- if (wizard_pages[page_num].prepare_func)
- wizard_pages[page_num].prepare_func (mcw);
-}
-
-static void
-wizard_back_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *mcw)
-{
- if (page_num >= MAIL_CONFIG_WIZARD_NUM_PAGES) {
- evolution_wizard_set_page (wizard, MAIL_CONFIG_WIZARD_PAGE_MANAGEMENT, NULL);
- return;
- }
-
- if (wizard_pages[page_num].back_func &&
- wizard_pages[page_num].back_func (mcw))
- return;
-
- if (page_num > 0)
- evolution_wizard_set_page (wizard, page_num - 1, NULL);
-}
-
-static void
-wizard_finish_cb (EvolutionWizard *wizard,
- MailConfigWizard *w)
-{
- MailAccountGui *gui = w->gui;
-
- /* Save the settings for that account */
- if (mail_account_gui_save (gui) == FALSE)
- /* problem. Um, how to keep the druid alive? */
- return;
-
- /* Write out the config info */
- mail_config_write ();
- mail_account_gui_destroy (gui);
- w->gui = NULL;
-}
-
-static void
-wizard_cancel_cb (EvolutionWizard *wizard,
- MailConfigWizard *mcw)
-{
- mail_account_gui_destroy (mcw->gui);
- mcw->gui = NULL;
-}
-
-static void
-wizard_help_cb (EvolutionWizard *wizard,
- int page_num,
- MailConfigWizard *mcw)
-{
-}
-
-BonoboObject *
-evolution_mail_config_wizard_new (void)
-{
- EvolutionWizard *wizard;
- MailConfigWizard *mcw;
- GdkPixbuf *icon;
- int i;
-
- mcw = config_wizard_new ();
- mail_account_gui_setup (mcw->gui, NULL);
-
- wizard = evolution_wizard_new ();
- for (i = 0; i < MAIL_CONFIG_WIZARD_NUM_PAGES; i++) {
- icon = e_icon_factory_get_icon (wizard_pages[i].icon_name, E_ICON_SIZE_DIALOG);
- evolution_wizard_add_page (wizard, _(wizard_pages[i].title),
- icon, get_page (mcw->gui->xml, i));
- g_object_unref (icon);
- }
-
- g_object_set_data_full (G_OBJECT (wizard), "MailConfigWizard",
- mcw, (GDestroyNotify)free_config_wizard);
- mcw->corba_wizard = wizard;
-
- g_signal_connect (wizard, "next", G_CALLBACK (wizard_next_cb), mcw);
- g_signal_connect (wizard, "prepare", G_CALLBACK (wizard_prepare_cb), mcw);
- g_signal_connect (wizard, "back", G_CALLBACK (wizard_back_cb), mcw);
- g_signal_connect (wizard, "finish", G_CALLBACK (wizard_finish_cb), mcw);
- g_signal_connect (wizard, "cancel", G_CALLBACK (wizard_cancel_cb), mcw);
- g_signal_connect (wizard, "help", G_CALLBACK (wizard_help_cb), mcw);
-
- return BONOBO_OBJECT (wizard);
-}
diff --git a/mail/mail-config-druid.h b/mail/mail-config-druid.h
deleted file mode 100644
index e2145c33d2..0000000000
--- a/mail/mail-config-druid.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright 2001 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * 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 MAIL_CONFIG_DRUID_H
-#define MAIL_CONFIG_DRUID_H
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <glib.h>
-
-typedef struct _GtkWindow MailConfigDruid;
-
-MailConfigDruid *mail_config_druid_new (void);
-
-char *mail_config_druid_get_account_name (MailConfigDruid *druid);
-gboolean mail_config_druid_get_default_account (MailConfigDruid *druid);
-
-char *mail_config_druid_get_source_url (MailConfigDruid *druid);
-
-gboolean mail_config_druid_get_keep_mail_on_server (MailConfigDruid *druid);
-gboolean mail_config_druid_get_save_source_password (MailConfigDruid *druid);
-gboolean mail_config_druid_get_auto_check (MailConfigDruid *druid);
-gint mail_config_druid_get_auto_check_minutes (MailConfigDruid *druid);
-
-char *mail_config_druid_get_transport_url (MailConfigDruid *druid);
-gboolean mail_config_druid_get_save_transport_password (MailConfigDruid *druid);
-gboolean mail_config_druid_get_transport_requires_auth (MailConfigDruid *druid);
-
-struct _BonoboObject *evolution_mail_config_wizard_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* MAIL_CONFIG_DRUID_H */
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 457fd4c43f..78d773f417 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -18,7 +18,7 @@
#include <libgnome/gnome-i18n.h>
#include <gal/widgets/e-gui-utils.h>
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include "widgets/misc/e-error.h"
#include "e-activity-handler.h"
diff --git a/mail/mail-mt.h b/mail/mail-mt.h
index 23baf60a56..f018fd337c 100644
--- a/mail/mail-mt.h
+++ b/mail/mail-mt.h
@@ -25,7 +25,7 @@
#include <pthread.h>
#include "camel/camel-exception.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include "camel/camel-object.h"
#include "camel/camel-operation.h"
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index 8527994eaa..21c0685165 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -36,7 +36,7 @@ extern "C" {
#include "camel/camel-mime-message.h"
#include "camel/camel-operation.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include "e-util/e-account.h"
void mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageInfo *info,
diff --git a/mail/mail-session.c b/mail/mail-session.c
index c88c5e8d1b..151f3998b4 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -53,7 +53,7 @@
#include "mail-mt.h"
#include "mail-ops.h"
#include "e-util/e-passwords.h"
-#include "e-util/e-msgport.h"
+#include "libedataserver/e-msgport.h"
#include "em-junk-filter.h"
#include "widgets/misc/e-error.h"
@@ -628,7 +628,9 @@ mail_session_init (const char *base_directory)
if (camel_init (base_directory, TRUE) != 0)
exit (0);
-
+
+ camel_provider_init();
+
session = CAMEL_SESSION (camel_object_new (MAIL_SESSION_TYPE));
camel_dir = g_strdup_printf ("%s/mail", base_directory);
diff --git a/mail/message-list.c b/mail/message-list.c
index 4dbca08a7f..0e2669d6f4 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -57,7 +57,7 @@
#include <camel/camel-folder.h>
#include <camel/camel-folder-thread.h>
#include <camel/camel-vee-folder.h>
-#include <e-util/e-memory.h>
+#include <libedataserver/e-memory.h>
#include "filter/filter-label.h"