aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-20 11:27:39 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-12-20 11:27:39 +0800
commit987fb91d5ec4b61d1283acdb9cf02960cc47b74d (patch)
tree5e9dc4fa1e10995f0217b068daff2ca6b77cf461 /modules/mail
parentda67edd2a675481fb90b8f5fcbeb3eaf5dc427ea (diff)
downloadgsoc2013-evolution-987fb91d5ec4b61d1283acdb9cf02960cc47b74d.tar
gsoc2013-evolution-987fb91d5ec4b61d1283acdb9cf02960cc47b74d.tar.gz
gsoc2013-evolution-987fb91d5ec4b61d1283acdb9cf02960cc47b74d.tar.bz2
gsoc2013-evolution-987fb91d5ec4b61d1283acdb9cf02960cc47b74d.tar.lz
gsoc2013-evolution-987fb91d5ec4b61d1283acdb9cf02960cc47b74d.tar.xz
gsoc2013-evolution-987fb91d5ec4b61d1283acdb9cf02960cc47b74d.tar.zst
gsoc2013-evolution-987fb91d5ec4b61d1283acdb9cf02960cc47b74d.zip
Reduce diff noise with account-mgmt branch.
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c2
-rw-r--r--modules/mail/em-account-prefs.c31
-rw-r--r--modules/mail/em-account-prefs.h2
-rw-r--r--modules/mail/evolution-module-mail.c4
4 files changed, 30 insertions, 9 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index e0bdc492bc..45ea021f28 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -82,9 +82,9 @@ action_mail_account_disable_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
EMailShellSidebar *mail_shell_sidebar;
- EShellBackend *shell_backend;
EShellView *shell_view;
EShellWindow *shell_window;
+ EShellBackend *shell_backend;
EMailBackend *backend;
EMailSession *session;
EMailAccountStore *account_store;
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 9506e75d29..24651d1131 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -19,10 +19,11 @@
*
*/
-/* XXX EAccountManager handles all the user interface stuff. This subclass
- * applies policies using mailer resources that EAccountManager does not
- * have access to. The desire is to someday move account management
- * completely out of the mailer, perhaps to evolution-data-server. */
+/* XXX EMailAccountManager handles all the user interface stuff.
+ * This subclass applies policies using mailer resources that
+ * EMailAccountManager does not have access to. The desire is
+ * to someday move account management completely out of the mailer,
+ * perhaps to evolution-data-server. */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -58,7 +59,7 @@ enum {
PROP_BACKEND
};
-G_DEFINE_TYPE (
+G_DEFINE_DYNAMIC_TYPE (
EMAccountPrefs,
em_account_prefs,
E_TYPE_MAIL_ACCOUNT_MANAGER)
@@ -286,30 +287,46 @@ em_account_prefs_class_init (EMAccountPrefsClass *class)
}
static void
+em_account_prefs_class_finalize (EMAccountPrefsClass *class)
+{
+}
+
+static void
em_account_prefs_init (EMAccountPrefs *prefs)
{
prefs->priv = EM_ACCOUNT_PREFS_GET_PRIVATE (prefs);
}
+void
+em_account_prefs_type_register (GTypeModule *type_module)
+{
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ em_account_prefs_register_type (type_module);
+}
+
GtkWidget *
em_account_prefs_new (EPreferencesWindow *window)
{
EShell *shell;
EShellBackend *shell_backend;
EMailAccountStore *account_store;
+ EMailBackend *backend;
EMailSession *session;
/* XXX Figure out a better way to get the mail backend. */
shell = e_preferences_window_get_shell (window);
shell_backend = e_shell_get_backend_by_name (shell, "mail");
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
+ backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
account_store = e_mail_session_get_account_store (session);
return g_object_new (
EM_TYPE_ACCOUNT_PREFS,
"store", account_store,
- "backend", shell_backend, NULL);
+ "backend", backend, NULL);
}
EMailBackend *
diff --git a/modules/mail/em-account-prefs.h b/modules/mail/em-account-prefs.h
index b7ba5b0dde..d2aafdb1cf 100644
--- a/modules/mail/em-account-prefs.h
+++ b/modules/mail/em-account-prefs.h
@@ -24,7 +24,6 @@
#include <gtk/gtk.h>
#include <table/e-table.h>
-#include <libedataserver/e-account-list.h>
#include <mail/e-mail-backend.h>
#include <mail/e-mail-account-manager.h>
#include <widgets/misc/e-preferences-window.h>
@@ -64,6 +63,7 @@ struct _EMAccountPrefsClass {
};
GType em_account_prefs_get_type (void);
+void em_account_prefs_type_register (GTypeModule *type_module);
GtkWidget * em_account_prefs_new (EPreferencesWindow *window);
EMailBackend * em_account_prefs_get_backend (EMAccountPrefs *prefs);
diff --git a/modules/mail/evolution-module-mail.c b/modules/mail/evolution-module-mail.c
index 6a44c935e7..edb22c4f29 100644
--- a/modules/mail/evolution-module-mail.c
+++ b/modules/mail/evolution-module-mail.c
@@ -37,6 +37,8 @@
#include "e-mail-config-reader.h"
#include "e-mail-config-web-view.h"
+#include "em-account-prefs.h"
+
/* Module Entry Points */
void e_module_load (GTypeModule *type_module);
void e_module_unload (GTypeModule *type_module);
@@ -60,6 +62,8 @@ e_module_load (GTypeModule *type_module)
e_mail_config_format_html_register_type (type_module);
e_mail_config_reader_register_type (type_module);
e_mail_config_web_view_register_type (type_module);
+
+ em_account_prefs_type_register (type_module);
}
G_MODULE_EXPORT void