mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
Fix to update the file chooser entry
Return after setting the file chooser entry instead of falling through. Also remove the handling for the search and recent files operation modes, since they don't have a location entry to update. svn path=/trunk/; revision=17983
This commit is contained in:
parent
8bd39297a6
commit
7ec6f9375c
@ -1,3 +1,8 @@
|
|||||||
|
2007-05-30 Emmanuele Bassi <ebassi@gnome.org>
|
||||||
|
|
||||||
|
* gtk/gtkfilechooserdefault.c (update_chooser_entry): Return
|
||||||
|
after setting the file chooser entry with the current selection.
|
||||||
|
|
||||||
2007-05-30 Matthias Clasen <mclasen@redhat.com>
|
2007-05-30 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkiconcachevalidator.c: Correct the handling
|
* gtk/gtkiconcachevalidator.c: Correct the handling
|
||||||
|
@ -6702,6 +6702,7 @@ update_chooser_entry (GtkFileChooserDefault *impl)
|
|||||||
struct update_chooser_entry_selected_foreach_closure closure;
|
struct update_chooser_entry_selected_foreach_closure closure;
|
||||||
const char *file_part;
|
const char *file_part;
|
||||||
|
|
||||||
|
/* no need to update the file chooser's entry if there's no entry */
|
||||||
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
|
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
|
||||||
impl->operation_mode == OPERATION_MODE_RECENT ||
|
impl->operation_mode == OPERATION_MODE_RECENT ||
|
||||||
!impl->location_entry)
|
!impl->location_entry)
|
||||||
@ -6761,20 +6762,7 @@ update_chooser_entry (GtkFileChooserDefault *impl)
|
|||||||
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry),
|
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry),
|
||||||
impl->browse_files_last_selected_name);
|
impl->browse_files_last_selected_name);
|
||||||
|
|
||||||
}
|
return;
|
||||||
else if (impl->operation_mode == OPERATION_MODE_SEARCH)
|
|
||||||
{
|
|
||||||
search_get_valid_child_iter (impl, &child_iter, &closure.first_selected_iter);
|
|
||||||
gtk_tree_model_get (GTK_TREE_MODEL (impl->search_model), &child_iter,
|
|
||||||
SEARCH_MODEL_COL_DISPLAY_NAME, &file_part,
|
|
||||||
-1);
|
|
||||||
}
|
|
||||||
else if (impl->operation_mode == OPERATION_MODE_RECENT)
|
|
||||||
{
|
|
||||||
recent_get_valid_child_iter (impl, &child_iter, &closure.first_selected_iter);
|
|
||||||
gtk_tree_model_get (GTK_TREE_MODEL (impl->recent_model), &child_iter,
|
|
||||||
RECENT_MODEL_COL_DISPLAY_NAME, &file_part,
|
|
||||||
-1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -10479,7 +10467,6 @@ list_selection_changed (GtkTreeSelection *selection,
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
||||||
/* TODO - Change the following functions to make them accept MODE_SEARCH */
|
|
||||||
if (impl->location_entry)
|
if (impl->location_entry)
|
||||||
update_chooser_entry (impl);
|
update_chooser_entry (impl);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user