[gnome-photos] base-item: We only want the nie:title as the name, not the filename
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: We only want the nie:title as the name, not the filename
- Date: Tue, 20 Nov 2012 01:47:37 +0000 (UTC)
commit 3e97b1013dc9ba4b4899fb72811ea38fb586d6a6
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Nov 20 02:12:26 2012 +0100
base-item: We only want the nie:title as the name, not the filename
For photos originating from screenshots and cameras the filename tends
to be human unreadable.
Fixes: https://bugzilla.gnome.org/688562
src/photos-base-item.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 19463f4..ee0bfe7 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -533,16 +533,8 @@ photos_base_item_populate_from_cursor (PhotosBaseItem *self, TrackerSparqlCursor
priv->date_created = -1;
title = tracker_sparql_cursor_get_string (cursor, PHOTOS_QUERY_COLUMNS_TITLE, NULL);
- if (title == NULL || title[0] == '\0')
- {
- const gchar *filename;
-
- filename = tracker_sparql_cursor_get_string (cursor, PHOTOS_QUERY_COLUMNS_FILENAME, NULL);
- if (filename != NULL)
- title = photos_utils_filename_strip_extension (filename);
- else
- title = "";
- }
+ if (title == NULL)
+ title = "";
priv->name = g_strdup (title);
photos_base_item_refresh_icon (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]