Commit a97e0ac7 authored by Debarshi Ray's avatar Debarshi Ray

utils: Add photos_utils_convert_paths_to_uris

This will be necessary to support fallback pipeline paths in a
subsequent commit.

#87
parent 85675cc0
......@@ -120,6 +120,32 @@ photos_utils_convert_path_to_uri (const gchar *path)
}
GStrv
photos_utils_convert_paths_to_uris (const gchar *const *paths)
{
GStrv uris = NULL;
guint i;
guint n_paths;
if (paths == NULL)
goto out;
n_paths = g_strv_length ((GStrv) paths);
uris = (GStrv) g_malloc0_n (n_paths + 1, sizeof (gchar *));
for (i = 0; paths[i] != NULL; i++)
{
g_autofree gchar *uri = NULL;
uri = photos_utils_convert_path_to_uri (paths[i]);
uris[i] = g_steal_pointer (&uri);
}
out:
return uris;
}
GIcon *
photos_utils_create_collection_icon (gint base_size, GList *pixbufs)
{
......
......@@ -63,6 +63,8 @@ GdkPixbuf *photos_utils_center_pixbuf (GdkPixbuf *pixbuf, gi
gchar *photos_utils_convert_path_to_uri (const gchar *path);
GStrv photos_utils_convert_paths_to_uris (const gchar *const *paths);
GIcon *photos_utils_create_collection_icon (gint base_size, GList *pixbufs);
GdkPixbuf *photos_utils_create_placeholder_icon_for_scale (const gchar *name, gint size, gint scale);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment