search-locations-dialog: Set title for non-existent bookmarks

Show the bookmark name, but keep the switch invisible.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1916
This commit is contained in:
Corey Berla 2024-02-04 20:04:38 -08:00 committed by Matthijs Velsink
parent 8baa4b159b
commit 127bd170c2

View file

@ -485,9 +485,13 @@ place_query_info_ready (GObject *source,
{
AdwActionRow *row = ADW_ACTION_ROW (user_data);
g_autoptr(GFileInfo) info = NULL;
g_autoptr(GError) error = NULL;
Place *place;
info = g_file_query_info_finish (G_FILE (source), res, NULL);
info = g_file_query_info_finish (G_FILE (source), res, &error);
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
adw_action_row_set_subtitle (row, _("Location not found"));
place = g_object_get_data (G_OBJECT (row), "place");
g_clear_object (&place->cancellable);