From 987fb91d5ec4b61d1283acdb9cf02960cc47b74d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 19 Dec 2011 22:27:39 -0500 Subject: Reduce diff noise with account-mgmt branch. --- modules/mail/e-mail-shell-view-actions.c | 2 +- modules/mail/em-account-prefs.c | 31 ++++++++++++++++++++++++------- modules/mail/em-account-prefs.h | 2 +- modules/mail/evolution-module-mail.c | 4 ++++ modules/mdn/evolution-mdn.c | 10 ++++------ 5 files changed, 34 insertions(+), 15 deletions(-) (limited to 'modules') 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 @@ -58,7 +59,7 @@ enum { PROP_BACKEND }; -G_DEFINE_TYPE ( +G_DEFINE_DYNAMIC_TYPE ( EMAccountPrefs, em_account_prefs, E_TYPE_MAIL_ACCOUNT_MANAGER) @@ -285,31 +286,47 @@ em_account_prefs_class_init (EMAccountPrefsClass *class) G_PARAM_CONSTRUCT_ONLY)); } +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 #include -#include #include #include #include @@ -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 diff --git a/modules/mdn/evolution-mdn.c b/modules/mdn/evolution-mdn.c index d925c42b40..fa3fd8171c 100644 --- a/modules/mdn/evolution-mdn.c +++ b/modules/mdn/evolution-mdn.c @@ -399,8 +399,7 @@ mdn_notify_action_cb (GtkAction *action, static void mdn_message_loaded_cb (EMailReader *reader, const gchar *message_uid, - CamelMimeMessage *message, - EMdn *extension) + CamelMimeMessage *message) { EAlert *alert; EAccount *account; @@ -477,8 +476,7 @@ exit: static void mdn_message_seen_cb (EMailReader *reader, const gchar *message_uid, - CamelMimeMessage *message, - EMdn *extension) + CamelMimeMessage *message) { EAccount *account; CamelFolder *folder; @@ -526,11 +524,11 @@ mdn_constructed (GObject *object) g_signal_connect ( extensible, "message-loaded", - G_CALLBACK (mdn_message_loaded_cb), extension); + G_CALLBACK (mdn_message_loaded_cb), NULL); g_signal_connect ( extensible, "message-seen", - G_CALLBACK (mdn_message_seen_cb), extension); + G_CALLBACK (mdn_message_seen_cb), NULL); /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (e_mdn_parent_class)->constructed (object); -- cgit v1.2.3