[shotwell] Do not strip newlines from comments on write-back
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] Do not strip newlines from comments on write-back
- Date: Sun, 7 May 2017 13:57:58 +0000 (UTC)
commit e00379b5545254bc197a9d42946d1dd9ddfc54f7
Author: Jens Georg <mail jensge org>
Date: Mon May 1 18:29:34 2017 +0200
Do not strip newlines from comments on write-back
Stripping newlines makes sense for titles etc, but it makes sense to keep them
for comments.
https://bugzilla.gnome.org/show_bug.cgi?id=781897
src/photos/PhotoMetadata.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/photos/PhotoMetadata.vala b/src/photos/PhotoMetadata.vala
index 7764415..e9a9042 100644
--- a/src/photos/PhotoMetadata.vala
+++ b/src/photos/PhotoMetadata.vala
@@ -970,8 +970,13 @@ public class PhotoMetadata : MediaMetadata {
public void set_comment(string? comment,
SetOption option = SetOption.ALL_DOMAINS) {
+ /* https://bugzilla.gnome.org/show_bug.cgi?id=781897 - Do not strip
+ * newlines from comments */
if (!is_string_empty(comment))
- set_all_string(COMMENT_TAGS, comment, option);
+ set_all_generic(COMMENT_TAGS, option, (tag) => {
+ set_string(tag, comment, PREPARE_STRING_OPTIONS &
+ ~PrepareInputTextOptions.STRIP_CRLF);
+ });
else
remove_tags(COMMENT_TAGS);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]