diff src/gtk/bookmarks.c @ 593:46f4218c92ce

2004-10-7 Brian Masney <masneyb@gftp.org> * src/gtk/bookmarks.c (entry_apply_changes) - convert all /'s in the entry description to spaces so that sub menus are not created
author masneyb
date Fri, 08 Oct 2004 01:22:09 +0000
parents de0128b73daa
children 76d372913c71
line wrap: on
line diff
--- a/src/gtk/bookmarks.c	Fri Oct 08 00:53:31 2004 +0000
+++ b/src/gtk/bookmarks.c	Fri Oct 08 01:22:09 2004 +0000
@@ -668,17 +668,21 @@
   size_t oldpathlen;
   const char *str;
 
+  tempstr = g_strdup (gtk_entry_get_text (GTK_ENTRY (bm_pathedit)));
+  while ((pos = strchr (tempstr, '/')) != NULL)
+    *pos = ' ';
+
   oldpathlen = strlen (entry->path);
-
   if ((pos = strrchr (entry->path, '/')) == NULL)
     pos = entry->path;
 
   tempchar = *pos;
   *pos = '\0';
-  origpath = newpath = gftp_build_path (NULL, entry->path,
-                                        gtk_entry_get_text (GTK_ENTRY (bm_pathedit)), NULL);
+  origpath = newpath = gftp_build_path (NULL, entry->path, tempstr, NULL);
   *pos = tempchar;
 
+  g_free (tempstr);
+
   str = gtk_entry_get_text (GTK_ENTRY (bm_hostedit));
   if (entry->hostname != NULL)
     g_free (entry->hostname);