aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-28 07:48:22 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-28 07:48:22 +0800
commit5c7766bfbdd344c1e2820329b0cdf455b966a9da (patch)
treeef782f63214d7194e270f6fb4ffa61fff0441266
parent6b69bd22e31261fe9db4283c223f76879ad3f7fe (diff)
downloadgsoc2013-evolution-5c7766bfbdd344c1e2820329b0cdf455b966a9da.tar
gsoc2013-evolution-5c7766bfbdd344c1e2820329b0cdf455b966a9da.tar.gz
gsoc2013-evolution-5c7766bfbdd344c1e2820329b0cdf455b966a9da.tar.bz2
gsoc2013-evolution-5c7766bfbdd344c1e2820329b0cdf455b966a9da.tar.lz
gsoc2013-evolution-5c7766bfbdd344c1e2820329b0cdf455b966a9da.tar.xz
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
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-config.c13
2 files changed, 15 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 18ad0d1af8..d26439f1f2 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+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
+
2000-07-27 Dan Winship <danw@helixcode.com>
* mail-config.c (get_service_url): toss in a kludge to deal with
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");