aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog22
-rw-r--r--mail/Makefile.am12
-rw-r--r--mail/em-account-prefs.c (renamed from mail/mail-accounts.c)84
-rw-r--r--mail/em-account-prefs.h (renamed from mail/mail-accounts.h)36
-rw-r--r--mail/em-composer-prefs.c (renamed from mail/mail-composer-prefs.c)110
-rw-r--r--mail/em-composer-prefs.h (renamed from mail/mail-composer-prefs.h)40
-rw-r--r--mail/em-mailer-prefs.c (renamed from mail/mail-preferences.c)66
-rw-r--r--mail/em-mailer-prefs.h (renamed from mail/mail-preferences.h)38
-rw-r--r--mail/mail-account-editor.c6
-rw-r--r--mail/mail-account-editor.h6
-rw-r--r--mail/mail-account-gui.c6
-rw-r--r--mail/mail-account-gui.h8
-rw-r--r--mail/mail-component-factory.c18
-rw-r--r--mail/mail-component.h7
-rw-r--r--mail/mail-config-factory.c36
-rw-r--r--mail/mail-config-factory.h6
-rw-r--r--mail/mail.h3
17 files changed, 264 insertions, 240 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c2000f0b5f..4d2dc72d3a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,25 @@
+2003-10-24 Jeffrey Stedfast <fejj@ximian.com>
+
+ * em-account-prefs.[c,h]: Re-Namespaced mail-accounts.c
+
+ * em-composer-prefs.[c,h]: Re-Namespaced mail-composer-prefs.c
+
+ * em-mailer-prefs.[c,h]: Re-Namespaced mail-preferences.c
+
+ * mail-accounts.[c,h]: Removed.
+
+ * mail-composer-prefs.[c,h]: Removed.
+
+ * mail-preferences.[c,h]: Removed.
+
+ * mail-account-editor.c: Updated.
+
+ * mail-account-gui.c: Updated.
+
+ * mail-config-factory.c: Updated.
+
+ * mail-component-factory.c: Updated.
+
2003-10-22 Ettore Perazzoli <ettore@ximian.com>
* GNOME_Evolution_Mail.server.in.in: Add an
diff --git a/mail/Makefile.am b/mail/Makefile.am
index f6db73f74e..f52e6003ba 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -83,6 +83,12 @@ libevolution_mail_la_SOURCES = \
$(MAILER_IDL_GENERATED) \
e-searching-tokenizer.c \
e-searching-tokenizer.h \
+ em-account-prefs.c \
+ em-account-prefs.h \
+ em-composer-prefs.c \
+ em-composer-prefs.h \
+ em-mailer-prefs.c \
+ em-mailer-prefs.h \
em-inline-filter.c \
em-inline-filter.h \
em-folder-selection.c \
@@ -133,15 +139,11 @@ libevolution_mail_la_SOURCES = \
mail-account-editor.h \
mail-account-gui.c \
mail-account-gui.h \
- mail-accounts.c \
- mail-accounts.h \
mail-autofilter.c \
mail-autofilter.h \
mail-component-factory.c \
mail-component.c \
mail-component.h \
- mail-composer-prefs.c \
- mail-composer-prefs.h \
mail-config.c \
mail-config.h \
mail-config-druid.c \
@@ -150,8 +152,6 @@ libevolution_mail_la_SOURCES = \
mail-crypto.h \
mail-config-factory.c \
mail-config-factory.h \
- mail-preferences.c \
- mail-preferences.h \
mail-folder-cache.c \
mail-folder-cache.h \
mail-importer.c \
diff --git a/mail/mail-accounts.c b/mail/em-account-prefs.c
index b17652bb66..4e5008f3ef 100644
--- a/mail/mail-accounts.c
+++ b/mail/em-account-prefs.c
@@ -2,7 +2,7 @@
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
+ * Copyright 2002-2003 Ximian, Inc. (www.ximian.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
@@ -25,8 +25,6 @@
#include <config.h>
#endif
-#include "mail-accounts.h"
-
#include <camel/camel-url.h>
#include <gtk/gtkliststore.h>
@@ -42,13 +40,15 @@
#include "art/mark.xpm"
+#include "em-account-prefs.h"
+
-static void mail_accounts_tab_class_init (MailAccountsTabClass *class);
-static void mail_accounts_tab_init (MailAccountsTab *prefs);
-static void mail_accounts_tab_finalise (GObject *obj);
-static void mail_accounts_tab_destroy (GtkObject *object);
+static void em_account_prefs_class_init (EMAccountPrefsClass *class);
+static void em_account_prefs_init (EMAccountPrefs *prefs);
+static void em_account_prefs_finalise (GObject *obj);
+static void em_account_prefs_destroy (GtkObject *object);
-static void mail_accounts_load (MailAccountsTab *tab);
+static void mail_accounts_load (EMAccountPrefs *prefs);
static GdkPixbuf *disabled_pixbuf = NULL;
static GdkPixbuf *enabled_pixbuf = NULL;
@@ -60,38 +60,38 @@ static GtkVBoxClass *parent_class = NULL;
GType
-mail_accounts_tab_get_type (void)
+em_account_prefs_get_type (void)
{
static GType type = 0;
if (!type) {
GTypeInfo type_info = {
- sizeof (MailAccountsTabClass),
+ sizeof (EMAccountPrefsClass),
NULL, NULL,
- (GClassInitFunc) mail_accounts_tab_class_init,
+ (GClassInitFunc) em_account_prefs_class_init,
NULL, NULL,
- sizeof (MailAccountsTab),
+ sizeof (EMAccountPrefs),
0,
- (GInstanceInitFunc) mail_accounts_tab_init,
+ (GInstanceInitFunc) em_account_prefs_init,
};
- type = g_type_register_static (gtk_vbox_get_type (), "MailAccountsTab", &type_info, 0);
+ type = g_type_register_static (gtk_vbox_get_type (), "EMAccountPrefs", &type_info, 0);
}
return type;
}
static void
-mail_accounts_tab_class_init (MailAccountsTabClass *klass)
+em_account_prefs_class_init (EMAccountPrefsClass *klass)
{
GtkObjectClass *gtk_object_class = (GtkObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (gtk_vbox_get_type ());
- gtk_object_class->destroy = mail_accounts_tab_destroy;
+ gtk_object_class->destroy = em_account_prefs_destroy;
- object_class->finalize = mail_accounts_tab_finalise;
+ object_class->finalize = em_account_prefs_finalise;
/* setup static data */
disabled_pixbuf = NULL;
@@ -99,7 +99,7 @@ mail_accounts_tab_class_init (MailAccountsTabClass *klass)
}
static void
-mail_accounts_tab_init (MailAccountsTab *prefs)
+em_account_prefs_init (EMAccountPrefs *prefs)
{
prefs->druid = NULL;
prefs->editor = NULL;
@@ -108,9 +108,9 @@ mail_accounts_tab_init (MailAccountsTab *prefs)
}
static void
-mail_accounts_tab_destroy (GtkObject *obj)
+em_account_prefs_destroy (GtkObject *obj)
{
- MailAccountsTab *prefs = (MailAccountsTab *) obj;
+ EMAccountPrefs *prefs = (EMAccountPrefs *) obj;
prefs->destroyed = TRUE;
@@ -118,9 +118,9 @@ mail_accounts_tab_destroy (GtkObject *obj)
}
static void
-mail_accounts_tab_finalise (GObject *obj)
+em_account_prefs_finalise (GObject *obj)
{
- MailAccountsTab *prefs = (MailAccountsTab *) obj;
+ EMAccountPrefs *prefs = (EMAccountPrefs *) obj;
g_object_unref (prefs->gui);
gdk_pixmap_unref (prefs->mark_pixmap);
@@ -130,7 +130,7 @@ mail_accounts_tab_finalise (GObject *obj)
}
static void
-account_add_finished (MailAccountsTab *prefs, GObject *deadbeef)
+account_add_finished (EMAccountPrefs *prefs, GObject *deadbeef)
{
/* Either Cancel or Finished was clicked in the druid so reload the accounts */
prefs->druid = NULL;
@@ -144,7 +144,7 @@ account_add_finished (MailAccountsTab *prefs, GObject *deadbeef)
static void
account_add_clicked (GtkButton *button, gpointer user_data)
{
- MailAccountsTab *prefs = (MailAccountsTab *) user_data;
+ EMAccountPrefs *prefs = (EMAccountPrefs *) user_data;
GtkWidget *parent;
if (prefs->druid == NULL) {
@@ -165,7 +165,7 @@ account_add_clicked (GtkButton *button, gpointer user_data)
}
static void
-account_edit_finished (MailAccountsTab *prefs, GObject *deadbeef)
+account_edit_finished (EMAccountPrefs *prefs, GObject *deadbeef)
{
prefs->editor = NULL;
@@ -178,7 +178,7 @@ account_edit_finished (MailAccountsTab *prefs, GObject *deadbeef)
static void
account_edit_clicked (GtkButton *button, gpointer user_data)
{
- MailAccountsTab *prefs = (MailAccountsTab *) user_data;
+ EMAccountPrefs *prefs = (EMAccountPrefs *) user_data;
if (prefs->editor == NULL) {
GtkTreeSelection *selection;
@@ -210,7 +210,7 @@ account_edit_clicked (GtkButton *button, gpointer user_data)
static void
account_delete_clicked (GtkButton *button, gpointer user_data)
{
- MailAccountsTab *prefs = user_data;
+ EMAccountPrefs *prefs = user_data;
GtkTreeSelection *selection;
EAccount *account = NULL;
EAccountList *accounts;
@@ -277,7 +277,7 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
static void
account_default_clicked (GtkButton *button, gpointer user_data)
{
- MailAccountsTab *prefs = user_data;
+ EMAccountPrefs *prefs = user_data;
GtkTreeSelection *selection;
EAccount *account = NULL;
GtkTreeModel *model;
@@ -300,7 +300,7 @@ static void
account_able_clicked (GtkButton *button, gpointer user_data)
{
MailComponent *component = mail_component_peek ();
- MailAccountsTab *prefs = user_data;
+ EMAccountPrefs *prefs = user_data;
GtkTreeSelection *selection;
EAccount *account = NULL;
GtkTreeModel *model;
@@ -336,7 +336,7 @@ account_able_clicked (GtkButton *button, gpointer user_data)
static void
account_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user_data)
{
- MailAccountsTab *prefs = user_data;
+ EMAccountPrefs *prefs = user_data;
GtkTreeSelection *selection;
EAccount *account = NULL;
GtkTreeModel *model;
@@ -377,13 +377,13 @@ account_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user
static void
account_double_click (GtkTreeView *treeview, GtkTreePath *path,
- GtkTreeViewColumn *column, MailAccountsTab *prefs)
+ GtkTreeViewColumn *column, EMAccountPrefs *prefs)
{
account_edit_clicked (NULL, prefs);
}
static void
-account_cursor_change (GtkTreeSelection *selection, MailAccountsTab *prefs)
+account_cursor_change (GtkTreeSelection *selection, EMAccountPrefs *prefs)
{
EAccount *account = NULL;
GtkTreeModel *model;
@@ -408,7 +408,7 @@ account_cursor_change (GtkTreeSelection *selection, MailAccountsTab *prefs)
}
static void
-mail_accounts_load (MailAccountsTab *prefs)
+mail_accounts_load (EMAccountPrefs *prefs)
{
EAccount *default_account;
EAccountList *accounts;
@@ -463,11 +463,11 @@ mail_accounts_load (MailAccountsTab *prefs)
-GtkWidget *mail_accounts_treeview_new (char *widget_name, char *string1, char *string2,
- int int1, int int2);
+GtkWidget *em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2,
+ int int1, int int2);
GtkWidget *
-mail_accounts_treeview_new (char *widget_name, char *string1, char *string2, int int1, int int2)
+em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2, int int1, int int2)
{
GtkWidget *table, *scrolled;
GtkTreeSelection *selection;
@@ -513,7 +513,7 @@ mail_accounts_treeview_new (char *widget_name, char *string1, char *string2, int
}
static void
-mail_accounts_tab_construct (MailAccountsTab *prefs)
+em_account_prefs_construct (EMAccountPrefs *prefs)
{
GtkWidget *toplevel, *widget;
GtkCellRenderer *renderer;
@@ -561,12 +561,12 @@ mail_accounts_tab_construct (MailAccountsTab *prefs)
GtkWidget *
-mail_accounts_tab_new (GNOME_Evolution_Shell shell)
+em_account_prefs_new (GNOME_Evolution_Shell shell)
{
- MailAccountsTab *new;
+ EMAccountPrefs *new;
- new = (MailAccountsTab *) g_object_new (mail_accounts_tab_get_type (), NULL);
- mail_accounts_tab_construct (new);
+ new = (EMAccountPrefs *) g_object_new (em_account_prefs_get_type (), NULL);
+ em_account_prefs_construct (new);
new->shell = shell;
return (GtkWidget *) new;
@@ -574,7 +574,7 @@ mail_accounts_tab_new (GNOME_Evolution_Shell shell)
void
-mail_accounts_tab_apply (MailAccountsTab *prefs)
+em_account_prefs_apply (EMAccountPrefs *prefs)
{
/* nothing to do here... */
}
diff --git a/mail/mail-accounts.h b/mail/em-account-prefs.h
index 0c046fa428..55cf27ec1c 100644
--- a/mail/mail-accounts.h
+++ b/mail/em-account-prefs.h
@@ -2,7 +2,7 @@
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
+ * Copyright 2002-2003 Ximian, Inc. (www.ximian.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
@@ -21,13 +21,13 @@
*/
-#ifndef __MAIL_ACCOUNTS_TAB_H__
-#define __MAIL_ACCOUNTS_TAB_H__
+#ifndef __EM_ACCOUNT_PREFS_H__
+#define __EM_ACCOUNT_PREFS_H__
#ifdef __cplusplus
extern "C" {
#pragma }
-#endif
+#endif /* __cplusplus */
#include <gtk/gtkvbox.h>
#include <gtk/gtkbutton.h>
@@ -42,16 +42,16 @@ extern "C" {
#include <shell/Evolution.h>
-#define MAIL_ACCOUNTS_TAB_TYPE (mail_accounts_tab_get_type ())
-#define MAIL_ACCOUNTS_TAB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_ACCOUNTS_TAB_TYPE, MailAccountsTab))
-#define MAIL_ACCOUNTS_TAB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_ACCOUNTS_TAB_TYPE, MailAccountsTabClass))
-#define IS_MAIL_ACCOUNTS_TAB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_ACCOUNTS_TAB_TYPE))
-#define IS_MAIL_ACCOUNTS_TAB_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_ACCOUNTS_TAB_TYPE))
+#define EM_ACCOUNT_PREFS_TYPE (em_account_prefs_get_type ())
+#define EM_ACCOUNT_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_ACCOUNT_PREFS_TYPE, EMAccountPrefs))
+#define EM_ACCOUNT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_ACCOUNT_PREFS_TYPE, EMAccountPrefsClass))
+#define EM_IS_ACCOUNT_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_ACCOUNT_PREFS_TYPE))
+#define EM_IS_ACCOUNT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_ACCOUNT_PREFS_TYPE))
-typedef struct _MailAccountsTab MailAccountsTab;
-typedef struct _MailAccountsTabClass MailAccountsTabClass;
+typedef struct _EMAccountPrefs EMAccountPrefs;
+typedef struct _EMAccountPrefsClass EMAccountPrefsClass;
-struct _MailAccountsTab {
+struct _EMAccountPrefs {
GtkVBox parent_object;
GNOME_Evolution_Shell shell;
@@ -75,7 +75,7 @@ struct _MailAccountsTab {
guint destroyed : 1;
};
-struct _MailAccountsTabClass {
+struct _EMAccountPrefsClass {
GtkVBoxClass parent_class;
/* signals */
@@ -83,17 +83,17 @@ struct _MailAccountsTabClass {
};
-GtkType mail_accounts_tab_get_type (void);
+GtkType em_account_prefs_get_type (void);
-GtkWidget *mail_accounts_tab_new (GNOME_Evolution_Shell shell);
+GtkWidget *em_account_prefs_new (GNOME_Evolution_Shell shell);
-void mail_accounts_tab_apply (MailAccountsTab *accounts);
+void em_account_prefs_apply (EMAccountPrefs *prefs);
/* needed by global config */
-#define MAIL_ACCOUNTS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_Accounts_ConfigControl"
+#define EM_ACCOUNT_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_Accounts_ConfigControl"
#ifdef __cplusplus
}
#endif
-#endif /* __MAIL_ACCOUNTS_TAB_H__ */
+#endif /* __EM_ACCOUNT_PREFS_H__ */
diff --git a/mail/mail-composer-prefs.c b/mail/em-composer-prefs.c
index 06e16c4e48..f16e254ccf 100644
--- a/mail/mail-composer-prefs.c
+++ b/mail/em-composer-prefs.c
@@ -2,7 +2,7 @@
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
+ * Copyright 2002-2003 Ximian, Inc. (www.ximian.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
@@ -27,7 +27,7 @@
#include <string.h>
-#include "mail-composer-prefs.h"
+#include "em-composer-prefs.h"
#include "composer/e-msg-composer.h"
#include <bonobo/bonobo-generic-factory.h>
@@ -49,52 +49,52 @@
#define d(x)
-static void mail_composer_prefs_class_init (MailComposerPrefsClass *class);
-static void mail_composer_prefs_init (MailComposerPrefs *dialog);
-static void mail_composer_prefs_destroy (GtkObject *obj);
-static void mail_composer_prefs_finalise (GObject *obj);
+static void em_composer_prefs_class_init (EMComposerPrefsClass *class);
+static void em_composer_prefs_init (EMComposerPrefs *dialog);
+static void em_composer_prefs_destroy (GtkObject *obj);
+static void em_composer_prefs_finalise (GObject *obj);
-static void sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailComposerPrefs *prefs);
+static void sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, EMComposerPrefs *prefs);
static GtkVBoxClass *parent_class = NULL;
GType
-mail_composer_prefs_get_type (void)
+em_composer_prefs_get_type (void)
{
static GType type = 0;
if (!type) {
static const GTypeInfo info = {
- sizeof (MailComposerPrefsClass),
+ sizeof (EMComposerPrefsClass),
NULL, NULL,
- (GClassInitFunc) mail_composer_prefs_class_init,
+ (GClassInitFunc) em_composer_prefs_class_init,
NULL, NULL,
- sizeof (MailComposerPrefs),
+ sizeof (EMComposerPrefs),
0,
- (GInstanceInitFunc) mail_composer_prefs_init,
+ (GInstanceInitFunc) em_composer_prefs_init,
};
- type = g_type_register_static (gtk_vbox_get_type (), "MailComposerPrefs", &info, 0);
+ type = g_type_register_static (gtk_vbox_get_type (), "EMComposerPrefs", &info, 0);
}
return type;
}
static void
-mail_composer_prefs_class_init (MailComposerPrefsClass *klass)
+em_composer_prefs_class_init (EMComposerPrefsClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
parent_class = g_type_class_ref (gtk_vbox_get_type ());
- object_class->destroy = mail_composer_prefs_destroy;
- gobject_class->finalize = mail_composer_prefs_finalise;
+ object_class->destroy = em_composer_prefs_destroy;
+ gobject_class->finalize = em_composer_prefs_finalise;
}
static void
-mail_composer_prefs_init (MailComposerPrefs *composer_prefs)
+em_composer_prefs_init (EMComposerPrefs *composer_prefs)
{
composer_prefs->enabled_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) mark_xpm);
gdk_pixbuf_render_pixmap_and_mask (composer_prefs->enabled_pixbuf,
@@ -102,9 +102,9 @@ mail_composer_prefs_init (MailComposerPrefs *composer_prefs)
}
static void
-mail_composer_prefs_finalise (GObject *obj)
+em_composer_prefs_finalise (GObject *obj)
{
- MailComposerPrefs *prefs = (MailComposerPrefs *) obj;
+ EMComposerPrefs *prefs = (EMComposerPrefs *) obj;
g_object_unref (prefs->gui);
g_object_unref (prefs->enabled_pixbuf);
@@ -115,9 +115,9 @@ mail_composer_prefs_finalise (GObject *obj)
}
static void
-mail_composer_prefs_destroy (GtkObject *obj)
+em_composer_prefs_destroy (GtkObject *obj)
{
- MailComposerPrefs *prefs = (MailComposerPrefs *) obj;
+ EMComposerPrefs *prefs = (EMComposerPrefs *) obj;
mail_config_signature_unregister_client ((MailConfigSignatureClient) sig_event_client, prefs);
@@ -137,7 +137,7 @@ attach_style_info (GtkWidget *item, gpointer user_data)
static void
toggle_button_toggled (GtkWidget *widget, gpointer user_data)
{
- MailComposerPrefs *prefs = (MailComposerPrefs *) user_data;
+ EMComposerPrefs *prefs = (EMComposerPrefs *) user_data;
if (prefs->control)
evolution_config_control_changed (prefs->control);
@@ -146,7 +146,7 @@ toggle_button_toggled (GtkWidget *widget, gpointer user_data)
static void
menu_changed (GtkWidget *widget, gpointer user_data)
{
- MailComposerPrefs *prefs = (MailComposerPrefs *) user_data;
+ EMComposerPrefs *prefs = (EMComposerPrefs *) user_data;
if (prefs->control)
evolution_config_control_changed (prefs->control);
@@ -169,7 +169,7 @@ option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
}
static void
-sig_load_preview (MailComposerPrefs *prefs, MailConfigSignature *sig)
+sig_load_preview (EMComposerPrefs *prefs, MailConfigSignature *sig)
{
char *str;
@@ -205,7 +205,7 @@ sig_load_preview (MailComposerPrefs *prefs, MailConfigSignature *sig)
}
static void
-sig_edit_cb (GtkWidget *widget, MailComposerPrefs *prefs)
+sig_edit_cb (GtkWidget *widget, EMComposerPrefs *prefs)
{
GtkTreeSelection *selection;
MailConfigSignature *sig;
@@ -248,7 +248,7 @@ sig_edit_cb (GtkWidget *widget, MailComposerPrefs *prefs)
}
MailConfigSignature *
-mail_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char *script)
+em_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char *script)
{
MailConfigSignature *sig;
@@ -259,7 +259,7 @@ mail_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char
}
static void
-sig_delete_cb (GtkWidget *widget, MailComposerPrefs *prefs)
+sig_delete_cb (GtkWidget *widget, EMComposerPrefs *prefs)
{
MailConfigSignature *sig;
GtkTreeModel *model;
@@ -275,7 +275,7 @@ sig_delete_cb (GtkWidget *widget, MailComposerPrefs *prefs)
}
static void
-sig_add_cb (GtkWidget *widget, MailComposerPrefs *prefs)
+sig_add_cb (GtkWidget *widget, EMComposerPrefs *prefs)
{
GConfClient *gconf;
gboolean send_html;
@@ -287,11 +287,11 @@ sig_add_cb (GtkWidget *widget, MailComposerPrefs *prefs)
parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
- mail_composer_prefs_new_signature ((GtkWindow *) parent, send_html, NULL);
+ em_composer_prefs_new_signature ((GtkWindow *) parent, send_html, NULL);
}
static void
-sig_add_script_response (GtkWidget *widget, int button, MailComposerPrefs *prefs)
+sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs)
{
const char *script, *name;
GtkWidget *dialog;
@@ -317,7 +317,7 @@ sig_add_script_response (GtkWidget *widget, int button, MailComposerPrefs *prefs
/* we're just editing an existing signature script */
mail_config_signature_set_name (sig, name);
} else {
- sig = mail_composer_prefs_new_signature ((GtkWindow *) parent, TRUE, script);
+ sig = em_composer_prefs_new_signature ((GtkWindow *) parent, TRUE, script);
mail_config_signature_set_name (sig, name);
mail_config_signature_add (sig);
}
@@ -341,7 +341,7 @@ sig_add_script_response (GtkWidget *widget, int button, MailComposerPrefs *prefs
}
static void
-sig_add_script_cb (GtkWidget *widget, MailComposerPrefs *prefs)
+sig_add_script_cb (GtkWidget *widget, EMComposerPrefs *prefs)
{
GtkWidget *entry;
@@ -355,7 +355,7 @@ sig_add_script_cb (GtkWidget *widget, MailComposerPrefs *prefs)
}
static void
-sig_selection_changed (GtkTreeSelection *selection, MailComposerPrefs *prefs)
+sig_selection_changed (GtkTreeSelection *selection, EMComposerPrefs *prefs)
{
MailConfigSignature *sig;
GtkTreeModel *model;
@@ -425,7 +425,7 @@ url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle)
}
static void
-sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailComposerPrefs *prefs)
+sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, EMComposerPrefs *prefs)
{
MailConfigSignature *current;
GtkTreeSelection *selection;
@@ -485,7 +485,7 @@ sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailCompos
#define SPELL_API_VERSION "0.3"
static void
-spell_set_ui (MailComposerPrefs *prefs)
+spell_set_ui (EMComposerPrefs *prefs)
{
GtkListStore *model;
GtkTreeIter iter;
@@ -525,7 +525,7 @@ spell_set_ui (MailComposerPrefs *prefs)
}
static gchar *
-spell_get_language_str (MailComposerPrefs *prefs)
+spell_get_language_str (EMComposerPrefs *prefs)
{
GString *str = g_string_new ("");
GtkListStore *model;
@@ -555,7 +555,7 @@ spell_get_language_str (MailComposerPrefs *prefs)
}
static void
-spell_get_ui (MailComposerPrefs *prefs)
+spell_get_ui (EMComposerPrefs *prefs)
{
gnome_color_picker_get_i16 (GNOME_COLOR_PICKER (prefs->colour),
&prefs->spell_error_color.red,
@@ -571,7 +571,7 @@ spell_get_ui (MailComposerPrefs *prefs)
gconf_value_free (val); }
static void
-spell_save_orig (MailComposerPrefs *prefs)
+spell_save_orig (EMComposerPrefs *prefs)
{
g_free (prefs->language_str_orig);
prefs->language_str_orig = g_strdup (prefs->language_str ? prefs->language_str : "");
@@ -579,7 +579,7 @@ spell_save_orig (MailComposerPrefs *prefs)
}
/* static void
-spell_load_orig (MailComposerPrefs *prefs)
+spell_load_orig (EMComposerPrefs *prefs)
{
g_free (prefs->language_str);
prefs->language_str = g_strdup (prefs->language_str_orig);
@@ -587,7 +587,7 @@ spell_load_orig (MailComposerPrefs *prefs)
} */
static void
-spell_load_values (MailComposerPrefs *prefs)
+spell_load_values (EMComposerPrefs *prefs)
{
GConfValue *val;
char *def_lang;
@@ -618,7 +618,7 @@ spell_load_values (MailComposerPrefs *prefs)
#define STR_EQUAL(str1, str2) ((str1 == NULL && str2 == NULL) || (str1 && str2 && !strcmp (str1, str2)))
static void
-spell_save_values (MailComposerPrefs *prefs, gboolean force)
+spell_save_values (EMComposerPrefs *prefs, gboolean force)
{
if (force || !gdk_color_equal (&prefs->spell_error_color, &prefs->spell_error_color_orig)) {
SET (int, "/spell_error_color_red", prefs->spell_error_color.red);
@@ -634,14 +634,14 @@ spell_save_values (MailComposerPrefs *prefs, gboolean force)
}
static void
-spell_apply (MailComposerPrefs *prefs)
+spell_apply (EMComposerPrefs *prefs)
{
spell_get_ui (prefs);
spell_save_values (prefs, FALSE);
}
/* static void
-spell_revert (MailComposerPrefs *prefs)
+spell_revert (EMComposerPrefs *prefs)
{
spell_load_orig (prefs);
spell_set_ui (prefs);
@@ -651,7 +651,7 @@ spell_revert (MailComposerPrefs *prefs)
static void
spell_changed (gpointer user_data)
{
- MailComposerPrefs *prefs = (MailComposerPrefs *) user_data;
+ EMComposerPrefs *prefs = (EMComposerPrefs *) user_data;
if (prefs->control)
evolution_config_control_changed (prefs->control);
@@ -664,7 +664,7 @@ spell_color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, gpointer
}
static void
-spell_language_selection_changed (GtkTreeSelection *selection, MailComposerPrefs *prefs)
+spell_language_selection_changed (GtkTreeSelection *selection, EMComposerPrefs *prefs)
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -679,7 +679,7 @@ spell_language_selection_changed (GtkTreeSelection *selection, MailComposerPrefs
}
static void
-spell_language_enable (GtkWidget *widget, MailComposerPrefs *prefs)
+spell_language_enable (GtkWidget *widget, EMComposerPrefs *prefs)
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -696,7 +696,7 @@ spell_language_enable (GtkWidget *widget, MailComposerPrefs *prefs)
}
static gboolean
-spell_language_button_press (GtkTreeView *tv, GdkEventButton *event, MailComposerPrefs *prefs)
+spell_language_button_press (GtkTreeView *tv, GdkEventButton *event, EMComposerPrefs *prefs)
{
GtkTreePath *path = NULL;
GtkTreeViewColumn *column = NULL;
@@ -722,7 +722,7 @@ spell_language_button_press (GtkTreeView *tv, GdkEventButton *event, MailCompose
}
static void
-spell_setup (MailComposerPrefs *prefs)
+spell_setup (EMComposerPrefs *prefs)
{
GtkListStore *model;
GtkTreeIter iter;
@@ -750,7 +750,7 @@ spell_setup (MailComposerPrefs *prefs)
}
static gboolean
-spell_setup_check_options (MailComposerPrefs *prefs)
+spell_setup_check_options (EMComposerPrefs *prefs)
{
GNOME_Spell_Dictionary dict;
CORBA_Environment ev;
@@ -785,7 +785,7 @@ spell_setup_check_options (MailComposerPrefs *prefs)
*/
static void
-mail_composer_prefs_construct (MailComposerPrefs *prefs)
+em_composer_prefs_construct (EMComposerPrefs *prefs)
{
GtkWidget *toplevel, *widget, *menu, *info_pixmap;
GtkDialog *dialog;
@@ -943,19 +943,19 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
GtkWidget *
-mail_composer_prefs_new (void)
+em_composer_prefs_new (void)
{
- MailComposerPrefs *new;
+ EMComposerPrefs *new;
- new = (MailComposerPrefs *) g_object_new (mail_composer_prefs_get_type (), NULL);
- mail_composer_prefs_construct (new);
+ new = (EMComposerPrefs *) g_object_new (em_composer_prefs_get_type (), NULL);
+ em_composer_prefs_construct (new);
return (GtkWidget *) new;
}
void
-mail_composer_prefs_apply (MailComposerPrefs *prefs)
+em_composer_prefs_apply (EMComposerPrefs *prefs)
{
GtkWidget *menu, *item;
char *string;
diff --git a/mail/mail-composer-prefs.h b/mail/em-composer-prefs.h
index 6c181c3d8a..0e4ad636c4 100644
--- a/mail/mail-composer-prefs.h
+++ b/mail/em-composer-prefs.h
@@ -2,7 +2,7 @@
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
+ * Copyright 2002-2003 Ximian, Inc. (www.ximian.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
@@ -21,13 +21,13 @@
*/
-#ifndef __MAIL_COMPOSER_PREFS_H__
-#define __MAIL_COMPOSER_PREFS_H__
+#ifndef __EM_COMPOSER_PREFS_H__
+#define __EM_COMPOSER_PREFS_H__
#ifdef __cplusplus
extern "C" {
#pragma }
-#endif
+#endif /* __cplusplus */
#include <gtk/gtk.h>
#include <glade/glade.h>
@@ -44,16 +44,16 @@ extern "C" {
#include <shell/Evolution.h>
#include "Spell.h"
-#define MAIL_COMPOSER_PREFS_TYPE (mail_composer_prefs_get_type ())
-#define MAIL_COMPOSER_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_COMPOSER_PREFS_TYPE, MailComposerPrefs))
-#define MAIL_COMPOSER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_COMPOSER_PREFS_TYPE, MailComposerPrefsClass))
-#define IS_MAIL_COMPOSER_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_COMPOSER_PREFS_TYPE))
-#define IS_MAIL_COMPOSER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_COMPOSER_PREFS_TYPE))
+#define EM_COMPOSER_PREFS_TYPE (em_composer_prefs_get_type ())
+#define EM_COMPOSER_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_COMPOSER_PREFS_TYPE, EMComposerPrefs))
+#define EM_COMPOSER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_COMPOSER_PREFS_TYPE, EMComposerPrefsClass))
+#define EM_IS_COMPOSER_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_COMPOSER_PREFS_TYPE))
+#define EM_IS_COMPOSER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_COMPOSER_PREFS_TYPE))
-typedef struct _MailComposerPrefs MailComposerPrefs;
-typedef struct _MailComposerPrefsClass MailComposerPrefsClass;
+typedef struct _EMComposerPrefs EMComposerPrefs;
+typedef struct _EMComposerPrefsClass EMComposerPrefsClass;
-struct _MailComposerPrefs {
+struct _EMComposerPrefs {
GtkVBox parent_object;
EvolutionConfigControl *control;
@@ -104,7 +104,7 @@ struct _MailComposerPrefs {
GtkWidget *sig_script_dialog;
};
-struct _MailComposerPrefsClass {
+struct _EMComposerPrefsClass {
GtkVBoxClass parent_class;
/* signals */
@@ -112,19 +112,19 @@ struct _MailComposerPrefsClass {
};
-GType mail_composer_prefs_get_type (void);
+GType em_composer_prefs_get_type (void);
-GtkWidget *mail_composer_prefs_new (void);
+GtkWidget *em_composer_prefs_new (void);
-void mail_composer_prefs_apply (MailComposerPrefs *prefs);
+void em_composer_prefs_apply (EMComposerPrefs *prefs);
-MailConfigSignature *mail_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char *script);
+MailConfigSignature *em_composer_prefs_new_signature (GtkWindow *parent, gboolean html, const char *script);
/* needed by global config */
-#define MAIL_COMPOSER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl"
+#define EM_COMPOSER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl"
#ifdef __cplusplus
}
-#endif
+#endif /* __cplusplus */
-#endif /* __MAIL_COMPOSER_PREFS_H__ */
+#endif /* __EM_COMPOSER_PREFS_H__ */
diff --git a/mail/mail-preferences.c b/mail/em-mailer-prefs.c
index 43f3a438f7..b391af1655 100644
--- a/mail/mail-preferences.c
+++ b/mail/em-mailer-prefs.c
@@ -2,7 +2,7 @@
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
+ * Copyright 2002-2003 Ximian, Inc. (www.ximian.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
@@ -27,7 +27,7 @@
#include <string.h>
-#include "mail-preferences.h"
+#include "em-mailer-prefs.h"
#include <gal/util/e-iconv.h>
#include <gtkhtml/gtkhtml-properties.h>
@@ -37,56 +37,56 @@
#include "mail-config.h"
-static void mail_preferences_class_init (MailPreferencesClass *class);
-static void mail_preferences_init (MailPreferences *dialog);
-static void mail_preferences_finalise (GObject *obj);
+static void em_mailer_prefs_class_init (EMMailerPrefsClass *class);
+static void em_mailer_prefs_init (EMMailerPrefs *dialog);
+static void em_mailer_prefs_finalise (GObject *obj);
static GtkVBoxClass *parent_class = NULL;
GtkType
-mail_preferences_get_type (void)
+em_mailer_prefs_get_type (void)
{
static GType type = 0;
if (!type) {
GTypeInfo type_info = {
- sizeof (MailPreferencesClass),
+ sizeof (EMMailerPrefsClass),
NULL, NULL,
- (GClassInitFunc) mail_preferences_class_init,
+ (GClassInitFunc) em_mailer_prefs_class_init,
NULL, NULL,
- sizeof (MailPreferences),
+ sizeof (EMMailerPrefs),
0,
- (GInstanceInitFunc) mail_preferences_init,
+ (GInstanceInitFunc) em_mailer_prefs_init,
};
- type = g_type_register_static (gtk_vbox_get_type (), "MailPreferences", &type_info, 0);
+ type = g_type_register_static (gtk_vbox_get_type (), "EMMailerPrefs", &type_info, 0);
}
return type;
}
static void
-mail_preferences_class_init (MailPreferencesClass *klass)
+em_mailer_prefs_class_init (EMMailerPrefsClass *klass)
{
GObjectClass *object_class;
object_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (gtk_vbox_get_type ());
- object_class->finalize = mail_preferences_finalise;
+ object_class->finalize = em_mailer_prefs_finalise;
}
static void
-mail_preferences_init (MailPreferences *preferences)
+em_mailer_prefs_init (EMMailerPrefs *preferences)
{
preferences->gconf = mail_config_get_gconf_client ();
}
static void
-mail_preferences_finalise (GObject *obj)
+em_mailer_prefs_finalise (GObject *obj)
{
- MailPreferences *prefs = (MailPreferences *) obj;
+ EMMailerPrefs *prefs = (EMMailerPrefs *) obj;
g_object_unref (prefs->gui);
@@ -126,7 +126,7 @@ colorpicker_get_color (GnomeColorPicker *color)
static void
settings_changed (GtkWidget *widget, gpointer user_data)
{
- MailPreferences *prefs = (MailPreferences *) user_data;
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
if (prefs->control)
evolution_config_control_changed (prefs->control);
@@ -135,7 +135,7 @@ settings_changed (GtkWidget *widget, gpointer user_data)
static void
font_share_changed (GtkWidget *w, gpointer user_data)
{
- MailPreferences *prefs = (MailPreferences *) user_data;
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
gboolean use_custom;
use_custom = !gtk_toggle_button_get_active (prefs->font_share);
@@ -150,7 +150,7 @@ font_share_changed (GtkWidget *w, gpointer user_data)
static void
font_changed (GnomeFontPicker *fontpicker, gchar *arg1, gpointer user_data)
{
- MailPreferences *prefs = (MailPreferences *) user_data;
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
if (prefs->control)
evolution_config_control_changed (prefs->control);
@@ -159,7 +159,7 @@ font_changed (GnomeFontPicker *fontpicker, gchar *arg1, gpointer user_data)
static void
color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, gpointer user_data)
{
- MailPreferences *prefs = (MailPreferences *) user_data;
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
if (prefs->control)
evolution_config_control_changed (prefs->control);
@@ -168,7 +168,7 @@ color_set (GtkWidget *widget, guint r, guint g, guint b, guint a, gpointer user_
static void
restore_labels_clicked (GtkWidget *widget, gpointer user_data)
{
- MailPreferences *prefs = (MailPreferences *) user_data;
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
int i;
for (i = 0; i < 5; i++) {
@@ -180,7 +180,7 @@ restore_labels_clicked (GtkWidget *widget, gpointer user_data)
static void
menu_changed (GtkWidget *widget, gpointer user_data)
{
- MailPreferences *prefs = (MailPreferences *) user_data;
+ EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
if (prefs->control)
evolution_config_control_changed (prefs->control);
@@ -203,7 +203,7 @@ option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
}
static void
-mail_preferences_construct (MailPreferences *prefs)
+em_mailer_prefs_construct (EMMailerPrefs *prefs)
{
GtkWidget *toplevel, *menu;
GSList *list;
@@ -364,24 +364,24 @@ mail_preferences_construct (MailPreferences *prefs)
GtkWidget *
-mail_preferences_new (void)
+em_mailer_prefs_new (void)
{
- MailPreferences *new;
+ EMMailerPrefs *new;
- new = (MailPreferences *) g_object_new (mail_preferences_get_type (), NULL);
- mail_preferences_construct (new);
+ new = (EMMailerPrefs *) g_object_new (em_mailer_prefs_get_type (), NULL);
+ em_mailer_prefs_construct (new);
return (GtkWidget *) new;
}
void
-mail_preferences_apply (MailPreferences *prefs)
+em_mailer_prefs_apply (EMMailerPrefs *prefs)
{
GtkWidget *entry, *menu;
char *string, buf[20];
const char *cstring;
- GSList *list, *l;
+ GSList *list, *l, *n;
guint32 rgb;
int i, val;
@@ -447,11 +447,10 @@ mail_preferences_apply (MailPreferences *prefs)
!gtk_toggle_button_get_active (prefs->font_share), NULL);
gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/animate_images",
gtk_toggle_button_get_active (prefs->show_animated), NULL);
-
+
gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/unwanted_html",
gtk_toggle_button_get_active (prefs->prompt_unwanted_html), NULL);
-
/* Labels and Colours */
list = NULL;
for (i = 4; i >= 0; i--) {
@@ -465,10 +464,11 @@ mail_preferences_apply (MailPreferences *prefs)
l = list;
while (l != NULL) {
+ n = l->next;
g_free (l->data);
- l = l->next;
+ g_slist_free_1 (l);
+ l = n;
}
- g_slist_free (list);
gconf_client_suggest_sync (prefs->gconf, NULL);
}
diff --git a/mail/mail-preferences.h b/mail/em-mailer-prefs.h
index bca18a316b..5f547a77a6 100644
--- a/mail/mail-preferences.h
+++ b/mail/em-mailer-prefs.h
@@ -2,7 +2,7 @@
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
+ * Copyright 2002-2003 Ximian, Inc. (www.ximian.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
@@ -21,13 +21,13 @@
*/
-#ifndef __MAIL_PREFERENCES_H__
-#define __MAIL_PREFERENCES_H__
+#ifndef __EM_MAILER_PREFS_H__
+#define __EM_MAILER_PREFS_H__
#ifdef __cplusplus
extern "C" {
#pragma }
-#endif
+#endif /* __cplusplus */
#include <gtk/gtk.h>
#include <glade/glade.h>
@@ -40,16 +40,16 @@ extern "C" {
#include <shell/Evolution.h>
-#define MAIL_PREFERENCES_TYPE (mail_preferences_get_type ())
-#define MAIL_PREFERENCES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_PREFERENCES_TYPE, MailPreferences))
-#define MAIL_PREFERENCES_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), MAIL_PREFERENCES_TYPE, MailPreferencesClass))
-#define IS_MAIL_PREFERENCES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAIL_PREFERENCES_TYPE))
-#define IS_MAIL_PREFERENCES_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAIL_PREFERENCES_TYPE))
+#define EM_MAILER_PREFS_TYPE (em_mailer_prefs_get_type ())
+#define EM_MAILER_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_MAILER_PREFS_TYPE, EMMailerPrefs))
+#define EM_MAILER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_MAILER_PREFS_TYPE, EMMailerPrefsClass))
+#define EM_IS_MAILER_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_MAILER_PREFS_TYPE))
+#define EM_IS_MAILER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_MAILER_PREFS_TYPE))
-typedef struct _MailPreferences MailPreferences;
-typedef struct _MailPreferencesClass MailPreferencesClass;
+typedef struct _EMMailerPrefs EMMailerPrefs;
+typedef struct _EMMailerPrefsClass EMMailerPrefsClass;
-struct _MailPreferences {
+struct _EMMailerPrefs {
GtkVBox parent_object;
GNOME_Evolution_Shell shell;
@@ -100,7 +100,7 @@ struct _MailPreferences {
GtkButton *restore_labels;
};
-struct _MailPreferencesClass {
+struct _EMMailerPrefsClass {
GtkVBoxClass parent_class;
/* signals */
@@ -108,17 +108,17 @@ struct _MailPreferencesClass {
};
-GtkType mail_preferences_get_type (void);
+GtkType em_mailer_prefs_get_type (void);
-GtkWidget *mail_preferences_new (void);
+GtkWidget *em_mailer_prefs_new (void);
-void mail_preferences_apply (MailPreferences *prefs);
+void em_mailer_prefs_apply (EMMailerPrefs *prefs);
/* needed by global config */
-#define MAIL_PREFERENCES_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_Preferences_ConfigControl"
+#define EM_MAILER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_Preferences_ConfigControl"
#ifdef __cplusplus
}
-#endif
+#endif /* __cplusplus */
-#endif /* __MAIL_PREFERENCES_H__ */
+#endif /* __EM_MAILER_PREFS_H__ */
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index b4cdbc7cef..d8f6c4df40 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -4,7 +4,7 @@
* Jeffrey Stedfast <fejj@ximian.com>
* Dan Winship <danw@ximian.com>
*
- * Copyright 2001 Ximian, Inc. (www.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
@@ -132,7 +132,7 @@ editor_response_cb (GtkWidget *widget, int button, gpointer user_data)
}
static void
-construct (MailAccountEditor *editor, EAccount *account, MailAccountsTab *dialog)
+construct (MailAccountEditor *editor, EAccount *account, EMAccountPrefs *dialog)
{
EAccountService *source = account->source;
@@ -162,7 +162,7 @@ construct (MailAccountEditor *editor, EAccount *account, MailAccountsTab *dialog
}
MailAccountEditor *
-mail_account_editor_new (EAccount *account, GtkWindow *parent, MailAccountsTab *dialog)
+mail_account_editor_new (EAccount *account, GtkWindow *parent, EMAccountPrefs *dialog)
{
MailAccountEditor *new;
diff --git a/mail/mail-account-editor.h b/mail/mail-account-editor.h
index 2ee67f67cf..ff66a47703 100644
--- a/mail/mail-account-editor.h
+++ b/mail/mail-account-editor.h
@@ -2,7 +2,7 @@
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2001 Ximian, Inc. (www.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
@@ -32,7 +32,7 @@ extern "C" {
#include <libgnomeui/gnome-file-entry.h>
#include "mail-account-gui.h"
-#include "mail-accounts.h"
+#include "em-account-prefs.h"
#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))
@@ -58,7 +58,7 @@ typedef struct {
GtkType mail_account_editor_get_type (void);
-MailAccountEditor *mail_account_editor_new (EAccount *account, GtkWindow *parent, MailAccountsTab *dialog);
+MailAccountEditor *mail_account_editor_new (EAccount *account, GtkWindow *parent, EMAccountPrefs *dialog);
#ifdef __cplusplus
}
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 6e6ce85d2c..263051585f 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -42,7 +42,7 @@
#include "mail-send-recv.h"
#include "mail-signature-editor.h"
#include "mail-component.h"
-#include "mail-composer-prefs.h"
+#include "em-composer-prefs.h"
#include "mail-config.h"
#include "mail-ops.h"
#include "mail-mt.h"
@@ -1308,7 +1308,7 @@ sig_add_new_signature (GtkWidget *w, MailAccountGui *gui)
parent = gtk_widget_get_toplevel (w);
parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
- gui->def_signature = mail_composer_prefs_new_signature ((GtkWindow *) parent, send_html, NULL);
+ gui->def_signature = em_composer_prefs_new_signature ((GtkWindow *) parent, send_html, NULL);
gui->auto_signature = FALSE;
gtk_option_menu_set_history (GTK_OPTION_MENU (gui->sig_option_menu), sig_gui_get_index (gui));
@@ -1407,7 +1407,7 @@ prepare_signatures (MailAccountGui *gui)
}
MailAccountGui *
-mail_account_gui_new (EAccount *account, MailAccountsTab *dialog)
+mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog)
{
MailAccountGui *gui;
GtkWidget *button;
diff --git a/mail/mail-account-gui.h b/mail/mail-account-gui.h
index d003885bd4..b2fd033491 100644
--- a/mail/mail-account-gui.h
+++ b/mail/mail-account-gui.h
@@ -4,7 +4,7 @@
* Jeffrey Stedfast <fejj@ximian.com>
* Dan Winship <danw@ximian.com>
*
- * Copyright 2001 Ximian, Inc. (www.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
@@ -36,7 +36,7 @@ extern "C" {
#include <camel/camel-provider.h>
#include "mail-config.h"
-#include "mail-accounts.h"
+#include "em-account-prefs.h"
typedef struct {
GtkOptionMenu *type;
@@ -59,7 +59,7 @@ typedef struct {
typedef struct {
EAccount *account;
- MailAccountsTab *dialog;
+ EMAccountPrefs *dialog;
GladeXML *xml;
/* identity */
@@ -114,7 +114,7 @@ typedef struct {
} MailAccountGui;
-MailAccountGui *mail_account_gui_new (EAccount *account, MailAccountsTab *dialog);
+MailAccountGui *mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog);
void mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top);
gboolean mail_account_gui_save (MailAccountGui *gui);
void mail_account_gui_destroy (MailAccountGui *gui);
diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c
index 00087b7439..d941e8edbc 100644
--- a/mail/mail-component-factory.c
+++ b/mail/mail-component-factory.c
@@ -20,16 +20,22 @@
* Boston, MA 02111-1307, USA.
*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "em-utils.h"
#include "evolution-composer.h"
-#include "mail-accounts.h"
#include "mail-component.h"
-#include "mail-composer-prefs.h"
+#include "em-account-prefs.h"
+#include "em-composer-prefs.h"
+#include "em-mailer-prefs.h"
+
#include "mail-config-druid.h"
#include "mail-config-factory.h"
#include "mail-config.h"
#include "mail-mt.h"
-#include "mail-preferences.h"
#include <bonobo-activation/bonobo-activation.h>
#include <bonobo/bonobo-shlib-factory.h>
@@ -67,9 +73,9 @@ factory (BonoboGenericFactory *factory,
return (BonoboObject *)g_object_new (evolution_mail_config_get_type (), NULL);
} else if (strcmp(component_id, WIZARD_ID) == 0) {
return evolution_mail_config_wizard_new();
- } else if (strcmp (component_id, MAIL_ACCOUNTS_CONTROL_ID) == 0
- || strcmp (component_id, MAIL_PREFERENCES_CONTROL_ID) == 0
- || strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID) == 0) {
+ } 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) {
return mail_config_control_factory_cb (factory, component_id, CORBA_OBJECT_NIL);
} else if (strcmp(component_id, COMPOSER_ID) == 0) {
/* FIXME: how to remove need for callbacks, probably make the composer more tightly integrated with mail */
diff --git a/mail/mail-component.h b/mail/mail-component.h
index 3e832752df..0a31fdc815 100644
--- a/mail/mail-component.h
+++ b/mail/mail-component.h
@@ -26,15 +26,14 @@
#ifndef _MAIL_COMPONENT_H_
#define _MAIL_COMPONENT_H_
+#include <camel/camel-store.h>
+#include <filter/rule-context.h>
#include <bonobo/bonobo-object.h>
-#include <camel/camel-store.h>
+#include "shell/e-storage-set.h"
-#include "e-storage-set.h"
#include "Evolution.h"
-#include "filter/rule-context.h"
-
#define MAIL_TYPE_COMPONENT (mail_component_get_type ())
#define MAIL_COMPONENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIL_TYPE_COMPONENT, MailComponent))
diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c
index 50fddb9be9..e2c205de94 100644
--- a/mail/mail-config-factory.c
+++ b/mail/mail-config-factory.c
@@ -27,9 +27,10 @@
#include <string.h>
-#include "mail-accounts.h"
-#include "mail-preferences.h"
-#include "mail-composer-prefs.h"
+#include "em-account-prefs.h"
+#include "em-composer-prefs.h"
+#include "em-mailer-prefs.h"
+
#include "mail-config-factory.h"
#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ConfigControlFactory"
@@ -67,16 +68,15 @@ mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *compo
data = g_new (struct _config_data, 1);
- /* TODO: should use ascii_str*cmp? */
- if (!strcmp (component_id, MAIL_ACCOUNTS_CONTROL_ID)) {
- prefs = mail_accounts_tab_new (shell);
- data->apply = (ApplyFunc) mail_accounts_tab_apply;
- } else if (!strcmp (component_id, MAIL_PREFERENCES_CONTROL_ID)) {
- prefs = mail_preferences_new ();
- data->apply = (ApplyFunc) mail_preferences_apply;
- } else if (!strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID)) {
- prefs = mail_composer_prefs_new ();
- data->apply = (ApplyFunc) mail_composer_prefs_apply;
+ if (!strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID)) {
+ prefs = em_account_prefs_new (shell);
+ data->apply = (ApplyFunc) em_account_prefs_apply;
+ } else if (!strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID)) {
+ prefs = em_mailer_prefs_new ();
+ data->apply = (ApplyFunc) em_mailer_prefs_apply;
+ } else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) {
+ prefs = em_composer_prefs_new ();
+ data->apply = (ApplyFunc) em_composer_prefs_apply;
} else {
g_assert_not_reached ();
}
@@ -88,12 +88,12 @@ mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *compo
control = evolution_config_control_new (prefs);
- if (!strcmp (component_id, MAIL_ACCOUNTS_CONTROL_ID)) {
+ if (!strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID)) {
/* nothing to do here... */
- } else if (!strcmp (component_id, MAIL_PREFERENCES_CONTROL_ID)) {
- MAIL_PREFERENCES (prefs)->control = control;
- } else if (!strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID)) {
- MAIL_COMPOSER_PREFS (prefs)->control = control;
+ } else if (!strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID)) {
+ EM_MAILER_PREFS (prefs)->control = control;
+ } else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) {
+ EM_COMPOSER_PREFS (prefs)->control = control;
} else {
g_assert_not_reached ();
}
diff --git a/mail/mail-config-factory.h b/mail/mail-config-factory.h
index 1a8993aacd..e726a51976 100644
--- a/mail/mail-config-factory.h
+++ b/mail/mail-config-factory.h
@@ -2,7 +2,7 @@
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2002 Ximian, Inc. (www.ximian.com)
+ * Copyright 2002-2003 Ximian, Inc. (www.ximian.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
@@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#pragma }
-#endif
+#endif /* __cplusplus */
#include <bonobo/bonobo-generic-factory.h>
#include "evolution-config-control.h"
@@ -40,6 +40,6 @@ BonoboObject *mail_config_control_factory_cb (BonoboGenericFactory *factory, con
#ifdef __cplusplus
}
-#endif
+#endif /* __cplusplus */
#endif /* __MAIL_CONFIG_FACTORY_H__ */
diff --git a/mail/mail.h b/mail/mail.h
index 86ca868f5f..16ad3e0136 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -24,10 +24,7 @@
#include <camel/camel.h>
#include <composer/e-msg-composer.h>
#include <shell/evolution-storage.h>
-#include "mail-accounts.h"
-#include "mail-account-editor.h"
#include "mail-config.h"
-#include "mail-config-druid.h"
#include "mail-session.h"
#include "mail-types.h"