diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-07-26 05:43:15 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-07-26 05:43:15 +0800 |
commit | 35ed08a7654b18590dd850ba7901e725be033394 (patch) | |
tree | 1cd2a47197cbcae12c189c97f2c01ac29851ce4f | |
parent | d6c66f72e7174af586496b8dfdbcc252f753864a (diff) | |
download | gsoc2013-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
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-config.c | 15 |
2 files changed, 16 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 70847b04a1..b8b098e807 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +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 + 2000-07-25 Michael Meeks <michael@helixcode.com> * mail-config.c (create_identity_page): set default signature to 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"); |