]> Pileus Git - ~andy/gtk/commitdiff
Small fix for the optionmenu.
authorIan Main <imain@src.gnome.org>
Wed, 21 Jan 1998 08:50:47 +0000 (08:50 +0000)
committerIan Main <imain@src.gnome.org>
Wed, 21 Jan 1998 08:50:47 +0000 (08:50 +0000)
Ian

gtk/gtkfilesel.c

index 2b100c6966ed5d7687fa74029a464671a7a84214..a99db9542cd343792cd2a6e877afe4c3130923be 100644 (file)
@@ -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);