Fix build by allowing includes for e-table dir
2000-08-08 JP Rosevear <jpr@helixcode.com> * Makefile.am: Fix build by allowing includes for e-table dir 2000-08-08 JP Rosevear <jpr@helixcode.com> * mail-ops.c (check_configured): Use config accessors (fetch_mail): ditto (composer_send_cb): ditto (create_msg_composer): ditto * mail-config-gui.h: Update API * mail-config.h: Update API * mail-config.c: Add accessor functions (mail_config_is_configured): accessor function (mail_config_get_default_identity): ditto (mail_config_get_default_source): ditto (mail_config_get_transport): ditto (mail_config_send_html): ditto (identity_copy): Make public (identity_destroy): ditto (identity_destroy_each): ditto (service_copy): ditto (service_destroy): ditto (service_destroy_each): ditto (mail_config_init): Rename from init_config and make public (mail_config_clear): Rename from clear_config and make public (mail_config_read): Rename from read_config and make public (mail_config_write): Reanme from write_config and make public * main.c (main): Call mail_config_init. * mail.h: Include mail-config-gui.h * mail-config-gui.c: Move config gui stuff here. (source_dialog): Kill memory leak from debug leftovers. Make sure returned source is NULL by default svn path=/trunk/; revision=4592
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2000-08-08 JP Rosevear <jpr@helixcode.com>
|
||||
|
||||
* Makefile.am: Fix build by allowing includes for e-table dir
|
||||
|
||||
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
|
||||
|
||||
* e-msg-composer-attachment-bar.c (attach_to_multipart):
|
||||
|
||||
@ -33,6 +33,8 @@ libcomposer_la_LDFLAGS = -static
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir)/widgets \
|
||||
-I$(top_builddir)/widgets \
|
||||
-I$(top_srcdir)/camel \
|
||||
-I$(top_builddir)/camel \
|
||||
-I$(top_builddir)/addressbook/gui/component/select-names \
|
||||
|
||||
@ -1,3 +1,39 @@
|
||||
2000-08-08 JP Rosevear <jpr@helixcode.com>
|
||||
|
||||
* mail-ops.c (check_configured): Use config accessors
|
||||
(fetch_mail): ditto
|
||||
(composer_send_cb): ditto
|
||||
(create_msg_composer): ditto
|
||||
|
||||
* mail-config-gui.h: Update API
|
||||
|
||||
* mail-config.h: Update API
|
||||
|
||||
* mail-config.c: Add accessor functions
|
||||
(mail_config_is_configured): accessor function
|
||||
(mail_config_get_default_identity): ditto
|
||||
(mail_config_get_default_source): ditto
|
||||
(mail_config_get_transport): ditto
|
||||
(mail_config_send_html): ditto
|
||||
(identity_copy): Make public
|
||||
(identity_destroy): ditto
|
||||
(identity_destroy_each): ditto
|
||||
(service_copy): ditto
|
||||
(service_destroy): ditto
|
||||
(service_destroy_each): ditto
|
||||
(mail_config_init): Rename from init_config and make public
|
||||
(mail_config_clear): Rename from clear_config and make public
|
||||
(mail_config_read): Rename from read_config and make public
|
||||
(mail_config_write): Reanme from write_config and make public
|
||||
|
||||
* main.c (main): Call mail_config_init.
|
||||
|
||||
* mail.h: Include mail-config-gui.h
|
||||
|
||||
* mail-config-gui.c: Move config gui stuff here.
|
||||
(source_dialog): Kill memory leak from debug leftovers.
|
||||
Make sure returned source is NULL by default
|
||||
|
||||
2000-08-07 Not Zed <NotZed@HelixCode.com>
|
||||
|
||||
* mail-local.c (local_reconfigure_folder): Redone to show a
|
||||
|
||||
@ -43,6 +43,9 @@ evolution_mail_SOURCES = \
|
||||
folder-browser.h \
|
||||
folder-browser-factory.c \
|
||||
mail-config.c \
|
||||
mail-config.h \
|
||||
mail-config-gui.c \
|
||||
mail-config-gui.h \
|
||||
mail-crypto.c \
|
||||
mail-display.c \
|
||||
mail-display.h \
|
||||
|
||||
2117
mail/mail-config-gui.c
Normal file
2117
mail/mail-config-gui.c
Normal file
File diff suppressed because it is too large
Load Diff
29
mail/mail-config-gui.h
Normal file
29
mail/mail-config-gui.h
Normal file
@ -0,0 +1,29 @@
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
||||
|
||||
/*
|
||||
* Copyright 2000, Helix Code, Inc. (http://www.helixcode.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef _MAIL_CONFIG_GUI_H
|
||||
#define _MAIL_CONFIG_GUI_H
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
void mail_config (void);
|
||||
void mail_config_druid (void);
|
||||
|
||||
#endif
|
||||
2109
mail/mail-config.c
2109
mail/mail-config.c
File diff suppressed because it is too large
Load Diff
@ -46,9 +46,31 @@ typedef struct
|
||||
gboolean send_html;
|
||||
} MailConfig;
|
||||
|
||||
void mail_config (void);
|
||||
void mail_config_druid (void);
|
||||
/* Identities */
|
||||
MailConfigIdentity *identity_copy (MailConfigIdentity *id);
|
||||
void identity_destroy (MailConfigIdentity *id);
|
||||
void identity_destroy_each (gpointer item, gpointer data);
|
||||
|
||||
const MailConfig *mail_config_fetch (void);
|
||||
/* Services */
|
||||
MailConfigService *service_copy (MailConfigService *source);
|
||||
void service_destroy (MailConfigService *source);
|
||||
void service_destroy_each (gpointer item, gpointer data);
|
||||
|
||||
/* Configuration */
|
||||
void mail_config_init (void);
|
||||
void mail_config_clear (void);
|
||||
void mail_config_read (void);
|
||||
void mail_config_write (void);
|
||||
|
||||
/* Accessor functions */
|
||||
gboolean mail_config_is_configured ();
|
||||
MailConfigIdentity *mail_config_get_default_identity (void);
|
||||
MailConfigService *mail_config_get_default_source (void);
|
||||
MailConfigService *mail_config_get_transport (void);
|
||||
gboolean mail_config_send_html ();
|
||||
|
||||
MailConfig *mail_config_fetch (void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -103,17 +103,12 @@ async_mail_exception_dialog (char *head, CamelException *ex, gpointer unused )
|
||||
static gboolean
|
||||
check_configured (void)
|
||||
{
|
||||
const MailConfig *config;
|
||||
|
||||
config = mail_config_fetch ();
|
||||
if (config->configured)
|
||||
if (mail_config_is_configured ())
|
||||
return TRUE;
|
||||
|
||||
mail_config_druid ();
|
||||
|
||||
config = mail_config_fetch ();
|
||||
|
||||
return config->configured;
|
||||
return mail_config_is_configured ();
|
||||
}
|
||||
|
||||
static void
|
||||
@ -361,19 +356,15 @@ real_fetch_mail (gpointer user_data)
|
||||
void
|
||||
fetch_mail (GtkWidget *button, gpointer user_data)
|
||||
{
|
||||
const MailConfig *config;
|
||||
const MailConfigService *source;
|
||||
MailConfigService *source;
|
||||
char *url = NULL;
|
||||
rfm_t *info;
|
||||
|
||||
if (!check_configured ())
|
||||
return;
|
||||
|
||||
config = mail_config_fetch ();
|
||||
if (config->sources) {
|
||||
source = (MailConfigService *)config->sources->data;
|
||||
url = source->url;
|
||||
}
|
||||
source = mail_config_get_default_source ();
|
||||
url = source->url;
|
||||
|
||||
if (!url) {
|
||||
GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (user_data),
|
||||
@ -507,7 +498,6 @@ cleanup_send_mail (gpointer userdata)
|
||||
static void
|
||||
composer_send_cb (EMsgComposer *composer, gpointer data)
|
||||
{
|
||||
const MailConfig *config;
|
||||
const MailConfigIdentity *id = NULL;
|
||||
static CamelTransport *transport = NULL;
|
||||
struct post_send_data *psd = data;
|
||||
@ -520,9 +510,9 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
|
||||
|
||||
ex = camel_exception_new ();
|
||||
|
||||
config = mail_config_fetch ();
|
||||
id = mail_config_get_default_identity ();
|
||||
|
||||
if (!check_configured() || !config->ids) {
|
||||
if (!check_configured() || !id) {
|
||||
GtkWidget *message;
|
||||
|
||||
message = gnome_warning_dialog_parented (_("You need to configure an identity\n"
|
||||
@ -536,9 +526,6 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
|
||||
if (!from) {
|
||||
CamelInternetAddress *ciaddr;
|
||||
|
||||
if (config->ids->data) {
|
||||
id = (MailConfigIdentity *)config->ids->data;
|
||||
}
|
||||
g_assert (id);
|
||||
|
||||
name = id->name;
|
||||
@ -554,9 +541,11 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
|
||||
}
|
||||
|
||||
if (!transport) {
|
||||
MailConfigService *t;
|
||||
char *url;
|
||||
|
||||
url = config->transport->url;
|
||||
t = mail_config_get_transport ();
|
||||
url = t->url;
|
||||
g_assert (url);
|
||||
|
||||
transport = camel_session_get_transport (session, url, ex);
|
||||
@ -606,15 +595,15 @@ free_psd (GtkWidget *composer, gpointer user_data)
|
||||
static GtkWidget *
|
||||
create_msg_composer (const char *url)
|
||||
{
|
||||
const MailConfig *config;
|
||||
MailConfigIdentity *id;
|
||||
gboolean send_html;
|
||||
gchar *sig_file = NULL;
|
||||
GtkWidget *composer_widget;
|
||||
|
||||
config = mail_config_fetch ();
|
||||
if (config->ids) {
|
||||
const MailConfigIdentity *id;
|
||||
|
||||
id = (MailConfigIdentity *)config->ids->data;
|
||||
id = mail_config_get_default_identity ();
|
||||
send_html = mail_config_send_html ();
|
||||
|
||||
if (id) {
|
||||
sig_file = id->sig;
|
||||
}
|
||||
|
||||
@ -624,7 +613,7 @@ create_msg_composer (const char *url)
|
||||
composer_widget = e_msg_composer_new_with_sig_file (sig_file);
|
||||
|
||||
e_msg_composer_set_send_html (E_MSG_COMPOSER (composer_widget),
|
||||
config->send_html);
|
||||
send_html);
|
||||
|
||||
return composer_widget;
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "camel/camel.h"
|
||||
#include "composer/e-msg-composer.h"
|
||||
#include "mail-config.h"
|
||||
#include "mail-config-gui.h"
|
||||
#include "folder-browser.h"
|
||||
|
||||
/* FIXME FIXME FIXME this sucks sucks sucks sucks */
|
||||
|
||||
@ -53,6 +53,8 @@ main (int argc, char *argv [])
|
||||
|
||||
glade_gnome_init ();
|
||||
|
||||
mail_config_init ();
|
||||
|
||||
session_init ();
|
||||
e_cursors_init ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user