aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config-druid.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2001-01-07 13:33:54 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-07 13:33:54 +0800
commitb1bfee4db1eed475d5528a5179eea1f6435e5ebe (patch)
tree790a7ab99a7b6598b145561a9f347ba62e223ba0 /mail/mail-config-druid.c
parentdf57651390a172b0192b2dd158d24ec9ff271d83 (diff)
downloadgsoc2013-evolution-b1bfee4db1eed475d5528a5179eea1f6435e5ebe.tar.gz
gsoc2013-evolution-b1bfee4db1eed475d5528a5179eea1f6435e5ebe.tar.zst
gsoc2013-evolution-b1bfee4db1eed475d5528a5179eea1f6435e5ebe.zip
Implemented. (ok_clicked): Implemented. (cancel_clicked): Implemented.
2001-01-07 Jeffrey Stedfast <fejj@helixcode.com> * mail-account-editor.c (apply_clicked): Implemented. (ok_clicked): Implemented. (cancel_clicked): Implemented. (source_auth_type_changed): Implemented. (source_auth_init): Implemented. (transport_construct_authmenu): Implemented. (transport_type_changed): Updated to change regenerate the auth option menu. (construct): Attached callbacks to OK, Apply and Cancel buttons. * mail-account-editor.c (source_auth_init): Use the new mail_config_check_service(). * mail-config-druid.c: Remove check_service() as it will be moved into mail-config. svn path=/trunk/; revision=7289
Diffstat (limited to 'mail/mail-config-druid.c')
-rw-r--r--mail/mail-config-druid.c71
1 files changed, 2 insertions, 69 deletions
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 4c8ada2aa5..511e162bd6 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -36,8 +36,6 @@ static void mail_config_druid_finalise (GtkObject *obj);
static void construct_auth_menu (MailConfigDruid *druid, GList *authtypes);
-static gboolean check_service (CamelURL *url, CamelProviderType type, GList **authtypes);
-
static GtkWindowClass *parent_class;
GtkType
@@ -324,7 +322,7 @@ incoming_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
url->path = mail_config_druid_get_incoming_path (config);
/* If we can't connect, don't let them continue. */
- if (!check_service (url, CAMEL_PROVIDER_STORE, &authtypes)) {
+ if (!mail_config_check_service (url, CAMEL_PROVIDER_STORE, &authtypes)) {
camel_url_free (url);
return TRUE;
}
@@ -509,7 +507,7 @@ transport_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
url->host = mail_config_druid_get_outgoing_hostname (config);
/* If we can't connect, don't let them continue. */
- if (!check_service (url, CAMEL_PROVIDER_TRANSPORT, NULL)) {
+ if (!mail_config_check_service (url, CAMEL_PROVIDER_TRANSPORT, NULL)) {
camel_url_free (url);
return TRUE;
}
@@ -736,71 +734,6 @@ construct (MailConfigDruid *druid)
gnome_druid_set_buttons_sensitive (druid->druid, FALSE, TRUE, TRUE);
}
-/* Async service-checking/authtype-lookup code. */
-
-typedef struct {
- char *url;
- CamelProviderType type;
- GList **authtypes;
- gboolean success;
-} check_service_input_t;
-
-static char *
-describe_check_service (gpointer in_data, gboolean gerund)
-{
- if (gerund)
- return g_strdup (_("Connecting to server"));
- else
- return g_strdup (_("Connect to server"));
-}
-
-static void
-do_check_service (gpointer in_data, gpointer op_data, CamelException *ex)
-{
- check_service_input_t *input = in_data;
- CamelService *service;
-
- if (input->authtypes) {
- service = camel_session_get_service (
- session, input->url, input->type, ex);
- if (!service)
- return;
- *input->authtypes = camel_service_query_auth_types (service, ex);
- } else {
- service = camel_session_get_service_connected (
- session, input->url, input->type, ex);
- }
- if (service)
- camel_object_unref (CAMEL_OBJECT (service));
- if (!camel_exception_is_set (ex))
- input->success = TRUE;
-}
-
-static const mail_operation_spec op_check_service = {
- describe_check_service,
- 0,
- NULL,
- do_check_service,
- NULL
-};
-
-static gboolean
-check_service (CamelURL *url, CamelProviderType type, GList **authtypes)
-{
- check_service_input_t input;
-
- input.url = camel_url_to_string (url, TRUE);
- input.type = type;
- input.authtypes = authtypes;
- input.success = FALSE;
-
- mail_operation_queue (&op_check_service, &input, FALSE);
- mail_operation_wait_for_finish ();
- g_free (input.url);
-
- return input.success;
-}
-
MailConfigDruid *
mail_config_druid_new ()
{