aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-08-24 23:21:41 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-08-25 02:37:02 +0800
commitecf3434da05b1f39f793c24b38bfd278e10b5786 (patch)
tree485ed2399920ecb10dbee2b4db4c437c22574a20 /mail
parentf1d2541c487fbf7433a1b9aad8e8982ef08b85f5 (diff)
downloadgsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar.gz
gsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.tar.zst
gsoc2013-evolution-ecf3434da05b1f39f793c24b38bfd278e10b5786.zip
GObject boilerplate cleanup.
Prefer thread-safe G_DEFINE_TYPE and G_DEFINE_INTERFACE macros over manual GType registration. This is just a start... lots more to do.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-attachment-bar.c28
-rw-r--r--mail/e-mail-browser.c32
-rw-r--r--mail/e-mail-notebook-view.c26
-rw-r--r--mail/e-mail-paned-view.c34
-rw-r--r--mail/e-mail-reader.c182
-rw-r--r--mail/e-mail-reader.h16
6 files changed, 146 insertions, 172 deletions
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index b5a82dbcc1..c5ce9cf7bf 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -489,18 +489,18 @@ mail_attachment_bar_class_init (EMailAttachmentBarClass *class)
}
static void
-mail_attachment_bar_iface_init (EAttachmentViewIface *iface)
+mail_attachment_bar_interface_init (EAttachmentViewInterface *interface)
{
- iface->get_private = mail_attachment_bar_get_private;
- iface->get_store = mail_attachment_bar_get_store;
- iface->get_path_at_pos = mail_attachment_bar_get_path_at_pos;
- iface->get_selected_paths = mail_attachment_bar_get_selected_paths;
- iface->path_is_selected = mail_attachment_bar_path_is_selected;
- iface->select_path = mail_attachment_bar_select_path;
- iface->unselect_path = mail_attachment_bar_unselect_path;
- iface->select_all = mail_attachment_bar_select_all;
- iface->unselect_all = mail_attachment_bar_unselect_all;
- iface->update_actions = mail_attachment_bar_update_actions;
+ interface->get_private = mail_attachment_bar_get_private;
+ interface->get_store = mail_attachment_bar_get_store;
+ interface->get_path_at_pos = mail_attachment_bar_get_path_at_pos;
+ interface->get_selected_paths = mail_attachment_bar_get_selected_paths;
+ interface->path_is_selected = mail_attachment_bar_path_is_selected;
+ interface->select_path = mail_attachment_bar_select_path;
+ interface->unselect_path = mail_attachment_bar_unselect_path;
+ interface->select_all = mail_attachment_bar_select_all;
+ interface->unselect_all = mail_attachment_bar_unselect_all;
+ interface->update_actions = mail_attachment_bar_update_actions;
}
static void
@@ -665,8 +665,8 @@ e_mail_attachment_bar_get_type (void)
NULL /* value_table */
};
- static const GInterfaceInfo iface_info = {
- (GInterfaceInitFunc) mail_attachment_bar_iface_init,
+ static const GInterfaceInfo interface_info = {
+ (GInterfaceInitFunc) mail_attachment_bar_interface_init,
(GInterfaceFinalizeFunc) NULL,
NULL /* interface_data */
};
@@ -675,7 +675,7 @@ e_mail_attachment_bar_get_type (void)
GTK_TYPE_VBOX, "EMailAttachmentBar", &type_info, 0);
g_type_add_interface_static (
- type, E_TYPE_ATTACHMENT_VIEW, &iface_info);
+ type, E_TYPE_ATTACHMENT_VIEW, &interface_info);
}
return type;
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index 9d4fdf95ba..2ace9e4dd6 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -723,13 +723,13 @@ static void
mail_browser_set_message (EMailReader *reader,
const gchar *uid)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
CamelMessageInfo *info;
CamelFolder *folder;
/* Chain up to parent's set_message() method. */
- iface = g_type_default_interface_peek (E_TYPE_MAIL_READER);
- iface->set_message (reader, uid);
+ interface = g_type_default_interface_peek (E_TYPE_MAIL_READER);
+ interface->set_message (reader, uid);
if (uid == NULL) {
e_mail_browser_close (E_MAIL_BROWSER (reader));
@@ -814,17 +814,17 @@ mail_browser_class_init (EMailBrowserClass *class)
}
static void
-mail_browser_iface_init (EMailReaderIface *iface)
+mail_browser_interface_init (EMailReaderInterface *interface)
{
- iface->get_action_group = mail_browser_get_action_group;
- iface->get_formatter = mail_browser_get_formatter;
- iface->get_hide_deleted = mail_browser_get_hide_deleted;
- iface->get_message_list = mail_browser_get_message_list;
- iface->get_popup_menu = mail_browser_get_popup_menu;
- iface->get_shell_backend = mail_browser_get_shell_backend;
- iface->get_window = mail_browser_get_window;
- iface->set_message = mail_browser_set_message;
- iface->show_search_bar = mail_browser_show_search_bar;
+ interface->get_action_group = mail_browser_get_action_group;
+ interface->get_formatter = mail_browser_get_formatter;
+ interface->get_hide_deleted = mail_browser_get_hide_deleted;
+ interface->get_message_list = mail_browser_get_message_list;
+ interface->get_popup_menu = mail_browser_get_popup_menu;
+ interface->get_shell_backend = mail_browser_get_shell_backend;
+ interface->get_window = mail_browser_get_window;
+ interface->set_message = mail_browser_set_message;
+ interface->show_search_bar = mail_browser_show_search_bar;
}
static void
@@ -864,8 +864,8 @@ e_mail_browser_get_type (void)
NULL /* value_table */
};
- static const GInterfaceInfo iface_info = {
- (GInterfaceInitFunc) mail_browser_iface_init,
+ static const GInterfaceInfo interface_info = {
+ (GInterfaceInitFunc) mail_browser_interface_init,
(GInterfaceFinalizeFunc) NULL,
NULL /* interface_data */
};
@@ -874,7 +874,7 @@ e_mail_browser_get_type (void)
GTK_TYPE_WINDOW, "EMailBrowser", &type_info, 0);
g_type_add_interface_static (
- type, E_TYPE_MAIL_READER, &iface_info);
+ type, E_TYPE_MAIL_READER, &interface_info);
}
return type;
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index 0480ac281c..a10c37031c 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -71,7 +71,7 @@ enum {
E_SHELL_WINDOW_ACTION_GROUP ((window), "mail")
/* Forward Declarations */
-static void e_mail_notebook_view_reader_init (EMailReaderIface *iface);
+static void e_mail_notebook_view_reader_init (EMailReaderInterface *interface);
G_DEFINE_TYPE_WITH_CODE (
EMailNotebookView, e_mail_notebook_view, E_TYPE_MAIL_VIEW,
@@ -1257,19 +1257,19 @@ e_mail_notebook_view_class_init (EMailNotebookViewClass *class)
}
static void
-e_mail_notebook_view_reader_init (EMailReaderIface *iface)
+e_mail_notebook_view_reader_init (EMailReaderInterface *interface)
{
- iface->get_action_group = mail_notebook_view_get_action_group;
- iface->get_formatter = mail_notebook_view_get_formatter;
- iface->get_hide_deleted = mail_notebook_view_get_hide_deleted;
- iface->get_message_list = mail_notebook_view_get_message_list;
- iface->get_popup_menu = mail_notebook_view_get_popup_menu;
- iface->get_shell_backend = mail_notebook_view_get_shell_backend;
- iface->get_window = mail_notebook_view_get_window;
- iface->set_folder = mail_notebook_view_set_folder;
- iface->show_search_bar = mail_notebook_view_show_search_bar;
- iface->open_selected_mail = mail_notebook_view_open_selected_mail;
- iface->enable_show_folder = mail_notebook_view_enable_show_folder;
+ interface->get_action_group = mail_notebook_view_get_action_group;
+ interface->get_formatter = mail_notebook_view_get_formatter;
+ interface->get_hide_deleted = mail_notebook_view_get_hide_deleted;
+ interface->get_message_list = mail_notebook_view_get_message_list;
+ interface->get_popup_menu = mail_notebook_view_get_popup_menu;
+ interface->get_shell_backend = mail_notebook_view_get_shell_backend;
+ interface->get_window = mail_notebook_view_get_window;
+ interface->set_folder = mail_notebook_view_set_folder;
+ interface->show_search_bar = mail_notebook_view_show_search_bar;
+ interface->open_selected_mail = mail_notebook_view_open_selected_mail;
+ interface->enable_show_folder = mail_notebook_view_enable_show_folder;
}
static void
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index 2839c1f44e..e81a7bbbef 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -84,7 +84,7 @@ enum {
#define STATE_KEY_PREVIEW_VISIBLE "PreviewVisible"
/* Forward Declarations */
-static void e_mail_paned_view_reader_init (EMailReaderIface *iface);
+static void e_mail_paned_view_reader_init (EMailReaderInterface *interface);
G_DEFINE_TYPE_WITH_CODE (
EMailPanedView, e_mail_paned_view, E_TYPE_MAIL_VIEW,
@@ -426,7 +426,7 @@ mail_paned_view_set_folder (EMailReader *reader,
EShellView *shell_view;
EShellWindow *shell_window;
EShellSettings *shell_settings;
- EMailReaderIface *default_iface;
+ EMailReaderInterface *default_interface;
GtkWidget *message_list;
GKeyFile *key_file;
gchar *group_name;
@@ -448,8 +448,8 @@ mail_paned_view_set_folder (EMailReader *reader,
message_list_freeze (MESSAGE_LIST (message_list));
/* Chain up to interface's default set_folder() method. */
- default_iface = g_type_default_interface_peek (E_TYPE_MAIL_READER);
- default_iface->set_folder (reader, folder, folder_uri);
+ default_interface = g_type_default_interface_peek (E_TYPE_MAIL_READER);
+ default_interface->set_folder (reader, folder, folder_uri);
if (folder == NULL)
goto exit;
@@ -891,19 +891,19 @@ e_mail_paned_view_class_init (EMailPanedViewClass *class)
}
static void
-e_mail_paned_view_reader_init (EMailReaderIface *iface)
-{
- iface->get_action_group = mail_paned_view_get_action_group;
- iface->get_formatter = mail_paned_view_get_formatter;
- iface->get_hide_deleted = mail_paned_view_get_hide_deleted;
- iface->get_message_list = mail_paned_view_get_message_list;
- iface->get_popup_menu = mail_paned_view_get_popup_menu;
- iface->get_shell_backend = mail_paned_view_get_shell_backend;
- iface->get_window = mail_paned_view_get_window;
- iface->set_folder = mail_paned_view_set_folder;
- iface->show_search_bar = mail_paned_view_show_search_bar;
- iface->open_selected_mail = mail_paned_view_reader_open_selected_mail;
- iface->enable_show_folder = mail_paned_view_enable_show_folder;
+e_mail_paned_view_reader_init (EMailReaderInterface *interface)
+{
+ interface->get_action_group = mail_paned_view_get_action_group;
+ interface->get_formatter = mail_paned_view_get_formatter;
+ interface->get_hide_deleted = mail_paned_view_get_hide_deleted;
+ interface->get_message_list = mail_paned_view_get_message_list;
+ interface->get_popup_menu = mail_paned_view_get_popup_menu;
+ interface->get_shell_backend = mail_paned_view_get_shell_backend;
+ interface->get_window = mail_paned_view_get_window;
+ interface->set_folder = mail_paned_view_set_folder;
+ interface->show_search_bar = mail_paned_view_show_search_bar;
+ interface->open_selected_mail = mail_paned_view_reader_open_selected_mail;
+ interface->enable_show_folder = mail_paned_view_enable_show_folder;
}
static void
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index e19c53d4d7..805ed615d8 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -106,6 +106,8 @@ static gchar *default_xfer_messages_uri;
static GQuark quark_private;
static guint signals[LAST_SIGNAL];
+G_DEFINE_INTERFACE (EMailReader, e_mail_reader, GTK_TYPE_OBJECT)
+
static void
mail_reader_destroy (GObject *object)
{
@@ -2899,21 +2901,21 @@ mail_reader_init_charset_actions (EMailReader *reader)
}
static void
-mail_reader_class_init (EMailReaderIface *iface)
+e_mail_reader_default_init (EMailReaderInterface *interface)
{
quark_private = g_quark_from_static_string ("EMailReader-private");
- iface->get_selected_uids = mail_reader_get_selected_uids;
- iface->get_folder = mail_reader_get_folder;
- iface->get_folder_uri = mail_reader_get_folder_uri;
- iface->enable_show_folder = mail_reader_get_enable_show_folder;
- iface->set_folder = mail_reader_set_folder;
- iface->set_message = mail_reader_set_message;
- iface->open_selected_mail = e_mail_reader_open_selected;
- iface->update_actions = mail_reader_update_actions;
+ interface->get_selected_uids = mail_reader_get_selected_uids;
+ interface->get_folder = mail_reader_get_folder;
+ interface->get_folder_uri = mail_reader_get_folder_uri;
+ interface->enable_show_folder = mail_reader_get_enable_show_folder;
+ interface->set_folder = mail_reader_set_folder;
+ interface->set_message = mail_reader_set_message;
+ interface->open_selected_mail = e_mail_reader_open_selected;
+ interface->update_actions = mail_reader_update_actions;
g_object_interface_install_property (
- iface,
+ interface,
g_param_spec_boolean (
"group-by-threads",
"Group by Threads",
@@ -2923,7 +2925,7 @@ mail_reader_class_init (EMailReaderIface *iface)
signals[CHANGED] = g_signal_new (
"changed",
- G_OBJECT_CLASS_TYPE (iface),
+ G_OBJECT_CLASS_TYPE (interface),
G_SIGNAL_RUN_FIRST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
@@ -2931,7 +2933,7 @@ mail_reader_class_init (EMailReaderIface *iface)
signals[FOLDER_LOADED] = g_signal_new (
"folder-loaded",
- G_OBJECT_CLASS_TYPE (iface),
+ G_OBJECT_CLASS_TYPE (interface),
G_SIGNAL_RUN_FIRST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
@@ -2939,16 +2941,16 @@ mail_reader_class_init (EMailReaderIface *iface)
signals[SHOW_SEARCH_BAR] = g_signal_new (
"show-search-bar",
- G_OBJECT_CLASS_TYPE (iface),
+ G_OBJECT_CLASS_TYPE (interface),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (EMailReaderIface, show_search_bar),
+ G_STRUCT_OFFSET (EMailReaderInterface, show_search_bar),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[SHOW_FOLDER] = g_signal_new (
"show-folder",
- G_OBJECT_CLASS_TYPE (iface),
+ G_OBJECT_CLASS_TYPE (interface),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
0,
NULL, NULL,
@@ -2957,7 +2959,7 @@ mail_reader_class_init (EMailReaderIface *iface)
signals[SHOW_NEXTTAB] = g_signal_new (
"show-next-tab",
- G_OBJECT_CLASS_TYPE (iface),
+ G_OBJECT_CLASS_TYPE (interface),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
0,
NULL, NULL,
@@ -2966,7 +2968,7 @@ mail_reader_class_init (EMailReaderIface *iface)
signals[SHOW_PREVTAB] = g_signal_new (
"show-previous-tab",
- G_OBJECT_CLASS_TYPE (iface),
+ G_OBJECT_CLASS_TYPE (interface),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
0,
NULL, NULL,
@@ -2975,7 +2977,7 @@ mail_reader_class_init (EMailReaderIface *iface)
signals[CLOSE_TAB] = g_signal_new (
"close-tab",
- G_OBJECT_CLASS_TYPE (iface),
+ G_OBJECT_CLASS_TYPE (interface),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
0,
NULL, NULL,
@@ -2984,43 +2986,15 @@ mail_reader_class_init (EMailReaderIface *iface)
signals[UPDATE_ACTIONS] = g_signal_new (
"update-actions",
- G_OBJECT_CLASS_TYPE (iface),
+ G_OBJECT_CLASS_TYPE (interface),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (EMailReaderIface, update_actions),
+ G_STRUCT_OFFSET (EMailReaderInterface, update_actions),
NULL, NULL,
g_cclosure_marshal_VOID__UINT,
G_TYPE_NONE, 1,
G_TYPE_UINT);
}
-GType
-e_mail_reader_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EMailReaderIface),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mail_reader_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- 0, /* instance_size */
- 0, /* n_preallocs */
- (GInstanceInitFunc) NULL,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- G_TYPE_INTERFACE, "EMailReader", &type_info, 0);
-
- g_type_interface_add_prerequisite (type, GTK_TYPE_OBJECT);
- }
-
- return type;
-}
-
void
e_mail_reader_init (EMailReader *reader)
{
@@ -3455,131 +3429,131 @@ e_mail_reader_get_action (EMailReader *reader,
GtkActionGroup *
e_mail_reader_get_action_group (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_action_group != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_action_group != NULL, NULL);
- return iface->get_action_group (reader);
+ return interface->get_action_group (reader);
}
EMFormatHTML *
e_mail_reader_get_formatter (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_formatter != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_formatter != NULL, NULL);
- return iface->get_formatter (reader);
+ return interface->get_formatter (reader);
}
gboolean
e_mail_reader_get_hide_deleted (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), FALSE);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_hide_deleted != NULL, FALSE);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_hide_deleted != NULL, FALSE);
- return iface->get_hide_deleted (reader);
+ return interface->get_hide_deleted (reader);
}
GtkWidget *
e_mail_reader_get_message_list (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_message_list != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_message_list != NULL, NULL);
- return iface->get_message_list (reader);
+ return interface->get_message_list (reader);
}
GtkMenu *
e_mail_reader_get_popup_menu (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_popup_menu != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_popup_menu != NULL, NULL);
- return iface->get_popup_menu (reader);
+ return interface->get_popup_menu (reader);
}
GPtrArray *
e_mail_reader_get_selected_uids (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_selected_uids != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_selected_uids != NULL, NULL);
- return iface->get_selected_uids (reader);
+ return interface->get_selected_uids (reader);
}
EShellBackend *
e_mail_reader_get_shell_backend (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_shell_backend != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_shell_backend != NULL, NULL);
- return iface->get_shell_backend (reader);
+ return interface->get_shell_backend (reader);
}
GtkWindow *
e_mail_reader_get_window (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_window != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_window != NULL, NULL);
- return iface->get_window (reader);
+ return interface->get_window (reader);
}
CamelFolder *
e_mail_reader_get_folder (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_folder != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_folder != NULL, NULL);
- return iface->get_folder (reader);
+ return interface->get_folder (reader);
}
const gchar *
e_mail_reader_get_folder_uri (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), NULL);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->get_folder_uri != NULL, NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->get_folder_uri != NULL, NULL);
- return iface->get_folder_uri (reader);
+ return interface->get_folder_uri (reader);
}
void
@@ -3587,14 +3561,14 @@ e_mail_reader_set_folder (EMailReader *reader,
CamelFolder *folder,
const gchar *folder_uri)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_if_fail (E_IS_MAIL_READER (reader));
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_if_fail (iface->set_folder != NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_if_fail (interface->set_folder != NULL);
- iface->set_folder (reader, folder, folder_uri);
+ interface->set_folder (reader, folder, folder_uri);
}
/* Helper for e_mail_reader_set_folder_uri () */
@@ -3625,27 +3599,27 @@ void
e_mail_reader_set_message (EMailReader *reader,
const gchar *uid)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_if_fail (E_IS_MAIL_READER (reader));
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_if_fail (iface->set_message != NULL);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_if_fail (interface->set_message != NULL);
- iface->set_message (reader, uid);
+ interface->set_message (reader, uid);
}
guint
e_mail_reader_open_selected_mail (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), 0);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->open_selected_mail != NULL, 0);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->open_selected_mail != NULL, 0);
- return iface->open_selected_mail (reader);
+ return interface->open_selected_mail (reader);
}
gboolean
@@ -3763,12 +3737,12 @@ e_mail_reader_enable_show_folder (EMailReader *reader)
gboolean
e_mail_reader_get_enable_show_folder (EMailReader *reader)
{
- EMailReaderIface *iface;
+ EMailReaderInterface *interface;
g_return_val_if_fail (E_IS_MAIL_READER (reader), FALSE);
- iface = E_MAIL_READER_GET_IFACE (reader);
- g_return_val_if_fail (iface->enable_show_folder != NULL, FALSE);
+ interface = E_MAIL_READER_GET_INTERFACE (reader);
+ g_return_val_if_fail (interface->enable_show_folder != NULL, FALSE);
- return iface->enable_show_folder (reader);
+ return interface->enable_show_folder (reader);
}
diff --git a/mail/e-mail-reader.h b/mail/e-mail-reader.h
index f1e609bbfa..b2247048be 100644
--- a/mail/e-mail-reader.h
+++ b/mail/e-mail-reader.h
@@ -38,18 +38,18 @@
#define E_MAIL_READER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_MAIL_READER, EMailReader))
-#define E_MAIL_READER_IFACE(cls) \
+#define E_MAIL_READER_INTERFACE(cls) \
(G_TYPE_CHECK_CLASS_CAST \
- ((cls), E_TYPE_MAIL_READER, EMailReaderIface))
+ ((cls), E_TYPE_MAIL_READER, EMailReaderInterface))
#define E_IS_MAIL_READER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE \
((obj), E_TYPE_MAIL_READER))
-#define E_IS_MAIL_READER_IFACE(cls) \
+#define E_IS_MAIL_READER_INTERFACE(cls) \
(G_TYPE_CHECK_CLASS_TYPE \
((cls), E_TYPE_MAIL_READER))
-#define E_MAIL_READER_GET_IFACE(obj) \
+#define E_MAIL_READER_GET_INTERFACE(obj) \
(G_TYPE_INSTANCE_GET_INTERFACE \
- ((obj), E_TYPE_MAIL_READER, EMailReaderIface))
+ ((obj), E_TYPE_MAIL_READER, EMailReaderInterface))
/* Basename of the UI definition file. */
#define E_MAIL_READER_UI_DEFINITION "evolution-mail-reader.ui"
@@ -57,7 +57,7 @@
G_BEGIN_DECLS
typedef struct _EMailReader EMailReader;
-typedef struct _EMailReaderIface EMailReaderIface;
+typedef struct _EMailReaderInterface EMailReaderInterface;
enum {
E_MAIL_READER_HAVE_ENABLED_ACCOUNT = 1 << 0,
@@ -79,8 +79,8 @@ enum {
E_MAIL_READER_FOLDER_IS_JUNK = 1 << 16
};
-struct _EMailReaderIface {
- GTypeInterface parent_iface;
+struct _EMailReaderInterface {
+ GTypeInterface parent_interface;
GtkActionGroup *
(*get_action_group) (EMailReader *reader);