[gimp] app: port gimp_imagefile_get_description() from URI to GFile
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: port gimp_imagefile_get_description() from URI to GFile
- Date: Mon, 7 Jul 2014 23:37:03 +0000 (UTC)
commit 25f190d3096027dba0fb4c22a4b6d4e9b742ac5b
Author: Michael Natterer <mitch gimp org>
Date: Tue Jul 8 01:34:14 2014 +0200
app: port gimp_imagefile_get_description() from URI to GFile
app/core/gimpimagefile.c | 20 +++++++-------------
1 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c
index a1c441a..b70db12 100644
--- a/app/core/gimpimagefile.c
+++ b/app/core/gimpimagefile.c
@@ -47,7 +47,6 @@
#include "gimpprogress.h"
#include "file/file-open.h"
-#include "file/file-utils.h"
#include "gimp-intl.h"
@@ -660,29 +659,24 @@ gimp_imagefile_get_description (GimpViewable *viewable,
GimpThumbnail *thumbnail = private->thumbnail;
gchar *basename;
- if (! thumbnail->image_uri)
+ if (! private->file)
return NULL;
if (tooltip)
{
- gchar *filename;
+ const gchar *name;
const gchar *desc;
- filename = file_utils_uri_display_name (thumbnail->image_uri);
- desc = gimp_imagefile_get_desc_string (imagefile);
+ name = gimp_file_get_utf8_name (private->file);
+ desc = gimp_imagefile_get_desc_string (imagefile);
if (desc)
- {
- *tooltip = g_strdup_printf ("%s\n%s", filename, desc);
- g_free (filename);
- }
+ *tooltip = g_strdup_printf ("%s\n%s", name, desc);
else
- {
- *tooltip = filename;
- }
+ *tooltip = g_strdup (name);
}
- basename = file_utils_uri_display_basename (thumbnail->image_uri);
+ basename = g_path_get_basename (gimp_file_get_utf8_name (private->file));
if (thumbnail->image_width > 0 && thumbnail->image_height > 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]