diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-07-28 07:48:22 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-07-28 07:48:22 +0800 |
commit | 5c7766bfbdd344c1e2820329b0cdf455b966a9da (patch) | |
tree | ef782f63214d7194e270f6fb4ffa61fff0441266 /mail/mail-config.c | |
parent | 6b69bd22e31261fe9db4283c223f76879ad3f7fe (diff) | |
download | gsoc2013-evolution-5c7766bfbdd344c1e2820329b0cdf455b966a9da.tar.gz gsoc2013-evolution-5c7766bfbdd344c1e2820329b0cdf455b966a9da.tar.zst gsoc2013-evolution-5c7766bfbdd344c1e2820329b0cdf455b966a9da.zip |
Lets fix Dan's kludge the Right Way (tm) (set_service_url): Only strip off
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* mail-config.c: Lets fix Dan's kludge the Right Way (tm)
(set_service_url): Only strip off the leading "/" from the
url->path if url->host is NULL
(get_service_url): Only prepend a leading "/" to the path if the
host is NULL
svn path=/trunk/; revision=4402
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index 1375a75012..96ee65502f 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -506,10 +506,7 @@ get_service_url (GtkObject *table) editable = gtk_object_get_data (table, "path_entry"); if (editable) { char *path = gtk_editable_get_chars (editable, 0, -1); - /* FIXME. I am a kludge. */ - url->path = g_strdup_printf ( - "%s%s", !strcmp (url->protocol, "imap") ? "/" : "", - path); + url->path = g_strdup_printf ("%s%s", url->host ? "/" : "", path); g_free (path); } @@ -561,8 +558,12 @@ set_service_url (GtkObject *table, char *url_str) gtk_entry_set_text (GTK_ENTRY (editable), url->host); editable = gtk_object_get_data (table, "path_entry"); - if (editable && url && url->path && *url->path) - gtk_entry_set_text (GTK_ENTRY (editable), url->path + 1); + if (editable && url && url->path) { + if (url->host && *url->path) + gtk_entry_set_text (GTK_ENTRY (editable), url->path + 1); + else + gtk_entry_set_text (GTK_ENTRY (editable), url->path); + } /* How are we gonna do this? */ auth_optionmenu = gtk_object_get_data (table, "auth_optionmenu"); |