Skip to content

Commit

Permalink
Do not delete path settings when adding new directory
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mowgli committed Apr 22, 2011
1 parent a4270ac commit 31f6b82
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ui_pathsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,10 @@ static void dest_new_dir_cb(GtkWidget *widget, gpointer data)
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
Expand All @@ -765,7 +768,11 @@ static void dest_new_dir_cb(GtkWidget *widget, gpointer data)
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)));

Expand Down

0 comments on commit 31f6b82

Please sign in to comment.