aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authornobody <nobody@localhost>2000-02-26 07:33:55 +0800
committernobody <nobody@localhost>2000-02-26 07:33:55 +0800
commitb6d82950774ec120ac4027b3aec6dbb6b8c48565 (patch)
treee5dfae6704668d028cbb0e1fdc55e43b992004bc /mail
parent59d2deddc74713097251e0b2c0eb48f078f78268 (diff)
downloadgsoc2013-evolution-GNUMERIC_0_51.tar.gz
gsoc2013-evolution-GNUMERIC_0_51.tar.zst
gsoc2013-evolution-GNUMERIC_0_51.zip
This commit was manufactured by cvs2svn to create tagGNUMERIC_0_51
'GNUMERIC_0_51'. svn path=/tags/GNUMERIC_0_51/; revision=1957
Diffstat (limited to 'mail')
-rw-r--r--mail/.cvsignore10
-rw-r--r--mail/ChangeLog86
-rw-r--r--mail/Mail.idl30
-rw-r--r--mail/Makefile.am57
-rw-r--r--mail/evolution-mail.gnorba13
-rw-r--r--mail/folder-browser-factory.c68
-rw-r--r--mail/folder-browser.c201
-rw-r--r--mail/folder-browser.h45
-rw-r--r--mail/html-stream.c115
-rw-r--r--mail/html-stream.h26
-rw-r--r--mail/mail-component.c48
-rw-r--r--mail/mail-display.c69
-rw-r--r--mail/mail-display.h29
-rw-r--r--mail/main.c59
-rw-r--r--mail/main.h6
-rw-r--r--mail/message-list.c545
-rw-r--r--mail/message-list.h65
-rw-r--r--mail/session.c110
-rw-r--r--mail/session.h17
-rw-r--r--mail/test-mail.c62
20 files changed, 0 insertions, 1661 deletions
diff --git a/mail/.cvsignore b/mail/.cvsignore
deleted file mode 100644
index be56e23078..0000000000
--- a/mail/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-Mail-stubs.c
-Mail-skels.c
-Mail-common.c
-Mail.h
-evolution-mail
-test-mail \ No newline at end of file
diff --git a/mail/ChangeLog b/mail/ChangeLog
deleted file mode 100644
index 6aa072a42d..0000000000
--- a/mail/ChangeLog
+++ /dev/null
@@ -1,86 +0,0 @@
-2000-02-24 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Changed to match new e_table_simple interface.
-
-2000-02-24 Dan Winship <danw@helixcode.com>
-
- * message-list.c (message_list_set_folder): update for CamelFolder
- changes
-
-2000-02-24 Christopher James Lahey <clahey@helixcode.com>
-
- * message-list.c: Changed this to not use the "x" and "y"
- arguments to e-table-item.
-
-2000-02-23 Matt Loper <matt@helixcode.com>
-
- * message-list.c (message_list_set_folder): Check 'desc'riptions
- of exceptions.
-
-2000-02-22 bertrand <Bertrand.Guiheneuf@aful.org>
-
- * message-list.c (message_list_set_folder):
- fix to show a sample correct implementation.
-
-2000-02-21 Matt Loper <matt@helixcode.com>
-
- * Makefile.am: added -lunicode to evolution_mail_LDADD.
-
-2000-02-21 Dan Winship <danw@helixcode.com>
-
- * session.c (session_store_new): Pass a CamelAuthCallback
- (evolution_auth_callback) to camel_session_new.
-
-2000-02-21 Dan Winship <danw@helixcode.com>
-
- * session.c (session_store_new): Update session_store_new to
- deal with the fact that camel_session_get_store takes a
- CamelException now. Doesn't actually do anything with the
- exception yet, because nothing else does yet either.
-
-2000-02-19 Matt Loper <matt@helixcode.com>
-
- * .cvsignore: added test-mail.
-
-2000-02-14 Miguel de Icaza <miguel@gnu.org>
-
- * folder-browser.c (folder_browser_load_folder): New routine,
- loads a camel folder.
- (folder_browser_set_uri): redo.
-
- * session.c: new file. Implements SessionStores to keep track of
- a Session/Store tuple.
-
-2000-02-13 Matt Loper <matt@helixcode.com>
-
- * html-stream.c (html_stream_new): Second param of gtk_html_begin
- should be "", not NULL.
- (html_stream_new): gtk_html_parse() is deprecated, so the call was
- removed.
-
- * html-stream.h: HTMLStreamClass's parent changed to
- CamelStreamClass, not CamelStream.
-
-2000-02-11 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Add the e-text directory to the includes list.
-
- * message-list.c: Change the call to e_cell_text_new, since
- there's an added argument.
-
-2000-02-09 Christopher James Lahey <clahey@helixcode.com>
-
- * Makefile.am: Added libetext as libetable depends on it.
-
-2000-02-08 Iain Holmes <ih@csd.abdn.ac.uk>
-
- * Makefile.am: Changed the order of the compilation so the CORBA stuff
- was made before it was needed.
-
-2000-01-19 Miguel de Icaza <miguel@gnu.org>
-
- * Started work on the mail display engine.
-
- * html-stream.c, html-stream.h: New files, they are CamelStreams
- used to write to the GtkHTML widget.
-
diff --git a/mail/Mail.idl b/mail/Mail.idl
deleted file mode 100644
index 1d12a39c5c..0000000000
--- a/mail/Mail.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * mail.idl: Mail interfaces for Evolution
- *
- * Author:
- * Miguel de Icaza (miguel@helixcode.com)
- *
- * (C) 2000 Helix Code, Inc.
- */
-
-#include <Bonobo.idl>
-
-module Evolution {
-
- interface MessageList : Bonobo::Unknown {
-
- void select_message (in long message_number);
- void open_message (in long message_number);
- };
-
- /*
- * FolderBrowser object.
- *
- * configuration of this widget is done trough
- * Bonobo Properties
- */
- interface FolderBrowser : Bonobo::Unknown {
- MessageList get_message_list ();
- };
-};
-
diff --git a/mail/Makefile.am b/mail/Makefile.am
deleted file mode 100644
index cc7bd2f144..0000000000
--- a/mail/Makefile.am
+++ /dev/null
@@ -1,57 +0,0 @@
-bin_PROGRAMS = evolution-mail test-mail
-
-providerdir = $(libdir)/evolution/camel-providers/$(VERSION)
-
-INCLUDES = \
- $(BONOBO_HTML_GNOME_CFLAGS) \
- -DEVOLUTION_VERSION=\""$(VERSION)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\" \
- -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/widgets/e-text
-
-EVOLUTION_MAIL_CORBA_GENERATED = \
- Mail.h \
- Mail-common.c \
- Mail-skels.c \
- Mail-stubs.c
-
-evolution_mail_SOURCES = \
- $(EVOLUTION_MAIL_CORBA_GENERATED) \
- folder-browser.c \
- folder-browser.h \
- folder-browser-factory.c \
- folder-browser-factory.h \
- html-stream.c \
- html-stream.h \
- mail-display.h \
- mail-display.c \
- main.c \
- message-list.c \
- message-list.h \
- session.c \
- session.h
-
-evolution_mail_LDADD = \
- ../widgets/e-table/libetable.a \
- ../widgets/e-text/libetext.a \
- ../camel/libcamel.la \
- ../e-util/libeutil.a \
- $(BONOBO_HTML_GNOME_LIBS) \
- -lunicode
-
-test_mail_SOURCES = \
- test-mail.c
-
-test_mail_LDADD = \
- $(BONOBO_HTML_GNOME_LIBS)
-
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = evolution-mail.gnorba
-
-$(EVOLUTION_MAIL_CORBA_GENERATED): Mail.idl
- orbit-idl -I`$(GNOME_CONFIG) --datadir`/idl -I$(srcdir) $(srcdir)/Mail.idl
-
-EXTRA_DIST = Mail.idl evolution-mail.gnorba
diff --git a/mail/evolution-mail.gnorba b/mail/evolution-mail.gnorba
deleted file mode 100644
index 278c480384..0000000000
--- a/mail/evolution-mail.gnorba
+++ /dev/null
@@ -1,13 +0,0 @@
-[GOADID:Evolution:FolderBrowserFactory:1.0]
-type=exe
-repo_id=IDL:GNOME/GenericFactory:1.0 IDL:Bonobo/GenericFactory:1.0
-description=Evolution mail folder factory component.
-location_info=evolution-mail
-
-[GOADID:Evolution:FolderBrowser:1.0]
-type=factory
-repo_id=IDL:Evolution/Mail:1.0
-description=Evolution mail folder display component.
-location_info=GOADID:Evolution:FolderBrowserFactory:1.0
-
-
diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c
deleted file mode 100644
index dc5afb79a6..0000000000
--- a/mail/folder-browser-factory.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * folder-browser-factory.c: A Bonobo Control factory for Folder Browsers
- *
- * Author:
- * Miguel de Icaza (miguel@helixcode.com)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include <config.h>
-#include <gnome.h>
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-control.h>
-#include "e-util/e-util.h"
-#include "e-util/e-gui-utils.h"
-#include "folder-browser.h"
-#include "main.h"
-
-/*
- * Creates the Folder Browser, wraps it in a Bonobo Control, and
- * sets the Bonobo Control properties to point to the Folder Browser
- * Properties
- */
-static BonoboObject *
-folder_browser_factory (BonoboGenericFactory *factory, void *closure)
-{
- BonoboControl *control;
- GtkWidget *folder_browser;
-
- folder_browser = folder_browser_new ();
- if (folder_browser == NULL)
- return NULL;
-
- folder_browser_set_uri (FOLDER_BROWSER (folder_browser), "inbox");
-
- control = bonobo_control_new (folder_browser);
- if (control == NULL){
- gtk_object_destroy (GTK_OBJECT (folder_browser));
- return NULL;
- }
-
- bonobo_control_set_property_bag (
- control,
- FOLDER_BROWSER (folder_browser)->properties);
-
- return BONOBO_OBJECT (control);
-}
-
-void
-folder_browser_factory_init (void)
-{
- static BonoboGenericFactory *bonobo_folder_browser_factory = NULL;
-
- if (bonobo_folder_browser_factory != NULL)
- return;
-
- bonobo_folder_browser_factory =
- bonobo_generic_factory_new (
- "GOADID:Evolution:FolderBrowserFactory:1.0",
- folder_browser_factory, NULL);
-
- if (bonobo_folder_browser_factory == NULL){
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("We are sorry, Evolution's Folder Browser can not be initialized."));
- exit (1);
- }
-}
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
deleted file mode 100644
index 85a09395a8..0000000000
--- a/mail/folder-browser.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * folder-browser.c: Folder browser top level component
- *
- * Author:
- * Miguel de Icaza (miguel@kernel.org)
- *
- * (C) 2000 Helix Code, Inc.
- */
-
-#include <config.h>
-#include <gnome.h>
-#include "e-util/e-util.h"
-#include "camel/camel-exception.h"
-#include "folder-browser.h"
-#include "session.h"
-
-#define PARENT_TYPE (gtk_table_get_type ())
-
-static GtkObjectClass *folder_browser_parent_class;
-
-#define PROPERTY_FOLDER_URI "folder_uri"
-#define PROPERTY_MESSAGE_PREVIEW "message_preview"
-
-static void
-folder_browser_destroy (GtkObject *object)
-{
- FolderBrowser *folder_browser = FOLDER_BROWSER (object);
-
- if (folder_browser->uri)
- g_free (folder_browser->uri);
-
- if (folder_browser->folder)
- gtk_object_unref (GTK_OBJECT (folder_browser->folder));
-
- if (folder_browser->message_list)
- bonobo_object_unref (BONOBO_OBJECT (folder_browser->message_list));
-
- folder_browser_parent_class->destroy (object);
-}
-
-static void
-folder_browser_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = folder_browser_destroy;
-
- folder_browser_parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-static gboolean
-folder_browser_load_folder (FolderBrowser *fb, const char *name)
-{
- CamelFolder *new_folder;
- CamelException *ex;
-
- ex = camel_exception_new ();
- new_folder = camel_store_get_folder (default_session->store, name, ex);
-
- if (camel_exception_get_id (ex)){
- camel_exception_free (ex);
- return FALSE;
- }
- camel_exception_free (ex);
-
- if (fb->folder)
- gtk_object_unref (GTK_OBJECT (fb->folder));
-
- fb->folder = new_folder;
-
- camel_folder_exists (new_folder, NULL);
- printf ("In folder browser, folder = %p\n", new_folder);
-
- message_list_set_folder (fb->message_list, new_folder);
-
- return TRUE;
-}
-
-#define EQUAL(a,b) (strcmp (a,b) == 0)
-
-void
-folder_browser_set_uri (FolderBrowser *folder_browser, const char *uri)
-{
- /* FIXME: hardcoded uri */
- if (!folder_browser_load_folder (folder_browser, "inbox"))
- return;
-
- if (folder_browser->uri)
- g_free (folder_browser->uri);
-
- folder_browser->uri = g_strdup (uri);
-}
-
-void
-folder_browser_set_message_preview (FolderBrowser *folder_browser, gboolean show_message_preview)
-{
- if (folder_browser->preview_shown == show_message_preview)
- return;
-
- g_warning ("FIXME: implement me");
-}
-
-static void
-folder_browser_property_changed (BonoboPropertyBag *properties,
- const char *name,
- const char *type,
- gpointer old_value,
- gpointer new_value,
- gpointer user_data)
-{
- FolderBrowser *folder_browser = FOLDER_BROWSER (user_data);
-
- if (EQUAL (name, PROPERTY_FOLDER_URI)){
- folder_browser_set_uri (folder_browser, new_value);
- return;
- } else if (EQUAL (name, PROPERTY_MESSAGE_PREVIEW)){
- folder_browser_set_message_preview (folder_browser, *((gboolean *)new_value));
- }
-}
-
-static void
-folder_browser_properties_init (FolderBrowser *fb)
-{
- fb->properties = bonobo_property_bag_new ();
-
- bonobo_property_bag_add (
- fb->properties, PROPERTY_FOLDER_URI, "string",
- NULL, NULL, _("The URI that the Folder Browser will display"), 0);
- bonobo_property_bag_add (
- fb->properties, PROPERTY_MESSAGE_PREVIEW, "boolean",
- NULL, NULL, _("Whether a message preview should be shown"), 0);
-
- gtk_signal_connect (GTK_OBJECT (fb->properties), "value_changed",
- folder_browser_property_changed, fb);
-}
-
-static void
-folder_browser_gui_init (FolderBrowser *fb)
-{
- /*
- * The panned container
- */
- fb->vpaned = gtk_vpaned_new ();
- gtk_widget_show (fb->vpaned);
-
- gtk_table_attach (
- GTK_TABLE (fb), fb->vpaned,
- 0, 1, 0, 2,
- GTK_FILL | GTK_EXPAND,
- GTK_FILL | GTK_EXPAND,
- 0, 0);
-
- fb->message_list_w = message_list_get_widget (fb->message_list);
- gtk_paned_add1 (GTK_PANED (fb->vpaned), fb->message_list_w);
- gtk_widget_show (fb->message_list_w);
-#if 0
- gtk_paned_add2 (GTK_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
- gtk_widget_show (GTK_WIDGET (fb->mail_display));
- gtk_widget_show (GTK_WIDGET (fb));
-#endif
-}
-
-static void
-folder_browser_init (GtkObject *object)
-{
-}
-
-static void
-my_folder_browser_init (GtkObject *object)
-{
- FolderBrowser *fb = FOLDER_BROWSER (object);
-
- /*
- * Setup parent class fields.
- */
- GTK_TABLE (fb)->homogeneous = FALSE;
- gtk_table_resize (GTK_TABLE (fb), 1, 2);
-
- /*
- * Our instance data
- */
- fb->message_list = MESSAGE_LIST (message_list_new ());
- fb->mail_display = MAIL_DISPLAY (mail_display_new ());
-
- folder_browser_properties_init (fb);
- folder_browser_gui_init (fb);
-}
-
-GtkWidget *
-folder_browser_new (void)
-{
- FolderBrowser *folder_browser = gtk_type_new (folder_browser_get_type ());
-
- my_folder_browser_init (GTK_OBJECT (folder_browser));
-
- printf ("Widget started\n");
- return GTK_WIDGET (folder_browser);
-}
-
-
-E_MAKE_TYPE (folder_browser, "FolderBrowser", FolderBrowser, folder_browser_class_init, folder_browser_init, PARENT_TYPE);
-
-
diff --git a/mail/folder-browser.h b/mail/folder-browser.h
deleted file mode 100644
index f845c9f98b..0000000000
--- a/mail/folder-browser.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef _FOLDER_BROWSER_H_
-#define _FOLDER_BROWSER_H_
-
-#include <gtk/gtktable.h>
-#include "camel/camel-stream.h"
-#include <bonobo/bonobo-property-bag.h>
-#include "message-list.h"
-#include "mail-display.h"
-
-#define FOLDER_BROWSER_TYPE (folder_browser_get_type ())
-#define FOLDER_BROWSER(o) (GTK_CHECK_CAST ((o), FOLDER_BROWSER_TYPE, FolderBrowser))
-#define FOLDER_BROWSER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), FOLDER_BROWSER_TYPE, FolderBrowserClass))
-#define IS_FOLDER_BROWSER(o) (GTK_CHECK_TYPE ((o), FOLDER_BROWSER_TYPE))
-#define IS_FOLDER_BROWSER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), FOLDER_BROWSER_TYPE))
-
-typedef struct {
- GtkTable parent;
-
- BonoboPropertyBag *properties;
-
- /*
- * The current URI being displayed by the FolderBrowser
- */
- char *uri;
- CamelFolder *folder;
-
- MessageList *message_list;
- GtkWidget *message_list_w;
- MailDisplay *mail_display;
- GtkWidget *vpaned;
- gboolean preview_shown;
-} FolderBrowser;
-
-typedef struct {
- GtkTableClass parent_class;
-} FolderBrowserClass;
-
-GtkType folder_browser_get_type (void);
-GtkWidget *folder_browser_new (void);
-void folder_browser_set_uri (FolderBrowser *folder_browser,
- const char *uri);
-void folder_browser_set_message_preview (FolderBrowser *folder_browser,
- gboolean show_message_preview);
-
-#endif /* _FOLDER_BROWSER_H_ */
diff --git a/mail/html-stream.c b/mail/html-stream.c
deleted file mode 100644
index d3028dcdcd..0000000000
--- a/mail/html-stream.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * html-stream.c: A CamelStream class that feeds data into a GtkHTML widget
- *
- * Author:
- * Miguel de Icaza (miguel@helixcode.com)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include <config.h>
-#include "html-stream.h"
-#include "e-util/e-util.h"
-
-#define PARENT_TYPE camel_stream_get_type ()
-
-static GtkObjectClass *html_stream_parent_class;
-
-/*
- * CamelStream::read method
- *
- * Return 0 bytes read, as this is a write-only stream
- */
-static gint
-html_stream_read (CamelStream *stream, gchar *buffer, gint n)
-{
- return 0;
-}
-
-/*
- * CamelStream::write method
- *
- * Writes @buffer into the HTML widget
- */
-static gint
-html_stream_write (CamelStream *stream, const gchar *buffer, gint n)
-{
- HTMLStream *html_stream = HTML_STREAM (stream);
-
- gtk_html_write (html_stream->gtk_html, html_stream->gtk_html_stream, buffer, n);
-
- return n;
-}
-
-/*
- * CamelStream::available method
- *
- * Return 0, as this is only a write-stream
- */
-static gint
-html_stream_available (CamelStream *stream)
-{
- return 0;
-}
-
-/*
- * CamelStream::eos method.
- *
- * We just return TRUE, as this is not a read-stream
- */
-static gboolean
-html_stream_eos (CamelStream *stream)
-{
- return TRUE;
-}
-
-static void
-html_stream_close (CamelStream *stream)
-{
- HTMLStream *html_stream = HTML_STREAM (stream);
-
- gtk_html_end (html_stream->gtk_html, html_stream->gtk_html_stream, GTK_HTML_STREAM_OK);
-}
-
-static void
-html_stream_destroy (GtkObject *object)
-{
-}
-
-static void
-html_stream_class_init (GtkObjectClass *object_class)
-{
- CamelStreamClass *stream_class = (CamelStreamClass *) object_class;
-
- html_stream_parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = html_stream_destroy;
-
- stream_class->read = html_stream_read;
- stream_class->write = html_stream_write;
- stream_class->available = html_stream_available;
- stream_class->eos = html_stream_eos;
- stream_class->close = html_stream_close;
-}
-
-CamelStream *
-html_stream_new (GtkHTML *html)
-{
- HTMLStream *html_stream;
-
- g_return_val_if_fail (html != NULL, NULL);
- g_return_val_if_fail (GTK_IS_HTML (html), NULL);
-
- html_stream = gtk_type_new (html_stream_get_type ());
-
- gtk_object_ref (GTK_OBJECT (html));
-
- html_stream->gtk_html_stream = gtk_html_begin (html, "");
-
- html_stream->gtk_html = html;
-
- return CAMEL_STREAM (html_stream);
-}
-
-E_MAKE_TYPE (html_stream, "HTMLStream", HTMLStream, html_stream_class_init, NULL, PARENT_TYPE);
-
-
diff --git a/mail/html-stream.h b/mail/html-stream.h
deleted file mode 100644
index ffa0f4751c..0000000000
--- a/mail/html-stream.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _HTML_STREAM_H_
-#define _HTML_STREAM_H_ 1
-
-#include <gtkhtml/gtkhtml.h>
-#include "camel/camel-stream.h"
-
-#define HTML_STREAM_TYPE (html_stream_get_type ())
-#define HTML_STREAM(obj) (GTK_CHECK_CAST((obj), HTML_STREAM_TYPE, HTMLStream))
-#define HTML_STREAM_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), HTML_STREAM_TYPE, HTMLStreamClass))
-#define IS_HTML_STREAM(o) (GTK_CHECK_TYPE((o), HTML_STREAM_TYPE))
-
-typedef struct {
- CamelStream parent_object;
- GtkHTML *gtk_html;
- GtkHTMLStreamHandle *gtk_html_stream;
-} HTMLStream;
-
-typedef struct {
- CamelStreamClass parent_class;
-} HTMLStreamClass;
-
-
-GtkType html_stream_get_type (void);
-CamelStream *html_stream_new (GtkHTML *html);
-
-#endif /* _HTML_STREAM_H_ */
diff --git a/mail/mail-component.c b/mail/mail-component.c
deleted file mode 100644
index d1fca42e65..0000000000
--- a/mail/mail-component.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * mail-component.c: The core of the mail component
- *
- * Author:
- * Miguel de Icaza (miguel@helixcode.com)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include <config.h>
-#include <gnome.h>
-#include <bonobo/bonobo-main.h>
-#include "e-util/e-gui-utils.h"
-
-CORBA_Environment ev;
-CORBA_ORB orb;
-
-static void
-init_bonobo (int argc, char **argv)
-{
- gnome_CORBA_init_with_popt_table (
- "evolution-mail-component", "1.0",
- &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
-
- orb = gnome_CORBA_ORB ();
-
- if (bonobo_init (orb, NULL, NULL) == FALSE){
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Mail Component: I could not initialize Bonobo"));
- exit (1);
- }
-}
-
-static void
-main (int argc, char *argv [])
-{
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- CORBA_exception_init (&ev);
-
- init_bonobo (argc, argv);
-
- mail_display_factory_init ();
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/mail/mail-display.c b/mail/mail-display.c
deleted file mode 100644
index 7b0246b31c..0000000000
--- a/mail/mail-display.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * mail-display.c: Mail display widget
- *
- * Author:
- * Miguel de Icaza
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include <config.h>
-#include <gnome.h>
-#include "e-util/e-util.h"
-#include "mail-display.h"
-#include "html-stream.h"
-
-#define PARENT_TYPE (gtk_table_get_type ())
-
-static GtkObjectClass *mail_display_parent_class;
-
-static void
-mail_display_init (GtkObject *object)
-{
- MailDisplay *mail_display = MAIL_DISPLAY (object);
-
- mail_display->html = (GtkHTML *) gtk_html_new ();
- gtk_widget_show (GTK_WIDGET (mail_display->html));
-}
-
-static void
-mail_display_destroy (GtkObject *object)
-{
- MailDisplay *mail_display = MAIL_DISPLAY (object);
-
- mail_display_parent_class->destroy (object);
-}
-
-static void
-mail_display_class_init (GtkObjectClass *object_class)
-{
- object_class->destroy = mail_display_destroy;
- mail_display_parent_class = gtk_type_class (PARENT_TYPE);
-}
-
-GtkWidget *
-mail_display_new (void)
-{
- MailDisplay *mail_display = gtk_type_new (mail_display_get_type ());
- GtkTable *table = GTK_TABLE (mail_display);
-
- table->homogeneous = FALSE;
- gtk_table_resize (table, 1, 2);
-
- gtk_table_attach (table, GTK_WIDGET (mail_display->html),
- 0, 1, 1, 2,
- GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- return GTK_WIDGET (mail_display);
-}
-
-CamelStream *
-mail_display_get_stream (MailDisplay *mail_display)
-{
- g_return_val_if_fail (mail_display != NULL, NULL);
- g_return_val_if_fail (IS_MAIL_DISPLAY (mail_display), NULL);
-
- return html_stream_new (mail_display->html);
-}
-
-E_MAKE_TYPE (mail_display, "MailDisplay", MailDisplay, mail_display_class_init, mail_display_init, PARENT_TYPE);
-
-
diff --git a/mail/mail-display.h b/mail/mail-display.h
deleted file mode 100644
index cb74d5c390..0000000000
--- a/mail/mail-display.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _MAIL_DISPLAY_H_
-#define _MAIL_DISPLAY_H_
-
-#include <gtk/gtktable.h>
-#include <gtkhtml/gtkhtml.h>
-#include "camel/camel-stream.h"
-
-#define MAIL_DISPLAY_TYPE (mail_display_get_type ())
-#define MAIL_DISPLAY(o) (GTK_CHECK_CAST ((o), MAIL_DISPLAY_TYPE, MailDisplay))
-#define MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MAIL_DISPLAY_TYPE, MailDisplayClass))
-#define IS_MAIL_DISPLAY(o) (GTK_CHECK_TYPE ((o), MAIL_DISPLAY_TYPE))
-#define IS_MAIL_DISPLAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MAIL_DISPLAY_TYPE))
-
-typedef struct {
- GtkTable parent;
-
- GtkHTML *html;
-} MailDisplay;
-
-typedef struct {
- GtkTableClass parent_class;
-} MailDisplayClass;
-
-GtkType mail_display_get_type (void);
-GtkWidget *mail_display_new (void);
-
-CamelStream *mail_display_get_stream (MailDisplay *display);
-
-#endif /* _MAIL_DISPLAY_H_ */
diff --git a/mail/main.c b/mail/main.c
deleted file mode 100644
index 2dceb6644e..0000000000
--- a/mail/main.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * mail-component.c: The core of the mail component
- *
- * Author:
- * Miguel de Icaza (miguel@helixcode.com)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include <config.h>
-#include <gnome.h>
-#include <libgnorba/gnorba.h>
-#include <bonobo/bonobo-main.h>
-#include "e-util/e-gui-utils.h"
-#include "main.h"
-
-CORBA_ORB orb;
-
-static void
-init_bonobo (int argc, char **argv)
-{
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- gnome_CORBA_init_with_popt_table (
- "evolution-mail-component", "1.0",
- &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
-
- orb = gnome_CORBA_ORB ();
-
- if (bonobo_init (orb, NULL, NULL) == FALSE){
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("Mail Component: I could not initialize Bonobo"));
- exit (1);
- }
-
- CORBA_exception_free (&ev);
-}
-
-int
-main (int argc, char *argv [])
-{
- bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR);
- textdomain (PACKAGE);
-
- init_bonobo (argc, argv);
-
- session_init ();
-
- folder_browser_factory_init ();
-
- bonobo_main ();
-
- return 0;
-}
-
-
-
-
diff --git a/mail/main.h b/mail/main.h
deleted file mode 100644
index 2cb17b5e10..0000000000
--- a/mail/main.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _MAIL_MAIN_H_
-#define _MAIL_MAIN_H_
-
-void folder_browser_factory_init (void);
-
-#endif /* _MAIL_MAIN_H_ */
diff --git a/mail/message-list.c b/mail/message-list.c
deleted file mode 100644
index 6983b4ac78..0000000000
--- a/mail/message-list.c
+++ /dev/null
@@ -1,545 +0,0 @@
-/*
- * message-list.c: Displays the messages.
- * Implements CORBA's Evolution::MessageList
- *
- * Author:
- * Miguel de Icaza (miguel@helixcode.com)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include <config.h>
-#include <gnome.h>
-#include <bonobo/bonobo-main.h>
-#include "e-util/e-util.h"
-#include "camel/camel-exception.h"
-#include "message-list.h"
-#include "Mail.h"
-#include "widgets/e-table/e-table-header-item.h"
-#include "widgets/e-table/e-table-item.h"
-
-/*
- * Default sizes for the ETable display
- *
- */
-#define N_CHARS(x) (CHAR_WIDTH * (x))
-
-#define COL_ICON_WIDTH 16
-#define COL_FROM_WIDTH N_CHARS(24)
-#define COL_FROM_WIDTH_MIN 32
-#define COL_SUBJECT_WIDTH N_CHARS(30)
-#define COL_SUBJECT_WIDTH_MIN 32
-#define COL_SENT_WIDTH N_CHARS(20)
-#define COL_SENT_WIDTH_MIN 32
-#define COL_RECEIVE_WIDTH N_CHARS(20)
-#define COL_RECEIVE_WIDTH_MIN 32
-#define COL_TO_WIDTH N_CHARS(24)
-#define COL_TO_WIDTH_MIN 32
-#define COL_SIZE_WIDTH N_CHARS(6)
-#define COL_SIZE_WIDTH_MIN 32
-
-#define PARENT_TYPE (bonobo_object_get_type ())
-
-static BonoboObjectClass *message_list_parent_class;
-static POA_Evolution_MessageList__vepv evolution_message_list_vepv;
-
-/*
- * SimpleTableModel::col_count
- */
-static int
-ml_col_count (ETableModel *etm, void *data)
-{
- return COL_LAST;
-}
-
-/*
- * SimpleTableModel::row_count
- */
-static int
-ml_row_count (ETableModel *etm, void *data)
-{
- MessageList *message_list = data;
- CamelException *ex;
- int v;
-
- if (!message_list->folder)
- return 0;
-
- ex = camel_exception_new ();
- v = camel_folder_get_message_count (message_list->folder, ex);
- camel_exception_free (ex);
-
- return v;
-}
-
-static void *
-ml_value_at (ETableModel *etm, int col, int row, void *data)
-{
- static char buffer [10];
-
-
- switch (col){
- case COL_ONLINE_STATUS:
- return GINT_TO_POINTER (0);
-
- case COL_MESSAGE_STATUS:
- return GINT_TO_POINTER (1);
-
- case COL_PRIORITY:
- return GINT_TO_POINTER (1);
-
- case COL_ATTACHMENT:
- return GINT_TO_POINTER (0);
-
- case COL_FROM:
- return "miguel@dudical.com";
-
- case COL_SUBJECT:
- return "MONEY FAST!";
-
- case COL_SENT:
- return "sent";
-
- case COL_RECEIVE:
- return "receive";
-
- case COL_TO:
- return "dudes@server";
-
- case COL_SIZE:
- sprintf (buffer, "%d", 20);
- return buffer;
-
- default:
- g_assert_not_reached ();
- }
- return NULL;
-}
-
-static void
-ml_set_value_at (ETableModel *etm, int col, int row, const void *value, void *data)
-{
-}
-
-static gboolean
-ml_is_cell_editable (ETableModel *etm, int col, int row, void *data)
-{
- return FALSE;
-}
-
-static void *
-ml_duplicate_value (ETableModel *etm, int col, const void *value, void *data)
-{
- return value;
-}
-
-static void
-ml_free_value (ETableModel *etm, int col, void *value, void *data)
-{
-}
-
-static void
-ml_thaw (ETableModel *etm, void *data)
-{
- e_table_model_changed(etm);
-}
-
-static void
-message_list_init_renderers (MessageList *message_list)
-{
- g_assert (message_list);
- g_assert (message_list->table_model);
-
- message_list->render_text = e_cell_text_new (
- message_list->table_model,
- NULL, GTK_JUSTIFY_LEFT, FALSE);
-
- message_list->render_online_status = e_cell_checkbox_new ();
- message_list->render_message_status = e_cell_checkbox_new ();
- message_list->render_attachment = e_cell_checkbox_new ();
-
- /*
- * FIXME: We need a real renderer here
- */
- message_list->render_priority = e_cell_checkbox_new ();
-}
-
-#define CHAR_WIDTH 10
-static void
-message_list_init_header (MessageList *message_list)
-{
- int i;
-
- /*
- * FIXME:
- *
- * Use the font metric to compute this.
- */
-
- message_list->header_model = e_table_header_new ();
-
- message_list->table_cols [COL_ONLINE_STATUS] =
- e_table_col_new (COL_ONLINE_STATUS, _("Online status"),
- COL_ICON_WIDTH, COL_ICON_WIDTH,
- message_list->render_online_status,
- g_int_equal, FALSE);
-
- message_list->table_cols [COL_MESSAGE_STATUS] =
- e_table_col_new (COL_MESSAGE_STATUS, _("Message status"),
- COL_ICON_WIDTH, COL_ICON_WIDTH,
- message_list->render_message_status,
- g_int_equal, FALSE);
-
- message_list->table_cols [COL_PRIORITY] =
- e_table_col_new (COL_PRIORITY, _("Priority"),
- COL_ICON_WIDTH, COL_ICON_WIDTH,
- message_list->render_priority,
- g_int_equal, FALSE);
-
- message_list->table_cols [COL_ATTACHMENT] =
- e_table_col_new (COL_ATTACHMENT, _("Attachment"),
- COL_ICON_WIDTH, COL_ICON_WIDTH,
- message_list->render_attachment,
- g_int_equal, FALSE);
-
- message_list->table_cols [COL_FROM] =
- e_table_col_new (COL_FROM, _("From"),
- COL_FROM_WIDTH, COL_FROM_WIDTH_MIN,
- message_list->render_text,
- g_str_equal, TRUE);
-
- message_list->table_cols [COL_SUBJECT] =
- e_table_col_new (COL_SUBJECT, _("Subject"),
- COL_SUBJECT_WIDTH, COL_SUBJECT_WIDTH_MIN,
- message_list->render_text,
- g_str_equal, TRUE);
-
- message_list->table_cols [COL_SENT] =
- e_table_col_new (COL_SENT, _("Sent"),
- COL_SUBJECT_WIDTH, COL_SENT_WIDTH_MIN,
- message_list->render_text,
- g_str_equal, TRUE);
-
- message_list->table_cols [COL_RECEIVE] =
- e_table_col_new (COL_SENT, _("Receive"),
- COL_RECEIVE_WIDTH, COL_RECEIVE_WIDTH_MIN,
- message_list->render_text,
- g_str_equal, TRUE);
- message_list->table_cols [COL_TO] =
- e_table_col_new (COL_TO, _("To"),
- COL_TO_WIDTH, COL_TO_WIDTH_MIN,
- message_list->render_text,
- g_str_equal, TRUE);
-
- message_list->table_cols [COL_SIZE] =
- e_table_col_new (COL_SIZE, _("Size"),
- COL_SIZE_WIDTH, COL_SIZE_WIDTH_MIN,
- message_list->render_text,
- g_str_equal, TRUE);
-
- /*
- * Dummy init: It setups the headers to match the order in which
- * they are defined. In the future e-table widget will take care
- * of this.
- */
- for (i = 0; i < COL_LAST; i++)
- e_table_header_add_column (message_list->header_model,
- message_list->table_cols [i], i);
-}
-
-static void
-set_header_size (GnomeCanvas *canvas, GtkAllocation *alloc)
-{
- printf ("Here\n");
- gnome_canvas_set_scroll_region (canvas, 0, 0, alloc->width, alloc->height);
-}
-
-static void
-set_content_size (GnomeCanvas *canvas, GtkAllocation *alloc)
-{
- printf ("Here2\n");
- gnome_canvas_set_scroll_region (canvas, 0, 0, alloc->width, alloc->height);
-}
-
-static GtkWidget *
-make_etable (MessageList *message_list)
-{
- GtkTable *t;
- GtkWidget *header, *content;
-
- t = (GtkTable *) gtk_table_new (0, 0, 0);
- gtk_widget_show (GTK_WIDGET (t));
-
- gtk_widget_push_visual (gdk_rgb_get_visual ());
- gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
- header = gnome_canvas_new ();
- gtk_signal_connect (GTK_OBJECT (header), "size_allocate",
- GTK_SIGNAL_FUNC (set_header_size), NULL);
- gtk_widget_set_usize (header, 300, 20);
- gtk_widget_show (header);
- content = gnome_canvas_new ();
- gtk_widget_set_usize (content, 300, 20);
- gtk_signal_connect (GTK_OBJECT (content), "size_allocate",
- GTK_SIGNAL_FUNC (set_content_size), NULL);
- gtk_widget_show (content);
-
- gtk_widget_pop_colormap ();
- gtk_widget_pop_visual ();
-
- gnome_canvas_item_new (
- gnome_canvas_root (GNOME_CANVAS (header)),
- e_table_header_item_get_type (),
- "ETableHeader", message_list->header_model,
- NULL);
-
- gnome_canvas_item_new (
- gnome_canvas_root (GNOME_CANVAS (content)),
- e_table_item_get_type (),
- "ETableHeader", message_list->header_model,
- "ETableModel", message_list->table_model,
- "drawgrid", TRUE,
- "drawfocus", TRUE,
- "spreadsheet", TRUE,
- NULL);
-
- gtk_table_attach (t, header,
- 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
-
- gtk_table_attach (t, content,
- 0, 1, 1, 2,
- GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
-
-
- return t;
-}
-
-/*
- * GtkObject::init
- */
-static void
-message_list_init (GtkObject *object)
-{
- MessageList *message_list = MESSAGE_LIST (object);
-
- message_list->table_model = e_table_simple_new (
- ml_col_count, ml_row_count, ml_value_at,
- ml_set_value_at, ml_is_cell_editable, ml_duplicate_value, ml_free_value,
- ml_thaw, message_list);
-
- message_list_init_renderers (message_list);
- message_list_init_header (message_list);
-
- /*
- * The etable
- */
-
- message_list->etable = make_etable (message_list);
-
- /*
- * We do own the Etable, not some widget container
- */
- gtk_object_ref (GTK_OBJECT (message_list->etable));
- gtk_object_sink (GTK_OBJECT (message_list->etable));
-}
-
-static void
-message_list_destroy (GtkObject *object)
-{
- MessageList *message_list = MESSAGE_LIST (object);
- int i;
-
- gtk_object_unref (GTK_OBJECT (message_list->table_model));
- gtk_object_unref (GTK_OBJECT (message_list->header_model));
-
- /*
- * Renderers
- */
- gtk_object_unref (GTK_OBJECT (message_list->render_text));
- gtk_object_unref (GTK_OBJECT (message_list->render_online_status));
- gtk_object_unref (GTK_OBJECT (message_list->render_message_status));
- gtk_object_unref (GTK_OBJECT (message_list->render_priority));
- gtk_object_unref (GTK_OBJECT (message_list->render_attachment));
-
- gtk_object_unref (GTK_OBJECT (message_list->etable));
-
- for (i = 0; i < COL_LAST; i++)
- gtk_object_unref (GTK_OBJECT (message_list->table_cols [i]));
-
- GTK_OBJECT_CLASS (message_list_parent_class)->destroy (object);
-}
-
-/*
- * CORBA method: Evolution::MessageList::select_message
- */
-static void
-MessageList_select_message (PortableServer_Servant _servant,
- const CORBA_long message_number,
- CORBA_Environment *ev)
-{
- printf ("FIXME: select message method\n");
-}
-
-/*
- * CORBA method: Evolution::MessageList::open_message
- */
-static void
-MessageList_open_message (PortableServer_Servant _servant,
- const CORBA_long message_number,
- CORBA_Environment *ev)
-{
- printf ("FIXME: open message method\n");
-}
-
-static POA_Evolution_MessageList__epv *
-evolution_message_list_get_epv (void)
-{
- POA_Evolution_MessageList__epv *epv;
-
- epv = g_new0 (POA_Evolution_MessageList__epv, 1);
-
- epv->select_message = MessageList_select_message;
- epv->open_message = MessageList_open_message;
-
- return epv;
-}
-
-static void
-message_list_corba_class_init (void)
-{
- evolution_message_list_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv ();
- evolution_message_list_vepv.Evolution_MessageList_epv = evolution_message_list_get_epv ();
-}
-
-/*
- * GtkObjectClass::init
- */
-static void
-message_list_class_init (GtkObjectClass *object_class)
-{
- message_list_parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class->destroy = message_list_destroy;
-
- message_list_corba_class_init ();
-}
-
-static void
-message_list_construct (MessageList *message_list, Evolution_MessageList corba_message_list)
-{
- bonobo_object_construct (BONOBO_OBJECT (message_list), corba_message_list);
-}
-
-static Evolution_MessageList
-create_corba_message_list (BonoboObject *object)
-{
- POA_Evolution_MessageList *servant;
- CORBA_Environment ev;
-
- servant = (POA_Evolution_MessageList *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &evolution_message_list_vepv;
-
- CORBA_exception_init (&ev);
- POA_Evolution_MessageList__init ((PortableServer_Servant) servant, &ev);
- if (ev._major != CORBA_NO_EXCEPTION){
- g_free (servant);
- CORBA_exception_free (&ev);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev);
- return (Evolution_MessageList) bonobo_object_activate_servant (object, servant);
-}
-
-BonoboObject *
-message_list_new (void)
-{
- Evolution_MessageList corba_object;
- MessageList *message_list;
-
- message_list = gtk_type_new (message_list_get_type ());
-
- corba_object = create_corba_message_list (BONOBO_OBJECT (message_list));
- if (corba_object == CORBA_OBJECT_NIL){
- gtk_object_destroy (GTK_OBJECT (message_list));
- return NULL;
- }
-
- message_list_construct (message_list, corba_object);
-
- return BONOBO_OBJECT (message_list);
-}
-
-void
-message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder)
-{
- CamelException ex;
- gboolean folder_exists;
-
- g_return_if_fail (message_list != NULL);
- g_return_if_fail (camel_folder != NULL);
- g_return_if_fail (IS_MESSAGE_LIST (message_list));
- g_return_if_fail (CAMEL_IS_FOLDER (camel_folder));
- g_return_if_fail (camel_folder_has_summary_capability (camel_folder));
-
-
- camel_exception_init (&ex);
-
- if (message_list->folder)
- gtk_object_unref (GTK_OBJECT (message_list->folder));
-
- message_list->folder = camel_folder;
-
- folder_exists = camel_folder_exists (camel_folder, NULL);
-
- if (camel_exception_get_id (&ex)) {
- printf ("Unable to test for folder existence: %s\n",
- ex.desc?ex.desc:"unknown reason");
- return;
- }
-
- if (!folder_exists) {
- g_warning ("Folder does not exist, creating it\n");
- /*
- if you don't want the directory to be created
- automatically here remove this.
- */
- camel_folder_create (camel_folder, &ex);
- if (camel_exception_get_id (&ex)) {
- printf ("Unable to create folder: %s\n",
- ex.desc?ex.desc:"unknown_reason");
- return;
- }
-
- }
-
-
- camel_folder_open (camel_folder, FOLDER_OPEN_RW, &ex);
- if (camel_exception_get_id (&ex)) {
- printf ("Unable to open folder: %s\n",
- ex.desc?ex.desc:"unknown_reason");
- return;
- }
-
- message_list->folder_summary =
- camel_folder_get_summary (camel_folder, &ex);
-
- if (camel_exception_get_id (&ex)) {
- printf ("Unable to get summary: %s\n",
- ex.desc?ex.desc:"unknown_reason");
- return;
- }
-
-
- gtk_object_ref (GTK_OBJECT (camel_folder));
-
- printf ("Modelo cambio!\n");
- e_table_model_changed (message_list->table_model);
-}
-
-GtkWidget *
-message_list_get_widget (MessageList *message_list)
-{
- return message_list->etable;
-}
-
-E_MAKE_TYPE (message_list, "MessageList", MessageList, message_list_class_init, message_list_init, PARENT_TYPE);
diff --git a/mail/message-list.h b/mail/message-list.h
deleted file mode 100644
index 40cc924e24..0000000000
--- a/mail/message-list.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _MESSAGE_LIST_H_
-#define _MESSAGE_LIST_H_
-
-#include <bonobo/bonobo-main.h>
-#include <bonobo/bonobo-object.h>
-#include "camel/camel-folder.h"
-#include "e-table/e-table.h"
-#include "e-table/e-table-simple.h"
-#include "e-table/e-cell-text.h"
-#include "e-table/e-cell-toggle.h"
-#include "e-table/e-cell-checkbox.h"
-
-#define MESSAGE_LIST_TYPE (message_list_get_type ())
-#define MESSAGE_LIST(o) (GTK_CHECK_CAST ((o), MESSAGE_LIST_TYPE, MessageList))
-#define MESSAGE_LIST_CLASS(k) (GTK_CHECK_CLASS_CAST((k), MESSAGE_LIST_TYPE, MessageListClass))
-#define IS_MESSAGE_LIST(o) (GTK_CHECK_TYPE ((o), MESSAGE_LIST_TYPE))
-#define IS_MESSAGE_LIST_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), MESSAGE_LIST_TYPE))
-
-typedef struct _Renderer Renderer;
-
-enum {
- COL_ONLINE_STATUS,
- COL_MESSAGE_STATUS,
- COL_PRIORITY,
- COL_ATTACHMENT,
- COL_FROM,
- COL_SUBJECT,
- COL_SENT,
- COL_RECEIVE,
- COL_TO,
- COL_SIZE,
-
- COL_LAST
-};
-
-typedef struct {
- BonoboObject parent;
-
- ETableModel *table_model;
- ETableHeader *header_model;
- ETableCol *table_cols [COL_LAST];
-
- ECell *render_text;
- ECell *render_online_status;
- ECell *render_message_status;
- ECell *render_priority;
- ECell *render_attachment;
-
- GtkWidget *etable;
-
- CamelFolder *folder;
- CamelFolderSummary *folder_summary;
-} MessageList;
-
-typedef struct {
- BonoboObjectClass parent_class;
-} MessageListClass;
-
-GtkType message_list_get_type (void);
-BonoboObject *message_list_new (void);
-void message_list_set_folder (MessageList *message_list,
- CamelFolder *camel_folder);
-GtkWidget *message_list_get_widget (MessageList *message_list);
-
-#endif /* _MESSAGE_LIST_H_ */
diff --git a/mail/session.c b/mail/session.c
deleted file mode 100644
index a97b70ed26..0000000000
--- a/mail/session.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * session.c: handles the session infomration and resource manipulation
- *
- * Author:
- * Miguel de Icaza (miguel@gnu.org)
- *
- * (C) 2000 Helix Code, Inc. http://www.helixcode.com
- */
-#include <config.h>
-#include <gnome.h>
-#include "session.h"
-#include "e-util/e-setup.h"
-#include "camel/camel.h"
-
-SessionStore *default_session;
-
-static void
-request_callback (gchar *string, gpointer data)
-{
- char **ans = data;
-
- if (string)
- *ans = g_strdup(string);
- else
- *ans = NULL;
-}
-
-static char *
-evolution_auth_callback (char *prompt, gboolean secret,
- CamelService *service, char *item,
- CamelException *ex)
-{
- GtkWidget *dialog;
- char *ans;
-
- /* XXX look up stored passwords */
-
- /* XXX parent window? */
- dialog = gnome_request_dialog (secret, prompt, NULL, 0,
- request_callback, &ans, NULL);
- if (!dialog) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
- "Could not create dialog box.");
- return NULL;
- }
- if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == -1 ||
- ans == NULL) {
- camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
- "User cancelled query.");
- return NULL;
- }
-
- return ans;
-}
-
-static void
-session_providers_init (void)
-{
- camel_provider_register_as_module (CAMEL_PROVIDERDIR "/libcamelmbox.so");
-}
-
-SessionStore *
-session_store_new (const char *uri)
-{
- SessionStore *ss = g_new (SessionStore, 1);
- CamelException *ex;
-
- ss->session = camel_session_new (evolution_auth_callback);
- ex = camel_exception_new ();
- ss->store = camel_session_get_store (ss->session, uri, ex);
- camel_exception_free (ex);
-
- g_assert (ss->session);
- g_assert (ss->store);
-
- return ss;
-}
-
-void
-session_store_destroy (SessionStore *ss)
-{
- g_assert (ss != NULL);
-
- gtk_object_unref (GTK_OBJECT (ss->store));
- gtk_object_unref (GTK_OBJECT (ss->session));
-
- g_free (ss);
-}
-
-static void
-init_default_session (void)
-{
- char *url;
-
- url = g_strconcat ("mbox://", evolution_folders_dir, NULL);
- default_session = session_store_new (url);
- g_free (url);
-}
-
-void
-session_init (void)
-{
- e_setup_base_dir ();
- camel_init ();
- session_providers_init ();
-
- init_default_session ();
-}
-
-
diff --git a/mail/session.h b/mail/session.h
deleted file mode 100644
index 8b870f0383..0000000000
--- a/mail/session.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef EVOLUTION_MAIL_SESSION_H
-#define EVOLUTION_MAIL_SESSION_H
-
-#include <camel/camel-store.h>
-#include <camel/camel-session.h>
-typedef struct {
- CamelSession *session;
- CamelStore *store;
-} SessionStore;
-
-SessionStore *session_store_new (const char *uri);
-void session_store_destroy (SessionStore *ss);
-void session_init (void);
-
-extern SessionStore *default_session;
-
-#endif /* EVOLUTION_MAIL_SESSION_H */
diff --git a/mail/test-mail.c b/mail/test-mail.c
deleted file mode 100644
index 1f8b217ce5..0000000000
--- a/mail/test-mail.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Tests the mail summary display bonobo component
- *
- * Author:
- * Miguel de Icaza (miguel@kernel.org)
- *
- * (C) 2000 Helix Code, Inc.
- */
-#include <gnome.h>
-#include <bonobo.h>
-
-static void
-create_container (void)
-{
- GtkWidget *window, *control;
- BonoboUIHandler *uih;
-
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_widget_show (window);
-
- uih = bonobo_ui_handler_new ();
- control = bonobo_widget_new_control ("GOADID:Evolution:FolderBrowser:1.0",
- bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
-
- if (control == NULL){
- printf ("Could not launch mail control\n");
- exit (1);
- }
- gtk_container_add (GTK_CONTAINER (window), control);
-
- gtk_widget_show (window);
- gtk_widget_show (control);
-}
-
-int
-main (int argc, char *argv [])
-{
- CORBA_Environment ev;
- CORBA_ORB orb;
-
- CORBA_exception_init (&ev);
-
- gnome_CORBA_init ("sample-control-container", "1.0", &argc, argv, 0, &ev);
-
- CORBA_exception_free (&ev);
-
- orb = gnome_CORBA_ORB ();
-
- if (bonobo_init (orb, NULL, NULL) == FALSE)
- g_error ("Could not initialize Bonobo\n");
-
- bonobo_activate ();
-
- create_container ();
-
- /*
- * Main loop
- */
- gtk_main ();
-
- return 0;
-}