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



commit fbe3412b25f83221afe80cbd9acf22c7c91ee86d
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 f52615f..66f1668 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -1628,6 +1628,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]