changeset 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 741fc54b4869
children 132642e44799
files ChangeLog src/gtk/bookmarks.c
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 08 00:53:31 2004 +0000
+++ b/ChangeLog	Fri Oct 08 01:22:09 2004 +0000
@@ -1,4 +1,8 @@
 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
+
 	* src/gtk/gftpuicallbacks.c (gftpui_common_run_ls) - if the ..
 	directory was not found and an entry is to be created, make sure
 	the attributes are set to drwx------ (previously it was d---------)
@@ -2950,7 +2954,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.345 2004/10/08 00:53:31 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.346 2004/10/08 01:22:09 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- 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);