aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/em-account-prefs.c
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/em-account-prefs.c
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/em-account-prefs.c')
-rw-r--r--modules/mail/em-account-prefs.c31
1 files changed, 24 insertions, 7 deletions
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 *