[shotwell] transformer: Add possibility to define options on commandline
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell] transformer: Add possibility to define options on commandline
- Date: Sat, 25 Mar 2017 08:23:46 +0000 (UTC)
commit cc0c75f9dfb6df75576d45f67b8ad7624e630899
Author: Jens Georg <mail jensge org>
Date: Fri Mar 24 20:36:20 2017 +0100
transformer: Add possibility to define options on commandline
Signed-off-by: Jens Georg <mail jensge org>
src/graphics-processor.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/graphics-processor.vala b/src/graphics-processor.vala
index cb2d9d7..cb73871 100644
--- a/src/graphics-processor.vala
+++ b/src/graphics-processor.vala
@@ -14,7 +14,13 @@ const GLib.OptionEntry[] options = {
Gee.HashMap<string, KeyValueMap>? marshall_all_transformations(string filename) {
try {
var keyfile = new KeyFile();
- keyfile.load_from_file(filename, KeyFileFlags.NONE);
+ if (filename.has_prefix("string:")) {
+ var data = "[adjustments]\n" + filename.substring(7).replace("&", "\n");
+ keyfile.load_from_data(data, data.length, KeyFileFlags.NONE);
+ } else {
+ keyfile.load_from_file(filename, KeyFileFlags.NONE);
+ }
+
var map = new Gee.HashMap<string, KeyValueMap>();
var objects = keyfile.get_groups();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]