if (!g_file_info_get_attribute_boolean (info, "filechooser::visible"))
{
+ gboolean has_is_hidden = g_file_info_has_attribute (info, "standard::is-hidden");
+ gboolean has_is_backup = g_file_info_has_attribute (info, "standard::is-backup");
+
if (!enabled_hidden &&
- (g_file_info_get_is_hidden (info) ||
- g_file_info_get_is_backup (info)))
+ ((has_is_hidden && g_file_info_get_is_hidden (info)) ||
+ (has_is_backup && g_file_info_get_is_backup (info))))
{
set_show_hidden (impl, TRUE);
enabled_hidden = TRUE;
gboolean filtered_out)
{
FileModelNode *node = get_node (model, id);
+ gboolean has_is_hidden;
+ gboolean has_is_backup;
gboolean result;
if (node->info == NULL)
return FALSE;
+ has_is_hidden = g_file_info_has_attribute (node->info, "standard::is-hidden");
+ has_is_backup = g_file_info_has_attribute (node->info, "standard::is-backup");
if (!model->show_hidden &&
- (g_file_info_get_is_hidden (node->info) || g_file_info_get_is_backup (node->info)))
+ ((has_is_hidden && g_file_info_get_is_hidden (node->info)) ||
+ (has_is_backup && g_file_info_get_is_backup (node->info))))
return FALSE;
if (_gtk_file_info_consider_as_directory (node->info))
* @model: the model
*
* Gets the cancellable used by the @model. This is the cancellable used
- * internally by the @model that will be cancelled when @model is
+ * internally by the @model that will be cancelled when @model is
* disposed. So you can use it for operations that should be cancelled
* when the model goes away.
*
* _gtk_file_system_model_set_filter:
* @mode: a `GtkFileSystemModel`
* @filter: (nullable): %NULL or filter to use
- *
+ *
* Sets a filter to be used for deciding if a row should be visible or not.
* Whether this filter applies to directories can be toggled with
* _gtk_file_system_model_set_filter_folders().
* @file: the file to add
* @attributes: attributes to query before adding the file
*
- * This is a convenience function that calls g_file_query_info_async() on
+ * This is a convenience function that calls g_file_query_info_async() on
* the given file, and when successful, adds it to the model.
* Upon failure, the @file is discarded.
**/
desktop = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
if (desktop != NULL)
path_bar->desktop_file = g_file_new_for_path (desktop);
- else
+ else
path_bar->desktop_file = NULL;
}
else
{
gboolean fake_root_found = FALSE;
GList *l;
-
+
for (l = start_from_button; l; l = l->next)
{
GtkWidget *button = BUTTON_DATA (l->data)->button;
GFileInfo *info;
ButtonData *button_data;
const char *display_name;
+ gboolean has_is_hidden, has_is_backup;
gboolean is_hidden;
info = g_file_query_info_finish (file, result, NULL);
file_info->cancellable = NULL;
display_name = g_file_info_get_display_name (info);
- is_hidden = g_file_info_get_is_hidden (info) || g_file_info_get_is_backup (info);
+ has_is_hidden = g_file_info_has_attribute (info, "standard::is-hidden");
+ has_is_backup = g_file_info_has_attribute (info, "standard::is-backup");
+ is_hidden = (has_is_hidden && g_file_info_get_is_hidden (info)) ||
+ (has_is_backup && g_file_info_get_is_backup (info));
button_data = make_directory_button (file_info->path_bar, display_name,
file_info->file,
/**
* _gtk_path_bar_up:
* @path_bar: a `GtkPathBar`
- *
+ *
* If the selected button in the pathbar is not the furthest button “up” (in the
* root direction), act as if the user clicked on the next button up.
**/
/**
* _gtk_path_bar_down:
* @path_bar: a `GtkPathBar`
- *
+ *
* If the selected button in the pathbar is not the furthest button “down” (in the
* leaf direction), act as if the user clicked on the next button down.
**/