Further cleanup of include dependencies

This commit is contained in:
Ingo Weyrich 2019-10-30 22:12:06 +01:00
parent 4dcee23cb3
commit 6935faa258
68 changed files with 100 additions and 158 deletions

View File

@ -28,6 +28,7 @@
#include "gauss.h" #include "gauss.h"
#include "median.h" #include "median.h"
#include "StopWatch.h" #include "StopWatch.h"
namespace { namespace {
bool LinEqSolve(int nDim, double* pfMatr, double* pfVect, double* pfSolution) bool LinEqSolve(int nDim, double* pfMatr, double* pfVect, double* pfSolution)
@ -106,10 +107,6 @@ bool LinEqSolve(int nDim, double* pfMatr, double* pfVect, double* pfSolution)
//end of linear equation solver //end of linear equation solver
} }
namespace rtengine {
extern const Settings* settings;
}
using namespace std; using namespace std;
using namespace rtengine; using namespace rtengine;

View File

@ -78,11 +78,7 @@ namespace rtengine
*/ */
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
extern const Settings* settings;
extern MyMutex *fftwMutex; extern MyMutex *fftwMutex;

View File

@ -20,8 +20,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
CameraConst::CameraConst() : pdafOffset(0) CameraConst::CameraConst() : pdafOffset(0)
{ {
memset(dcraw_matrix, 0, sizeof(dcraw_matrix)); memset(dcraw_matrix, 0, sizeof(dcraw_matrix));

View File

@ -34,10 +34,6 @@
namespace rtengine namespace rtengine
{ {
#ifdef _DEBUG
extern const Settings* settings;
#endif
void Ciecam02::curvecolorfloat (float satind, float satval, float &sres, float parsat) void Ciecam02::curvecolorfloat (float satind, float satval, float &sres, float parsat)
{ {
if (satind > 0.f) { if (satind > 0.f) {

View File

@ -30,8 +30,6 @@ using namespace std;
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
cmsToneCurve* Color::linearGammaTRC; cmsToneCurve* Color::linearGammaTRC;
LUTf Color::cachef; LUTf Color::cachef;
LUTf Color::cachefy; LUTf Color::cachefy;

View File

@ -31,8 +31,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
static const double cie_colour_match_jd[97][3] = {//350nm to 830nm 5 nm J.Desmis 2° Standard Observer. static const double cie_colour_match_jd[97][3] = {//350nm to 830nm 5 nm J.Desmis 2° Standard Observer.
{0.0000000, 0.000000, 0.000000}, {0.0000000, 0.000000, 0.000000}, {0.0001299, 0.0003917, 0.0006061}, {0.0000000, 0.000000, 0.000000}, {0.0000000, 0.000000, 0.000000}, {0.0001299, 0.0003917, 0.0006061},
{0.0002321, 0.000006965, 0.001086}, {0.0004149, 0.00001239, 0.001946}, {0.0007416, 0.00002202, 0.003846}, {0.0002321, 0.000006965, 0.001086}, {0.0004149, 0.00001239, 0.001946}, {0.0007416, 0.00002202, 0.003846},

View File

@ -33,13 +33,6 @@
#include "rt_math.h" #include "rt_math.h"
#include "../rtgui/options.h" #include "../rtgui/options.h"
namespace rtengine
{
extern const Settings* settings;
}
using namespace rtengine; using namespace rtengine;
using namespace rtexif; using namespace rtexif;
@ -1868,7 +1861,7 @@ DCPProfile* DCPStore::getProfile(const Glib::ustring& filename) const
if (res->isValid()) { if (res->isValid()) {
// Add profile // Add profile
profile_cache[key] = res; profile_cache[key] = res;
if (options.rtSettings.verbose) { if (settings->verbose) {
printf("DCP profile '%s' loaded from disk\n", filename.c_str()); printf("DCP profile '%s' loaded from disk\n", filename.c_str());
} }
return res; return res;

View File

@ -48,8 +48,6 @@ constexpr T skips(T a, T b)
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
Crop::Crop(ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) Crop::Crop(ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow)
: PipetteBuffer(editDataProvider), origCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr), : PipetteBuffer(editDataProvider), origCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr),
cropImg (nullptr), transCrop (nullptr), cieCrop (nullptr), cropImg (nullptr), transCrop (nullptr), cieCrop (nullptr),

View File

@ -40,8 +40,6 @@ using namespace std;
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
#undef ABS #undef ABS
#define ABS(a) ((a)<0?-(a):(a)) #define ABS(a) ((a)<0?-(a):(a))

View File

@ -29,8 +29,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
// *********************** class dfInfo ************************************** // *********************** class dfInfo **************************************
inline dfInfo& dfInfo::operator =(const dfInfo &o) inline dfInfo& dfInfo::operator =(const dfInfo &o)

View File

@ -350,8 +350,6 @@ void idirpyr_eq_channelcam(const float * const * data_coarse, const float * cons
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
void ImProcFunctions::dirpyr_equalizer(const float * const * src, float ** dst, int srcwidth, int srcheight, const float * const * l_a, const float * const * l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scaleprev) void ImProcFunctions::dirpyr_equalizer(const float * const * src, float ** dst, int srcwidth, int srcheight, const float * const * l_a, const float * const * l_b, const double * mult, const double dirpyrThreshold, const double skinprot, float b_l, float t_l, float t_r, int scaleprev)
{ {
//sequence of scales //sequence of scales

View File

@ -179,7 +179,7 @@ bool DynamicProfileRules::loadRules()
return false; return false;
} }
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("loading dynamic profiles...\n"); printf ("loading dynamic profiles...\n");
} }
@ -198,7 +198,7 @@ bool DynamicProfileRules::loadRules()
return false; return false;
} }
if (options.rtSettings.verbose) { if (settings->verbose) {
printf (" loading rule %d\n", serial); printf (" loading rule %d\n", serial);
} }
@ -228,7 +228,7 @@ bool DynamicProfileRules::loadRules()
bool DynamicProfileRules::storeRules() bool DynamicProfileRules::storeRules()
{ {
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("saving dynamic profiles...\n"); printf ("saving dynamic profiles...\n");
} }

View File

@ -30,8 +30,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
// *********************** class ffInfo ************************************** // *********************** class ffInfo **************************************
inline ffInfo& ffInfo::operator =(const ffInfo &o) inline ffInfo& ffInfo::operator =(const ffInfo &o)

View File

@ -36,13 +36,6 @@
//#define BENCHMARK //#define BENCHMARK
#include "StopWatch.h" #include "StopWatch.h"
namespace rtengine
{
extern const Settings* settings;
}
namespace namespace
{ {

View File

@ -22,19 +22,11 @@
#include "rtthumbnail.h" #include "rtthumbnail.h"
#include "opthelper.h" #include "opthelper.h"
#include "rt_algo.h" #include "rt_algo.h"
#include "rtengine.h"
#include "settings.h" #include "settings.h"
#include "procparams.h" #include "procparams.h"
#define BENCHMARK #define BENCHMARK
#include "StopWatch.h" #include "StopWatch.h"
namespace rtengine
{
extern const Settings* settings;
}
void rtengine::Thumbnail::processFilmNegative( void rtengine::Thumbnail::processFilmNegative(
const procparams::ProcParams &params, const procparams::ProcParams &params,
const Imagefloat* baseImg, const Imagefloat* baseImg,

View File

@ -288,8 +288,6 @@ void boxblur_resamp(const float* const* src, float** dst, float** temp, int H, i
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue) void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue)
{ {
double progress = 0.0; double progress = 0.0;

View File

@ -34,6 +34,7 @@
#include "iccstore.h" #include "iccstore.h"
#include "iccmatrices.h" #include "iccmatrices.h"
#include "utils.h"
#include "../rtgui/guiutils.h" #include "../rtgui/guiutils.h"
#include "../rtgui/options.h" #include "../rtgui/options.h"
@ -44,12 +45,6 @@
#include "cJSON.h" #include "cJSON.h"
#define inkc_constant 0x696E6B43 #define inkc_constant 0x696E6B43
namespace rtengine
{
extern const Settings* settings;
}
namespace namespace
{ {

View File

@ -810,7 +810,7 @@ int ImageIO::loadTIFF (const Glib::ustring &fname)
* TIFFTAG_SMAXSAMPLEVALUE, but for now, we normalize the image to the * TIFFTAG_SMAXSAMPLEVALUE, but for now, we normalize the image to the
* effective minimum and maximum values * effective minimum and maximum values
*/ */
if (options.rtSettings.verbose) { if (settings->verbose) {
printf("Information of \"%s\":\n", fname.c_str()); printf("Information of \"%s\":\n", fname.c_str());
uint16 tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; uint16 tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit;
if (TIFFGetField(in, TIFFTAG_DEFAULTSCALE, &tiffDefaultScale)) { if (TIFFGetField(in, TIFFTAG_DEFAULTSCALE, &tiffDefaultScale)) {

View File

@ -47,8 +47,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
ImProcCoordinator::ImProcCoordinator() : ImProcCoordinator::ImProcCoordinator() :
orig_prev(nullptr), orig_prev(nullptr),
oprevi(nullptr), oprevi(nullptr),

View File

@ -267,8 +267,6 @@ namespace rtengine
using namespace procparams; using namespace procparams;
extern const Settings* settings;
ImProcFunctions::~ImProcFunctions () ImProcFunctions::~ImProcFunctions ()
{ {
if (monitorTransform) { if (monitorTransform) {

View File

@ -42,7 +42,7 @@ const Settings* settings;
MyMutex* lcmsMutex = nullptr; MyMutex* lcmsMutex = nullptr;
MyMutex *fftwMutex = nullptr; MyMutex *fftwMutex = nullptr;
int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir, bool loadAll) int init (const Settings* s, const Glib::ustring& baseDir, const Glib::ustring& userSettingsDir, bool loadAll)
{ {
settings = s; settings = s;
ProcParams::init(); ProcParams::init();

View File

@ -200,7 +200,7 @@ float estimate_ambient_light(const array2D<float> &R, const array2D<float> &G, c
} }
} }
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << "dehaze: computing ambient light from " << patches.size() std::cout << "dehaze: computing ambient light from " << patches.size()
<< " patches" << std::endl; << " patches" << std::endl;
} }
@ -284,7 +284,7 @@ void ImProcFunctions::dehaze(Imagefloat *img)
const int H = img->getHeight(); const int H = img->getHeight();
const float strength = LIM01(float(params->dehaze.strength) / 100.f * 0.9f); const float strength = LIM01(float(params->dehaze.strength) / 100.f * 0.9f);
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << "dehaze: strength = " << strength << std::endl; std::cout << "dehaze: strength = " << strength << std::endl;
} }
@ -326,7 +326,7 @@ void ImProcFunctions::dehaze(Imagefloat *img)
} }
if (min(ambient[0], ambient[1], ambient[2]) < 0.01f) { if (min(ambient[0], ambient[1], ambient[2]) < 0.01f) {
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << "dehaze: no haze detected" << std::endl; std::cout << "dehaze: no haze detected" << std::endl;
} }
restore(img, maxChannel, multiThread); restore(img, maxChannel, multiThread);
@ -334,7 +334,7 @@ void ImProcFunctions::dehaze(Imagefloat *img)
} }
patchsize = max(max(W, H) / 600, 2); patchsize = max(max(W, H) / 600, 2);
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << "dehaze: ambient light is " std::cout << "dehaze: ambient light is "
<< ambient[0] << ", " << ambient[1] << ", " << ambient[2] << ambient[0] << ", " << ambient[1] << ", " << ambient[2]
<< std::endl; << std::endl;
@ -349,7 +349,7 @@ void ImProcFunctions::dehaze(Imagefloat *img)
array2D<float> guideB(W, H, img->b.ptrs, ARRAY2D_BYREFERENCE); array2D<float> guideB(W, H, img->b.ptrs, ARRAY2D_BYREFERENCE);
guidedFilter(guideB, dark, dark, radius, epsilon, multiThread); guidedFilter(guideB, dark, dark, radius, epsilon, multiThread);
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << "dehaze: max distance is " << maxDistance << std::endl; std::cout << "dehaze: max distance is " << maxDistance << std::endl;
} }

View File

@ -34,8 +34,6 @@ namespace rtengine
extern void filmlike_clip(float *r, float *g, float *b); extern void filmlike_clip(float *r, float *g, float *b);
extern const Settings* settings;
namespace { namespace {
inline void copyAndClampLine(const float *src, unsigned char *dst, const int W) inline void copyAndClampLine(const float *src, unsigned char *dst, const int W)

View File

@ -161,8 +161,6 @@ void dcdamping (float** aI, float** aO, float damping, int W, int H)
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
void ImProcFunctions::deconvsharpening (float** luminance, float** tmp, const float * const * blend, int W, int H, const procparams::SharpeningParams &sharpenParam, double Scale) void ImProcFunctions::deconvsharpening (float** luminance, float** tmp, const float * const * blend, int W, int H, const procparams::SharpeningParams &sharpenParam, double Scale)
{ {
if (sharpenParam.deconvamount == 0 && sharpenParam.blurradius < 0.25f) { if (sharpenParam.deconvamount == 0 && sharpenParam.blurradius < 0.25f) {

View File

@ -60,8 +60,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
struct cont_params { struct cont_params {
float mul[10]; float mul[10];
int chrom; int chrom;

View File

@ -35,13 +35,6 @@
#include "settings.h" #include "settings.h"
#include "utils.h" #include "utils.h"
namespace rtengine
{
extern const Settings* settings;
}
class rtengine::LCPProfile::LCPPersModel class rtengine::LCPProfile::LCPPersModel
{ {
public: public:

View File

@ -160,7 +160,7 @@ void ProfileStore::_parseProfiles ()
if (findEntryFromFullPathU (options.defProfRaw) == nullptr) { if (findEntryFromFullPathU (options.defProfRaw) == nullptr) {
options.setDefProfRawMissing (true); options.setDefProfRawMissing (true);
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("WARNING: Default profile \"%s\" for raw images not found!\n", options.defProfRaw.c_str()); printf ("WARNING: Default profile \"%s\" for raw images not found!\n", options.defProfRaw.c_str());
} }
} }
@ -168,7 +168,7 @@ void ProfileStore::_parseProfiles ()
if (findEntryFromFullPathU (options.defProfImg) == nullptr) { if (findEntryFromFullPathU (options.defProfImg) == nullptr) {
options.setDefProfImgMissing (true); options.setDefProfImgMissing (true);
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("WARNING: Default profile \"%s\" for standard images not found!\n", options.defProfImg.c_str()); printf ("WARNING: Default profile \"%s\" for standard images not found!\n", options.defProfImg.c_str());
} }
} }
@ -220,7 +220,7 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath
if (lastdot != Glib::ustring::npos && lastdot == currDir.length() - 4 && currDir.substr (lastdot).casefold() == paramFileExtension) { if (lastdot != Glib::ustring::npos && lastdot == currDir.length() - 4 && currDir.substr (lastdot).casefold() == paramFileExtension) {
// file found // file found
if ( options.rtSettings.verbose ) { if (settings->verbose) {
printf ("Processing file %s...", fname.c_str()); printf ("Processing file %s...", fname.c_str());
} }
@ -233,7 +233,7 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath
if (!res && pProf->pparams->ppVersion >= 220) { if (!res && pProf->pparams->ppVersion >= 220) {
fileFound = true; fileFound = true;
if ( options.rtSettings.verbose ) { if (settings->verbose) {
printf ("OK\n"); printf ("OK\n");
} }
@ -244,7 +244,7 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath
// map the partial profile // map the partial profile
partProfiles[filePSE] = pProf; partProfiles[filePSE] = pProf;
//partProfiles.insert( std::pair<ProfileStoreEntry*, rtengine::procparams::AutoPartialProfile*> (filePSE, pProf) ); //partProfiles.insert( std::pair<ProfileStoreEntry*, rtengine::procparams::AutoPartialProfile*> (filePSE, pProf) );
} else if ( options.rtSettings.verbose ) { } else if (settings->verbose) {
printf ("failed!\n"); printf ("failed!\n");
} }
} }
@ -522,7 +522,7 @@ PartialProfile *ProfileStore::loadDynamicProfile (const FramesMetaData *im)
for (auto rule : dynamicRules) { for (auto rule : dynamicRules) {
if (rule.matches (im)) { if (rule.matches (im)) {
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("found matching profile %s\n", rule.profilepath.c_str()); printf ("found matching profile %s\n", rule.profilepath.c_str());
} }

View File

@ -19,8 +19,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
RawImage::RawImage( const Glib::ustring &name ) RawImage::RawImage( const Glib::ustring &name )
: data(nullptr) : data(nullptr)
, prefilters(0) , prefilters(0)

View File

@ -426,7 +426,6 @@ void transLineD1x (const float* const red, const float* const green, const float
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
#undef ABS #undef ABS
#undef DIST #undef DIST

View File

@ -562,7 +562,7 @@ public:
* @param baseDir base directory of RT's installation dir * @param baseDir base directory of RT's installation dir
* @param userSettingsDir RT's base directory in the user's settings dir * @param userSettingsDir RT's base directory in the user's settings dir
* @param loadAll if false, don't load the various dependencies (profiles, HALDClut files, ...), they'll be loaded from disk each time they'll be used (launching time improvement) */ * @param loadAll if false, don't load the various dependencies (profiles, HALDClut files, ...), they'll be loaded from disk each time they'll be used (launching time improvement) */
int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir, bool loadAll = true); int init (const Settings* s, const Glib::ustring& baseDir, const Glib::ustring& userSettingsDir, bool loadAll = true);
/** Cleanup the RT engine (static variables) */ /** Cleanup the RT engine (static variables) */
void cleanup (); void cleanup ();

View File

@ -47,7 +47,6 @@
#include "StopWatch.h" #include "StopWatch.h"
#include "utils.h" #include "utils.h"
#include "../rtgui/options.h"
#include "../rtgui/ppversion.h" #include "../rtgui/ppversion.h"
namespace namespace
@ -194,8 +193,6 @@ void scale_colors (rtengine::RawImage *ri, float scale_mul[4], float cblack[4],
namespace rtengine namespace rtengine
{ {
extern const Settings *settings;
using namespace procparams; using namespace procparams;
Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, int fixwh, double wbEq, bool inspectorMode) Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, int fixwh, double wbEq, bool inspectorMode)
@ -335,7 +332,7 @@ Image8 *load_inspector_mode(const Glib::ustring &fname, RawMetaDataLocation &rml
neutral.raw.bayersensor.method = RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::FAST); neutral.raw.bayersensor.method = RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::FAST);
neutral.raw.xtranssensor.method = RAWParams::XTransSensor::getMethodString(RAWParams::XTransSensor::Method::FAST); neutral.raw.xtranssensor.method = RAWParams::XTransSensor::getMethodString(RAWParams::XTransSensor::Method::FAST);
neutral.icm.inputProfile = "(camera)"; neutral.icm.inputProfile = "(camera)";
neutral.icm.workingProfile = options.rtSettings.srgb; neutral.icm.workingProfile = settings->srgb;
src.preprocess(neutral.raw, neutral.lensProf, neutral.coarse, false); src.preprocess(neutral.raw, neutral.lensProf, neutral.coarse, false);
double thresholdDummy = 0.f; double thresholdDummy = 0.f;
@ -434,7 +431,7 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL
// did we succeed? // did we succeed?
if ( err ) { if ( err ) {
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << "Could not extract thumb from " << fname.c_str() << std::endl; std::cout << "Could not extract thumb from " << fname.c_str() << std::endl;
} }
delete tpp; delete tpp;
@ -1242,7 +1239,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
ImProcFunctions ipf (&params, forHistogramMatching); // enable multithreading when forHistogramMatching is true ImProcFunctions ipf (&params, forHistogramMatching); // enable multithreading when forHistogramMatching is true
ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale); ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale);
ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), RenderingIntent(options.rtSettings.monitorIntent), false, false); ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), RenderingIntent(settings->monitorIntent), false, false);
LUTu hist16 (65536); LUTu hist16 (65536);
@ -2132,11 +2129,11 @@ bool Thumbnail::readData (const Glib::ustring& fname)
return true; return true;
} catch (Glib::Error &err) { } catch (Glib::Error &err) {
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("Thumbnail::readData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); printf ("Thumbnail::readData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str());
} }
} catch (...) { } catch (...) {
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("Thumbnail::readData / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); printf ("Thumbnail::readData / Unknown exception while trying to load \"%s\"!\n", fname.c_str());
} }
} }
@ -2183,11 +2180,11 @@ bool Thumbnail::writeData (const Glib::ustring& fname)
keyData = keyFile.to_data (); keyData = keyFile.to_data ();
} catch (Glib::Error& err) { } catch (Glib::Error& err) {
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("Thumbnail::writeData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); printf ("Thumbnail::writeData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str());
} }
} catch (...) { } catch (...) {
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("Thumbnail::writeData / Unknown exception while trying to save \"%s\"!\n", fname.c_str()); printf ("Thumbnail::writeData / Unknown exception while trying to save \"%s\"!\n", fname.c_str());
} }
} }
@ -2199,7 +2196,7 @@ bool Thumbnail::writeData (const Glib::ustring& fname)
FILE *f = g_fopen (fname.c_str (), "wt"); FILE *f = g_fopen (fname.c_str (), "wt");
if (!f) { if (!f) {
if (options.rtSettings.verbose) { if (settings->verbose) {
printf ("Thumbnail::writeData / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); printf ("Thumbnail::writeData / Error: unable to open file \"%s\" with write access!\n", fname.c_str());
} }

View File

@ -96,4 +96,5 @@ public:
* @param s a pointer to the Settings instance to destroy. */ * @param s a pointer to the Settings instance to destroy. */
static void destroy(Settings* s); static void destroy(Settings* s);
}; };
extern const Settings* settings;
} }

View File

@ -29,8 +29,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
SHMap::SHMap (int w, int h) : max_f(0.f), min_f(0.f), avg(0.f), W(w), H(h) SHMap::SHMap (int w, int h) : max_f(0.f), min_f(0.f), avg(0.f), W(w), H(h)
{ {

View File

@ -38,7 +38,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
namespace namespace
{ {

View File

@ -32,8 +32,6 @@
namespace rtengine namespace rtengine
{ {
extern const Settings* settings;
template<class T> void freeArray (T** a, int H) template<class T> void freeArray (T** a, int H)
{ {
for (int i = 0; i < H; i++) { for (int i = 0; i < H; i++) {

View File

@ -20,7 +20,7 @@
#include <sigc++/slot.h> #include <sigc++/slot.h>
#include <cmath> #include <cmath>
#include "multilangmgr.h" #include "multilangmgr.h"
#include "../rtengine/rtengine.h" #include "../rtengine/rt_math.h"
#include "options.h" #include "options.h"
#include "guiutils.h" #include "guiutils.h"
#include "rtimage.h" #include "rtimage.h"

View File

@ -23,6 +23,7 @@
#include <locale.h> #include <locale.h>
#include "../rtengine/procparams.h" #include "../rtengine/procparams.h"
#include "../rtengine/settings.h"
CacheImageData::CacheImageData() : CacheImageData::CacheImageData() :
supported(false), supported(false),
@ -223,11 +224,11 @@ int CacheImageData::load (const Glib::ustring& fname)
return 0; return 0;
} }
} catch (Glib::Error &err) { } catch (Glib::Error &err) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("CacheImageData::load / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); printf("CacheImageData::load / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str());
} }
} catch (...) { } catch (...) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("CacheImageData::load / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); printf("CacheImageData::load / Unknown exception while trying to load \"%s\"!\n", fname.c_str());
} }
} }
@ -305,11 +306,11 @@ int CacheImageData::save (const Glib::ustring& fname)
keyData = keyFile.to_data (); keyData = keyFile.to_data ();
} catch (Glib::Error &err) { } catch (Glib::Error &err) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("CacheImageData::save / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); printf("CacheImageData::save / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str());
} }
} catch (...) { } catch (...) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("CacheImageData::save / Unknown exception while trying to save \"%s\"!\n", fname.c_str()); printf("CacheImageData::save / Unknown exception while trying to save \"%s\"!\n", fname.c_str());
} }
} }
@ -321,7 +322,7 @@ int CacheImageData::save (const Glib::ustring& fname)
FILE *f = g_fopen (fname.c_str (), "wt"); FILE *f = g_fopen (fname.c_str (), "wt");
if (!f) { if (!f) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("CacheImageData::save / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); printf("CacheImageData::save / Error: unable to open file \"%s\" with write access!\n", fname.c_str());
} }

