[nautilus] Add extra data to the image properties
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Add extra data to the image properties
- Date: Tue, 25 Sep 2012 16:23:55 +0000 (UTC)
commit a9c2a2252700c47c802938a23258a20b6c2ebed0
Author: William Jon McCann <jmccann redhat com>
Date: Wed Sep 19 06:03:22 2012 -0400
Add extra data to the image properties
That includes PNG tEXt chunk information.
https://bugzilla.gnome.org/show_bug.cgi?id=613288
src/nautilus-image-properties-page.c | 41 ++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-image-properties-page.c b/src/nautilus-image-properties-page.c
index 56f470b..8372eec 100644
--- a/src/nautilus-image-properties-page.c
+++ b/src/nautilus-image-properties-page.c
@@ -297,6 +297,22 @@ append_xmp_value_pair (NautilusImagePropertiesPage *page,
}
#endif /*HAVE EXEMPI*/
+static gboolean
+append_option_value_pair (NautilusImagePropertiesPage *page,
+ GdkPixbuf *pixbuf,
+ const char *key,
+ char *description)
+{
+ const char *value;
+
+ value = gdk_pixbuf_get_option (pixbuf, key);
+ if (value == NULL)
+ return FALSE;
+
+ append_item (page, description, value);
+ return TRUE;
+}
+
static void
append_basic_info (NautilusImagePropertiesPage *page)
{
@@ -329,6 +345,30 @@ append_basic_info (NautilusImagePropertiesPage *page)
}
static void
+append_options_info (NautilusImagePropertiesPage *page)
+{
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gdk_pixbuf_loader_get_pixbuf (page->details->loader);
+ if (pixbuf == NULL)
+ return;
+
+ if (!append_option_value_pair (page, pixbuf, "Title", _("Title")))
+ append_option_value_pair (page, pixbuf, "tEXt::Title", _("Title"));
+ if (!append_option_value_pair (page, pixbuf, "Author", _("Author")))
+ append_option_value_pair (page, pixbuf, "tEXt::Author", _("Author"));
+
+ append_option_value_pair (page, pixbuf, "tEXt::Description", _("Description"));
+ append_option_value_pair (page, pixbuf, "tEXt::Copyright", _("Copyright"));
+ append_option_value_pair (page, pixbuf, "tEXt::Creation Time", _("Created On"));
+ append_option_value_pair (page, pixbuf, "tEXt::Software", _("Created By"));
+ append_option_value_pair (page, pixbuf, "tEXt::Disclaimer", _("Disclaimer"));
+ append_option_value_pair (page, pixbuf, "tEXt::Warning", _("Warning"));
+ append_option_value_pair (page, pixbuf, "tEXt::Source", _("Source"));
+ append_option_value_pair (page, pixbuf, "tEXt::Comment", _("Comment"));
+}
+
+static void
append_exif_info (NautilusImagePropertiesPage *page)
{
#ifdef HAVE_EXIF
@@ -394,6 +434,7 @@ load_finished (NautilusImagePropertiesPage *page)
if (page->details->got_size) {
append_basic_info (page);
+ append_options_info (page);
append_exif_info (page);
append_xmp_info (page);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]