From eb29bd9d25713c88a324cfacba2307d84c0dd199 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Thu, 11 Apr 2013 12:51:59 -0400 Subject: [PATCH] added option to txtGallery --- openbr/plugins/gallery.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 7c2f17b..f96ca02 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -541,6 +541,8 @@ BR_REGISTER(Gallery, csvGallery) class txtGallery : public Gallery { Q_OBJECT + Q_PROPERTY(QString metadataKey READ get_metadataKey WRITE set_metadataKey RESET reset_metadataKey STORED false) + BR_PROPERTY(QString, metadataKey, "") QStringList lines; @@ -563,7 +565,7 @@ class txtGallery : public Gallery void write(const Template &t) { - lines.append(t.file.flat()); + lines.append(metadataKey.isEmpty() ? t.file.flat() : t.file.get(metadataKey)); } }; -- libgit2 0.21.4