[gtk+/multiroot-filechooser] Don't bring up the completion window after typing a folder name that is outside the roots



commit 1358953103a60680c6e94a49723ace835f3c8133
Author: Federico Mena Quintero <federico novell com>
Date:   Thu Oct 14 12:01:10 2010 -0500

    Don't bring up the completion window after typing a folder name that is outside the roots
    
    We were not clearing the completion store in the case where we couldn't
    even start loading the 'new' current folder.  This includes the case
    where the proposed folder is not inside the roots.
    
    Signed-off-by: Federico Mena Quintero <federico novell com>

 gtk/gtkfilechooserentry.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index d43d506..0b8789d 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -1634,6 +1634,12 @@ refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry,
   if (folder_file)
     g_object_unref (folder_file);
 
+  if (result != REFRESH_OK)
+    {
+      clear_completions (chooser_entry);
+      discard_completion_store (chooser_entry);
+    }
+
   g_assert (/* we are OK and we have a current folder file and (loading process or folder handle)... */
 	    ((result == REFRESH_OK)
 	     && (chooser_entry->current_folder_file != NULL)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]