From 9a0e17c9934233995badbe6c4b3c3a3f7c0d16b8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 14 Jan 2016 15:51:36 +0300 Subject: Add option into paths.xml for default GIMP palette file name. --- src/defaults.cpp | 2 ++ src/resources/db/palettedb.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/defaults.cpp b/src/defaults.cpp index 57eeed649..47253b5dd 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -625,6 +625,8 @@ DefaultsData* getPathsDefaults() AddDEF("inactivebadge", "inactive.xml"); AddDEF("awaybadge", "away.xml"); + AddDEF("defaultPaletteFile", "palette.gpl"); + return configData; } diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp index a3caf62dc..3c7abe6af 100644 --- a/src/resources/db/palettedb.cpp +++ b/src/resources/db/palettedb.cpp @@ -20,6 +20,7 @@ #include "resources/db/palettedb.h" +#include "configuration.h" #include "logger.h" #include "utils/files.h" @@ -48,7 +49,9 @@ void PaletteDB::loadPalette() { mLoaded = true; StringVect lines; - Files::loadTextFile("palette.gpl", lines); + Files::loadTextFile(paths.getStringValue( + "defaultPaletteFile"), + lines); StringVectCIter it = lines.begin(); if (it == lines.end()) { -- cgit v1.2.3-70-g09d2