From 2ef945c6e2ef11c4269a3729a9df7c824b0408e5 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sat, 6 May 2000 17:16:22 +0000 Subject: consolidate mail-format.h, mail-identify.h, mail-ops.h, main.h and * mail.h: consolidate mail-format.h, mail-identify.h, mail-ops.h, main.h and session.h into this new file. There's no reason to have a .h for every .c. svn path=/trunk/; revision=2830 --- mail/ChangeLog | 6 +++++ mail/Makefile.am | 6 +---- mail/folder-browser-factory.c | 5 +--- mail/folder-browser.c | 3 +-- mail/mail-display.c | 3 +-- mail/mail-format.c | 4 +-- mail/mail-format.h | 51 ------------------------------------ mail/mail-identify.c | 4 +-- mail/mail-identify.h | 1 - mail/mail-ops.c | 6 +---- mail/mail-ops.h | 8 ------ mail/mail.h | 61 +++++++++++++++++++++++++++++++++++++++++++ mail/main.c | 3 +-- mail/main.h | 6 ----- mail/session.c | 3 +-- mail/session.h | 17 ------------ 16 files changed, 76 insertions(+), 111 deletions(-) delete mode 100644 mail/mail-format.h delete mode 100644 mail/mail-identify.h delete mode 100644 mail/mail-ops.h create mode 100644 mail/mail.h delete mode 100644 mail/main.h delete mode 100644 mail/session.h diff --git a/mail/ChangeLog b/mail/ChangeLog index 88cb9d2404..74ad09c487 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2000-05-06 Dan Winship + + * mail.h: consolidate mail-format.h, mail-identify.h, mail-ops.h, + main.h and session.h into this new file. There's no reason to have + a .h for every .c. + 2000-05-05 Anders Carlsson * test-mail.c (create_container): Use the OAFIID when using an diff --git a/mail/Makefile.am b/mail/Makefile.am index 5f7701749a..d0d316160a 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -32,18 +32,14 @@ evolution_mail_SOURCES = \ folder-browser-factory.c \ folder-browser-factory.h \ mail-display.c \ - mail-display.h \ mail-format.c \ - mail-format.h \ mail-identify.c \ - mail-identify.h \ mail-ops.c \ - mail-ops.h \ main.c \ message-list.c \ message-list.h \ session.c \ - session.h + mail.h evolution_mail_LDADD = \ diff --git a/mail/folder-browser-factory.c b/mail/folder-browser-factory.c index 10f0e50a88..d2bb9c6b29 100644 --- a/mail/folder-browser-factory.c +++ b/mail/folder-browser-factory.c @@ -16,12 +16,9 @@ #include "e-util/e-util.h" #include "e-util/e-gui-utils.h" #include "folder-browser.h" -#include "main.h" +#include "mail.h" #include "shell/Evolution.h" #include "shell/evolution-service-repository.h" -#include "composer/e-msg-composer.h" -#include -#include "mail-ops.h" #ifdef USING_OAF #define CONTROL_FACTORY_ID "OAFIID:control-factory:evolution-mail:25902062-543b-4f44-8702-d90145fcdbf2" diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 15171f9461..625a006d50 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -10,9 +10,8 @@ #include #include #include "e-util/e-util.h" -#include "camel/camel-exception.h" #include "folder-browser.h" -#include "session.h" +#include "mail.h" #include "message-list.h" diff --git a/mail/mail-display.c b/mail/mail-display.c index c6eb792d52..bee6e9cc74 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -16,8 +16,7 @@ #include "e-util/e-setup.h" #include "e-util/e-util.h" #include "mail-display.h" -#include "mail-format.h" -#include "mail-ops.h" +#include "mail.h" #define PARENT_TYPE (gtk_vbox_get_type ()) diff --git a/mail/mail-format.c b/mail/mail-format.c index f883eca54b..0fb9ddaa17 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -24,10 +24,8 @@ */ #include -#include "mail-format.h" #include "mail-display.h" -#include "mail-identify.h" -#include "camel/hash-table-utils.h" +#include "mail.h" #include "e-util/e-html-utils.h" #include diff --git a/mail/mail-format.h b/mail/mail-format.h deleted file mode 100644 index 39265014d6..0000000000 --- a/mail/mail-format.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ - -/* - * Author : - * Matt Loper - * - * 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_FORMAT_H -#define MAIL_FORMAT_H - -#ifdef __cplusplus -extern "C" { -#pragma } -#endif /* __cplusplus }*/ - -#include -#include "camel/camel.h" -#include "composer/e-msg-composer.h" - -void mail_format_mime_message (CamelMimeMessage *mime_message, GtkBox *box); - -EMsgComposer *mail_generate_reply (CamelMimeMessage *mime_message, - gboolean to_all); - -EMsgComposer *mail_generate_forward (CamelMimeMessage *mime_message, - gboolean forward_as_attachment, - gboolean keep_attachments); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif // CAMEL_FORMATTER_H - diff --git a/mail/mail-identify.c b/mail/mail-identify.c index 244bd7d013..8b8e61487d 100644 --- a/mail/mail-identify.c +++ b/mail/mail-identify.c @@ -29,8 +29,7 @@ #include #include -#include "camel/camel.h" -#include "mail-identify.h" +#include "mail.h" /** * mail_identify_mime_part: @@ -44,7 +43,6 @@ mail_identify_mime_part (CamelMimePart *part) { GMimeContentField *content_type; const char *filename, *type; - CamelMimePartEncodingType encoding; content_type = camel_mime_part_get_content_type (part); diff --git a/mail/mail-identify.h b/mail/mail-identify.h deleted file mode 100644 index 30bc9f1c78..0000000000 --- a/mail/mail-identify.h +++ /dev/null @@ -1 +0,0 @@ -char *mail_identify_mime_part (CamelMimePart *part); diff --git a/mail/mail-ops.c b/mail/mail-ops.c index d9a5b6c113..b5c34b4b4a 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -26,13 +26,9 @@ #include #include #include -#include "camel/camel.h" -#include "mail-ops.h" -#include "mail-format.h" +#include "mail.h" #include "folder-browser.h" -#include "session.h" #include "e-util/e-setup.h" -#include "composer/e-msg-composer.h" #ifndef HAVE_MKSTEMP #include diff --git a/mail/mail-ops.h b/mail/mail-ops.h deleted file mode 100644 index 463e74c0ef..0000000000 --- a/mail/mail-ops.h +++ /dev/null @@ -1,8 +0,0 @@ -void fetch_mail (GtkWidget *button, gpointer user_data); -void send_msg (GtkWidget *button, gpointer user_data); -void send_to_url (const char *url); -void forward_msg (GtkWidget *button, gpointer user_data); -void reply_to_sender (GtkWidget *button, gpointer user_data); -void reply_to_all (GtkWidget *button, gpointer user_data); -void delete_msg (GtkWidget *button, gpointer user_data); -void expunge_folder (GtkWidget *button, gpointer user_data); diff --git a/mail/mail.h b/mail/mail.h new file mode 100644 index 0000000000..5c67d547d8 --- /dev/null +++ b/mail/mail.h @@ -0,0 +1,61 @@ +/* -*- 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. + */ + +#include +#include "camel/camel.h" +#include "composer/e-msg-composer.h" + +/* folder-browser-factory */ +void folder_browser_factory_init (void); + +/* mail-format */ +void mail_format_mime_message (CamelMimeMessage *mime_message, GtkBox *box); + +EMsgComposer *mail_generate_reply (CamelMimeMessage *mime_message, + gboolean to_all); + +EMsgComposer *mail_generate_forward (CamelMimeMessage *mime_message, + gboolean forward_as_attachment, + gboolean keep_attachments); + +/* mail-identify */ +char *mail_identify_mime_part (CamelMimePart *part); + +/* mail-ops */ +void fetch_mail (GtkWidget *button, gpointer user_data); +void send_msg (GtkWidget *button, gpointer user_data); +void send_to_url (const char *url); +void forward_msg (GtkWidget *button, gpointer user_data); +void reply_to_sender (GtkWidget *button, gpointer user_data); +void reply_to_all (GtkWidget *button, gpointer user_data); +void delete_msg (GtkWidget *button, gpointer user_data); +void expunge_folder (GtkWidget *button, gpointer user_data); + +/* session */ +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; diff --git a/mail/main.c b/mail/main.c index 48a207d3b5..737b6df11a 100644 --- a/mail/main.c +++ b/mail/main.c @@ -12,8 +12,7 @@ #include #include "e-util/e-gui-utils.h" #include "e-util/e-cursors.h" -#include "main.h" -#include "session.h" +#include "mail.h" #ifdef USING_OAF 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/session.c b/mail/session.c index f1d39dab46..b822d3e177 100644 --- a/mail/session.c +++ b/mail/session.c @@ -8,9 +8,8 @@ */ #include #include -#include "session.h" +#include "mail.h" #include "e-util/e-setup.h" -#include "camel/camel.h" SessionStore *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 -#include -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 */ -- cgit