View File

@ -32,8 +32,8 @@
#include "guiutils.h" #include "guiutils.h"
#include "options.h" #include "options.h"
#include "procparamchangers.h"
#include "thumbnail.h" #include "thumbnail.h"
#include "procparamchangers.h"
namespace namespace
{ {
@ -64,7 +64,7 @@ void CacheManager::init ()
} }
} }
if (error != 0 && options.rtSettings.verbose) { if (error != 0 && rtengine::settings->verbose) {
std::cerr << "Failed to create all cache directories: " << g_strerror(errno) << std::endl; std::cerr << "Failed to create all cache directories: " << g_strerror(errno) << std::endl;
} }
} }
@ -191,7 +191,7 @@ void CacheManager::renameEntry (const std::string& oldfilename, const std::strin
error |= g_rename (getCacheFileName ("embprofiles", oldfilename, ".icc", oldmd5).c_str (), getCacheFileName ("embprofiles", newfilename, ".icc", newmd5).c_str ()); error |= g_rename (getCacheFileName ("embprofiles", oldfilename, ".icc", oldmd5).c_str (), getCacheFileName ("embprofiles", newfilename, ".icc", newmd5).c_str ());
error |= g_rename (getCacheFileName ("data", oldfilename, ".txt", oldmd5).c_str (), getCacheFileName ("data", newfilename, ".txt", newmd5).c_str ()); error |= g_rename (getCacheFileName ("data", oldfilename, ".txt", oldmd5).c_str (), getCacheFileName ("data", newfilename, ".txt", newmd5).c_str ());
if (error != 0 && options.rtSettings.verbose) { if (error != 0 && rtengine::settings->verbose) {
std::cerr << "Failed to rename all files for cache entry '" << oldfilename << "': " << g_strerror(errno) << std::endl; std::cerr << "Failed to rename all files for cache entry '" << oldfilename << "': " << g_strerror(errno) << std::endl;
} }
@ -263,7 +263,7 @@ void CacheManager::deleteDir (const Glib::ustring& dirName) const
error |= g_remove (Glib::build_filename (baseDir, dirName, *entry).c_str ()); error |= g_remove (Glib::build_filename (baseDir, dirName, *entry).c_str ());
} }
if (error != 0 && options.rtSettings.verbose) { if (error != 0 && rtengine::settings->verbose) {
std::cerr << "Failed to delete all entries in cache directory '" << dirName << "': " << g_strerror(errno) << std::endl; std::cerr << "Failed to delete all entries in cache directory '" << dirName << "': " << g_strerror(errno) << std::endl;
} }
@ -288,7 +288,7 @@ void CacheManager::deleteFiles (const Glib::ustring& fname, const std::string& m
error |= g_remove (getCacheFileName ("profiles", fname, paramFileExtension, md5).c_str ()); error |= g_remove (getCacheFileName ("profiles", fname, paramFileExtension, md5).c_str ());
} }
if (error != 0 && options.rtSettings.verbose) { if (error != 0 && rtengine::settings->verbose) {
std::cerr << "Failed to delete all files for cache entry '" << fname << "': " << g_strerror(errno) << std::endl; std::cerr << "Failed to delete all files for cache entry '" << fname << "': " << g_strerror(errno) << std::endl;
} }
} }

View File

@ -22,6 +22,7 @@
#include "guiutils.h" #include "guiutils.h"
#include "options.h" #include "options.h"
#include "rtimage.h"
#include "../rtengine/color.h" #include "../rtengine/color.h"
#include "../rtengine/procparams.h" #include "../rtengine/procparams.h"

View File

@ -63,7 +63,7 @@ std::vector<Glib::ustring> listSubDirs (const Glib::RefPtr<Gio::File>& dir, bool
subDirs.push_back (file->get_name ()); subDirs.push_back (file->get_name ());
} catch (const Glib::Exception& exception) { } catch (const Glib::Exception& exception) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
std::cerr << exception.what().c_str() << std::endl; std::cerr << exception.what().c_str() << std::endl;
} }
@ -72,7 +72,7 @@ std::vector<Glib::ustring> listSubDirs (const Glib::RefPtr<Gio::File>& dir, bool
} catch (const Glib::Exception& exception) { } catch (const Glib::Exception& exception) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
std::cerr << "Failed to list subdirectories of \"" << dir->get_parse_name() << "\": " << exception.what () << std::endl; std::cerr << "Failed to list subdirectories of \"" << dir->get_parse_name() << "\": " << exception.what () << std::endl;
} }

View File

@ -18,11 +18,11 @@
*/ */
#include "dynamicprofilepanel.h" #include "dynamicprofilepanel.h"
#include "options.h"
#include "multilangmgr.h" #include "multilangmgr.h"
#include "../rtengine/profilestore.h" #include "../rtengine/profilestore.h"
#include "../rtengine/rtengine.h" #include "../rtengine/rtengine.h"
#include "../rtengine/dynamicprofile.h" #include "../rtengine/dynamicprofile.h"
#include "../rtengine/settings.h"
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
@ -616,7 +616,7 @@ void DynamicProfilePanel::save()
if (!ProfileStore::getInstance()->storeRules()) { if (!ProfileStore::getInstance()->storeRules()) {
printf ("Error in saving dynamic profile rules\n"); printf ("Error in saving dynamic profile rules\n");
} else if (options.rtSettings.verbose) { } else if (rtengine::settings->verbose) {
printf ("Saved %d dynamic profile rules\n", int (rules.size())); printf ("Saved %d dynamic profile rules\n", int (rules.size()));
} }
} }

View File

@ -20,6 +20,7 @@
#include <gtkmm.h> #include <gtkmm.h>
#include "filepanel.h" #include "filepanel.h"
#include "editorpanel.h" #include "editorpanel.h"
#include "rtimage.h"
#include <set> #include <set>
class EditWindow : public Gtk::Window class EditWindow : public Gtk::Window

View File

@ -213,7 +213,7 @@ bool ExtProgStore::spawnCommandAsync (const Glib::ustring& cmd)
} catch (const Glib::Exception& exception) { } catch (const Glib::Exception& exception) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
std::cerr << "Failed to execute \"" << cmd << "\": " << exception.what() << std::endl; std::cerr << "Failed to execute \"" << cmd << "\": " << exception.what() << std::endl;
} }
@ -232,7 +232,7 @@ bool ExtProgStore::spawnCommandSync (const Glib::ustring& cmd)
} catch (const Glib::Exception& exception) { } catch (const Glib::Exception& exception) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
std::cerr << "Failed to execute \"" << cmd << "\": " << exception.what() << std::endl; std::cerr << "Failed to execute \"" << cmd << "\": " << exception.what() << std::endl;
} }

View File

@ -23,6 +23,7 @@
#include "fattaltonemap.h" #include "fattaltonemap.h"
#include "eventmapper.h" #include "eventmapper.h"
#include "rtimage.h"
#include "../rtengine/procparams.h" #include "../rtengine/procparams.h"

