# HG changeset patch # User Sadrul Habib Chowdhury # Date 1186805529 0 # Node ID d470282d49da74318db065a586546433fa312145 # Parent 1d96cfd8879f3dcd89fb2bd4ee5e2b19cd9d507b Fix typeahead searching in the file-dialog. diff -r 1d96cfd8879f -r d470282d49da finch/libgnt/gntfilesel.c --- a/finch/libgnt/gntfilesel.c Sat Aug 11 03:21:36 2007 +0000 +++ b/finch/libgnt/gntfilesel.c Sat Aug 11 04:12:09 2007 +0000 @@ -355,6 +355,7 @@ } else if (strcmp(str, "..") == 0) { gnt_tree_set_selected(tree, dir); } + gnt_bindable_perform_action_named(GNT_BINDABLE(tree), "end-search", NULL); g_free(dir); g_free(str); g_free(path); @@ -495,10 +496,11 @@ if (!sel->multiselect) return FALSE; tree = sel->dirsonly ? sel->dirs : sel->files; - if (!gnt_widget_has_focus(tree)) + if (!gnt_widget_has_focus(tree) || + gnt_tree_is_searching(GNT_TREE(tree))) return FALSE; - file = gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files)); + file = gnt_tree_get_selection_data(GNT_TREE(tree)); str = gnt_file_sel_get_selected_file(sel); if ((find = g_list_find_custom(sel->tags, str, (GCompareFunc)g_utf8_collate)) != NULL) { @@ -526,7 +528,8 @@ if (!sel->multiselect) return FALSE; tree = sel->dirsonly ? sel->dirs : sel->files; - if (!gnt_widget_has_focus(tree)) + if (!gnt_widget_has_focus(tree) || + gnt_tree_is_searching(GNT_TREE(tree))) return FALSE; g_list_foreach(sel->tags, (GFunc)g_free, NULL); @@ -547,6 +550,9 @@ if (!gnt_widget_has_focus(sel->dirs) && !gnt_widget_has_focus(sel->files)) return FALSE; + if (gnt_tree_is_searching(GNT_TREE(sel->dirs)) || + gnt_tree_is_searching(GNT_TREE(sel->files))) + return FALSE; path = g_build_filename(sel->current, "..", NULL); dir = g_path_get_basename(sel->current);