aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-26 05:43:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-26 05:43:15 +0800
commit35ed08a7654b18590dd850ba7901e725be033394 (patch)
tree1cd2a47197cbcae12c189c97f2c01ac29851ce4f /mail/mail-config.c
parentd6c66f72e7174af586496b8dfdbcc252f753864a (diff)
downloadgsoc2013-evolution-35ed08a7654b18590dd850ba7901e725be033394.tar
gsoc2013-evolution-35ed08a7654b18590dd850ba7901e725be033394.tar.gz
gsoc2013-evolution-35ed08a7654b18590dd850ba7901e725be033394.tar.bz2
gsoc2013-evolution-35ed08a7654b18590dd850ba7901e725be033394.tar.lz
gsoc2013-evolution-35ed08a7654b18590dd850ba7901e725be033394.tar.xz
gsoc2013-evolution-35ed08a7654b18590dd850ba7901e725be033394.tar.zst
gsoc2013-evolution-35ed08a7654b18590dd850ba7901e725be033394.zip
Always prepend a leading "/" to the url->path. (set_service_url): Added
2000-07-25 Jeffrey Stedfast <fejj@helixcode.com> * mail-config.c (get_service_url): Always prepend a leading "/" to the url->path. (set_service_url): Added more error checking and also strip the leading '/' from the url->path svn path=/trunk/; revision=4332
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index ab11e1cf5f..d13b4b3641 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -503,8 +503,11 @@ get_service_url (GtkObject *table)
if (editable)
url->host = gtk_editable_get_chars (editable, 0, -1);
editable = gtk_object_get_data (table, "path_entry");
- if (editable)
- url->path = gtk_editable_get_chars (editable, 0, -1);
+ if (editable) {
+ char *path = gtk_editable_get_chars (editable, 0, -1);
+ url->path = g_strdup_printf ("/%s", path);
+ g_free (path);
+ }
auth_optionmenu = gtk_object_get_data (table, "auth_optionmenu");
if (auth_optionmenu) {
@@ -546,16 +549,16 @@ set_service_url (GtkObject *table, char *url_str)
}
editable = gtk_object_get_data (table, "user_entry");
- if (editable && url)
+ if (editable && url && url->user)
gtk_entry_set_text (GTK_ENTRY (editable), url->user);
editable = gtk_object_get_data (table, "server_entry");
- if (editable && url)
+ if (editable && url && url->host)
gtk_entry_set_text (GTK_ENTRY (editable), url->host);
editable = gtk_object_get_data (table, "path_entry");
- if (editable && url)
- gtk_entry_set_text (GTK_ENTRY (editable), url->path);
+ if (editable && url && url->path && *url->path)
+ gtk_entry_set_text (GTK_ENTRY (editable), url->path + 1);
/* How are we gonna do this? */
auth_optionmenu = gtk_object_get_data (table, "auth_optionmenu");