View File

@ -602,7 +602,7 @@ std::vector<Glib::ustring> FileCatalog::getFileList()
names.push_back(Glib::build_filename(selectedDirectory, fname)); names.push_back(Glib::build_filename(selectedDirectory, fname));
} catch (Glib::Exception& exception) { } catch (Glib::Exception& exception) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
std::cerr << exception.what() << std::endl; std::cerr << exception.what() << std::endl;
} }
} }
@ -610,7 +610,7 @@ std::vector<Glib::ustring> FileCatalog::getFileList()
} catch (Glib::Exception& exception) { } catch (Glib::Exception& exception) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
std::cerr << "Failed to list directory \"" << selectedDirectory << "\": " << exception.what() << std::endl; std::cerr << "Failed to list directory \"" << selectedDirectory << "\": " << exception.what() << std::endl;
} }

View File

@ -28,13 +28,23 @@
#include "../rtengine/coord.h" #include "../rtengine/coord.h"
#include "../rtengine/noncopyable.h" #include "../rtengine/noncopyable.h"
#include "../rtengine/rtengine.h"
#include "rtimage.h" #include "threadutils.h"
// for convenience... // for convenience...
#include "pathutils.h" #include "pathutils.h"
namespace rtengine {
namespace procparams
{
class ProcParams;
struct CropParams;
}
}
class RTImage;
Glib::ustring escapeHtmlChars(const Glib::ustring &src); Glib::ustring escapeHtmlChars(const Glib::ustring &src);
bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference = true); bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference = true);

View File

@ -29,13 +29,6 @@
#include <omp.h> #include <omp.h>
#endif #endif
namespace rtengine
{
extern const Settings* settings;
}
const char* sTRCPreset[] = {"BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9", "Lab_g3.0s9.03296"}; //gamma free const char* sTRCPreset[] = {"BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9", "Lab_g3.0s9.03296"}; //gamma free
ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow) ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)

View File

@ -22,6 +22,7 @@
#include "cursormanager.h" #include "cursormanager.h"
#include "guiutils.h" #include "guiutils.h"
#include "options.h" #include "options.h"
#include "rtscalable.h"
#include "../rtengine/previewimage.h" #include "../rtengine/previewimage.h"
InspectorBuffer::InspectorBuffer(const Glib::ustring &imagePath) : currTransform(0), fromRaw(false) InspectorBuffer::InspectorBuffer(const Glib::ustring &imagePath) : currTransform(0), fromRaw(false)

View File

