From 3dca4457638eeedb01f961560d0f9e9e6281e8db Mon Sep 17 00:00:00 2001 From: Ian Main Date: Wed, 21 Jan 1998 08:50:47 +0000 Subject: [PATCH] Small fix for the optionmenu. Ian --- gtk/gtkfilesel.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index 2b100c696..a99db9542 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -1041,7 +1041,15 @@ gtk_file_selection_update_history_menu (GtkFileSelection *fs, callback_arg = g_new (HistoryCallbackArg, 1); callback_arg->menu_item = menu_item; - callback_arg->directory = directory; + + /* since the autocompletion gets confused if you don't + * supply a trailing '/' on a dir entry, set the full + * (current) path to "" which just refreshes the filesel */ + if (dir_len == i) { + callback_arg->directory = g_strdup (""); + } else { + callback_arg->directory = directory; + } fs->history_list = g_list_append (fs->history_list, callback_arg);