From 6aa091a305180a73ec9734f8e028c23ff4e2e488 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Sat, 28 May 2011 06:12:08 +0000 Subject: [PATCH] Fix an error in changing date/ time display into human_value in the model display area. svn: r17600 --- src/plugins/gramplet/EditExifMetadata.py | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/plugins/gramplet/EditExifMetadata.py b/src/plugins/gramplet/EditExifMetadata.py index 52586428b..a8c782084 100644 --- a/src/plugins/gramplet/EditExifMetadata.py +++ b/src/plugins/gramplet/EditExifMetadata.py @@ -520,27 +520,17 @@ class EditExifMetadata(Gramplet): for KeyTag in metadatatags: if LesserVersion: # prior to v0.2.0 label = metadata.tagDetails(KeyTag)[0] - if KeyTag in ("Exif.Image.DateTime", - "Exif.Photo.DateTimeOriginal", - "Exif.Photo.DateTimeDigitized"): - human_value = _format_datetime(self.plugin_image[KeyTag]) - else: - human_value = self.plugin_image.interpretedExifValue(KeyTag) + human_value = self.plugin_image.interpretedExifValue(KeyTag) + + # add to model display... self.model.add((label, human_value)) else: # v0.2.0 and above try: tag = self.plugin_image[KeyTag] + human_value = tag.human_value - # display the date as the user has set in preferences... - if KeyTag in ("Exif.Image.DateTime", - "Exif.Photo.DateTimeOriginal", - "Exif.Photo.DateTimeDigitized"): - human_value = _format_datetime(tag.value) - - # display anything else... - else: - human_value = tag.human_value + # add to model display... self.model.add((tag.label, human_value)) except AttributeError: