diff --git a/rtengine/dcp.cc b/rtengine/dcp.cc index 549fcf150..9dbee9375 100644 --- a/rtengine/dcp.cc +++ b/rtengine/dcp.cc @@ -31,6 +31,7 @@ #include "imagefloat.h" #include "rawimagesource.h" #include "rt_math.h" +#include "../rtgui/options.h" namespace rtengine { diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 7151e244d..02a1fffac 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -35,6 +35,7 @@ #include "iccmatrices.h" +#include "../rtgui/guiutils.h" #include "../rtgui/options.h" #include "../rtgui/threadutils.h" #include "lcms2_plugin.h" diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index b55c6ee75..090c3376d 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -36,12 +36,14 @@ #include "procparams.h" #include "refreshmap.h" +#include "../rtgui/options.h" #include "../rtgui/ppversion.h" #ifdef _OPENMP #include #endif + namespace rtengine { diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index f2b337e01..6166c928e 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -24,7 +24,6 @@ #include #include "iccstore.h" #include "iccmatrices.h" -#include "../rtgui/options.h" #include "settings.h" #include "alignedbuffer.h" #include "color.h" diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 4cd16f90b..2ba6ec97b 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -42,6 +42,7 @@ #include "rt_math.h" #include "rtengine.h" #include "sleef.c" +#include "../rtgui/options.h" #ifdef _OPENMP #include @@ -56,7 +57,6 @@ #define epsilon 0.001f/(TS*TS) //tolerance - namespace rtengine { diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 57c27063e..015b487ff 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -20,11 +20,11 @@ #include #include +#include #include #include #include -#include #include #include "noncopyable.h" diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 7d101ff5d..347331467 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -40,6 +40,7 @@ #include "rt_math.h" #include "rtengine.h" #include "rtlensfun.h" +#include "../rtgui/options.h" //#define BENCHMARK //#include "StopWatch.h" diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index d10e2b1dc..4a7fb2d11 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -191,8 +191,6 @@ void scale_colors (rtengine::RawImage *ri, float scale_mul[4], float cblack[4], } -extern Options options; - namespace rtengine { diff --git a/rtgui/batchqueue.h b/rtgui/batchqueue.h index f61b7b5c4..7248ac793 100644 --- a/rtgui/batchqueue.h +++ b/rtgui/batchqueue.h @@ -26,7 +26,6 @@ #include "batchqueueentry.h" #include "lwbuttonset.h" -#include "options.h" #include "threadutils.h" #include "thumbbrowserbase.h" #include "../rtengine/noncopyable.h" diff --git a/rtgui/batchtoolpanelcoord.h b/rtgui/batchtoolpanelcoord.h index f03d1d4b2..53741be49 100644 --- a/rtgui/batchtoolpanelcoord.h +++ b/rtgui/batchtoolpanelcoord.h @@ -22,7 +22,8 @@ #include "thumbnail.h" #include "toolpanelcoord.h" #include "fileselectionchangelistener.h" -#include "../rtengine/rtengine.h" +#include "../rtengine/procparams.h" +#include "../rtengine/procevents.h" #include "paramsedited.h" #include "thumbnaillistener.h" diff --git a/rtgui/blackwhite.cc b/rtgui/blackwhite.cc index b5ecb96bd..482bf437f 100644 --- a/rtgui/blackwhite.cc +++ b/rtgui/blackwhite.cc @@ -23,6 +23,7 @@ #include "guiutils.h" #include "rtimage.h" +#include "options.h" #include "../rtengine/color.h" #include "../rtengine/procparams.h" diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index f8eb736d4..0d155e97b 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -21,6 +21,7 @@ #include "colorappearance.h" #include "guiutils.h" +#include "options.h" #include "../rtengine/color.h" #include "../rtengine/procparams.h" diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc index e164739e5..f177602a3 100644 --- a/rtgui/colortoning.cc +++ b/rtgui/colortoning.cc @@ -6,6 +6,7 @@ #include "rtimage.h" #include "eventmapper.h" #include "labgrid.h" +#include "options.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/crop.cc b/rtgui/crop.cc index b1780538e..3bdcf14cf 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -26,8 +26,6 @@ using namespace rtengine; using namespace rtengine::procparams; -extern Options options; - namespace { diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index 99b0fd897..be07db5c9 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -19,7 +19,6 @@ #ifndef _CROPWINDOW_ #define _CROPWINDOW_ -#include "../rtengine/rtengine.h" #include #include "lwbutton.h" #include "lwbuttonset.h" @@ -33,6 +32,11 @@ #include "editcoordsys.h" #include "../rtengine/noncopyable.h" +namespace rtengine { + +class Coord; + +} class CropWindow; class CropWindowListener diff --git a/rtgui/cursormanager.cc b/rtgui/cursormanager.cc index 76b4eabfb..e915150aa 100644 --- a/rtgui/cursormanager.cc +++ b/rtgui/cursormanager.cc @@ -18,7 +18,6 @@ */ #include "cursormanager.h" -#include "options.h" #include "rtimage.h" CursorManager mainWindowCursorManager; diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index 0e7205518..edad0349d 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -25,6 +25,7 @@ #include "flatcurveeditorsubgroup.h" #include "multilangmgr.h" #include "rtimage.h" +#include "options.h" CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), line(0), curve_reset(nullptr), displayedCurve(nullptr), flatSubGroup(nullptr), diagonalSubGroup(nullptr), cl(nullptr), numberOfPackedCurve(0) diff --git a/rtgui/defringe.cc b/rtgui/defringe.cc index 659d41960..8aa79dddd 100644 --- a/rtgui/defringe.cc +++ b/rtgui/defringe.cc @@ -20,6 +20,7 @@ #include #include "defringe.h" +#include "options.h" #include "../rtengine/procparams.h" diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc index 21b42a6ce..cece9be66 100644 --- a/rtgui/diagonalcurveeditorsubgroup.cc +++ b/rtgui/diagonalcurveeditorsubgroup.cc @@ -31,6 +31,7 @@ #include "curveeditor.h" #include "diagonalcurveeditorsubgroup.h" #include "rtimage.h" +#include "options.h" #include "../rtengine/curves.h" diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 2a0bba596..dd695eecf 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -21,14 +21,14 @@ #include "dirpyrdenoise.h" +#include "editbuffer.h" #include "guiutils.h" +#include "options.h" #include "../rtengine/procparams.h" -#include "editbuffer.h" using namespace rtengine; using namespace rtengine::procparams; -extern Options options; DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP_DIRPYRDENOISE_LABEL"), true, true), lastmedian(false) { diff --git a/rtgui/dirpyrdenoise.h b/rtgui/dirpyrdenoise.h index a513eb262..05304e4f7 100644 --- a/rtgui/dirpyrdenoise.h +++ b/rtgui/dirpyrdenoise.h @@ -26,7 +26,6 @@ #include "curveeditorgroup.h" #include "colorprovider.h" #include "guiutils.h" -#include "options.h" class EditDataProvider; diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index d4f5bb8ca..5817222dd 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -37,8 +37,6 @@ #include "../rtengine/ffmanager.h" #include "../rtengine/procparams.h" -extern Options options; - namespace { diff --git a/rtgui/flatcurveeditorsubgroup.cc b/rtgui/flatcurveeditorsubgroup.cc index 6dc3a1f5b..b5dc4f726 100644 --- a/rtgui/flatcurveeditorsubgroup.cc +++ b/rtgui/flatcurveeditorsubgroup.cc @@ -32,6 +32,7 @@ #include "curveeditor.h" #include "flatcurveeditorsubgroup.h" #include "rtimage.h" +#include "options.h" #include "../rtengine/curves.h" diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 74e473096..ddf60ca75 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -28,8 +28,6 @@ using namespace rtengine; -extern Options options; - // // diff --git a/rtgui/hsvequalizer.cc b/rtgui/hsvequalizer.cc index b6b5b04f2..b570a23ac 100644 --- a/rtgui/hsvequalizer.cc +++ b/rtgui/hsvequalizer.cc @@ -18,6 +18,8 @@ */ #include "hsvequalizer.h" +#include "options.h" + #include "../rtengine/color.h" #include "../rtengine/procparams.h" diff --git a/rtgui/iccprofilecreator.cc b/rtgui/iccprofilecreator.cc index 2728a7611..0ac0b79f3 100644 --- a/rtgui/iccprofilecreator.cc +++ b/rtgui/iccprofilecreator.cc @@ -29,8 +29,6 @@ #include #endif -extern Options options; - namespace rtengine { diff --git a/rtgui/iccprofilecreator.h b/rtgui/iccprofilecreator.h index b28ac29f2..950fcc01f 100644 --- a/rtgui/iccprofilecreator.h +++ b/rtgui/iccprofilecreator.h @@ -21,7 +21,6 @@ #include #include "adjuster.h" -#include "options.h" #include #include "rtwindow.h" diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 012aeca78..99bd6cfca 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -32,8 +32,6 @@ using namespace rtengine; using namespace rtengine::procparams; -extern Options options; - ICMPanel::ICMPanel() : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(nullptr), icmplistener(nullptr) { auto m = ProcEventMapper::getInstance(); diff --git a/rtgui/inspector.cc b/rtgui/inspector.cc index 8bd9862a7..ad2e424ec 100644 --- a/rtgui/inspector.cc +++ b/rtgui/inspector.cc @@ -24,8 +24,6 @@ #include "options.h" #include "../rtengine/previewimage.h" -extern Options options; - InspectorBuffer::InspectorBuffer(const Glib::ustring &imagePath) : currTransform(0), fromRaw(false) { if (!imagePath.empty() && Glib::file_test(imagePath, Glib::FILE_TEST_EXISTS) && !Glib::file_test(imagePath, Glib::FILE_TEST_IS_DIR)) { diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index 237f9ea9b..fd1065269 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -20,6 +20,8 @@ #include "labcurve.h" +#include "options.h" + #include "../rtengine/improcfun.h" #include "../rtengine/procparams.h" #include "editcallbacks.h" diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc index ef16df6ec..a4f3dbdab 100644 --- a/rtgui/lockablecolorpicker.cc +++ b/rtgui/lockablecolorpicker.cc @@ -25,8 +25,6 @@ #include "multilangmgr.h" #include "navigator.h" -extern Options options; - LockableColorPicker::LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) : cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(Size::S15), outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index 09aab1cff..8310867df 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -55,8 +55,6 @@ // Set this to 1 to make RT work when started with Eclipse and arguments, at least on Windows platform #define ECLIPSE_ARGS 0 -extern Options options; - // stores path to data files Glib::ustring argv0; Glib::ustring creditsPath; diff --git a/rtgui/main.cc b/rtgui/main.cc index 631d3db0a..997f20732 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -53,8 +53,6 @@ // Set this to 1 to make RT work when started with Eclipse and arguments, at least on Windows platform #define ECLIPSE_ARGS 0 -extern Options options; - // stores path to data files Glib::ustring argv0; Glib::ustring creditsPath; diff --git a/rtgui/mycurve.h b/rtgui/mycurve.h index fd22660ea..b5577e8dd 100644 --- a/rtgui/mycurve.h +++ b/rtgui/mycurve.h @@ -26,7 +26,6 @@ #include "coloredbar.h" #include "coordinateadjuster.h" #include "../rtengine/LUT.h" -#include "options.h" #include "../rtengine/noncopyable.h" #define RADIUS 3.5 /** radius of the control points ; must be x.5 to target the center of a pixel */ diff --git a/rtgui/navigator.cc b/rtgui/navigator.cc index 50946f32f..6a8137737 100644 --- a/rtgui/navigator.cc +++ b/rtgui/navigator.cc @@ -23,8 +23,6 @@ #include "../rtengine/rt_math.h" #include "options.h" -extern Options options; - using namespace rtengine; Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(options.navHSVUnit) diff --git a/rtgui/options.cc b/rtgui/options.cc index 9757fa3b7..8d8d52c83 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -19,6 +19,7 @@ #include "options.h" #include #include +#include #include #include #include "multilangmgr.h" diff --git a/rtgui/options.h b/rtgui/options.h index 990a32228..b2263f59c 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -16,12 +16,11 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#ifndef _OPTIONS_ -#define _OPTIONS_ +#pragma once #include #include -#include "../rtengine/rtengine.h" +#include "../rtengine/settings.h" #include #define STARTUPDIR_CURRENT 0 @@ -103,6 +102,11 @@ enum PPLoadLocation {PLL_Cache = 0, PLL_Input = 1}; enum CPBKeyType {CPBKT_TID = 0, CPBKT_NAME = 1, CPBKT_TID_NAME = 2}; enum prevdemo_t {PD_Sidecar = 1, PD_Fast = 0}; +namespace Glib { + +class KeyFile; + +} class Options { public: @@ -447,5 +451,3 @@ extern bool gimpPlugin; extern bool remote; extern Glib::ustring versionString; extern Glib::ustring paramFileExtension; - -#endif diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 3c0d1bedc..2676e0940 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -50,7 +50,6 @@ void placeSpinBox(Gtk::Container* where, Gtk::SpinButton* &spin, const std::stri } } -extern Options options; extern Glib::ustring argv0; Glib::RefPtr themecss; Glib::RefPtr fontcss; diff --git a/rtgui/renamedlg.cc b/rtgui/renamedlg.cc index 8f55b3653..81bcd86e5 100644 --- a/rtgui/renamedlg.cc +++ b/rtgui/renamedlg.cc @@ -18,7 +18,6 @@ */ #include "renamedlg.h" #include "multilangmgr.h" -#include "options.h" #include "rtimage.h" RenameDialog::RenameDialog (Gtk::Window* parent) diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index e074d7e9c..dddf1da20 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -4,6 +4,7 @@ #include "retinex.h" #include "mycurve.h" #include "rtimage.h" +#include "options.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/rgbcurves.cc b/rtgui/rgbcurves.cc index 2350783e0..7af6cab97 100644 --- a/rtgui/rgbcurves.cc +++ b/rtgui/rgbcurves.cc @@ -18,6 +18,8 @@ */ #include "rgbcurves.h" +#include "options.h" + #include "../rtengine/procparams.h" using namespace rtengine; diff --git a/rtgui/rtimage.cc b/rtgui/rtimage.cc index e35a6d164..ff27dbbd3 100644 --- a/rtgui/rtimage.cc +++ b/rtgui/rtimage.cc @@ -20,6 +20,7 @@ #include "rtimage.h" +#include #include #include "options.h" diff --git a/rtgui/rtscalable.cc b/rtgui/rtscalable.cc index fa92655ac..b803ab270 100644 --- a/rtgui/rtscalable.cc +++ b/rtgui/rtscalable.cc @@ -25,11 +25,12 @@ #include #include "options.h" +#include "../rtengine/rt_math.h" + double RTScalable::dpi = 0.; int RTScalable::scale = 0; extern Glib::ustring argv0; -extern Options options; extern unsigned char initialGdkScale; extern float fontScale; Gtk::TextDirection RTScalable::direction = Gtk::TextDirection::TEXT_DIR_NONE; diff --git a/rtgui/saveasdlg.cc b/rtgui/saveasdlg.cc index 1b61d7d3d..5516bdf7c 100644 --- a/rtgui/saveasdlg.cc +++ b/rtgui/saveasdlg.cc @@ -26,8 +26,6 @@ #include "../rtengine/utils.h" -extern Options options; - namespace { diff --git a/rtgui/saveasdlg.h b/rtgui/saveasdlg.h index dd120337d..4097a3ae9 100644 --- a/rtgui/saveasdlg.h +++ b/rtgui/saveasdlg.h @@ -22,7 +22,6 @@ #include #include "adjuster.h" #include "saveformatpanel.h" -#include "options.h" class SaveAsDialog : public Gtk::Dialog, public FormatChangeListener { diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index b1c45fdfa..cacffbd58 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -24,7 +24,6 @@ #include #include "cachemanager.h" -#include "options.h" #include "../rtengine/rtengine.h" #include "../rtengine/rtthumbnail.h" #include "cacheimagedata.h" diff --git a/rtgui/tonecurve.cc b/rtgui/tonecurve.cc index fa1c80ed8..1f660f72a 100644 --- a/rtgui/tonecurve.cc +++ b/rtgui/tonecurve.cc @@ -25,6 +25,7 @@ #include "adjuster.h" #include "eventmapper.h" #include "ppversion.h" +#include "options.h" #include "../rtengine/procparams.h" #include "editcallbacks.h" diff --git a/rtgui/vibrance.cc b/rtgui/vibrance.cc index 461c4a79f..67052785a 100644 --- a/rtgui/vibrance.cc +++ b/rtgui/vibrance.cc @@ -18,6 +18,7 @@ */ #include "vibrance.h" +#include "options.h" #include "../rtengine/color.h" using namespace rtengine; diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index 94f96e0cc..6e49d36b9 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -23,10 +23,10 @@ #include "editcallbacks.h" #include "guiutils.h" #include "rtimage.h" +#include "options.h" using namespace rtengine; using namespace rtengine::procparams; -extern Options options; namespace { diff --git a/rtgui/wavelet.h b/rtgui/wavelet.h index feec85fc9..20a0ba4e5 100644 --- a/rtgui/wavelet.h +++ b/rtgui/wavelet.h @@ -27,7 +27,6 @@ #include "thresholdadjuster.h" #include "colorprovider.h" #include "guiutils.h" -#include "options.h" class EditDataProvider;