From: Jose Dapena Paz Date: Wed, 18 Feb 2009 15:43:19 +0000 (+0000) Subject: Add capability to account protocol to override wizard response X-Git-Tag: git_migration_finished~543 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=c242f03ef9213d58ce5cf0101e09d02cbec3736b Add capability to account protocol to override wizard response pmo-trunk-r7557 --- diff --git a/src/modest-account-protocol.c b/src/modest-account-protocol.c index 9256c02..01781e6 100644 --- a/src/modest-account-protocol.c +++ b/src/modest-account-protocol.c @@ -82,6 +82,9 @@ static void modest_account_protocol_save_wizard_settings_default (ModestAccountP GList *wizard_pages, ModestAccountSettings *settings); +static ModestWizardDialogResponseOverrideFunc +modest_account_protocol_get_wizard_response_override_default (ModestAccountProtocol *self); + /* globals */ static GObjectClass *parent_class = NULL; @@ -162,6 +165,8 @@ modest_account_protocol_class_init (ModestAccountProtocolClass *klass) modest_account_protocol_save_wizard_settings_default; account_class->create_account = modest_account_protocol_create_account_default; + account_class->get_wizard_response_override = + modest_account_protocol_get_wizard_response_override_default; } static void @@ -553,3 +558,20 @@ modest_account_protocol_save_wizard_settings_default (ModestAccountProtocol *sel g_warning ("You must implement save_wizard_settings"); } + +static ModestWizardDialogResponseOverrideFunc +modest_account_protocol_get_wizard_response_override_default (ModestAccountProtocol *self) +{ + g_return_val_if_fail (MODEST_IS_ACCOUNT_PROTOCOL (self), NULL); + + return NULL; +} + +ModestWizardDialogResponseOverrideFunc +modest_account_protocol_get_wizard_response_override (ModestAccountProtocol *self) +{ + g_return_val_if_fail (MODEST_IS_ACCOUNT_PROTOCOL (self), NULL); + + return MODEST_ACCOUNT_PROTOCOL_GET_CLASS (self)->get_wizard_response_override (self); +} + diff --git a/src/modest-account-protocol.h b/src/modest-account-protocol.h index eca9b0f..cc056f0 100644 --- a/src/modest-account-protocol.h +++ b/src/modest-account-protocol.h @@ -35,6 +35,7 @@ #include "widgets/modest-account-settings-dialog.h" #include "modest-protocol.h" +#include "widgets/modest-wizard-dialog.h" #include "modest-pair.h" #include #include @@ -64,6 +65,7 @@ struct _ModestAccountProtocolClass { TnyAccount * (*create_account) (ModestAccountProtocol *self); ModestAccountSettingsDialog* (*create_account_settings_dialog) (ModestAccountProtocol* self); ModestPairList* (*get_easysetupwizard_tabs) (ModestAccountProtocol* self); + ModestWizardDialogResponseOverrideFunc (*get_wizard_response_override) (ModestAccountProtocol *self); void (*save_settings) (ModestAccountProtocol *self, ModestAccountSettingsDialog *dialog, ModestAccountSettings *settings); void (*save_wizard_settings) (ModestAccountProtocol *self, GList *wizard_pages, ModestAccountSettings *settings); }; @@ -272,6 +274,18 @@ void modest_account_protocol_save_wizard_settings (ModestAccountProtocol *self, GList *wizard_pages, ModestAccountSettings *settings); +/** + * modest_account_protocol_get_wizard_response_override: + * @self: a #ModestAccountProtocol + * + * obtains the method that should be used to override wizard response behavior when the + * wizard is setting up this account type. + * + * Returns: a #ModestWizardDialogResponseOverrideFunc + */ +ModestWizardDialogResponseOverrideFunc modest_account_protocol_get_wizard_response_override (ModestAccountProtocol *self); + + G_END_DECLS #endif /* __MODEST_ACCOUNT_PROTOCOL_H__ */