Generate enum GTypes for libevolution-mail.

Steals some enum types that libemail-engine doesn't need to know about.
This commit is contained in:
Matthew Barnes
2013-11-10 13:37:34 -05:00
parent ab13a0e01a
commit 9c1975632e
7 changed files with 77 additions and 25 deletions

View File

@ -23,12 +23,6 @@
G_BEGIN_DECLS
typedef enum {
E_MAIL_FORWARD_STYLE_ATTACHED,
E_MAIL_FORWARD_STYLE_INLINE,
E_MAIL_FORWARD_STYLE_QUOTED
} EMailForwardStyle;
typedef enum {
E_MAIL_IMAGE_LOADING_POLICY_NEVER,
E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES,
@ -48,21 +42,6 @@ typedef enum {
E_MAIL_NUM_LOCAL_FOLDERS
} EMailLocalFolder;
typedef enum {
E_MAIL_REPLY_STYLE_QUOTED,
E_MAIL_REPLY_STYLE_DO_NOT_QUOTE,
E_MAIL_REPLY_STYLE_ATTACH,
E_MAIL_REPLY_STYLE_OUTLOOK
} EMailReplyStyle;
typedef enum {
E_MAIL_REPLY_TO_SENDER,
E_MAIL_REPLY_TO_RECIPIENT,
E_MAIL_REPLY_TO_FROM,
E_MAIL_REPLY_TO_ALL,
E_MAIL_REPLY_TO_LIST
} EMailReplyType;
G_END_DECLS
#endif /* E_MAIL_ENGINE_ENUMS_H */

View File

@ -2,6 +2,21 @@ SUBDIRS = . default importers
privsolib_LTLIBRARIES = libevolution-mail.la
ENUM_TYPES = e-mail-enums.h
e-mail-enumtypes.h: $(top_srcdir)/enumtypes.h.template $(ENUM_TYPES)
$(AM_V_GEN) $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.h.template \
--fhead "#ifndef E_MAIL_ENUMTYPES_H\n#define E_MAIL_ENUMTYPES_H\n" \
--ftail "#endif /* E_MAIL_ENUMTYPES_H */\n" \
$(addprefix $(srcdir)/,$(ENUM_TYPES)) > $@
e-mail-enumtypes.c: $(top_srcdir)/enumtypes.c.template $(ENUM_TYPES)
$(AM_V_GEN) $(GLIB_MKENUMS) --template $(top_srcdir)/enumtypes.c.template \
--fhead "#include \"e-mail-enumtypes.h\"" \
$(addprefix $(srcdir)/,$(ENUM_TYPES)) > $@
ENUM_GENERATED = e-mail-enumtypes.h e-mail-enumtypes.c
mailincludedir = $(privincludedir)/mail
libevolution_mail_la_CPPFLAGS = \
@ -65,6 +80,8 @@ mailinclude_HEADERS = \
e-mail-config-window.h \
e-mail-display.h \
e-mail-display-popup-extension.h \
e-mail-enums.h \
e-mail-enumtypes.h \
e-mail-folder-pane.h \
e-mail-junk-options.h \
e-mail-label-action.h \
@ -140,6 +157,7 @@ libevolution_mail_la_SOURCES = \
e-mail-config-window.c \
e-mail-display.c \
e-mail-display-popup-extension.c \
e-mail-enumtypes.c \
e-mail-folder-pane.c \
e-mail-junk-options.c \
e-mail-label-action.c \
@ -277,7 +295,7 @@ endif
dist-hook:
cd $(distdir); rm -f $(BUILT_SOURCES)
BUILT_SOURCES = $(error_DATA)
BUILT_SOURCES = $(ENUM_GENERATED) $(error_DATA)
CLEANFILES = $(BUILT_SOURCES)

50
mail/e-mail-enums.h Normal file
View File

@ -0,0 +1,50 @@
/*
* e-mail-enums.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) version 3.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the program; if not, see <http://www.gnu.org/licenses/>
*
*/
#ifndef E_MAIL_ENUMS_H
#define E_MAIL_ENUMS_H
#include <glib.h>
G_BEGIN_DECLS
typedef enum {
E_MAIL_FORWARD_STYLE_ATTACHED,
E_MAIL_FORWARD_STYLE_INLINE,
E_MAIL_FORWARD_STYLE_QUOTED
} EMailForwardStyle;
typedef enum {
E_MAIL_REPLY_STYLE_QUOTED,
E_MAIL_REPLY_STYLE_DO_NOT_QUOTE,
E_MAIL_REPLY_STYLE_ATTACH,
E_MAIL_REPLY_STYLE_OUTLOOK
} EMailReplyStyle;
typedef enum {
E_MAIL_REPLY_TO_SENDER,
E_MAIL_REPLY_TO_RECIPIENT,
E_MAIL_REPLY_TO_FROM,
E_MAIL_REPLY_TO_ALL,
E_MAIL_REPLY_TO_LIST
} EMailReplyType;
G_END_DECLS
#endif /* E_MAIL_ENUMS_H */

View File

@ -34,7 +34,6 @@
#include "shell/e-shell-utils.h"
#include "libemail-engine/e-mail-engine-enumtypes.h"
#include "libemail-engine/e-mail-utils.h"
#include "libemail-engine/mail-mt.h"
#include "libemail-engine/mail-ops.h"
@ -45,6 +44,7 @@
#include "e-mail-backend.h"
#include "e-mail-browser.h"
#include "e-mail-enumtypes.h"
#include "e-mail-reader-utils.h"
#include "e-mail-ui-session.h"
#include "e-mail-view.h"

View File

@ -34,6 +34,7 @@
#include <mail/e-mail-backend.h>
#include <mail/e-mail-display.h>
#include <mail/e-mail-enums.h>
/* Standard GObject macros */
#define E_TYPE_MAIL_READER \

View File

@ -25,10 +25,13 @@
#define EM_COMPOSER_UTILS_H
#include <em-format/e-mail-part.h>
#include <mail/e-mail-backend.h>
#include <composer/e-msg-composer.h>
#include <em-format/e-mail-part-list.h>
#include <composer/e-msg-composer.h>
#include <mail/e-mail-backend.h>
#include <mail/e-mail-enums.h>
G_BEGIN_DECLS
EMsgComposer * em_utils_compose_new_message (EShell *shell,

View File

@ -24,6 +24,7 @@
#include "e-settings-deprecated.h"
#include <shell/e-shell.h>
#include <mail/e-mail-enums.h>
#include <libemail-engine/e-mail-engine-enums.h>
#define E_SETTINGS_DEPRECATED_GET_PRIVATE(obj) \