aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog15
-rw-r--r--mail/mail-account-editor.c1
-rw-r--r--mail/mail-config-druid.c24
3 files changed, 35 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 57b5863e0d..807436c18f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,18 @@
+2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * mail-config-druid.c (auth_type_changed): Clear the password
+ entry if it's not allowed.
+ (transport_type_changed): Clear the hostname if it is not allowed
+ by the provider type.
+
+ * mail-account-editor.c (transport_type_changed): If the hostname
+ is allowed, clear it.
+
+ * mail-config-druid.c (incoming_type_changed): Clear the contents
+ of the entry boxes that are not to be used.
+ (mail_config_druid_get_source_url): If the text in the entry is
+ emptry string, don't set it' contents in the url.
+
2001-01-10 Miguel de Icaza <miguel@helixcode.com>
* mail-callbacks.c (print_msg): Fix proto.
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index 18f42fdce4..91894fa7a4 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -407,6 +407,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive (GTK_WIDGET (editor->transport_host), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
+ gtk_entry_set_text (editor->transport_host, "");
gtk_widget_set_sensitive (GTK_WIDGET (editor->transport_host), FALSE);
gtk_widget_set_sensitive (label, FALSE);
}
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 9df95c2796..b56bf20295 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -379,6 +379,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_hostname), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
+ gtk_entry_set_text (druid->incoming_hostname, "");
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_hostname), FALSE);
gtk_widget_set_sensitive (label, FALSE);
}
@@ -389,6 +390,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_username), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
+ gtk_entry_set_text (druid->incoming_username, "");
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_username), FALSE);
gtk_widget_set_sensitive (label, FALSE);
}
@@ -399,6 +401,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive (GTK_WIDGET (druid->password), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
+ gtk_entry_set_text (druid->password, "");
gtk_widget_set_sensitive (GTK_WIDGET (druid->password), FALSE);
gtk_widget_set_sensitive (label, FALSE);
}
@@ -419,6 +422,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_path), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
+ gtk_entry_set_text (druid->incoming_path, "");
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_path), FALSE);
gtk_widget_set_sensitive (label, FALSE);
}
@@ -493,6 +497,9 @@ auth_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive (GTK_WIDGET (druid->save_password), sensitive);
gtk_widget_set_sensitive (label, sensitive);
+ if (!sensitive)
+ gtk_entry_set_text (druid->password, "");
+
authentication_check (druid);
}
@@ -600,6 +607,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive (GTK_WIDGET (druid->outgoing_hostname), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
+ gtk_entry_set_text (druid->outgoing_hostname, "");
gtk_widget_set_sensitive (GTK_WIDGET (druid->outgoing_hostname), FALSE);
gtk_widget_set_sensitive (label, FALSE);
}
@@ -969,7 +977,7 @@ mail_config_druid_get_sigfile (MailConfigDruid *druid)
char *
mail_config_druid_get_source_url (MailConfigDruid *druid)
{
- char *source_url, *host, *pport, *auth;
+ char *source_url, *host, *pport, *str;
const CamelProvider *provider;
CamelURL *url;
int port = 0;
@@ -980,10 +988,16 @@ mail_config_druid_get_source_url (MailConfigDruid *druid)
url = g_new0 (CamelURL, 1);
url->protocol = g_strdup (provider->protocol);
- url->user = g_strdup (gtk_entry_get_text (druid->incoming_username));
- auth = gtk_object_get_data (GTK_OBJECT (druid), "source_authmech");
- url->authmech = auth && *auth ? g_strdup (auth) : NULL;
- url->passwd = g_strdup (gtk_entry_get_text (druid->password));
+
+ str = gtk_entry_get_text (druid->incoming_username);
+ url->user = str && *str ? g_strdup (str) : NULL;
+
+ str = gtk_object_get_data (GTK_OBJECT (druid), "source_authmech");
+ url->authmech = str && *str ? g_strdup (str) : NULL;
+
+ str = gtk_entry_get_text (druid->password);
+ url->passwd = str && *str ? g_strdup (str) : NULL;
+
host = g_strdup (gtk_entry_get_text (druid->incoming_hostname));
if (host && (pport = strchr (host, ':'))) {
port = atoi (pport + 1);