changeset 1979:37beac02fc55

Do not delete path settings when adding new directory This patch will change the way, geeqie is mangling the path name in the rename (copy) dialog when creating new directory. Will fix the bugs Debian:529531 and SF:2795791.
author Klaus Ethgen <Klaus@Ethgen.de>
date Sat, 09 Apr 2011 19:47:30 +0100
parents 899b9d10a91e
children 521678874c01
files src/ui_pathsel.c
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui_pathsel.c	Thu Apr 21 18:44:15 2011 +0100
+++ b/src/ui_pathsel.c	Sat Apr 09 19:47:30 2011 +0100
@@ -740,7 +740,10 @@
 	tmp = gtk_entry_get_text(GTK_ENTRY(dd->entry));
 	if (!isname(tmp))
 		{
-		path = g_strdup(tmp);
+		buf = remove_trailing_slash(tmp);
+		path = g_strdup(buf);
+		g_free(buf);
+		buf = remove_level_from_path(path);
 		from_text = TRUE;
 		}
 	else
@@ -765,7 +768,11 @@
 		GtkListStore *store;
 		const gchar *text;
 
-		if (from_text) gtk_entry_set_text(GTK_ENTRY(dd->entry), dd->path);
+		if (from_text)
+			{
+			dest_populate(dd, buf);
+			g_free(buf);
+			}
 
 		store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(dd->d_view)));