Merge with 1782f47ae9c9699a4a39036884ad9de4df010981
This commit is contained in:
commit
35ac9af7e3
13
CAVEATS.txt
Normal file
13
CAVEATS.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
RT 4.0.7 CAVEATS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Difference between Preview and Output image:
|
||||||
|
|
||||||
|
|
||||||
|
The color managed preview in RawTherapee is (and has always been) based on image data in the Working Space profile. Although the actual preview is rendered using a monitor profile (or sRGB profile, if monitor profile is not specified), it does not reflect the Output profile & Output Gamma settings. This can lead to a slightly different output rendering when Working Space profile and Output Space profiles are not the same. A workaround is to set them to the same values to ensure the preview accurately reflects the final render output.
|
||||||
|
|
||||||
|
For generic use in sRGB workflow when output is targeting web-based image display, it is recommended to use the default values of the Color/ICM toolset.
|
||||||
|
|
||||||
|
Future releases of RawTherapee are planned to support a more comprehensive color-managed preview that will allow accurate visualization of the final output render based on not only the working space and monitor profiles, but also on user-selected Output color profile and Output Gamma.
|
@ -344,6 +344,7 @@ endif(USE_CLANG)
|
|||||||
install (FILES AUTHORS.txt DESTINATION ${CREDITSDIR})
|
install (FILES AUTHORS.txt DESTINATION ${CREDITSDIR})
|
||||||
install (FILES LICENSE.txt DESTINATION ${LICENCEDIR})
|
install (FILES LICENSE.txt DESTINATION ${LICENCEDIR})
|
||||||
install (FILES AboutThisBuild.txt DESTINATION ${CREDITSDIR})
|
install (FILES AboutThisBuild.txt DESTINATION ${CREDITSDIR})
|
||||||
|
install (FILES CAVEATS.txt DESTINATION ${CREDITSDIR} OPTIONAL)
|
||||||
|
|
||||||
add_subdirectory (rtexif)
|
add_subdirectory (rtexif)
|
||||||
add_subdirectory (rtengine)
|
add_subdirectory (rtengine)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
ABOUT_TAB_BUILD;Version
|
ABOUT_TAB_BUILD;Version
|
||||||
|
ABOUT_TAB_CAVEATS;Mise en garde
|
||||||
ABOUT_TAB_CREDITS;Crédits
|
ABOUT_TAB_CREDITS;Crédits
|
||||||
ABOUT_TAB_LICENSE;Licence
|
ABOUT_TAB_LICENSE;Licence
|
||||||
ABOUT_TAB_SPLASH;Splash
|
ABOUT_TAB_SPLASH;Splash
|
||||||
@ -1062,7 +1063,7 @@ HISTORY_MSG_165;Courbes RVB - B
|
|||||||
HISTORY_MSG_166;Niveaux neutre
|
HISTORY_MSG_166;Niveaux neutre
|
||||||
MAIN_TOOLTIP_BEFOREAFTERLOCK;<b>Vérouille</b> / <b>déverouille</b> la vue <b>Avant</b>\n\n<b>Vérouille</b>: garde la vue <b>Avant</b> inchangée - \nutile pour évaluer l'effet cumultaif de plusieurs outils.\nDe plus, une comparaison peut être faite à partir de n'importe quelle étape de l'historique\n\n<b>Déverouille</b>: la vue <b>Avant</b> représentera l'étape précédant la vue <b>Après</b>, montrant l'effet qui vient d'être modifié
|
MAIN_TOOLTIP_BEFOREAFTERLOCK;<b>Vérouille</b> / <b>déverouille</b> la vue <b>Avant</b>\n\n<b>Vérouille</b>: garde la vue <b>Avant</b> inchangée - \nutile pour évaluer l'effet cumultaif de plusieurs outils.\nDe plus, une comparaison peut être faite à partir de n'importe quelle étape de l'historique\n\n<b>Déverouille</b>: la vue <b>Avant</b> représentera l'étape précédant la vue <b>Après</b>, montrant l'effet qui vient d'être modifié
|
||||||
MAIN_TOOLTIP_PREVIEWB;Affichage du <b>canal Bleu</b>
|
MAIN_TOOLTIP_PREVIEWB;Affichage du <b>canal Bleu</b>
|
||||||
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Affichage du <b>Masque du focus</b>
|
MAIN_TOOLTIP_PREVIEWFOCUSMASK;Affichage du <b>Masque du focus</b> <i>(beta)</i> <b>Shift-F</b>\n\nPlus précis sur les images avec une faible profondeur de champ, à faible bruit et à des niveaux de zoom élevé\n\nPour améliorer la précision de détection des images bruitées, évaluez les à un facteur de zoom de 10-30%\n\nLa prévisualisation met plus de temps à se calculer lorsque cet outil est actif.
|
||||||
MAIN_TOOLTIP_PREVIEWG;Affichage du <b>canal Vert</b>
|
MAIN_TOOLTIP_PREVIEWG;Affichage du <b>canal Vert</b>
|
||||||
MAIN_TOOLTIP_PREVIEWL;Affichage de la <b>Luminosité</b>\n0.299*R + 0.587*V + 0.114*B
|
MAIN_TOOLTIP_PREVIEWL;Affichage de la <b>Luminosité</b>\n0.299*R + 0.587*V + 0.114*B
|
||||||
MAIN_TOOLTIP_PREVIEWR;Affichage du <b>canal Rouge</b>
|
MAIN_TOOLTIP_PREVIEWR;Affichage du <b>canal Rouge</b>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
ABOUT_TAB_BUILD;Version
|
ABOUT_TAB_BUILD;Version
|
||||||
|
ABOUT_TAB_CAVEATS;Caveats
|
||||||
ABOUT_TAB_CREDITS;Credits
|
ABOUT_TAB_CREDITS;Credits
|
||||||
ABOUT_TAB_LICENSE;License
|
ABOUT_TAB_LICENSE;License
|
||||||
ABOUT_TAB_SPLASH;Splash
|
ABOUT_TAB_SPLASH;Splash
|
||||||
|
@ -77,7 +77,9 @@ class ImageSource : public InitialImage {
|
|||||||
|
|
||||||
virtual bool IsrgbSourceModified() =0; // tracks whether cached rgb output of demosaic has been modified
|
virtual bool IsrgbSourceModified() =0; // tracks whether cached rgb output of demosaic has been modified
|
||||||
|
|
||||||
|
// use the right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat*
|
||||||
virtual void getImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, HRecParams hlp, ColorManagementParams cmp, RAWParams raw) {}
|
virtual void getImage (ColorTemp ctemp, int tran, Imagefloat* image, PreviewProps pp, HRecParams hlp, ColorManagementParams cmp, RAWParams raw) {}
|
||||||
|
// true is ready to provide the AutoWB, i.e. when the image has been demosaiced for RawImageSource
|
||||||
virtual bool isWBProviderReady () =0;
|
virtual bool isWBProviderReady () =0;
|
||||||
virtual ColorTemp getWB () =0;
|
virtual ColorTemp getWB () =0;
|
||||||
virtual ColorTemp getAutoWB () =0;
|
virtual ColorTemp getAutoWB () =0;
|
||||||
|
@ -89,7 +89,7 @@ ALLNORAW, // EvHREnabled,
|
|||||||
ALLNORAW, // EvHRAmount,
|
ALLNORAW, // EvHRAmount,
|
||||||
ALLNORAW, // EvHRMethod,
|
ALLNORAW, // EvHRMethod,
|
||||||
ALL, // EvWProfile,
|
ALL, // EvWProfile,
|
||||||
ALL, // EvOProfile,
|
OUTPUTPROFIL, // EvOProfile,
|
||||||
ALL, // EvIProfile,
|
ALL, // EvIProfile,
|
||||||
TRANSFORM, // EvVignetting,
|
TRANSFORM, // EvVignetting,
|
||||||
RGBCURVE, // EvChMixer,
|
RGBCURVE, // EvChMixer,
|
||||||
@ -152,10 +152,10 @@ FLATFIELD, // EvFlatFieldBlurType,
|
|||||||
TRANSFORM, // EvAutoDIST,
|
TRANSFORM, // EvAutoDIST,
|
||||||
DIRPYRDENOISE, // EvDPDNLumCurve,
|
DIRPYRDENOISE, // EvDPDNLumCurve,
|
||||||
DIRPYRDENOISE, // EvDPDNChromCurve,
|
DIRPYRDENOISE, // EvDPDNChromCurve,
|
||||||
ALL, // EvGAMMA
|
GAMMA, // EvGAMMA
|
||||||
ALL, // EvGAMPOS
|
GAMMA, // EvGAMPOS
|
||||||
ALL, // EvGAMFREE
|
GAMMA, // EvGAMFREE
|
||||||
ALL, // EvSLPOS
|
GAMMA, // EvSLPOS
|
||||||
DARKFRAME, // EvPreProcessExpBlackzero
|
DARKFRAME, // EvPreProcessExpBlackzero
|
||||||
DARKFRAME, // EvPreProcessExpBlackone
|
DARKFRAME, // EvPreProcessExpBlackone
|
||||||
DARKFRAME, // EvPreProcessExpBlacktwo
|
DARKFRAME, // EvPreProcessExpBlacktwo
|
||||||
|
@ -63,6 +63,8 @@
|
|||||||
#define EXIF M_VOID
|
#define EXIF M_VOID
|
||||||
#define IPTC M_VOID
|
#define IPTC M_VOID
|
||||||
#define DIRPYREQUALIZER (M_COLOR|M_LUMINANCE)
|
#define DIRPYREQUALIZER (M_COLOR|M_LUMINANCE)
|
||||||
|
#define OUTPUTPROFIL (M_COLOR|M_LUMINANCE)
|
||||||
|
#define GAMMA (M_COLOR|M_LUMINANCE)
|
||||||
#define NONE 0
|
#define NONE 0
|
||||||
#define ALLNORAW (M_INIT|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR)
|
#define ALLNORAW (M_INIT|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR)
|
||||||
|
|
||||||
|
@ -248,24 +248,23 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
|||||||
bool useLCMS;
|
bool useLCMS;
|
||||||
|
|
||||||
if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8
|
if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8
|
||||||
cmsMLU *DescriptionMLU, *CopyrightMLU, *DmndMLU, *DmddMLU;// for modification TAG
|
cmsMLU *DescriptionMLU, *CopyrightMLU, *DmndMLU, *DmddMLU;// for modification TAG
|
||||||
|
|
||||||
cmsToneCurve* GammaTRC[3];
|
cmsToneCurve* GammaTRC[3];
|
||||||
cmsFloat64Number Parameters[7];
|
cmsFloat64Number Parameters[7];
|
||||||
double ga0,ga1,ga2,ga3,ga4,ga5,ga6;
|
double ga0,ga1,ga2,ga3,ga4,ga5,ga6;
|
||||||
// wchar_t string[80] ;
|
// wchar_t string[80] ;
|
||||||
const wchar_t* stri[]= {L" RT_Large ", L" RT_Medium",L" RT_sRGB ",L" WideGamut",L" Beta RGB ",L" BestRGB ",L" BruceRGB"};//label for Free gamma and Output Gamma
|
int ns;//numero of stri[]
|
||||||
int ns;//numero of stri[]
|
if (params.icm.working=="ProPhoto") ns=0;
|
||||||
if (params.icm.working=="ProPhoto") ns=0;
|
else if (params.icm.working=="Adobe RGB") ns=1;
|
||||||
else if (params.icm.working=="Adobe RGB") ns=1;
|
else if (params.icm.working=="sRGB") ns=2;
|
||||||
else if (params.icm.working=="sRGB") ns=2;
|
else if (params.icm.working=="WideGamut") ns=3;
|
||||||
else if (params.icm.working=="WideGamut") ns=3;
|
else if (params.icm.working=="Beta RGB") ns=4;
|
||||||
else if (params.icm.working=="Beta RGB") ns=4;
|
else if (params.icm.working=="BestRGB") ns=5;
|
||||||
else if (params.icm.working=="BestRGB") ns=5;
|
else if (params.icm.working=="BruceRGB") ns=6;
|
||||||
else if (params.icm.working=="BruceRGB") ns=6;
|
|
||||||
|
|
||||||
|
|
||||||
readyImg = ipf.lab2rgb16b (labView, cx, cy, cw, ch, params.icm.output, params.icm.working, params.icm.gamma, params.icm.freegamma, params.icm.gampos, params.icm.slpos, ga0,ga1,ga2,ga3,ga4,ga5,ga6 );
|
readyImg = ipf.lab2rgb16b (labView, cx, cy, cw, ch, params.icm.output, params.icm.working, params.icm.gamma, params.icm.freegamma, params.icm.gampos, params.icm.slpos, ga0,ga1,ga2,ga3,ga4,ga5,ga6 );
|
||||||
customGamma = true;
|
customGamma = true;
|
||||||
|
|
||||||
//or selected Free gamma
|
//or selected Free gamma
|
||||||
@ -337,50 +336,38 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
|||||||
CopyrightMLU = cmsMLUalloc(ContextID, 1);//for ICC
|
CopyrightMLU = cmsMLUalloc(ContextID, 1);//for ICC
|
||||||
DmndMLU=cmsMLUalloc(ContextID, 1);//for ICC
|
DmndMLU=cmsMLUalloc(ContextID, 1);//for ICC
|
||||||
DmddMLU=cmsMLUalloc(ContextID, 1);// for ICC
|
DmddMLU=cmsMLUalloc(ContextID, 1);// for ICC
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// instruction with //ICC are used for generate icc profile
|
// instruction with //ICC are used for generate icc profile
|
||||||
if (DescriptionMLU == NULL) printf("Error Description\n");
|
if (DescriptionMLU == NULL) printf("Description error\n");
|
||||||
cmsMLUsetWide(CopyrightMLU, "en", "US", L"No copyright Rawtherapee -AdobeRGB compatible") ;//adapt to profil
|
cmsMLUsetWide(CopyrightMLU, "en", "US", L"General Public License - AdobeRGB compatible") ;//adapt to profil
|
||||||
cmsMLUsetWide(DmndMLU, "en", "US", L"Rawtherapee") ;
|
cmsMLUsetWide(DmndMLU, "en", "US", L"RawTherapee") ;
|
||||||
cmsMLUsetWide(DmddMLU, "en", "US", L"RTMedium") ; //adapt to profil
|
cmsMLUsetWide(DmddMLU, "en", "US", L"RTMedium") ; //adapt to profil
|
||||||
//display Tag desc with : selection of gamma and Primaries
|
//display Tag desc with : selection of gamma and Primaries
|
||||||
if(params.icm.gamma=="High_g1.3_s3.35" && !params.icm.freegamma) {
|
if (!params.icm.freegamma) {
|
||||||
wchar_t string1[80] = L"GammaTRC: High g1.3 s3.35";
|
std::wstring gammaStr;
|
||||||
wcsncat( string1, stri[ns], 37 );
|
if(params.icm.gamma=="High_g1.3_s3.35") {
|
||||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string1);
|
gammaStr = std::wstring(L"GammaTRC: High g=1.3 s=3.35");
|
||||||
}
|
}
|
||||||
else if (params.icm.gamma=="Low_g2.6_s6.9" && !params.icm.freegamma) {
|
else if (params.icm.gamma=="Low_g2.6_s6.9") {
|
||||||
wchar_t string2[80] = L"GammaTRC: Low g2.6 s6.9";
|
gammaStr = std::wstring(L"GammaTRC: Low g=2.6 s=6.9");
|
||||||
wcsncat( string2, stri[ns], 36 );
|
}
|
||||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string2);
|
else if (params.icm.gamma=="sRGB_g2.4_s12.92") {
|
||||||
}
|
gammaStr = std::wstring(L"GammaTRC: sRGB g=2.4 s=12.92");
|
||||||
else if (params.icm.gamma=="sRGB_g2.4_s12.92" && !params.icm.freegamma) {
|
}
|
||||||
wchar_t string3[80] = L"GammaTRC: sRGB g2.4 s12.92";
|
else if (params.icm.gamma== "BT709_g2.2_s4.5") {
|
||||||
wcsncat( string3, stri[ns], 37 );
|
gammaStr = std::wstring(L"GammaTRC: BT709 g=2.2 s=4.5");
|
||||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string3);
|
}
|
||||||
}
|
else if (params.icm.gamma== "linear_g1.0") {
|
||||||
else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) {
|
gammaStr = std::wstring(L"GammaTRC: Linear g=1.0");
|
||||||
wchar_t string4[80] = L"GammaTRC: BT709 g2.2 s4.5";
|
}
|
||||||
wcsncat( string4, stri[ns], 36 );
|
else if (params.icm.gamma== "standard_g2.2") {
|
||||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string4);
|
gammaStr = std::wstring(L"GammaTRC: g=2.2");
|
||||||
}
|
}
|
||||||
else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) {
|
else if (params.icm.gamma== "standard_g1.8") {
|
||||||
wchar_t string5[80] = L"GammaTRC: Linear g1.0";
|
gammaStr = std::wstring(L"GammaTRC: g=1.8");
|
||||||
wcsncat( string5, stri[ns], 32 );
|
}
|
||||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string5);
|
cmsMLUsetWide(DescriptionMLU, "en", "US", gammaStr.c_str());
|
||||||
}
|
|
||||||
else if (params.icm.gamma== "standard_g2.2" && !params.icm.freegamma) {
|
|
||||||
wchar_t string6[80] = L"GammaTRC: g2.2";
|
|
||||||
wcsncat( string6, stri[ns], 30 );
|
|
||||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string6);
|
|
||||||
}
|
|
||||||
else if (params.icm.gamma== "standard_g1.8" && !params.icm.freegamma) {
|
|
||||||
wchar_t string7[80] = L"GammaTRC: g1.8";
|
|
||||||
wcsncat( string7, stri[ns], 30 );
|
|
||||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string7);
|
|
||||||
}
|
|
||||||
|
|
||||||
//for elaboration ICC profiles
|
//for elaboration ICC profiles
|
||||||
// else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Medium gamma sRGB(AdobeRGB compatible)");
|
// else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Medium gamma sRGB(AdobeRGB compatible)");
|
||||||
@ -390,36 +377,14 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
|||||||
//else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma BT709(Prophoto compatible)");
|
//else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma BT709(Prophoto compatible)");
|
||||||
// else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma sRGB(Prophoto compatible)");
|
// else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma sRGB(Prophoto compatible)");
|
||||||
// else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma Linear1.0(Prophoto compatible)");
|
// else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma Linear1.0(Prophoto compatible)");
|
||||||
|
}
|
||||||
else if (params.icm.freegamma) {//prepare wchar_t for Free Gamma
|
else {
|
||||||
std::wostringstream sgamm;
|
// create description with gamma + slope + primaries
|
||||||
float gamm = params.icm.gampos;//gamma
|
std::wostringstream gammaWs;
|
||||||
sgamm<<gamm;
|
gammaWs.precision(2);
|
||||||
std::wstring ws = sgamm.str();
|
gammaWs<<"Manual GammaTRC: g="<<(float)params.icm.gampos<<" s="<<(float)params.icm.slpos;
|
||||||
const wchar_t* cga = {ws.c_str()};
|
cmsMLUsetWide(DescriptionMLU, "en", "US", gammaWs.str().c_str());
|
||||||
std::vector<wchar_t> buf( cga , cga + (ws.size() + 1) );
|
}
|
||||||
wchar_t* wp = &buf[0];
|
|
||||||
wchar_t wpr[5]=L"2222";
|
|
||||||
wcsncpy(wpr,wp,4); //gamma (gampos==> string)
|
|
||||||
wchar_t string[80] = L"Free Gamma g=";
|
|
||||||
|
|
||||||
wchar_t mid[5]=L" s=";
|
|
||||||
wcsncat( string, wpr, 17 );
|
|
||||||
wcsncat( string, mid, 20 );
|
|
||||||
|
|
||||||
std::wostringstream slp;//slope
|
|
||||||
float slop = params.icm.slpos;
|
|
||||||
slp<<slop;
|
|
||||||
std::wstring ws2 = slp.str();
|
|
||||||
const wchar_t* cslo = {ws2.c_str()};// const wchar_t*
|
|
||||||
std::vector<wchar_t> buf2( cslo , cslo + (ws2.size() + 1) );
|
|
||||||
wchar_t* wp2 = &buf2[0]; // wchar_t*
|
|
||||||
wchar_t wpr2[6]=L"22222";
|
|
||||||
wcsncpy(wpr2,wp2,5); //Slope (slope==> string)
|
|
||||||
|
|
||||||
wcsncat( string, wpr2, 23 );
|
|
||||||
wcsncat( string, stri[ns], 33 );
|
|
||||||
cmsMLUsetWide(DescriptionMLU, "en", "US", string);}//display description with gamma + slope + primaries
|
|
||||||
|
|
||||||
cmsWriteTag(jprof, cmsSigProfileDescriptionTag, DescriptionMLU);//desc changed
|
cmsWriteTag(jprof, cmsSigProfileDescriptionTag, DescriptionMLU);//desc changed
|
||||||
// cmsWriteTag(jprof, cmsSigCopyrightTag, CopyrightMLU);
|
// cmsWriteTag(jprof, cmsSigCopyrightTag, CopyrightMLU);
|
||||||
@ -521,7 +486,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
|||||||
// Setting the output curve to readyImg
|
// Setting the output curve to readyImg
|
||||||
if (customGamma) {
|
if (customGamma) {
|
||||||
if (!useLCMS) {
|
if (!useLCMS) {
|
||||||
// use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generate by lab2rgb16b
|
// use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16b
|
||||||
ProfileContent pc(jprof);
|
ProfileContent pc(jprof);
|
||||||
readyImg->setOutputProfile (pc.data, pc.length);
|
readyImg->setOutputProfile (pc.data, pc.length);
|
||||||
}
|
}
|
||||||
|
@ -320,18 +320,22 @@ MySpinButton::MySpinButton () {
|
|||||||
void MySpinButton::updateSize() {
|
void MySpinButton::updateSize() {
|
||||||
double vMin, vMax;
|
double vMin, vMax;
|
||||||
double step, page;
|
double step, page;
|
||||||
double maxAbs;
|
int maxAbs;
|
||||||
unsigned int digits, digits2;
|
unsigned int digits, digits2;
|
||||||
unsigned int maxLen;
|
unsigned int maxLen;
|
||||||
|
|
||||||
get_range(vMin, vMax);
|
get_range(vMin, vMax);
|
||||||
get_increments (step, page);
|
get_increments (step, page);
|
||||||
|
|
||||||
maxAbs = fmax(fabs(vMin), fabs(vMax));
|
|
||||||
digits = get_digits();
|
digits = get_digits();
|
||||||
for (digits2=0; maxAbs/pow(double(10),digits2)>=1.0; digits2++);
|
maxAbs = (int)(fmax(fabs(vMin), fabs(vMax))+0.000001);
|
||||||
|
if (maxAbs==0)
|
||||||
|
digits2 = 1;
|
||||||
|
else {
|
||||||
|
digits2 = (int)(log10(double(maxAbs))+0.000001);
|
||||||
|
digits2++;
|
||||||
|
}
|
||||||
maxLen = digits+digits2+(vMin<0?1:0)+(digits>0?1:0);
|
maxLen = digits+digits2+(vMin<0?1:0)+(digits>0?1:0);
|
||||||
|
|
||||||
set_max_length(maxLen);
|
set_max_length(maxLen);
|
||||||
set_width_chars(maxLen);
|
set_width_chars(maxLen);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
#include <iomanip>
|
||||||
#include "icmpanel.h"
|
#include "icmpanel.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
@ -331,7 +332,7 @@ void ICMPanel::adjusterChanged (Adjuster* a, double newval) {
|
|||||||
|
|
||||||
if (listener && freegamma->get_active()) {
|
if (listener && freegamma->get_active()) {
|
||||||
|
|
||||||
Glib::ustring costr = Glib::ustring::format ((int)a->getValue());
|
Glib::ustring costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), newval);
|
||||||
|
|
||||||
if (a==gampos)
|
if (a==gampos)
|
||||||
listener->panelChanged (EvGAMPOS, costr);
|
listener->panelChanged (EvGAMPOS, costr);
|
||||||
|
@ -49,7 +49,6 @@ void Options::setDefaults () {
|
|||||||
windowWidth = 900;
|
windowWidth = 900;
|
||||||
windowHeight = 560;
|
windowHeight = 560;
|
||||||
windowMaximized = false;
|
windowMaximized = false;
|
||||||
firstRun = true;
|
|
||||||
savesParamsAtExit = true;
|
savesParamsAtExit = true;
|
||||||
saveFormat.format = "jpg";
|
saveFormat.format = "jpg";
|
||||||
saveFormat.jpegQuality = 100;
|
saveFormat.jpegQuality = 100;
|
||||||
@ -79,8 +78,8 @@ void Options::setDefaults () {
|
|||||||
profilePath = "profiles";
|
profilePath = "profiles";
|
||||||
dirBrowserWidth = 200;
|
dirBrowserWidth = 200;
|
||||||
dirBrowserHeight = 150;
|
dirBrowserHeight = 150;
|
||||||
preferencesWidth = 0;
|
preferencesWidth = 0;
|
||||||
preferencesHeight = 0;
|
preferencesHeight = 0;
|
||||||
toolPanelWidth = 300;
|
toolPanelWidth = 300;
|
||||||
browserToolPanelWidth = 300;
|
browserToolPanelWidth = 300;
|
||||||
browserToolPanelHeight = 300;
|
browserToolPanelHeight = 300;
|
||||||
@ -95,7 +94,7 @@ void Options::setDefaults () {
|
|||||||
fbShowHidden = false;
|
fbShowHidden = false;
|
||||||
fbArrangement = 2; // was 0
|
fbArrangement = 2; // was 0
|
||||||
multiUser = true;
|
multiUser = true;
|
||||||
version = VERSION;
|
version = "0.0.0.0"; // temporary value; will be correctly set in RTWindow::on_realize
|
||||||
thumbSize = 240; // was 80
|
thumbSize = 240; // was 80
|
||||||
thumbSizeTab = 80;
|
thumbSizeTab = 80;
|
||||||
showHistory = true;
|
showHistory = true;
|
||||||
@ -233,14 +232,14 @@ void Options::setDefaults () {
|
|||||||
#endif
|
#endif
|
||||||
rtSettings.colorimetricIntent = 1;
|
rtSettings.colorimetricIntent = 1;
|
||||||
rtSettings.monitorProfile = "";
|
rtSettings.monitorProfile = "";
|
||||||
rtSettings.autoMonitorProfile = false;
|
rtSettings.autoMonitorProfile = false;
|
||||||
rtSettings.LCMSSafeMode = true;
|
rtSettings.LCMSSafeMode = true;
|
||||||
rtSettings.adobe = "RT_Medium_gsRGB"; // put the name of yours profiles (here windows)
|
rtSettings.adobe = "RT_Medium_gsRGB"; // put the name of yours profiles (here windows)
|
||||||
rtSettings.prophoto = "RT_Large_gBT709"; // these names appear in the menu "output profile"
|
rtSettings.prophoto = "RT_Large_gBT709"; // these names appear in the menu "output profile"
|
||||||
rtSettings.prophoto10 = "RT_Large_g10"; // these names appear in the menu "output profile"
|
rtSettings.prophoto10 = "RT_Large_g10"; // these names appear in the menu "output profile"
|
||||||
rtSettings.srgb10 = "RT_sRGB_g10";
|
rtSettings.srgb10 = "RT_sRGB_g10";
|
||||||
rtSettings.widegamut = "WideGamutRGB";
|
rtSettings.widegamut = "WideGamutRGB";
|
||||||
rtSettings.srgb = "RT_sRGB_gBT709";
|
rtSettings.srgb = "RT_sRGB";
|
||||||
rtSettings.bruce = "Bruce";
|
rtSettings.bruce = "Bruce";
|
||||||
rtSettings.beta = "BetaRGB";
|
rtSettings.beta = "BetaRGB";
|
||||||
rtSettings.best = "BestRGB";
|
rtSettings.best = "BestRGB";
|
||||||
@ -296,7 +295,6 @@ if (keyFile.has_group ("General")) {
|
|||||||
if (keyFile.has_key ("General", "Theme")) theme = keyFile.get_string ("General", "Theme");
|
if (keyFile.has_key ("General", "Theme")) theme = keyFile.get_string ("General", "Theme");
|
||||||
if (keyFile.has_key ("General", "SlimUI")) slimUI = keyFile.get_boolean ("General", "SlimUI");
|
if (keyFile.has_key ("General", "SlimUI")) slimUI = keyFile.get_boolean ("General", "SlimUI");
|
||||||
if (keyFile.has_key ("General", "UseSystemTheme")) useSystemTheme = keyFile.get_boolean ("General", "UseSystemTheme");
|
if (keyFile.has_key ("General", "UseSystemTheme")) useSystemTheme = keyFile.get_boolean ("General", "UseSystemTheme");
|
||||||
if (keyFile.has_key ("General", "FirstRun")) firstRun = keyFile.get_boolean ("General", "FirstRun");
|
|
||||||
if( keyFile.has_key ("General", "DarkFramesPath")) rtSettings.darkFramesPath = keyFile.get_string("General", "DarkFramesPath");
|
if( keyFile.has_key ("General", "DarkFramesPath")) rtSettings.darkFramesPath = keyFile.get_string("General", "DarkFramesPath");
|
||||||
if( keyFile.has_key ("General", "FlatFieldsPath")) rtSettings.flatFieldsPath = keyFile.get_string("General", "FlatFieldsPath");
|
if( keyFile.has_key ("General", "FlatFieldsPath")) rtSettings.flatFieldsPath = keyFile.get_string("General", "FlatFieldsPath");
|
||||||
if( keyFile.has_key ("General", "Verbose")) rtSettings.verbose = keyFile.get_boolean ( "General", "Verbose");
|
if( keyFile.has_key ("General", "Verbose")) rtSettings.verbose = keyFile.get_boolean ( "General", "Verbose");
|
||||||
@ -435,18 +433,16 @@ if (keyFile.has_group ("Color Management")) {
|
|||||||
if (keyFile.has_key ("Color Management", "Intent")) rtSettings.colorimetricIntent = keyFile.get_integer("Color Management", "Intent");
|
if (keyFile.has_key ("Color Management", "Intent")) rtSettings.colorimetricIntent = keyFile.get_integer("Color Management", "Intent");
|
||||||
|
|
||||||
if (keyFile.has_key ("Color Management", "WhiteBalanceSpotSize")) whiteBalanceSpotSize = keyFile.get_integer("Color Management", "WhiteBalanceSpotSize");
|
if (keyFile.has_key ("Color Management", "WhiteBalanceSpotSize")) whiteBalanceSpotSize = keyFile.get_integer("Color Management", "WhiteBalanceSpotSize");
|
||||||
if( keyFile.has_key ("Color Management", "GamutICC")) rtSettings.gamutICC = keyFile.get_boolean("Color Management", "GamutICC");
|
if( keyFile.has_key ("Color Management", "GamutICC")) rtSettings.gamutICC = keyFile.get_boolean("Color Management", "GamutICC");
|
||||||
if( keyFile.has_key ("Color Management", "RT_Adobe_RGB")) rtSettings.adobe = keyFile.get_string("Color Management", "RT_Adobe_RGB");
|
if( keyFile.has_key ("Color Management", "AdobeRGB")) rtSettings.adobe = keyFile.get_string("Color Management", "AdobeRGB");
|
||||||
if( keyFile.has_key ("Color Management", "RT_Pro_Photo")) rtSettings.prophoto = keyFile.get_string("Color Management","RT_Pro_Photo");
|
if( keyFile.has_key ("Color Management", "ProPhoto")) rtSettings.prophoto = keyFile.get_string("Color Management", "ProPhoto");
|
||||||
if( keyFile.has_key ("Color Management", "RT_Pro_Photo10")) rtSettings.prophoto10 = keyFile.get_string("Color Management","RT_Pro_Photo10");
|
if( keyFile.has_key ("Color Management", "ProPhoto10")) rtSettings.prophoto10 = keyFile.get_string("Color Management", "ProPhoto10");
|
||||||
|
if( keyFile.has_key ("Color Management", "WideGamut")) rtSettings.widegamut = keyFile.get_string("Color Management", "WideGamut");
|
||||||
if( keyFile.has_key ("Color Management", "Wide_Gamut")) rtSettings.widegamut = keyFile.get_string("Color Management","Wide_Gamut");
|
if( keyFile.has_key ("Color Management", "sRGB")) rtSettings.srgb = keyFile.get_string("Color Management", "sRGB");
|
||||||
if( keyFile.has_key ("Color Management", "RT_S_rgb")) rtSettings.srgb = keyFile.get_string("Color Management","RT_S_rgb");
|
if( keyFile.has_key ("Color Management", "sRGB10")) rtSettings.srgb10 = keyFile.get_string("Color Management", "sRGB10");
|
||||||
if( keyFile.has_key ("Color Management", "RT_S_rgb10")) rtSettings.srgb10 = keyFile.get_string("Color Management","RT_S_rgb10");
|
if( keyFile.has_key ("Color Management", "Beta")) rtSettings.beta = keyFile.get_string("Color Management", "Beta");
|
||||||
|
if( keyFile.has_key ("Color Management", "Best")) rtSettings.best = keyFile.get_string("Color Management", "Best");
|
||||||
if( keyFile.has_key ("Color Management", "B_eta")) rtSettings.beta = keyFile.get_string("Color Management","B_eta");
|
if( keyFile.has_key ("Color Management", "Bruce")) rtSettings.bruce = keyFile.get_string("Color Management", "Bruce");
|
||||||
if( keyFile.has_key ("Color Management", "B_est")) rtSettings.best = keyFile.get_string("Color Management","B_est");
|
|
||||||
if( keyFile.has_key ("Color Management", "B_ruce")) rtSettings.bruce = keyFile.get_string("Color Management","B_ruce");
|
|
||||||
|
|
||||||
// Disabled (default is true) till issues are sorted out
|
// Disabled (default is true) till issues are sorted out
|
||||||
//if (keyFile.has_key ("Color Management", "LCMSSafeMode")) rtSettings.LCMSSafeMode = keyFile.get_boolean ("Color Management", "LCMSSafeMode");
|
//if (keyFile.has_key ("Color Management", "LCMSSafeMode")) rtSettings.LCMSSafeMode = keyFile.get_boolean ("Color Management", "LCMSSafeMode");
|
||||||
@ -492,7 +488,6 @@ int Options::saveToFile (Glib::ustring fname) {
|
|||||||
keyFile.set_boolean ("General", "SlimUI", slimUI);
|
keyFile.set_boolean ("General", "SlimUI", slimUI);
|
||||||
keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme);
|
keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme);
|
||||||
keyFile.set_string ("General", "Version", VERSION);
|
keyFile.set_string ("General", "Version", VERSION);
|
||||||
keyFile.set_boolean ("General", "FirstRun", false);
|
|
||||||
keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath);
|
keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath);
|
||||||
keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath);
|
keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath);
|
||||||
keyFile.set_boolean ("General", "Verbose", rtSettings.verbose);
|
keyFile.set_boolean ("General", "Verbose", rtSettings.verbose);
|
||||||
@ -613,22 +608,20 @@ int Options::saveToFile (Glib::ustring fname) {
|
|||||||
|
|
||||||
keyFile.set_integer ("Crop Settings", "PPI", cropPPI);
|
keyFile.set_integer ("Crop Settings", "PPI", cropPPI);
|
||||||
|
|
||||||
keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory);
|
keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory);
|
||||||
keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile);
|
keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile);
|
||||||
keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile);
|
keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile);
|
||||||
keyFile.set_integer ("Color Management", "Intent", rtSettings.colorimetricIntent);
|
keyFile.set_integer ("Color Management", "Intent", rtSettings.colorimetricIntent);
|
||||||
keyFile.set_boolean ("Color Management", "LCMSSafeMode", rtSettings.LCMSSafeMode);
|
keyFile.set_boolean ("Color Management", "LCMSSafeMode", rtSettings.LCMSSafeMode);
|
||||||
keyFile.set_string ("Color Management", "RT_Adobe_RGB", rtSettings.adobe);
|
keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe);
|
||||||
keyFile.set_string ("Color Management", "RT_Pro_Photo", rtSettings.prophoto);
|
keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto);
|
||||||
keyFile.set_string ("Color Management", "RT_Pro_Photo10", rtSettings.prophoto10);
|
keyFile.set_string ("Color Management", "ProPhoto10", rtSettings.prophoto10);
|
||||||
|
keyFile.set_string ("Color Management", "WideGamut", rtSettings.widegamut);
|
||||||
keyFile.set_string ("Color Management", "Wide_Gamut", rtSettings.widegamut);
|
keyFile.set_string ("Color Management", "sRGB", rtSettings.srgb);
|
||||||
keyFile.set_string ("Color Management", "RT_S_rgb", rtSettings.srgb);
|
keyFile.set_string ("Color Management", "sRGB10", rtSettings.srgb10);
|
||||||
keyFile.set_string ("Color Management", "RT_S_rgb10", rtSettings.srgb10);
|
keyFile.set_string ("Color Management", "Beta", rtSettings.beta);
|
||||||
|
keyFile.set_string ("Color Management", "Best", rtSettings.best);
|
||||||
keyFile.set_string ("Color Management", "B_eta", rtSettings.beta);
|
keyFile.set_string ("Color Management", "Bruce", rtSettings.bruce);
|
||||||
keyFile.set_string ("Color Management", "B_est", rtSettings.best);
|
|
||||||
keyFile.set_string ("Color Management", "B_ruce", rtSettings.bruce);
|
|
||||||
keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize);
|
keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize);
|
||||||
keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC);
|
keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC);
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ class Options {
|
|||||||
void error (int line);
|
void error (int line);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool firstRun;
|
|
||||||
bool savesParamsAtExit;
|
bool savesParamsAtExit;
|
||||||
SaveFormat saveFormat,saveFormatBatch;
|
SaveFormat saveFormat,saveFormatBatch;
|
||||||
Glib::ustring savePathTemplate;
|
Glib::ustring savePathTemplate;
|
||||||
|
@ -33,6 +33,8 @@ extern Glib::ustring argv0;
|
|||||||
|
|
||||||
Preferences::Preferences (RTWindow *rtwindow):parent(rtwindow) {
|
Preferences::Preferences (RTWindow *rtwindow):parent(rtwindow) {
|
||||||
|
|
||||||
|
splash = NULL;
|
||||||
|
|
||||||
set_title (M("MAIN_BUTTON_PREFERENCES"));
|
set_title (M("MAIN_BUTTON_PREFERENCES"));
|
||||||
|
|
||||||
moptions.copyFrom (&options);
|
moptions.copyFrom (&options);
|
||||||
@ -1296,9 +1298,9 @@ void Preferences::selectStartupDir () {
|
|||||||
|
|
||||||
void Preferences::aboutPressed () {
|
void Preferences::aboutPressed () {
|
||||||
|
|
||||||
Splash* splash = new Splash ();
|
splash = new Splash (*this);
|
||||||
splash->set_transient_for (*this);
|
splash->set_transient_for (*this);
|
||||||
splash->set_modal (true);
|
splash->signal_delete_event().connect( sigc::mem_fun(*this, &Preferences::splashClosed) );
|
||||||
splash->show ();
|
splash->show ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1478,3 +1480,9 @@ void Preferences::updateFFinfos()
|
|||||||
Glib::ustring s = Glib::ustring::compose("%1: %2 %3, %4 %5", M("PREFERENCES_FLATFIELDFOUND"), t1, M("PREFERENCES_FLATFIELDSHOTS"), t2, M("PREFERENCES_FLATFIELDTEMPLATES"));
|
Glib::ustring s = Glib::ustring::compose("%1: %2 %3, %4 %5", M("PREFERENCES_FLATFIELDFOUND"), t1, M("PREFERENCES_FLATFIELDSHOTS"), t2, M("PREFERENCES_FLATFIELDTEMPLATES"));
|
||||||
ffLabel->set_text(s);
|
ffLabel->set_text(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Preferences::splashClosed(GdkEventAny* event) {
|
||||||
|
delete splash;
|
||||||
|
splash = NULL;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@ -51,6 +51,7 @@ class Preferences : public Gtk::Dialog {
|
|||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Splash* splash;
|
||||||
Gtk::ComboBoxText* rprofiles;
|
Gtk::ComboBoxText* rprofiles;
|
||||||
Gtk::ComboBoxText* iprofiles;
|
Gtk::ComboBoxText* iprofiles;
|
||||||
Gtk::ComboBoxText* languages;
|
Gtk::ComboBoxText* languages;
|
||||||
@ -159,6 +160,7 @@ class Preferences : public Gtk::Dialog {
|
|||||||
void cacheFormatComboChanged ();
|
void cacheFormatComboChanged ();
|
||||||
void switchThemeTo (Glib::ustring newTheme, bool slimInterface);
|
void switchThemeTo (Glib::ustring newTheme, bool slimInterface);
|
||||||
void switchFontTo (Glib::ustring newFont);
|
void switchFontTo (Glib::ustring newFont);
|
||||||
|
bool splashClosed(GdkEventAny* event);
|
||||||
|
|
||||||
void appendBehavList (Gtk::TreeModel::iterator& parent, Glib::ustring label, int id, bool set);
|
void appendBehavList (Gtk::TreeModel::iterator& parent, Glib::ustring label, int id, bool set);
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtwindow.h"
|
#include "rtwindow.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
@ -28,6 +29,7 @@ RTWindow::RTWindow ()
|
|||||||
,bpanel(NULL)
|
,bpanel(NULL)
|
||||||
,epanel(NULL)
|
,epanel(NULL)
|
||||||
,fpanel(NULL)
|
,fpanel(NULL)
|
||||||
|
,splash(NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
cacheMgr->init ();
|
cacheMgr->init ();
|
||||||
@ -202,6 +204,27 @@ RTWindow::RTWindow ()
|
|||||||
if (!isSingleTabMode()&& !simpleEditor) epanel->hide_all();
|
if (!isSingleTabMode()&& !simpleEditor) epanel->hide_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RTWindow::findVerNumbers(int* numbers, Glib::ustring versionStr) {
|
||||||
|
numbers[0] = numbers[1] = numbers[2] = numbers[3] = 0;
|
||||||
|
int n=0;
|
||||||
|
for (unsigned int i=0; i<versionStr.length(); i++) {
|
||||||
|
char chr = (char)versionStr.at(i);
|
||||||
|
if (chr >= '0' && chr <= '9') {
|
||||||
|
numbers[n] *= 10;
|
||||||
|
numbers[n] += (int)(chr - '0');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
n++;
|
||||||
|
if (n>4) {
|
||||||
|
printf("Error: malformed version string; \"%s\" must follow this format: xx.xx.xx.xx. Admitting it's a developer version...\n", versionStr.c_str());
|
||||||
|
// Reseting the already found numbers
|
||||||
|
numbers[0] = numbers[1] = numbers[2] = numbers[3] = 100;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RTWindow::on_realize () {
|
void RTWindow::on_realize () {
|
||||||
Gtk::Window::on_realize ();
|
Gtk::Window::on_realize ();
|
||||||
|
|
||||||
@ -209,6 +232,38 @@ void RTWindow::on_realize () {
|
|||||||
fpanel->setAspect();
|
fpanel->setAspect();
|
||||||
|
|
||||||
cursorManager.init (get_window());
|
cursorManager.init (get_window());
|
||||||
|
|
||||||
|
// Check if first run of this version, then display the caveats text
|
||||||
|
if (options.version != versionString) {
|
||||||
|
int prevVerNbr[4];
|
||||||
|
int currVerNbr[4];
|
||||||
|
findVerNumbers(prevVerNbr, options.version);
|
||||||
|
findVerNumbers(currVerNbr, versionString);
|
||||||
|
|
||||||
|
// Now we can update the version parameter with the right value
|
||||||
|
options.version = versionString;
|
||||||
|
|
||||||
|
bool showCaveats = false;
|
||||||
|
// Check if the current version is newer
|
||||||
|
if (currVerNbr[0] > prevVerNbr[0]) showCaveats = true;
|
||||||
|
else if (currVerNbr[1] > prevVerNbr[1]) showCaveats = true;
|
||||||
|
else if (currVerNbr[2] > prevVerNbr[2]) showCaveats = true;
|
||||||
|
|
||||||
|
if (showCaveats) {
|
||||||
|
// this is a first run!
|
||||||
|
splash = new Splash (*this);
|
||||||
|
splash->set_transient_for (*this);
|
||||||
|
splash->signal_delete_event().connect( sigc::mem_fun(*this, &RTWindow::splashClosed) );
|
||||||
|
if (splash->hasCaveats()) {
|
||||||
|
splash->showCaveats();
|
||||||
|
splash->show ();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
delete splash;
|
||||||
|
splash = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::on_window_state_event(GdkEventWindowState* event) {
|
bool RTWindow::on_window_state_event(GdkEventWindowState* event) {
|
||||||
@ -317,7 +372,7 @@ bool RTWindow::selectEditorPanel(const std::string &name) {
|
|||||||
bool RTWindow::keyPressed (GdkEventKey* event) {
|
bool RTWindow::keyPressed (GdkEventKey* event) {
|
||||||
|
|
||||||
bool ctrl = event->state & GDK_CONTROL_MASK;
|
bool ctrl = event->state & GDK_CONTROL_MASK;
|
||||||
bool shift = event->state & GDK_SHIFT_MASK;
|
//bool shift = event->state & GDK_SHIFT_MASK;
|
||||||
|
|
||||||
if (ctrl) {
|
if (ctrl) {
|
||||||
switch(event->keyval) {
|
switch(event->keyval) {
|
||||||
@ -397,8 +452,6 @@ bool RTWindow::on_delete_event(GdkEventAny* event) {
|
|||||||
WhiteBalance::cleanup();
|
WhiteBalance::cleanup();
|
||||||
|
|
||||||
|
|
||||||
options.firstRun = false;
|
|
||||||
|
|
||||||
if (!options.windowMaximized) {
|
if (!options.windowMaximized) {
|
||||||
options.windowWidth = get_width();
|
options.windowWidth = get_width();
|
||||||
options.windowHeight = get_height();
|
options.windowHeight = get_height();
|
||||||
@ -531,3 +584,9 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) {
|
|||||||
((*itr).second)->updateHistogramPosition (oldPosition, newPosition);
|
((*itr).second)->updateHistogramPosition (oldPosition, newPosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RTWindow::splashClosed(GdkEventAny* event) {
|
||||||
|
delete splash;
|
||||||
|
splash = NULL;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include "progressconnector.h"
|
#include "progressconnector.h"
|
||||||
#include "editwindow.h"
|
#include "editwindow.h"
|
||||||
|
#include "splash.h"
|
||||||
|
|
||||||
class RTWindow : public Gtk::Window, public rtengine::ProgressListener{
|
class RTWindow : public Gtk::Window, public rtengine::ProgressListener{
|
||||||
|
|
||||||
@ -34,6 +35,7 @@ class RTWindow : public Gtk::Window, public rtengine::ProgressListener{
|
|||||||
std::set<Glib::ustring> filesEdited;
|
std::set<Glib::ustring> filesEdited;
|
||||||
std::map<Glib::ustring, EditorPanel*> epanels;
|
std::map<Glib::ustring, EditorPanel*> epanels;
|
||||||
|
|
||||||
|
Splash* splash;
|
||||||
Gtk::ProgressBar prProgBar;
|
Gtk::ProgressBar prProgBar;
|
||||||
PLDBridge* pldBridge;
|
PLDBridge* pldBridge;
|
||||||
bool is_fullscreen;
|
bool is_fullscreen;
|
||||||
@ -42,9 +44,11 @@ class RTWindow : public Gtk::Window, public rtengine::ProgressListener{
|
|||||||
Gtk::Image *iFullscreen, *iFullscreen_exit;
|
Gtk::Image *iFullscreen, *iFullscreen_exit;
|
||||||
|
|
||||||
bool isSingleTabMode() { return !options.tabbedUI && !EditWindow::isMultiDisplayEnabled(); };
|
bool isSingleTabMode() { return !options.tabbedUI && !EditWindow::isMultiDisplayEnabled(); };
|
||||||
|
void findVerNumbers(int* numbers, Glib::ustring versionStr);
|
||||||
|
|
||||||
bool on_expose_event_epanel(GdkEventExpose* event);
|
bool on_expose_event_epanel(GdkEventExpose* event);
|
||||||
bool on_expose_event_fpanel(GdkEventExpose* event);
|
bool on_expose_event_fpanel(GdkEventExpose* event);
|
||||||
|
bool splashClosed(GdkEventAny* event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RTWindow ();
|
RTWindow ();
|
||||||
|
@ -70,16 +70,17 @@ bool SplashImage::on_expose_event (GdkEventExpose* event) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Splash::Splash () {
|
Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, true) {
|
||||||
|
|
||||||
set_title (M("GENERAL_ABOUT"));
|
|
||||||
set_border_width (4);
|
set_border_width (4);
|
||||||
|
|
||||||
Gtk::Notebook* nb = Gtk::manage (new Gtk::Notebook ());
|
caveatsSW = NULL;
|
||||||
|
|
||||||
|
nb = Gtk::manage (new Gtk::Notebook ());
|
||||||
get_vbox()->pack_start (*nb);
|
get_vbox()->pack_start (*nb);
|
||||||
|
|
||||||
// Tab 1: the image
|
// Tab 1: the image
|
||||||
splashImage = new SplashImage ();
|
splashImage = Gtk::manage(new SplashImage ());
|
||||||
nb->append_page (*splashImage, M("ABOUT_TAB_SPLASH"));
|
nb->append_page (*splashImage, M("ABOUT_TAB_SPLASH"));
|
||||||
splashImage->show ();
|
splashImage->show ();
|
||||||
|
|
||||||
@ -145,13 +146,37 @@ Splash::Splash () {
|
|||||||
textBuffer->set_text((Glib::ustring)(ostr.str()));
|
textBuffer->set_text((Glib::ustring)(ostr.str()));
|
||||||
|
|
||||||
Gtk::ScrolledWindow *licenseSW = Gtk::manage (new Gtk::ScrolledWindow());
|
Gtk::ScrolledWindow *licenseSW = Gtk::manage (new Gtk::ScrolledWindow());
|
||||||
Gtk::TextView *creditsTV = Gtk::manage (new Gtk::TextView (textBuffer));
|
Gtk::TextView *licenseTV = Gtk::manage (new Gtk::TextView (textBuffer));
|
||||||
creditsTV->set_editable(false);
|
licenseTV->set_editable(false);
|
||||||
licenseSW->add(*creditsTV);
|
licenseSW->add(*licenseTV);
|
||||||
nb->append_page (*licenseSW, M("ABOUT_TAB_LICENSE"));
|
nb->append_page (*licenseSW, M("ABOUT_TAB_LICENSE"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tab 5: the caveats
|
||||||
|
std::string caveatsFileName = Glib::build_filename (creditsPath, "CAVEATS.txt");
|
||||||
|
if ( safe_file_test(caveatsFileName, (Glib::FILE_TEST_EXISTS)) ) {
|
||||||
|
FILE *f = safe_g_fopen (caveatsFileName, "rt");
|
||||||
|
if (f != NULL) {
|
||||||
|
char* buffer = new char[1024];
|
||||||
|
std::ostringstream ostr;
|
||||||
|
while (fgets (buffer, 1024, f))
|
||||||
|
ostr << buffer;
|
||||||
|
delete [] buffer;
|
||||||
|
fclose (f);
|
||||||
|
|
||||||
|
Glib::RefPtr<Gtk::TextBuffer> textBuffer = Gtk::TextBuffer::create();
|
||||||
|
textBuffer->set_text((Glib::ustring)(ostr.str()));
|
||||||
|
|
||||||
|
caveatsSW = Gtk::manage (new Gtk::ScrolledWindow());
|
||||||
|
Gtk::TextView *caveatsTV = Gtk::manage (new Gtk::TextView (textBuffer));
|
||||||
|
caveatsTV->set_editable(false);
|
||||||
|
caveatsTV->set_wrap_mode(Gtk::WRAP_WORD);
|
||||||
|
caveatsSW->add(*caveatsTV);
|
||||||
|
nb->append_page (*caveatsSW, M("ABOUT_TAB_CAVEATS"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
set_position (Gtk::WIN_POS_CENTER);
|
set_position (Gtk::WIN_POS_CENTER);
|
||||||
//add_events(Gdk::BUTTON_RELEASE_MASK);
|
//add_events(Gdk::BUTTON_RELEASE_MASK);
|
||||||
@ -160,15 +185,12 @@ Splash::Splash () {
|
|||||||
nb->set_current_page (0);
|
nb->set_current_page (0);
|
||||||
|
|
||||||
show_all_children ();
|
show_all_children ();
|
||||||
set_modal (true);
|
|
||||||
set_keep_above (true);
|
set_keep_above (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Splash::Splash (int maxtime) {
|
Splash::Splash (Gtk::Window& parent, int maxtime) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, true) {
|
||||||
|
|
||||||
set_title (M("GENERAL_ABOUT"));
|
splashImage = Gtk::manage(new SplashImage ());
|
||||||
|
|
||||||
splashImage = new SplashImage ();
|
|
||||||
// add (*splashImage);
|
// add (*splashImage);
|
||||||
get_vbox()->pack_start (*splashImage);
|
get_vbox()->pack_start (*splashImage);
|
||||||
splashImage->show ();
|
splashImage->show ();
|
||||||
@ -190,8 +212,16 @@ bool Splash::on_timer () {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* removed as it seem to be too sensitive in some OS
|
||||||
bool Splash::on_button_release_event (GdkEventButton* event) {
|
bool Splash::on_button_release_event (GdkEventButton* event) {
|
||||||
|
|
||||||
hide ();
|
hide ();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
void Splash::showCaveats() {
|
||||||
|
if (caveatsSW)
|
||||||
|
nb->set_current_page(nb->page_num(*caveatsSW));
|
||||||
|
}
|
||||||
|
@ -39,13 +39,17 @@ class Splash : public Gtk::Dialog {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SplashImage* splashImage;
|
SplashImage* splashImage;
|
||||||
|
Gtk::Notebook* nb;
|
||||||
|
Gtk::ScrolledWindow* caveatsSW;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Splash (int maxtime);
|
Splash (Gtk::Window& parent, int maxtime);
|
||||||
Splash ();
|
Splash (Gtk::Window& parent);
|
||||||
|
|
||||||
|
bool hasCaveats() { return caveatsSW != NULL; };
|
||||||
|
void showCaveats();
|
||||||
bool on_timer ();
|
bool on_timer ();
|
||||||
virtual bool on_button_release_event (GdkEventButton* event);
|
//virtual bool on_button_release_event (GdkEventButton* event);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user