From: Jose Dapena Paz Date: Fri, 21 Aug 2009 10:18:42 +0000 (+0200) Subject: Cancel check support requests on tapping on cancel in the wizard checks dialog. X-Git-Tag: 3.0.17-rc38~4 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=366e77fcfcd44e42ad443802a10ac403056fbe89;hp=77279a928905bb344342d4d12bc5c0275c1ced27;ds=sidebyside Cancel check support requests on tapping on cancel in the wizard checks dialog. --- diff --git a/src/hildon2/modest-easysetup-wizard-dialog.c b/src/hildon2/modest-easysetup-wizard-dialog.c index 7a63303..8c9731c 100644 --- a/src/hildon2/modest-easysetup-wizard-dialog.c +++ b/src/hildon2/modest-easysetup-wizard-dialog.c @@ -2522,6 +2522,36 @@ on_check_support_cancel (GtkDialog *cancel_note, ModestEasysetupWizardDialog *self) { ModestEasysetupWizardDialogPrivate *priv = MODEST_EASYSETUP_WIZARD_DIALOG_GET_PRIVATE (self); + ModestProtocolRegistry *registry; + GSList *provider_protos, *node; + + registry = modest_runtime_get_protocol_registry (); + provider_protos = modest_protocol_registry_get_by_tag (registry, + MODEST_PROTOCOL_REGISTRY_PROVIDER_PROTOCOLS); + + for (node = provider_protos; node != NULL; node = g_slist_next (node)) { + ModestProtocol *proto = MODEST_PROTOCOL (node->data); + + if (!modest_protocol_registry_protocol_type_has_tag (registry, + modest_protocol_get_type_id (proto), + MODEST_PROTOCOL_REGISTRY_STORE_PROTOCOLS)) + continue; + + if (modest_protocol_registry_protocol_type_has_tag + (registry, + modest_protocol_get_type_id (proto), + MODEST_PROTOCOL_REGISTRY_SINGLETON_PROVIDER_PROTOCOLS)) { + /* Check if there's already an account configured with this account type */ + if (modest_account_mgr_singleton_protocol_exists (modest_runtime_get_account_mgr (), + modest_protocol_get_type_id (proto))) + continue; + } + + if (MODEST_ACCOUNT_PROTOCOL (proto)) { + modest_account_protocol_cancel_check_support (MODEST_ACCOUNT_PROTOCOL (proto)); + } + } + g_slist_free (provider_protos); gtk_widget_destroy (GTK_WIDGET (cancel_note)); priv->check_support_cancel_note = NULL;