aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-26 02:27:47 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-26 02:27:47 +0800
commit32e9b0c2020c7ed6ef0aac891e811e0547956337 (patch)
treee1fdfd77529592a3c21a4a8d57cf20974b88e27c
parentee16607d42149ca7472f9b95d3b4bbb676e229c4 (diff)
downloadgsoc2013-evolution-32e9b0c2020c7ed6ef0aac891e811e0547956337.tar.gz
gsoc2013-evolution-32e9b0c2020c7ed6ef0aac891e811e0547956337.tar.zst
gsoc2013-evolution-32e9b0c2020c7ed6ef0aac891e811e0547956337.zip
Now takes a check_supported gboolean argument saying whether or not to
2001-07-25 Jeffrey Stedfast <fejj@ximian.com> * mail-account-gui.c (build_auth_menu): Now takes a check_supported gboolean argument saying whether or not to disable non-supported authtypes. (source_type_changed): Update for build_auth_menu. (transport_type_changed): Same. (service_check_supported): Pass in TRUE for the disable non-supported authtypes to build_auth_menu and also disable check-supported button and the authtype menu if we get a NULL supported auth list. svn path=/trunk/; revision=11404
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-account-gui.c21
-rw-r--r--mail/mail-tools.c3
3 files changed, 25 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 26e9b7e043..83f5042dae 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,15 @@
2001-07-25 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-account-gui.c (build_auth_menu): Now takes a
+ check_supported gboolean argument saying whether or not to disable
+ non-supported authtypes.
+ (source_type_changed): Update for build_auth_menu.
+ (transport_type_changed): Same.
+ (service_check_supported): Pass in TRUE for the disable
+ non-supported authtypes to build_auth_menu and also disable
+ check-supported button and the authtype menu if we get a NULL
+ supported auth list.
+
* mail-callbacks.c (mail_generate_reply): Initialize `me' to NULL.
(forward_attached): If we are only forwarding a single message,
pass the message along as the callback data, else pass NULL.
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index d3e25a1cd3..34ed21c5f8 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -218,8 +218,8 @@ service_authtype_changed (GtkWidget *widget, gpointer user_data)
}
static void
-build_auth_menu (MailAccountGuiService *service,
- GList *all_authtypes, GList *supported_authtypes)
+build_auth_menu (MailAccountGuiService *service, GList *all_authtypes,
+ GList *supported_authtypes, gboolean check_supported)
{
GtkWidget *menu, *item, *first = NULL;
CamelServiceAuthType *authtype, *sauthtype;
@@ -236,7 +236,7 @@ build_auth_menu (MailAccountGuiService *service,
if (!strcmp (authtype->name, sauthtype->name))
break;
}
- if (supported_authtypes && !s)
+ if (check_supported && !s)
gtk_widget_set_sensitive (item, FALSE);
else if (!first)
first = item;
@@ -345,7 +345,7 @@ source_type_changed (GtkWidget *widget, gpointer user_data)
/* auth */
frame = glade_xml_get_widget (gui->xml, "source_auth_frame");
if (provider && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH)) {
- build_auth_menu (&gui->source, provider->authtypes, NULL);
+ build_auth_menu (&gui->source, provider->authtypes, NULL, FALSE);
gtk_widget_show (frame);
} else
gtk_widget_hide (frame);
@@ -437,7 +437,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_hide (label);
}
- build_auth_menu (&gui->transport, provider->authtypes, NULL);
+ build_auth_menu (&gui->transport, provider->authtypes, NULL, FALSE);
transport_needs_auth_toggled (gui->transport_needs_auth, gui);
} else
gtk_widget_hide (frame);
@@ -465,7 +465,12 @@ service_check_supported (GtkButton *button, gpointer user_data)
save_service (gsvc, NULL, service);
if (mail_config_check_service (service->url, gsvc->provider_type, &authtypes)) {
- build_auth_menu (gsvc, gsvc->provider->authtypes, authtypes);
+ build_auth_menu (gsvc, gsvc->provider->authtypes, authtypes, TRUE);
+ if (!authtypes) {
+ /* the provider doesn't support any authtypes so we can disable these */
+ gtk_widget_set_sensitive (GTK_WIDGET (gsvc->check_supported), FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (gsvc->authtype), FALSE);
+ }
g_list_free (authtypes);
}
@@ -1485,7 +1490,7 @@ save_service (MailAccountGuiService *gsvc, GHashTable *extra_config,
CamelServiceAuthType *authtype;
authtype = gtk_object_get_data (GTK_OBJECT (gsvc->authitem), "authtype");
- if (authtype->authproto && *authtype->authproto)
+ if (authtype && authtype->authproto && *authtype->authproto)
url->authmech = g_strdup (authtype->authproto);
service->save_passwd = gtk_toggle_button_get_active (gsvc->remember);
@@ -1515,7 +1520,7 @@ save_service (MailAccountGuiService *gsvc, GHashTable *extra_config,
if (gtk_toggle_button_get_active (gsvc->use_ssl))
camel_url_set_param (url, "use_ssl", "");
}
-
+
if (extra_config)
extract_values (gsvc, extra_config, url);
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 47f949ac10..c1da8fea98 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -273,6 +273,7 @@ mail_tool_uri_to_folder (const char *uri, CamelException *ex)
return folder;
}
+ /* This hack is still needed for file:/ since it's its own EvolutionStorage type */
if (!strncmp (uri, "vtrash:", 7))
offset = 7;
@@ -286,7 +287,7 @@ mail_tool_uri_to_folder (const char *uri, CamelException *ex)
} else {
store = camel_session_get_store (session, uri + offset, ex);
if (store) {
- char *name;
+ const char *name;
/* if we have a fragment, then the path is actually used by the store,
so the fragment is the path to the folder instead */