From 121d056d45b9766532ba9b7ec3f687c04582194f Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Sat, 29 Jul 2000 06:04:24 +0000 Subject: New function to create composer with sig file set. 2000-07-28 JP Rosevear * e-msg-composer.c (e_msg_composer_new_with_sig_file): New function to create composer with sig file set. (e_msg_composer_get_sig_file): New function to get sig file (e_msg_composer_set_sig_file): New function to set sig file 2000-07-29 JP Rosevear * mail-format.c (mail_generate_reply): Use new mail config stuff * component-factory.c (create_imap_storage): Use new mail config stuff (create_news_storage): ditto * evolution-mail.schemas: Gconf schema for evolution mail * mail-config-druid.glade: Gladification of config druid * mail-config.h: New header with config structs. * mail-config.c: Rewrite of GUI configuration tools to use new config structs. Stores multiple identities and sources now. Still only uses the first one found. (mail_config_fetch): Returns MailConfig struct to caller for configuration queries. (mail_config): Renamed function to show mail config dialog. (mail_config_druid): Renamed function to show mail config druid. * mail-ops.c (create_msg_composer): Use e_msg_composer_new_with_sig_file and new config stuff (check_configured): Use new config stuff (fetch_mail): ditto (composer_send_cb): ditto svn path=/trunk/; revision=4413 --- mail/component-factory.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'mail/component-factory.c') diff --git a/mail/component-factory.c b/mail/component-factory.c index 19296e650e..2ebd9c6961 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -274,15 +274,19 @@ struct create_info_s { static void create_imap_storage (EvolutionShellComponent *shell_component) { + const MailConfig *config; EvolutionShellClient *shell_client; Evolution_Shell corba_shell; EvolutionStorage *storage; - char *cpath, *source, *server, *p; + char *source=NULL, *server, *p; struct create_info_s *ii; - cpath = g_strdup_printf ("=%s/config=/mail/source", evolution_dir); - source = gnome_config_get_string (cpath); - g_free (cpath); + config = mail_config_fetch (); + if (config->sources) { + const MailConfigService *s; + s = (MailConfigService *)config->sources->data; + source = s->url; + } if (!source || strncasecmp (source, "imap://", 7)) return; @@ -413,15 +417,19 @@ real_create_imap_storage (gpointer user_data) static void create_news_storage (EvolutionShellComponent *shell_component) { + const MailConfig *config; EvolutionShellClient *shell_client; Evolution_Shell corba_shell; EvolutionStorage *storage; - char *cpath, *source, *server, *p; + char *source=NULL, *server, *p; struct create_info_s *ni; - cpath = g_strdup_printf ("=%s/config=/news/source", evolution_dir); - source = gnome_config_get_string (cpath); - g_free (cpath); + config = mail_config_fetch (); + if (config->news) { + const MailConfigService *s; + s = (MailConfigService *)config->news->data; + source = s->url; + } if (!source || strncasecmp (source, "news://", 7)) return; -- cgit v1.2.3