diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-10-30 00:56:45 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-10-30 00:56:45 +0800 |
commit | 5843bd83e79d16eecf87df5aa357c9577cf60a9c (patch) | |
tree | 7a2124146d8317754fd524591485ad22344002e9 /mail/mail-config.c | |
parent | 26f77b16e1f8a3207554e607e2ee18bb7b14c97d (diff) | |
download | gsoc2013-evolution-5843bd83e79d16eecf87df5aa357c9577cf60a9c.tar.gz gsoc2013-evolution-5843bd83e79d16eecf87df5aa357c9577cf60a9c.tar.zst gsoc2013-evolution-5843bd83e79d16eecf87df5aa357c9577cf60a9c.zip |
Nuked the MailConfig interface stuff.
2003-10-29 Jeffrey Stedfast <fejj@ximian.com>
* GNOME_Evolution_Mail.server.in.in: Nuked the MailConfig
interface stuff.
* Mailer.idl: Removed. None of the interfaces are needed/used
anymore.
* folder-info.[c,h]: Removed. The summary was the only thing that
needed/used this code and it has been nuked into oblivion, so
these interfaces are no longer needed.
* mail-config.c: Removed old crufty CORBA interface snot that is
no longer needed or used.
svn path=/trunk/; revision=23118
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index f75babcf36..d5c4b24cfe 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -60,8 +60,6 @@ #include "mail-mt.h" #include "mail-tools.h" -#include "Mailer.h" - /* Note, the first element of each MailConfigLabel must NOT be translated */ MailConfigLabel label_defaults[5] = { { "important", N_("Important"), "#ff0000" }, /* red */ @@ -95,7 +93,6 @@ typedef struct { static MailConfig *config = NULL; static guint config_write_timeout = 0; -#define MAIL_CONFIG_IID "OAFIID:GNOME_Evolution_MailConfig_Factory" #define MAIL_CONFIG_RC "/gtkrc-mail-fonts" /* signatures */ @@ -1182,24 +1179,6 @@ mail_config_check_service (const char *url, CamelProviderType type, GList **auth return ret; } -/* MailConfig Bonobo object */ -#define PARENT_TYPE BONOBO_OBJECT_TYPE -static BonoboObjectClass *parent_class = NULL; - -/* For the bonobo object */ -typedef struct _EvolutionMailConfig EvolutionMailConfig; -typedef struct _EvolutionMailConfigClass EvolutionMailConfigClass; - -struct _EvolutionMailConfig { - BonoboObject parent; -}; - -struct _EvolutionMailConfigClass { - BonoboObjectClass parent_class; - - POA_GNOME_Evolution_MailConfig__epv epv; -}; - static gboolean do_config_write (gpointer data) { @@ -1208,126 +1187,6 @@ do_config_write (gpointer data) return FALSE; } -static void -impl_GNOME_Evolution_MailConfig_addAccount (PortableServer_Servant servant, - const GNOME_Evolution_MailConfig_Account *account, - CORBA_Environment *ev) -{ - GNOME_Evolution_MailConfig_Service source, transport; - GNOME_Evolution_MailConfig_Identity id; - EAccount *new; - - if (mail_config_get_account_by_name (account->name)) { - /* FIXME: we need an exception. */ - return; - } - - new = e_account_new (); - new->name = g_strdup (account->name); - new->enabled = source.enabled; - - /* Copy ID */ - id = account->id; - new->id->name = g_strdup (id.name); - new->id->address = g_strdup (id.address); - new->id->reply_to = g_strdup (id.reply_to); - new->id->organization = g_strdup (id.organization); - - /* Copy source */ - source = account->source; - if (!(source.url == NULL || strcmp (source.url, "none://") == 0)) - new->source->url = g_strdup (source.url); - - new->source->keep_on_server = source.keep_on_server; - new->source->auto_check = source.auto_check; - new->source->auto_check_time = source.auto_check_time; - new->source->save_passwd = source.save_passwd; - - /* Copy transport */ - transport = account->transport; - if (transport.url != NULL) - new->transport->url = g_strdup (transport.url); - - new->transport->url = g_strdup (transport.url); - new->transport->save_passwd = transport.save_passwd; - - /* Add new account */ - mail_config_add_account (new); - - /* Don't write out the config right away in case the remote - * component is creating or removing multiple accounts. - */ - if (!config_write_timeout) - config_write_timeout = g_timeout_add (2000, do_config_write, NULL); -} - -static void -impl_GNOME_Evolution_MailConfig_removeAccount (PortableServer_Servant servant, - const CORBA_char *name, - CORBA_Environment *ev) -{ - EAccount *account; - - if ((account = mail_config_get_account_by_name (name))) - mail_config_remove_account (account); - - /* Don't write out the config right away in case the remote - * component is creating or removing multiple accounts. - */ - if (!config_write_timeout) - config_write_timeout = g_timeout_add (2000, do_config_write, NULL); -} - -static void -evolution_mail_config_class_init (EvolutionMailConfigClass *klass) -{ - POA_GNOME_Evolution_MailConfig__epv *epv = &klass->epv; - - parent_class = g_type_class_ref(PARENT_TYPE); - epv->addAccount = impl_GNOME_Evolution_MailConfig_addAccount; - epv->removeAccount = impl_GNOME_Evolution_MailConfig_removeAccount; -} - -static void -evolution_mail_config_init (EvolutionMailConfig *config) -{ - ; -} - -BONOBO_TYPE_FUNC_FULL (EvolutionMailConfig, - GNOME_Evolution_MailConfig, - PARENT_TYPE, - evolution_mail_config); - -static BonoboObject * -evolution_mail_config_factory_fn (BonoboGenericFactory *factory, - const char *id, - void *closure) -{ - EvolutionMailConfig *config; - - config = g_object_new (evolution_mail_config_get_type (), NULL); - - return BONOBO_OBJECT (config); -} - -gboolean -evolution_mail_config_factory_init (void) -{ - BonoboGenericFactory *factory; - - factory = bonobo_generic_factory_new (MAIL_CONFIG_IID, - evolution_mail_config_factory_fn, - NULL); - if (factory == NULL) { - g_warning ("Error starting MailConfig"); - return FALSE; - } - - bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory)); - return TRUE; -} - GSList * mail_config_get_signature_list (void) { |