filechooser: clarify nearby thumbnail priority
This commit is contained in:
parent
781d8c974a
commit
437b7949dd
1 changed files with 6 additions and 6 deletions
|
|
@ -12431,7 +12431,7 @@ file_system_model_set (GtkFileSystemModel *model,
|
|||
GtkTreeModel *tree_model;
|
||||
GtkTreePath *path, *start, *end;
|
||||
GtkTreeIter iter;
|
||||
gboolean file_visible;
|
||||
gboolean file_near_visible;
|
||||
gint path_index;
|
||||
gint start_index;
|
||||
gint end_index;
|
||||
|
|
@ -12446,7 +12446,7 @@ file_system_model_set (GtkFileSystemModel *model,
|
|||
if (tree_model != GTK_TREE_MODEL (model))
|
||||
return FALSE;
|
||||
|
||||
file_visible = FALSE;
|
||||
file_near_visible = FALSE;
|
||||
if (get_visible_range (&start, &end, impl))
|
||||
{
|
||||
if (!_gtk_file_system_model_get_iter_for_file (model,
|
||||
|
|
@ -12462,7 +12462,7 @@ file_system_model_set (GtkFileSystemModel *model,
|
|||
visible_items = MAX (1, end_index - start_index + 1);
|
||||
overscan_items = CLAMP (visible_items * 2, 16, 64);
|
||||
|
||||
file_visible = (path_index >= start_index - overscan_items &&
|
||||
file_near_visible = (path_index >= start_index - overscan_items &&
|
||||
path_index <= end_index + overscan_items);
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
|
|
@ -12490,15 +12490,15 @@ file_system_model_set (GtkFileSystemModel *model,
|
|||
icon_size = FALLBACK_LIST_VIEW_ICON_SIZE;
|
||||
}
|
||||
|
||||
thumbnail_queue_enqueue (impl, file, info, file_visible);
|
||||
thumbnail_queue_enqueue (impl, file, info, file_near_visible);
|
||||
|
||||
g_value_take_object (value, file_system_model_render_icon (impl, info, icon_size));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (file_visible)
|
||||
if (file_near_visible)
|
||||
{
|
||||
thumbnail_queue_enqueue (impl, file, info, file_visible);
|
||||
thumbnail_queue_enqueue (impl, file, info, file_near_visible);
|
||||
|
||||
/* #2 start loading standard icon (callback will be handled by #1) */
|
||||
if (!g_file_info_has_attribute (info, "filechooser::icon_queried"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue