aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-22 06:20:56 +0800
committerDan Winship <danw@src.gnome.org>2001-03-22 06:20:56 +0800
commit88bfa9d863e30e11be1a6435df3eba1624667194 (patch)
tree161808499a4ac524d78fd845ea57b8521330118b
parent5d562c3d3d879d05c75ecb300c53e0b5ae0120fc (diff)
downloadgsoc2013-evolution-88bfa9d863e30e11be1a6435df3eba1624667194.tar
gsoc2013-evolution-88bfa9d863e30e11be1a6435df3eba1624667194.tar.gz
gsoc2013-evolution-88bfa9d863e30e11be1a6435df3eba1624667194.tar.bz2
gsoc2013-evolution-88bfa9d863e30e11be1a6435df3eba1624667194.tar.lz
gsoc2013-evolution-88bfa9d863e30e11be1a6435df3eba1624667194.tar.xz
gsoc2013-evolution-88bfa9d863e30e11be1a6435df3eba1624667194.tar.zst
gsoc2013-evolution-88bfa9d863e30e11be1a6435df3eba1624667194.zip
Use the new URL part macros
* mail-config-druid.c (incoming_check, incoming_type_changed, transport_check, transport_type_changed): * mail-account-editor.c (transport_type_changed, source_check): Use the new URL part macros * mail-config.c (check_service_check): Use provider authtype list if not connecting. svn path=/trunk/; revision=8873
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-account-editor.c18
-rw-r--r--mail/mail-config-druid.c22
-rw-r--r--mail/mail-config.c5
-rw-r--r--mail/mail-format.c10
5 files changed, 39 insertions, 26 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 0daf0f575b..f095eeb382 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2001-03-21 Dan Winship <danw@ximian.com>
+
+ * mail-config-druid.c (incoming_check, incoming_type_changed,
+ transport_check, transport_type_changed):
+ * mail-account-editor.c (transport_type_changed, source_check):
+ Use the new URL part macros
+
+ * mail-config.c (check_service_check): Use provider authtype list
+ if not connecting.
+
2001-03-20 Miguel de Icaza <miguel@ximian.com>
* folder-browser-factory.c: Added new icons.
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index 757cb41ef3..2c4b2e8e93 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -497,7 +497,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
/* hostname */
label = glade_xml_get_widget (editor->gui, "lblTransportHost");
- if (provider->url_flags & CAMEL_URL_ALLOW_HOST) {
+ if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_HOST)) {
gtk_widget_set_sensitive (GTK_WIDGET (editor->transport_host), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -508,7 +508,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
/* username */
label = glade_xml_get_widget (editor->gui, "lblTransportUser");
- if (provider->url_flags & CAMEL_URL_ALLOW_AUTH) {
+ if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH)) {
gtk_widget_set_sensitive (GTK_WIDGET (editor->transport_user), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -519,7 +519,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
/* password */
label = glade_xml_get_widget (editor->gui, "lblTransportPasswd");
- if (provider->url_flags & CAMEL_URL_ALLOW_AUTH) {
+ if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH)) {
gtk_widget_set_sensitive (GTK_WIDGET (editor->transport_passwd), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (editor->transport_save_passwd), TRUE);
gtk_widget_set_sensitive (label, TRUE);
@@ -532,7 +532,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
/* auth */
label = glade_xml_get_widget (editor->gui, "lblTransportAuth");
- if (provider->url_flags & CAMEL_URL_ALLOW_AUTH) {
+ if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH)) {
CamelURL *url;
char *host;
@@ -642,7 +642,7 @@ source_check (MailAccountEditor *editor, CamelURL *url)
/* host */
label = glade_xml_get_widget (editor->gui, "lblSourceHost");
- if (url && provider->url_flags & CAMEL_URL_ALLOW_HOST) {
+ if (url && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_HOST)) {
gtk_widget_set_sensitive (GTK_WIDGET (editor->source_host), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -652,7 +652,7 @@ source_check (MailAccountEditor *editor, CamelURL *url)
/* user */
label = glade_xml_get_widget (editor->gui, "lblSourceUser");
- if (url && provider->url_flags & CAMEL_URL_ALLOW_USER) {
+ if (url && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_USER)) {
gtk_widget_set_sensitive (GTK_WIDGET (editor->source_user), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -662,7 +662,7 @@ source_check (MailAccountEditor *editor, CamelURL *url)
/* path */
label = glade_xml_get_widget (editor->gui, "lblSourcePath");
- if (url && provider->url_flags & CAMEL_URL_ALLOW_PATH) {
+ if (url && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_PATH)) {
gtk_widget_set_sensitive (GTK_WIDGET (editor->source_path), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -672,7 +672,7 @@ source_check (MailAccountEditor *editor, CamelURL *url)
/* auth */
label = glade_xml_get_widget (editor->gui, "lblSourceAuth");
- if (url && provider->url_flags & CAMEL_URL_ALLOW_AUTH) {
+ if (url && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH)) {
gtk_widget_set_sensitive (GTK_WIDGET (editor->source_auth), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -682,7 +682,7 @@ source_check (MailAccountEditor *editor, CamelURL *url)
/* passwd */
label = glade_xml_get_widget (editor->gui, "lblSourcePasswd");
- if (url && provider->url_flags & CAMEL_URL_ALLOW_PASSWORD) {
+ if (url && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_PASSWORD)) {
gtk_widget_set_sensitive (GTK_WIDGET (editor->source_passwd), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (editor->source_save_passwd), TRUE);
gtk_widget_set_sensitive (label, TRUE);
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 48f08b1c08..6759879915 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -326,13 +326,13 @@ incoming_check (MailConfigDruid *druid)
gboolean host = TRUE, user = TRUE, path = TRUE;
gboolean next_sensitive = TRUE;
- if (prov && prov->url_flags & CAMEL_URL_NEED_HOST)
+ if (prov && CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_HOST))
host = gtk_entry_get_text (druid->incoming_hostname) != NULL;
- if (prov && prov->url_flags & CAMEL_URL_NEED_USER)
+ if (prov && CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_USER))
user = gtk_entry_get_text (druid->incoming_username) != NULL;
- if (prov && prov->url_flags & CAMEL_URL_NEED_PATH)
+ if (prov && CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_PATH))
path = gtk_entry_get_text (druid->incoming_path) != NULL;
next_sensitive = host && user && path;
@@ -462,7 +462,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
/* hostname */
label = glade_xml_get_widget (druid->gui, "lblSourceHost");
- if (provider && provider->url_flags & CAMEL_URL_ALLOW_HOST) {
+ if (provider && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_HOST)) {
dwidget = GTK_WIDGET (druid->incoming_hostname);
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_hostname), TRUE);
gtk_widget_set_sensitive (label, TRUE);
@@ -474,7 +474,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
/* username */
label = glade_xml_get_widget (druid->gui, "lblSourceUser");
- if (provider && provider->url_flags & CAMEL_URL_ALLOW_USER) {
+ if (provider && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_USER)) {
if (!dwidget)
dwidget = GTK_WIDGET (druid->incoming_username);
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_username), TRUE);
@@ -487,7 +487,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
/* password */
label = glade_xml_get_widget (druid->gui, "lblSourcePasswd");
- if (provider && provider->url_flags & CAMEL_URL_ALLOW_PASSWORD) {
+ if (provider && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_PASSWORD)) {
if (!dwidget)
dwidget = GTK_WIDGET (druid->source_password);
gtk_widget_set_sensitive (GTK_WIDGET (druid->source_password), TRUE);
@@ -500,7 +500,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
/* auth */
label = glade_xml_get_widget (druid->gui, "lblSourceAuthType");
- if (provider && provider->url_flags & CAMEL_URL_ALLOW_AUTH) {
+ if (provider && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH)) {
gtk_widget_set_sensitive (GTK_WIDGET (druid->source_auth_type), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -515,7 +515,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
gtk_label_set_text (GTK_LABEL (label), _("Namespace:"));
else
gtk_label_set_text (GTK_LABEL (label), _("Path:"));
- if (provider && provider->url_flags & CAMEL_URL_ALLOW_PATH) {
+ if (provider && CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_PATH)) {
if (!dwidget)
dwidget = GTK_WIDGET (druid->incoming_path);
@@ -665,7 +665,7 @@ transport_check (MailConfigDruid *druid)
const CamelProvider *prov = druid->transport_provider;
gboolean next_sensitive = TRUE;
- if (prov && prov->url_flags & CAMEL_URL_NEED_HOST)
+ if (prov && CAMEL_PROVIDER_NEEDS (prov, CAMEL_URL_PART_HOST))
next_sensitive = gtk_entry_get_text (druid->outgoing_hostname) != NULL;
gnome_druid_set_buttons_sensitive (druid->druid, TRUE, next_sensitive, TRUE);
@@ -769,7 +769,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
/* hostname */
label = glade_xml_get_widget (druid->gui, "lblTransportHost");
- if (provider->url_flags & CAMEL_URL_ALLOW_HOST) {
+ if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_HOST)) {
gtk_widget_grab_focus (GTK_WIDGET (druid->outgoing_hostname));
gtk_widget_set_sensitive (GTK_WIDGET (druid->outgoing_hostname), TRUE);
gtk_widget_set_sensitive (label, TRUE);
@@ -780,7 +780,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
}
/* auth */
- if (provider->url_flags & CAMEL_URL_ALLOW_AUTH)
+ if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH))
gtk_widget_set_sensitive (GTK_WIDGET (druid->outgoing_requires_auth), TRUE);
else
gtk_widget_set_sensitive (GTK_WIDGET (druid->outgoing_requires_auth), FALSE);
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 9630def2df..a4748e35e5 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -896,7 +896,10 @@ static void check_service_check(struct _mail_msg *mm)
service = camel_session_get_service (session, m->url, m->type, &mm->ex);
if (!service)
return;
- *m->authtypes = camel_service_query_auth_types (service, m->connect, &mm->ex);
+ if (m->connect)
+ *m->authtypes = camel_service_query_auth_types (service, &mm->ex);
+ else
+ *m->authtypes = g_list_copy (service->provider->authtypes);
} else if (m->connect) {
service = camel_session_get_service_connected (session, m->url, m->type, &mm->ex);
}
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 4d5dfd82d3..2668208bc9 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1538,16 +1538,16 @@ handle_multipart_related (CamelMimePart *part, const char *mime_type,
break;
}
}
-
- if (!display_part) {
- /* Oops. Hrmph. */
- return handle_multipart_mixed (part, mime_type, md);
- }
} else {
/* No start parameter, so it defaults to the first part. */
display_part = camel_multipart_get_part (mp, 0);
}
+ if (!display_part) {
+ /* Oops. Hrmph. */
+ return handle_multipart_mixed (part, mime_type, md);
+ }
+
/* Record the Content-IDs of any non-displayed parts. */
for (i = 0; i < nparts; i++) {
body_part = camel_multipart_get_part (mp, i);