[gnome-photos] base-item: Set the type_description for collections
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] base-item: Set the type_description for collections
- Date: Sun, 11 Aug 2013 06:40:36 +0000 (UTC)
commit 701e56b32656f5c7d63ca3647a33062d1cd0bc3a
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Aug 9 17:50:16 2013 +0200
base-item: Set the type_description for collections
po/POTFILES.in | 1 +
src/photos-base-item.c | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 94771fe..0b4d0be 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,6 +8,7 @@ src/eog-uri-converter.c
src/eog-util.c
src/photos-application.c
[type: gettext/glade]src/photos-app-menu.ui
+src/photos-base-item.c
[type: gettext/glade]src/photos-dlna-renderers-dialog.ui
src/photos-embed.c
src/photos-empty-results-box.c
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 1c8e842..a7d5248 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -29,6 +29,7 @@
#include <gio/gio.h>
#include <glib.h>
+#include <glib/gi18n.h>
#include <tracker-sparql.h>
#include "photos-base-item.h"
@@ -774,11 +775,14 @@ static void
photos_base_item_update_type_description (PhotosBaseItem *self)
{
PhotosBaseItemPrivate *priv = self->priv;
+ gchar *description = NULL;
- if (priv->mime_type == NULL)
- return;
+ if (priv->collection)
+ description = g_strdup (_("Album"));
+ else if (priv->mime_type != NULL)
+ description = g_content_type_get_description (priv->mime_type);
- priv->type_description = g_content_type_get_description (priv->mime_type);
+ priv->type_description = description;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]