[gimp] app: create thumbnails also for imported files, not only for XCFs
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: create thumbnails also for imported files, not only for XCFs
- Date: Fri, 13 Jul 2012 21:52:40 +0000 (UTC)
commit afa81b5fbf753f82dd3c12c7795c38bd1aade372
Author: Michael Natterer <mitch gimp org>
Date: Fri Jul 13 23:50:07 2012 +0200
app: create thumbnails also for imported files, not only for XCFs
file_open_with_proc_and_display(): Use gimp_image_get_any_uri() to
check if the opened file has the same URI as the one passed in so
the logic works for non-XCF too.
app/file/file-open.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/app/file/file-open.c b/app/file/file-open.c
index 478776f..edd45db 100644
--- a/app/file/file-open.c
+++ b/app/file/file-open.c
@@ -477,13 +477,17 @@ file_open_with_proc_and_display (Gimp *gimp,
{
GimpDocumentList *documents = GIMP_DOCUMENT_LIST (gimp->documents);
GimpImagefile *imagefile;
+ const gchar *opened_uri;
imagefile = gimp_document_list_add_uri (documents, uri, mime_type);
/* can only create a thumbnail if the passed uri and the
- * resulting image's uri match.
+ * resulting image's uri match. Use any_uri() here so we
+ * create thumbnails for both XCF and imported images.
*/
- if (strcmp (uri, gimp_image_get_uri_or_untitled (image)) == 0)
+ opened_uri = gimp_image_get_any_uri (image);
+
+ if (opened_uri && ! strcmp (uri, opened_uri))
{
/* no need to save a thumbnail if there's a good one already */
if (! gimp_imagefile_check_thumbnail (imagefile))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]