@ -22,6 +22,8 @@
#include <gtkmm.h> #include <gtkmm.h>
#include "guiutils.h" #include "guiutils.h"
#include "../rtengine/coord.h" #include "../rtengine/coord.h"
#include "../rtengine/coord2d.h"
#include "../rtengine/rt_math.h"
class InspectorBuffer class InspectorBuffer
{ {

View File

@ -39,6 +39,7 @@
#include "labgrid.h" #include "labgrid.h"
#include "options.h" #include "options.h"
#include "rtimage.h"
using rtengine::Color; using rtengine::Color;

View File

@ -587,7 +587,7 @@ void LensProfilePanel::onCorrModeChanged(const Gtk::RadioButton* rbChanged)
LensProfilePanel::LFDbHelper::LFDbHelper() LensProfilePanel::LFDbHelper::LFDbHelper()
{ {
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel sections if (!options.rtSettings.verbose) #pragma omp parallel sections if (!settings->verbose)
#endif #endif
{ {
#ifdef _OPENMP #ifdef _OPENMP
@ -609,7 +609,7 @@ LensProfilePanel::LFDbHelper::LFDbHelper()
void LensProfilePanel::LFDbHelper::fillLensfunCameras() void LensProfilePanel::LFDbHelper::fillLensfunCameras()
{ {
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << "LENSFUN, scanning cameras:" << std::endl; std::cout << "LENSFUN, scanning cameras:" << std::endl;
} }
@ -619,7 +619,7 @@ void LensProfilePanel::LFDbHelper::fillLensfunCameras()
for (const auto& c : camlist) { for (const auto& c : camlist) {
camnames[c.getMake()].insert(c.getModel()); camnames[c.getMake()].insert(c.getModel());
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << " found: " << c.getDisplayString().c_str() << std::endl; std::cout << " found: " << c.getDisplayString().c_str() << std::endl;
} }
} }
@ -639,7 +639,7 @@ void LensProfilePanel::LFDbHelper::fillLensfunCameras()
void LensProfilePanel::LFDbHelper::fillLensfunLenses() void LensProfilePanel::LFDbHelper::fillLensfunLenses()
{ {
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << "LENSFUN, scanning lenses:" << std::endl; std::cout << "LENSFUN, scanning lenses:" << std::endl;
} }
@ -651,7 +651,7 @@ void LensProfilePanel::LFDbHelper::fillLensfunLenses()
const auto& make = l.getMake(); const auto& make = l.getMake();
lenses[make].insert(name); lenses[make].insert(name);
if (options.rtSettings.verbose) { if (settings->verbose) {
std::cout << " found: " << l.getDisplayString().c_str() << std::endl; std::cout << " found: " << l.getDisplayString().c_str() << std::endl;
} }
} }

View File

@ -218,7 +218,7 @@ bool init_rt()
extProgStore->init(); extProgStore->init();
SoundManager::init(); SoundManager::init();
if ( !options.rtSettings.verbose ) { if (!rtengine::settings->verbose) {
TIFFSetWarningHandler (nullptr); // avoid annoying message boxes TIFFSetWarningHandler (nullptr); // avoid annoying message boxes
} }

View File

@ -20,6 +20,7 @@
#include "../rtengine/curves.h" #include "../rtengine/curves.h"
#include <cstring> #include <cstring>
#include <gdkmm/types.h> #include <gdkmm/types.h>
#include "rtscalable.h"
MyCurve::MyCurve () : MyCurve::MyCurve () :
pipetteR(-1.f), pipetteR(-1.f),

View File

@ -53,6 +53,7 @@ enum SnapToType {
class MyCurveIdleHelper; class MyCurveIdleHelper;
class CurveEditor; class CurveEditor;
class EditDataProvider;
class MyCurve : public Gtk::DrawingArea, public BackBuffer, public ColorCaller, public CoordinateProvider, public rtengine::NonCopyable class MyCurve : public Gtk::DrawingArea, public BackBuffer, public ColorCaller, public CoordinateProvider, public rtengine::NonCopyable
{ {

View File

@ -23,6 +23,7 @@
#include "mydiagonalcurve.h" #include "mydiagonalcurve.h"
#include "editcallbacks.h" #include "editcallbacks.h"
#include "rtscalable.h"
#include "../rtengine/curves.h" #include "../rtengine/curves.h"

View File

@ -23,6 +23,7 @@
#include "myflatcurve.h" #include "myflatcurve.h"
#include "editcallbacks.h" #include "editcallbacks.h"
#include "rtscalable.h"
#include "../rtengine/curves.h" #include "../rtengine/curves.h"

View File

@ -28,6 +28,7 @@
#include "version.h" #include "version.h"
#include "../rtengine/procparams.h" #include "../rtengine/procparams.h"
#include "../rtengine/rtengine.h"
#ifdef _OPENMP #ifdef _OPENMP
#include <omp.h> #include <omp.h>

View File

@ -27,9 +27,10 @@
#include "partialpastedlg.h" #include "partialpastedlg.h"
#include "guiutils.h" #include "guiutils.h"
#include "profilestorecombobox.h" #include "profilestorecombobox.h"
#include "rtimage.h"
#include "../rtengine/noncopyable.h" #include "../rtengine/noncopyable.h"
class RTImage;
class ProfilePanel : public Gtk::Grid, public PParamsChangeListener, public ProfileStoreListener, public rtengine::NonCopyable class ProfilePanel : public Gtk::Grid, public PParamsChangeListener, public ProfileStoreListener, public rtengine::NonCopyable
{ {

View File

@ -23,7 +23,7 @@
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>
#include "options.h" #include "../rtengine/settings.h"
namespace namespace
{ {
@ -215,7 +215,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTImage::createImgSurfFromFile (const Glib::u
} }
*/ */
} catch (const Glib::Exception& exception) { } catch (const Glib::Exception& exception) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
std::cerr << "Failed to load image \"" << fileName << "\": " << exception.what() << std::endl; std::cerr << "Failed to load image \"" << fileName << "\": " << exception.what() << std::endl;
} }
} }

View File

@ -23,9 +23,9 @@
#include <gtkmm.h> #include <gtkmm.h>
#include <iostream> #include <iostream>
#include <librsvg/rsvg.h> #include <librsvg/rsvg.h>
#include "options.h"
#include "../rtengine/rt_math.h" #include "../rtengine/rt_math.h"
#include "options.h"
double RTScalable::dpi = 0.; double RTScalable::dpi = 0.;
int RTScalable::scale = 0; int RTScalable::scale = 0;
@ -102,7 +102,7 @@ void RTScalable::deleteDir(const Glib::ustring& path)
error |= g_remove (Glib::build_filename (path, *entry).c_str()); error |= g_remove (Glib::build_filename (path, *entry).c_str());
} }
if (error != 0 && options.rtSettings.verbose) { if (error != 0 && rtengine::settings->verbose) {
std::cerr << "Failed to delete all entries in '" << path << "': " << g_strerror(errno) << std::endl; std::cerr << "Failed to delete all entries in '" << path << "': " << g_strerror(errno) << std::endl;
} }

View File

@ -19,12 +19,12 @@
#include <gtkmm.h> #include <gtkmm.h>
#include "rtwindow.h" #include "rtwindow.h"
#include "options.h"
#include "preferences.h" #include "preferences.h"
#include "iccprofilecreator.h" #include "iccprofilecreator.h"
#include "cursormanager.h" #include "cursormanager.h"
#include "rtimage.h" #include "rtimage.h"
#include "whitebalance.h" #include "whitebalance.h"
#include "../rtengine/settings.h"
float fontScale = 1.f; float fontScale = 1.f;
Glib::RefPtr<Gtk::CssProvider> cssForced; Glib::RefPtr<Gtk::CssProvider> cssForced;
@ -170,7 +170,7 @@ RTWindow::RTWindow ()
if (options.pseudoHiDPISupport) { if (options.pseudoHiDPISupport) {
fontScale = options.fontSize / (float)RTScalable::baseFontSize; fontScale = options.fontSize / (float)RTScalable::baseFontSize;
} }
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("\"Non-Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", options.fontSize, (int)initialGdkScale, fontScale); printf("\"Non-Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", options.fontSize, (int)initialGdkScale, fontScale);
} }
} else { } else {
@ -200,14 +200,14 @@ RTWindow::RTWindow ()
} }
if ((int)initialGdkScale > 1 || pt != RTScalable::baseFontSize) { if ((int)initialGdkScale > 1 || pt != RTScalable::baseFontSize) {
css = Glib::ustring::compose ("* { font-size: %1pt}", pt * (int)initialGdkScale); css = Glib::ustring::compose ("* { font-size: %1pt}", pt * (int)initialGdkScale);
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("\"Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", pt, (int)initialGdkScale, fontScale); printf("\"Default\" font size(%d) * scale(%d) / fontScale(%.3f)\n", pt, (int)initialGdkScale, fontScale);
} }
} }
} }
} }
if (!css.empty()) { if (!css.empty()) {
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("CSS:\n%s\n\n", css.c_str()); printf("CSS:\n%s\n\n", css.c_str());
} }
try { try {

View File

@ -17,9 +17,12 @@
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <iomanip>
#include "shcselector.h" #include "shcselector.h"
#include "multilangmgr.h" #include "multilangmgr.h"
#include "mycurve.h" #include "mycurve.h"
#include "rtscalable.h"
SHCSelector::SHCSelector() : movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(nullptr), coloredBar(RTO_Left2Right) SHCSelector::SHCSelector() : movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(nullptr), coloredBar(RTO_Left2Right)
{ {

View File

@ -24,6 +24,7 @@
#include "multilangmgr.h" #include "multilangmgr.h"
#include "mycurve.h" #include "mycurve.h"
#include "rtscalable.h"
#include "../rtengine/procparams.h" #include "../rtengine/procparams.h"

View File

@ -19,7 +19,6 @@
#include "thumbnail.h" #include "thumbnail.h"
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
#include "options.h"
#include "../rtengine/mytime.h" #include "../rtengine/mytime.h"
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
@ -29,6 +28,7 @@
#include <glib/gstdio.h> #include <glib/gstdio.h>
#include "../rtengine/dynamicprofile.h" #include "../rtengine/dynamicprofile.h"
#include "../rtengine/settings.h"
#include "guiutils.h" #include "guiutils.h"
#include "batchqueue.h" #include "batchqueue.h"
#include "extprog.h" #include "extprog.h"
@ -299,7 +299,7 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu
// For the filename etc. do NOT use streams, since they are not UTF8 safe // For the filename etc. do NOT use streams, since they are not UTF8 safe
Glib::ustring cmdLine = options.CPBPath + Glib::ustring(" \"") + tmpFileName + Glib::ustring("\""); Glib::ustring cmdLine = options.CPBPath + Glib::ustring(" \"") + tmpFileName + Glib::ustring("\"");
if (options.rtSettings.verbose) { if (rtengine::settings->verbose) {
printf("Custom profile builder's command line: %s\n", Glib::ustring(cmdLine).c_str()); printf("Custom profile builder's command line: %s\n", Glib::ustring(cmdLine).c_str());
} }

View File

@ -20,6 +20,7 @@
#include "toolbar.h" #include "toolbar.h"
#include "multilangmgr.h" #include "multilangmgr.h"
#include "guiutils.h" #include "guiutils.h"
#include "rtimage.h"
ToolBar::ToolBar () : showColPickers(true), listener (nullptr), pickerListener(nullptr) ToolBar::ToolBar () : showColPickers(true), listener (nullptr), pickerListener(nullptr)
{ {

View File

@ -21,9 +21,10 @@
#include <gtkmm.h> #include <gtkmm.h>
#include "toolenum.h" #include "toolenum.h"
#include "rtimage.h"
#include "lockablecolorpicker.h" #include "lockablecolorpicker.h"
class RTImage;
class ToolBarListener class ToolBarListener
{ {

View File

@ -19,6 +19,7 @@
#include "toolpanel.h" #include "toolpanel.h"
#include "toolpanelcoord.h" #include "toolpanelcoord.h"
#include "guiutils.h" #include "guiutils.h"
#include "rtimage.h"
#include "../rtengine/procparams.h" #include "../rtengine/procparams.h"

View File

@ -19,6 +19,7 @@
#include "multilangmgr.h" #include "multilangmgr.h"
#include "toolpanelcoord.h" #include "toolpanelcoord.h"
#include "options.h" #include "options.h"
#include "rtimage.h"
#include "../rtengine/imagesource.h" #include "../rtengine/imagesource.h"
#include "../rtengine/dfmanager.h" #include "../rtengine/dfmanager.h"
#include "../rtengine/ffmanager.h" #include "../rtengine/ffmanager.h"