diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 3967deed9..88f9c73a5 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -861,6 +861,7 @@ PREFERENCES_CLIPPINGIND;Indication du dépassement de plage dynamique PREFERENCES_CLUTSCACHE;Cache HaldCLUT PREFERENCES_CLUTSCACHE_LABEL;Nombre maximum de chache CLUT PREFERENCES_CLUTSDIR;Dossier HaldCLUT +PREFERENCES_CMMBPC;Compensation du point noir PREFERENCES_CURVEBBOXPOS;Position des boutons copier/coller des courbes PREFERENCES_CURVEBBOXPOS_ABOVE;Au-dessus PREFERENCES_CURVEBBOXPOS_BELOW;En-dessous @@ -926,8 +927,8 @@ PREFERENCES_GREYSC;Luminance Yb de la scène (%) PREFERENCES_GREYSC18;Yb=18 CIE L#50 PREFERENCES_GREYSCA;Automatique PREFERENCES_HISTOGRAMPOSITIONLEFT;Histogramme dans le panneau de gauche -PREFERENCES_HISTOGRAMWORKING;Utiliser le profile de travail pour l'histograme principal et le Navigateur -PREFERENCES_HISTOGRAM_TOOLTIP;Si activé, le profile couleur de travail est utilisé pour les données d'histograme et le panneau Navigateur, sinon le profil de travail de sortie "gamma-corrigé" est utilisé. +PREFERENCES_HISTOGRAMWORKING;Utiliser le profil de travail pour l'histograme principal et le Navigateur +PREFERENCES_HISTOGRAM_TOOLTIP;Si activé, le profil couleur de travail est utilisé pour les données d'histograme et le panneau Navigateur, sinon le profil de travail de sortie "gamma-corrigé" est utilisé. PREFERENCES_HLTHRESHOLD;Seuil pour le dépassement de domaine supérieur PREFERENCES_ICCDIR;Dossier des profils ICC PREFERENCES_IMG_RELOAD_NEEDED;Ces changements nécessitent un rechargement de l'image (ou l'ouverture d'une autre image) pour prendre effet. @@ -955,7 +956,10 @@ PREFERENCES_MENUGROUPRANK;Classement PREFERENCES_MENUOPTIONS;Options du menu PREFERENCES_METADATA;Metadonnées PREFERENCES_MIN;Mini (100x115) -PREFERENCES_MONBPC;Compensation du Point Noir pour la transformation L*a*b*->Moniteur +PREFERENCES_MONINTENT;Intention de rendu par défaut +PREFERENCES_MONITOR;Moniteur +PREFERENCES_MONPROFILE;Profil couleur par défaut +PREFERENCES_MONPROFILE_WARNOSX;Due à des limitations de MacOS, seul sRGB est supporté. PREFERENCES_MULTITAB;Éditeurs multiple PREFERENCES_MULTITABDUALMON;Éditeurs multiple, si possible sur un second moniteur PREFERENCES_NAVGUIDEBRUSH;Couleur du cadre dans le Navigateur @@ -978,6 +982,7 @@ PREFERENCES_PREVDEMO;Méthode de Dématriçage de l'Aperçu PREFERENCES_PREVDEMO_FAST;Rapide PREFERENCES_PREVDEMO_LABEL;Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%: PREFERENCES_PREVDEMO_SIDECAR;Idem PP3 +PREFERENCES_PRINTER;Imprimante (Épreuvage Écran) PREFERENCES_PROFILEHANDLING;Gestionnaire des profils de traitement PREFERENCES_PROFILELOADPR;Priorité de chargement des profils PREFERENCES_PROFILEPRCACHE;Profil dans le Cache @@ -985,6 +990,8 @@ PREFERENCES_PROFILEPRFILE;Profil accolé au fichier d'entrée PREFERENCES_PROFILESAVECACHE;Enregistrer la paramètres de traitement dans le Cache PREFERENCES_PROFILESAVEINPUT;Enregistrer la paramètres de traitement accolé au fichier d'entrée PREFERENCES_PROPERTY;Propriété +PREFERENCES_PRTINTENT;Intention de rendu +PREFERENCES_PRTPROFILE;Profil couleur PREFERENCES_PSPATH;Dossier d'installation d'Adobe Photoshop PREFERENCES_REMEMBERZOOMPAN;Se souvenir de niveau de zoom et de la position de l'image PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Retient le niveau de zoom et la position de l'image courante lors de l'ouverture d'une nouvelle image.\n\nCette option ne fonctionne que dans le mode "Éditeur unique" et quand "Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%" is set to "Idem PP3". @@ -1085,8 +1092,8 @@ SAVEDLG_SUBSAMP_3;Meilleure qualité SAVEDLG_TIFFUNCOMPRESSED;TIFF non compressé SAVEDLG_WARNFILENAME;Le fichier sera nommé SHCSELECTOR_TOOLTIP;Cliquez le bouton droit de la souris\npour réinitialiser la position de ces 3 curseurs -SOFTPROOF_GAMUTCHECK_TOOLTIP;Si activé, indique en gris les pixels dont la couleurs est en dehors du gamut du profile de sortie -SOFTPROOF_TOOLTIP;Épreuvage écran\nSi activé, simule le rendu généré par le profiles de sortie de l'outil ICM. Particulièrement utile pour simuler le rendu en sortie d'imprimante. +SOFTPROOF_GAMUTCHECK_TOOLTIP;Si activé, indique en gris les pixels dont la couleurs est en dehors du gamut du profil de sortie +SOFTPROOF_TOOLTIP;Épreuvage écran\nSi activé, simule le rendu généré par le profile de sortie de l'outil ICM. Particulièrement utile pour simuler le rendu en sortie d'imprimante. THRESHOLDSELECTOR_B;Bas THRESHOLDSELECTOR_BL;Bas-gauche THRESHOLDSELECTOR_BR;Bas-droite @@ -1463,7 +1470,7 @@ TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolé TP_ICM_DCPILLUMINANT_TOOLTIP;Sélectionne quel illuminant DCP inclus utiliser. La valeur par défaut est "Interpolé", qui est un mix entre les 2 profils inclus basé sur la Balance des Blancs choisie. Ce paramètre n'est actif que si un fichier DCP Bi-Illuminant avec support de l'interpolation est choisi. TP_ICM_INPUTCAMERA;Celui de l'appareil photo -TP_ICM_INPUTCAMERAICC;Sél. auto du profile de l'APN +TP_ICM_INPUTCAMERAICC;Sél. auto du profil de l'APN TP_ICM_INPUTCAMERAICC_TOOLTIP;Utilise les profils d'entrée DCP ou ICC spécifiques à RawTherapee, qui sont plus précis qu'une simple matrice.\nDisponible pour certains appareils photo, ces profils sont stoqués dans le dossier /iccprofiles/input.\nCelui dont le nom de fichier correspond au champ EXIF "Modèle" (de l'appareil) est automatiquement sélectionné. TP_ICM_INPUTCAMERA_TOOLTIP;Par ordre de préférence, utilise les matrices de couleur incluses dans le fichier RAW, les matrices de couleur simple fournies par RawTherapee ou celles de DCRaw TP_ICM_INPUTCUSTOM;Personnel @@ -1929,8 +1936,6 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RETINEX;Retinex -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. !PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. !PREFERENCES_PROFILE_NONE;None diff --git a/rtdata/languages/default b/rtdata/languages/default index ea763fa2b..dfc875f59 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -907,6 +907,7 @@ PREFERENCES_CLIPPINGIND;Clipping Indication PREFERENCES_CLUTSCACHE;HaldCLUT Cache PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs PREFERENCES_CLUTSDIR;HaldCLUT directory +PREFERENCES_CMMBPC;Black point compensation PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons PREFERENCES_CURVEBBOXPOS_ABOVE;Above PREFERENCES_CURVEBBOXPOS_BELOW;Below @@ -1001,9 +1002,10 @@ PREFERENCES_MENUGROUPRANK;Group "Rank" PREFERENCES_MENUOPTIONS;Context Menu Options PREFERENCES_METADATA;Metadata PREFERENCES_MIN;Mini (100x115) -PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -PREFERENCES_MONINTENT;Default monitor intent -PREFERENCES_MONPROFILE;Default monitor profile +PREFERENCES_MONINTENT;Default rendering intent +PREFERENCES_MONITOR;Monitor +PREFERENCES_MONPROFILE;Default color profile +PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. PREFERENCES_MULTITAB;Multiple Editor Tabs Mode PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1028,6 +1030,7 @@ PREFERENCES_PREVDEMO;Preview Demosaic Method PREFERENCES_PREVDEMO_FAST;Fast PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +PREFERENCES_PRINTER;Printer (Soft-Proofing) PREFERENCES_PROFILEHANDLING;Processing Profile Handling PREFERENCES_PROFILELOADPR;Processing profile loading priority PREFERENCES_PROFILEPRCACHE;Profile in cache @@ -1036,6 +1039,8 @@ PREFERENCES_PROFILESAVECACHE;Save processing profile to the cache PREFERENCES_PROFILESAVEINPUT;Save processing profile next to the input file PREFERENCES_PROFILE_NONE;None PREFERENCES_PROPERTY;Property +PREFERENCES_PRTINTENT;Rendering intent +PREFERENCES_PRTPROFILE;Color profile PREFERENCES_PSPATH;Adobe Photoshop installation directory PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index 19ff10256..209ff2393 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -746,6 +746,10 @@ paned.vertical > separator { border-radius: 3px; } +#MetaPanelNotebook stack > box > scrolledwindow > viewport { + margin-left: 15px; +} + #PreviewWindow { border-style: solid; } diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 37fd16664..16ae455b6 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -165,16 +165,20 @@ std::vector getWorkingProfiles () return res; } -std::vector ICCStore::getProfiles (const bool onlyRgb) const +std::vector ICCStore::getProfiles (const ProfileType type) const { MyMutex::MyLock lock (mutex_); std::vector res; - for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) { - if (!onlyRgb || (onlyRgb && cmsGetColorSpace (profile->second) == cmsSigRgbData)) - res.push_back (profile->first); + for (const auto profile : fileProfiles) { + if ( (type==ICCStore::ProfileType::MONITOR && cmsGetDeviceClass(profile.second) == cmsSigDisplayClass && cmsGetColorSpace (profile.second) == cmsSigRgbData) + || (type==ICCStore::ProfileType::PRINTER && cmsGetDeviceClass(profile.second) == cmsSigOutputClass) + || (type==ICCStore::ProfileType::OUTPUT && cmsGetDeviceClass(profile.second) == cmsSigDisplayClass && cmsGetColorSpace (profile.second) == cmsSigRgbData) ) + { + res.push_back (profile.first); + } } return res; diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index bb9693f1a..58ddfdbc9 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -84,6 +84,12 @@ class ICCStore public: + enum class ProfileType { + MONITOR, + PRINTER, + OUTPUT // (actually correspond to the same profiles than with MONITOR) + }; + static ICCStore* getInstance (); void init (const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir); @@ -112,7 +118,7 @@ public: cmsHPROFILE getXYZProfile () const; cmsHPROFILE getsRGBProfile () const; - std::vector getProfiles (const bool onlyRgb = false) const; + std::vector getProfiles (const ProfileType type = ProfileType::MONITOR) const; std::vector getProfilesFromDir (const Glib::ustring& dirName) const; uint8_t getInputIntents (cmsHPROFILE profile) const; diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 9c04e0710..46cf031bd 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -781,7 +781,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) lastOutputProfile = params.icm.output; lastOutputIntent = params.icm.outputIntent; lastOutputBPC = params.icm.outputBPC; - ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent, softProof, gamutCheck); + ipf.updateColorProfiles(monitorProfile, monitorIntent, softProof, gamutCheck); } // process crop, if needed diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 3e0433197..1a3a969ae 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -68,7 +68,7 @@ void ImProcFunctions::setScale (double iscale) scale = iscale; } -void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck) +void ImProcFunctions::updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck) { // set up monitor transform if (monitorTransform) { @@ -77,9 +77,14 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con monitorTransform = nullptr; + cmsHPROFILE monitor = nullptr; + if (!monitorProfile.empty()) { #if !defined(__APPLE__) // No support for monitor profiles on OS X, all data is sRGB - - cmsHPROFILE monitor = iccStore->getProfile (monitorProfile); + monitor = iccStore->getProfile (monitorProfile); +#else + monitor = iccStore->getProfile ("RT_sRGB"); +#endif + } if (monitor) { MyMutex::MyLock lcmsLock (*lcmsMutex); @@ -91,25 +96,14 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con if (softProof) { cmsHPROFILE oprof = nullptr; - if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - GammaValues ga; - iccStore->getGammaArray(icm, ga); - oprof = iccStore->createGammaProfile (icm, ga); - } - else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { - if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - GammaValues ga; - iccStore->getGammaArray(icm, ga); - oprof = iccStore->createCustomGammaOutputProfile (icm, ga); - } else { - oprof = iccStore->getProfile(icm.output); - } + if (!settings->printerProfile.empty()) { + oprof = iccStore->getProfile(settings->printerProfile); } if (oprof) { // NOCACHE is for thread safety, NOOPTIMIZE for precision flags = cmsFLAGS_SOFTPROOFING | cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; - if (icm.outputBPC) { + if (settings->printerBPC) { flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; } if (gamutCheck) { @@ -119,7 +113,7 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con iprof, TYPE_Lab_FLT, monitor, TYPE_RGB_8, oprof, - monitorIntent, icm.outputIntent, + monitorIntent, settings->printerIntent, flags ); if (monitorTransform) { @@ -138,8 +132,6 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con cmsCloseProfile(iprof); } - -#endif } void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const ProcParams ¶ms, LUTu & histogram) diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 6a182e67b..e70083b0b 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -205,7 +205,7 @@ public: bool needsPCVignetting (); void firstAnalysis (const Imagefloat* const working, const ProcParams ¶ms, LUTu & vhist16); - void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); + void updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ); diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 8db42a84e..257a3eeb3 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -946,7 +946,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei ImProcFunctions ipf (¶ms, false); ipf.setScale (sqrt(double(fw * fw + fh * fh)) / sqrt(double(thumbImg->width * thumbImg->width + thumbImg->height * thumbImg->height))*scale); - ipf.updateColorProfiles (params.icm, options.rtSettings.monitorProfile, options.rtSettings.monitorIntent, false, false); + ipf.updateColorProfiles (options.rtSettings.monitorProfile, options.rtSettings.monitorIntent, false, false); LUTu hist16 (65536); diff --git a/rtengine/settings.h b/rtengine/settings.h index b572e7310..ada63400a 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -38,6 +38,9 @@ public: int leveldnliss; // level of auto multi zone int leveldnautsimpl; // STD or EXPERT + Glib::ustring printerProfile; ///< ICC profile name used for soft-proofing a printer output + RenderingIntent printerIntent; ///< Colorimetric intent used with the above profile + bool printerBPC; ///< Black Point Compensation for the Labimage->Printer->Monitor transform Glib::ustring monitorProfile; ///< ICC profile name used for the monitor RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile bool monitorBPC; ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between) diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index e27b03903..9d0f0b14b 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -38,15 +38,19 @@ using namespace rtengine::procparams; class EditorPanel::ColorManagementToolbar { private: +#if !defined(__APPLE__) // monitor profile not supported on apple MyComboBoxText profileBox; +#endif PopUpButton intentBox; Gtk::ToggleButton softProof; Gtk::ToggleButton spGamutCheck; - sigc::connection profileConn, intentConn; + sigc::connection profileConn, intentConn, softproofConn; + bool canSProof; rtengine::StagedImageProcessor* const& processor; private: +#if !defined(__APPLE__) // monitor profile not supported on apple void prepareProfileBox () { profileBox.setPreferredWidth(70, 200); @@ -59,14 +63,13 @@ private: #else profileBox.set_active (0); #endif - - const std::vector profiles = rtengine::iccStore->getProfiles (true); - - for (std::vector::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) { - profileBox.append (*iterator); + const std::vector profiles = rtengine::iccStore->getProfiles (rtengine::ICCStore::ProfileType::MONITOR); + for (const auto profile: profiles) { + profileBox.append (profile); } profileBox.set_tooltip_text (profileBox.get_active_text ()); } +#endif void prepareIntentBox () { @@ -89,6 +92,7 @@ private: softProof.set_tooltip_markup(M("SOFTPROOF_TOOLTIP")); softProof.set_active(false); + softProof.set_sensitive(canSProof); softProof.show (); Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("spGamutCheck.png")); @@ -124,31 +128,34 @@ private: void updateParameters (bool noEvent = false) { +#if !defined(__APPLE__) // monitor profile not supported on apple ConnectionBlocker profileBlocker (profileConn); +#endif ConnectionBlocker intentBlocker (intentConn); Glib::ustring profile; -#ifdef WIN32 - +#if !defined(__APPLE__) // monitor profile not supported on apple + #ifdef WIN32 if (profileBox.get_active_row_number () == 1) { profile = rtengine::iccStore->getDefaultMonitorProfileName (); - if (profile.empty ()) { profile = options.rtSettings.monitorProfile; } - if (profile.empty ()) { profile = "sRGB IEC61966-2.1"; } } else if (profileBox.get_active_row_number () > 1) { profile = profileBox.get_active_text (); } - -#else + #else profile = profileBox.get_active_row_number () > 0 ? profileBox.get_active_text () : Glib::ustring (); + #endif +#else + profile = "RT_sRGB"; #endif +#if !defined(__APPLE__) // monitor profile not supported on apple if (profileBox.get_active_row_number () == 0) { profile.clear (); @@ -171,8 +178,8 @@ private: intentBox.setItemSensitivity(0, supportsPerceptual); intentBox.setItemSensitivity(1, supportsRelativeColorimetric); intentBox.setItemSensitivity(2, supportsAbsoluteColorimetric); - softProof.set_sensitive(true); - spGamutCheck.set_sensitive(true); + softProof.set_sensitive(canSProof); + spGamutCheck.set_sensitive(canSProof); } else { intentBox.setItemSensitivity(0, true); intentBox.setItemSensitivity(1, true); @@ -185,9 +192,8 @@ private: profileBox.set_tooltip_text (profileBox.get_active_text ()); } - +#endif rtengine::RenderingIntent intent; - switch (intentBox.getSelected ()) { default: case 0: @@ -219,9 +225,18 @@ private: void updateSoftProofParameters (bool noEvent = false) { - spGamutCheck.set_sensitive(softProof.get_active()); + if (!canSProof) { + ConnectionBlocker profileBlocker (softproofConn); + softProof.set_active(false); + softProof.set_sensitive(false); + } else { + softProof.set_sensitive(profileBox.get_active_row_number () > 0); + } + spGamutCheck.set_sensitive(softProof.get_sensitive() && softProof.get_active()); +#if !defined(__APPLE__) // monitor profile not supported on apple if (profileBox.get_active_row_number () > 0) { +#endif if (!noEvent) { processor->beginUpdateParams (); } @@ -229,34 +244,49 @@ private: if (!noEvent) { processor->endUpdateParams (rtengine::EvMonitorTransform); } +#if !defined(__APPLE__) // monitor profile not supported on apple } +#endif } public: explicit ColorManagementToolbar (rtengine::StagedImageProcessor* const& ipc) : intentBox (Glib::ustring (), true), + canSProof(!options.rtSettings.printerProfile.empty() && options.rtSettings.printerProfile != "None"), // assuming the printer profile exist! processor (ipc) { +#if !defined(__APPLE__) // monitor profile not supported on apple prepareProfileBox (); +#endif prepareIntentBox (); prepareSoftProofingBox (); reset (); - softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); - spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled));; + softproofConn = softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); + spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled)); +#if !defined(__APPLE__) // monitor profile not supported on apple profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::profileBoxChanged)); +#endif intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::intentBoxChanged)); } void pack_right_in (Gtk::Grid* grid) { +#if !defined(__APPLE__) // monitor profile not supported on apple grid->attach_next_to (profileBox, Gtk::POS_RIGHT, 1, 1); +#endif grid->attach_next_to (*intentBox.buttonGroup, Gtk::POS_RIGHT, 1, 1); grid->attach_next_to (softProof, Gtk::POS_RIGHT, 1, 1); grid->attach_next_to (spGamutCheck, Gtk::POS_RIGHT, 1, 1); } + void canSoftProof(bool canSP) + { + canSProof = canSP; + updateSoftProofParameters(); + } + void updateProcessor() { if (processor) { @@ -266,19 +296,19 @@ public: void reset () { - ConnectionBlocker profileBlocker (profileConn); ConnectionBlocker intentBlocker (intentConn); +#if !defined(__APPLE__) // monitor profile not supported on apple + ConnectionBlocker profileBlocker (profileConn); -#ifdef WIN32 - + #ifdef WIN32 if (options.rtSettings.autoMonitorProfile) { setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 1); } else { setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0); } - -#else + #else setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0); + #endif #endif switch (options.rtSettings.monitorIntent) { @@ -2050,6 +2080,11 @@ void EditorPanel::tbShowHideSidePanels_managestate() ShowHideSidePanelsconn.block (false); } +void EditorPanel::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) +{ + colorMgmtToolBar->canSoftProof(!printerProfile.empty() && printerProfile != "None"); +} + void EditorPanel::updateTPVScrollbar (bool hide) { tpc->updateTPVScrollbar (hide); diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index 9ec7da58d..d87f12c23 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -209,6 +209,7 @@ public: { return isProcessing; } + void updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC); void updateTPVScrollbar (bool hide); void updateTabsUsesIcons (bool useIcons); void updateHistogramPosition (int oldPosition, int newPosition); diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index 82d2e0c3a..e5919c9e4 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -553,9 +553,13 @@ public: inline void setActiveTextOrIndex (Gtk::ComboBoxText& comboBox, const Glib::ustring& text, int index) { - comboBox.set_active_text (text); + bool valueSet = false; + if (!text.empty()) { + comboBox.set_active_text (text); + valueSet = true; + } - if (comboBox.get_active_row_number () < 0) { + if (!valueSet || comboBox.get_active_row_number () < 0) { comboBox.set_active (index); } } diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 4b19873eb..75311ca11 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -193,7 +193,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch onames->append (M("TP_ICM_NOICM")); onames->set_active (0); - std::vector opnames = iccStore->getProfiles (); + std::vector opnames = iccStore->getProfiles (rtengine::ICCStore::ProfileType::OUTPUT); for (size_t i = 0; i < opnames.size(); i++) { onames->append (opnames[i]); diff --git a/rtgui/iptcpanel.cc b/rtgui/iptcpanel.cc index 5d0c5ce15..b26b07603 100644 --- a/rtgui/iptcpanel.cc +++ b/rtgui/iptcpanel.cc @@ -26,13 +26,16 @@ using namespace rtengine::procparams; IPTCPanel::IPTCPanel () { + set_spacing (4); + Gtk::Grid* iptc = Gtk::manage( new Gtk::Grid () ); setExpandAlignProperties(iptc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + iptc->set_row_spacing(3); int row = 0; Gtk::Label* capl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CAPTION") + ":") ); - setExpandAlignProperties(capl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_START); + setExpandAlignProperties(capl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); captionText = Gtk::TextBuffer::create (); captionView = Gtk::manage( new Gtk::TextView (captionText) ); setExpandAlignProperties(captionView, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); @@ -44,52 +47,52 @@ IPTCPanel::IPTCPanel () capl->set_tooltip_text (M("IPTCPANEL_CAPTIONHINT")); captionView->set_tooltip_text (M("IPTCPANEL_CAPTIONHINT")); captionView->set_size_request(35, 95); - iptc->attach (*capl, 0, row, 1, 1); - iptc->attach (*scrolledWindowc, 1, row, 1, 1); + iptc->attach (*capl, 0, row++, 1, 1); + iptc->attach (*scrolledWindowc, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* capwl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CAPTIONWRITER") + ":") ); - setExpandAlignProperties(capwl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(capwl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); captionWriter = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(captionWriter, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(captionWriter, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); capwl->set_tooltip_text (M("IPTCPANEL_CAPTIONWRITERHINT")); captionWriter->set_tooltip_text (M("IPTCPANEL_CAPTIONWRITERHINT")); - iptc->attach (*capwl, 0, row, 1, 1); - iptc->attach (*captionWriter, 1, row, 1, 1); + iptc->attach (*capwl, 0, row++, 1, 1); + iptc->attach (*captionWriter, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* headl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_HEADLINE") + ":") ); - setExpandAlignProperties(headl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(headl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); headline = Gtk::manage( new Gtk::Entry () ); setExpandAlignProperties(headline, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); headl->set_tooltip_text (M("IPTCPANEL_HEADLINEHINT")); headline->set_tooltip_text (M("IPTCPANEL_HEADLINEHINT")); - iptc->attach (*headl, 0, row, 1, 1); - iptc->attach (*headline, 1, row, 1, 1); + iptc->attach (*headl, 0, row++, 1, 1); + iptc->attach (*headline, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* instl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_INSTRUCTIONS") + ":") ); - setExpandAlignProperties(instl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(instl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); instructions = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(instructions, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(instructions, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); instl->set_tooltip_text (M("IPTCPANEL_INSTRUCTIONSHINT")); instructions->set_tooltip_text (M("IPTCPANEL_INSTRUCTIONSHINT")); - iptc->attach (*instl, 0, row, 1, 1); - iptc->attach (*instructions, 1, row, 1, 1); + iptc->attach (*instl, 0, row++, 1, 1); + iptc->attach (*instructions, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::HSeparator* hsep1 = Gtk::manage( new Gtk::HSeparator () ); setExpandAlignProperties(hsep1, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - iptc->attach (*hsep1, 0, row, 2, 1); + iptc->attach (*hsep1, 0, row++, 2, 1); - row++; + // -------------------------- Gtk::Label* keyl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_KEYWORDS") + ":")); - setExpandAlignProperties(keyl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(keyl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); keyl->set_tooltip_text (M("IPTCPANEL_KEYWORDSHINT")); keywords = Gtk::manage( new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE) ); setExpandAlignProperties(keywords, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); @@ -101,14 +104,14 @@ IPTCPanel::IPTCPanel () scrolledWindowkw->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); scrolledWindowkw->add(*keywords); keyword = Gtk::manage(new MyComboBoxText (true)); - setExpandAlignProperties(keyword, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - keyword->set_size_request(35); + setExpandAlignProperties(keyword, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + keyword->set_size_request(75); keywords->set_tooltip_text (M("IPTCPANEL_KEYWORDSHINT")); keyword->set_tooltip_text (M("IPTCPANEL_KEYWORDSHINT")); addKW = Gtk::manage( new Gtk::Button () ); - setExpandAlignProperties(addKW, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(addKW, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); delKW = Gtk::manage( new Gtk::Button () ); - setExpandAlignProperties(delKW, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(delKW, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); Gtk::Image* addKWImg = Gtk::manage( new RTImage ("list-add-small.png") ); setExpandAlignProperties(addKWImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); Gtk::Image* delKWImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); @@ -116,30 +119,30 @@ IPTCPanel::IPTCPanel () addKW->add (*addKWImg); delKW->add (*delKWImg); Gtk::Grid* kwgrid = Gtk::manage( new Gtk::Grid () ); - setExpandAlignProperties(kwgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(kwgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); kwgrid->attach (*keyword, 0, 0, 1, 1); kwgrid->attach (*addKW, 1, 0, 1, 1); kwgrid->attach (*delKW, 2, 0, 1, 1); - iptc->attach (*keyl, 0, row, 1, 1); - iptc->attach (*kwgrid, 1, row, 1, 1); - row++; - iptc->attach (*scrolledWindowkw, 0, row, 2, 1); - row++; + iptc->attach (*keyl, 0, row++, 1, 1); + iptc->attach (*kwgrid, 0, row++, 1, 1); + // -------------------------- + iptc->attach (*scrolledWindowkw, 0, row++, 2, 1); + // -------------------------- Gtk::HSeparator* hsep2 = Gtk::manage( new Gtk::HSeparator () ); setExpandAlignProperties(hsep2, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - iptc->attach (*hsep2, 0, row, 2, 1); - row++; + iptc->attach (*hsep2, 0, row++, 2, 1); + // -------------------------- Gtk::Label* catl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CATEGORY") + ":") ); - setExpandAlignProperties(catl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(catl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); category = Gtk::manage(new MyComboBoxText (true)); - category->set_size_request(35); - setExpandAlignProperties(category, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + category->set_size_request(75); + setExpandAlignProperties(category, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); catl->set_tooltip_text (M("IPTCPANEL_CATEGORYHINT")); category->set_tooltip_text (M("IPTCPANEL_CATEGORYHINT")); Gtk::Label* scl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_SUPPCATEGORIES") + ":") ); - setExpandAlignProperties(scl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(scl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); suppCategories = Gtk::manage( new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE) ); setExpandAlignProperties(suppCategories, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); suppCategories->set_headers_visible (false); @@ -150,15 +153,15 @@ IPTCPanel::IPTCPanel () scrolledWindowsc->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); scrolledWindowsc->add(*suppCategories); suppCategory = Gtk::manage(new MyComboBoxText (true)); - suppCategory->set_size_request(35); - setExpandAlignProperties(suppCategory, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + suppCategory->set_size_request(75); + setExpandAlignProperties(suppCategory, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); scl->set_tooltip_text (M("IPTCPANEL_SUPPCATEGORIESHINT")); suppCategories->set_tooltip_text (M("IPTCPANEL_SUPPCATEGORIESHINT")); suppCategory->set_tooltip_text (M("IPTCPANEL_SUPPCATEGORIESHINT")); addSC = Gtk::manage( new Gtk::Button () ); - setExpandAlignProperties(addSC, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(addSC, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); delSC = Gtk::manage( new Gtk::Button () ); - setExpandAlignProperties(delSC, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + setExpandAlignProperties(delSC, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); Gtk::Image* addSCImg = Gtk::manage( new RTImage ("list-add-small.png") ); setExpandAlignProperties(addSCImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); Gtk::Image* delSCImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); @@ -166,150 +169,150 @@ IPTCPanel::IPTCPanel () addSC->add (*addSCImg); delSC->add (*delSCImg); Gtk::Grid* scgrid = Gtk::manage( new Gtk::Grid () ); - setExpandAlignProperties(scgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(scgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); scgrid->attach (*suppCategory, 0, 0, 1, 1); scgrid->attach (*addSC, 1, 0, 1, 1); scgrid->attach (*delSC, 2, 0, 1, 1); - iptc->attach (*catl, 0, row, 1, 1); - iptc->attach (*category, 1, row, 1, 1); - row++; - iptc->attach (*scl, 0, row, 1, 1); - iptc->attach (*scgrid, 1, row, 1, 1); - row++; - iptc->attach (*scrolledWindowsc, 0, row, 2, 1); - row++; + iptc->attach (*catl, 0, row++, 1, 1); + iptc->attach (*category, 0, row++, 1, 1); + // -------------------------- + iptc->attach (*scl, 0, row++, 1, 1); + iptc->attach (*scgrid, 0, row++, 1, 1); + // -------------------------- + iptc->attach (*scrolledWindowsc, 0, row++, 2, 1); + // -------------------------- Gtk::HSeparator* hsep3 = Gtk::manage( new Gtk::HSeparator () ); setExpandAlignProperties(hsep3, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - iptc->attach (*hsep3, 0, row, 2, 1); - row++; + iptc->attach (*hsep3, 0, row++, 2, 1); + // -------------------------- Gtk::Label* authl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_AUTHOR") + ":") ); - setExpandAlignProperties(authl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(authl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); author = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(author, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(author, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); authl->set_tooltip_text (M("IPTCPANEL_CREDITHINT")); author->set_tooltip_text (M("IPTCPANEL_CREDITHINT")); - iptc->attach (*authl, 0, row, 1, 1); - iptc->attach (*author, 1, row, 1, 1); + iptc->attach (*authl, 0, row++, 1, 1); + iptc->attach (*author, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* aupl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_AUTHORSPOSITION") + ":") ); - setExpandAlignProperties(aupl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(aupl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); authorPos = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(authorPos, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(authorPos, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); aupl->set_tooltip_text (M("IPTCPANEL_AUTHORSPOSITIONHINT")); authorPos->set_tooltip_text (M("IPTCPANEL_AUTHORSPOSITIONHINT")); - iptc->attach (*aupl, 0, row, 1, 1); - iptc->attach (*authorPos, 1, row, 1, 1); + iptc->attach (*aupl, 0, row++, 1, 1); + iptc->attach (*authorPos, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* credl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CREDIT") + ":") ); - setExpandAlignProperties(credl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(credl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); credit = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(credit, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(credit, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); credl->set_tooltip_text (M("IPTCPANEL_CREDITHINT")); credit->set_tooltip_text (M("IPTCPANEL_CREDITHINT")); - iptc->attach (*credl, 0, row, 1, 1); - iptc->attach (*credit, 1, row, 1, 1); + iptc->attach (*credl, 0, row++, 1, 1); + iptc->attach (*credit, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* sourl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_SOURCE") + ":") ); - setExpandAlignProperties(sourl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(sourl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); source = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(source, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(source, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); sourl->set_tooltip_text (M("IPTCPANEL_SOURCEHINT")); source->set_tooltip_text (M("IPTCPANEL_SOURCEHINT")); - iptc->attach (*sourl, 0, row, 1, 1); - iptc->attach (*source, 1, row, 1, 1); + iptc->attach (*sourl, 0, row++, 1, 1); + iptc->attach (*source, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* cprl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_COPYRIGHT") + ":") ); - setExpandAlignProperties(cprl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(cprl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); copyright = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(copyright, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(copyright, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); cprl->set_tooltip_text (M("IPTCPANEL_COPYRIGHTHINT")); copyright->set_tooltip_text (M("IPTCPANEL_COPYRIGHTHINT")); - iptc->attach (*cprl, 0, row, 1, 1); - iptc->attach (*copyright, 1, row, 1, 1); + iptc->attach (*cprl, 0, row++, 1, 1); + iptc->attach (*copyright, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::HSeparator* hsep4 = Gtk::manage( new Gtk::HSeparator () ); setExpandAlignProperties(hsep4, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - iptc->attach (*hsep4, 0, row, 2, 1); + iptc->attach (*hsep4, 0, row++, 2, 1); - row++; + // -------------------------- Gtk::Label* cityl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CITY") + ":") ); - setExpandAlignProperties(cityl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(cityl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); city = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(city, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(city, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); cityl->set_tooltip_text (M("IPTCPANEL_CITYHINT")); city->set_tooltip_text (M("IPTCPANEL_CITYHINT")); - iptc->attach (*cityl, 0, row, 1, 1); - iptc->attach (*city, 1, row, 1, 1); + iptc->attach (*cityl, 0, row++, 1, 1); + iptc->attach (*city, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* provl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_PROVINCE") + ":") ); - setExpandAlignProperties(provl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(provl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); province = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(province, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(province, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); provl->set_tooltip_text (M("IPTCPANEL_PROVINCEHINT")); province->set_tooltip_text (M("IPTCPANEL_PROVINCEHINT")); - iptc->attach (*provl, 0, row, 1, 1); - iptc->attach (*province, 1, row, 1, 1); + iptc->attach (*provl, 0, row++, 1, 1); + iptc->attach (*province, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* ctrl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_COUNTRY") + ":") ); - setExpandAlignProperties(ctrl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(ctrl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); country = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(country, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(country, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); ctrl->set_tooltip_text (M("IPTCPANEL_COUNTRYHINT")); country->set_tooltip_text (M("IPTCPANEL_COUNTRYHINT")); - iptc->attach (*ctrl, 0, row, 1, 1); - iptc->attach (*country, 1, row, 1, 1); + iptc->attach (*ctrl, 0, row++, 1, 1); + iptc->attach (*country, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* titll = Gtk::manage( new Gtk::Label (M("IPTCPANEL_TITLE") + ":") ); - setExpandAlignProperties(titll, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(titll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); title = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(title, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(title, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); titll->set_tooltip_text (M("IPTCPANEL_TITLEHINT")); title->set_tooltip_text (M("IPTCPANEL_TITLEHINT")); - iptc->attach (*titll, 0, row, 1, 1); - iptc->attach (*title, 1, row, 1, 1); + iptc->attach (*titll, 0, row++, 1, 1); + iptc->attach (*title, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* dcl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_DATECREATED") + ":") ); - setExpandAlignProperties(dcl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(dcl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); dateCreated = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(dateCreated, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(dateCreated, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); dcl->set_tooltip_text (M("IPTCPANEL_DATECREATEDHINT")); dateCreated->set_tooltip_text (M("IPTCPANEL_DATECREATEDHINT")); - iptc->attach (*dcl, 0, row, 1, 1); - iptc->attach (*dateCreated, 1, row, 1, 1); + iptc->attach (*dcl, 0, row++, 1, 1); + iptc->attach (*dateCreated, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* trl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_TRANSREFERENCE") + ":") ); - setExpandAlignProperties(trl, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(trl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); transReference = Gtk::manage( new Gtk::Entry () ); - setExpandAlignProperties(transReference, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + setExpandAlignProperties(transReference, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); trl->set_tooltip_text (M("IPTCPANEL_TRANSREFERENCEHINT")); transReference->set_tooltip_text (M("IPTCPANEL_TRANSREFERENCEHINT")); - iptc->attach (*trl, 0, row, 1, 1); - iptc->attach (*transReference, 1, row, 1, 1); + iptc->attach (*trl, 0, row++, 1, 1); + iptc->attach (*transReference, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::ScrolledWindow* scrolledWindow = Gtk::manage( new Gtk::ScrolledWindow() ); setExpandAlignProperties(scrolledWindow, false, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); diff --git a/rtgui/options.cc b/rtgui/options.cc index 192e9bbf9..2b8203728 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -632,6 +632,9 @@ void Options::setDefaults () rtSettings.leveldnliss = 0; rtSettings.leveldnautsimpl = 0; + rtSettings.printerProfile = Glib::ustring(); + rtSettings.printerIntent = rtengine::RI_RELATIVE; + rtSettings.printerBPC = true; rtSettings.monitorProfile = Glib::ustring(); rtSettings.monitorIntent = rtengine::RI_RELATIVE; rtSettings.monitorBPC = true; @@ -1450,6 +1453,18 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.iccDirectory = keyFile.get_string ("Color Management", "ICCDirectory"); } + if (keyFile.has_key ("Color Management", "PrinterIntent")) { + rtSettings.printerIntent = static_cast(keyFile.get_integer("Color Management", "PrinterIntent")); + } + + if (keyFile.has_key ("Color Management", "PrinterBPC")) { + rtSettings.printerBPC = keyFile.get_boolean("Color Management", "PrinterBPC"); + } + + if (keyFile.has_key ("Color Management", "PrinterProfile")) { + rtSettings.printerProfile = keyFile.get_string ("Color Management", "PrinterProfile"); + } + if (keyFile.has_key ("Color Management", "MonitorProfile")) { rtSettings.monitorProfile = keyFile.get_string ("Color Management", "MonitorProfile"); } @@ -2035,6 +2050,10 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_integer ("Crop Settings", "PPI", cropPPI); + keyFile.set_string ("Color Management", "PrinterProfile", rtSettings.printerProfile); + keyFile.set_integer ("Color Management", "PrinterIntent", rtSettings.printerIntent); + keyFile.set_boolean ("Color Management", "PrinterBPC", rtSettings.printerBPC); + keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 735d64e82..f00bb6e2e 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -684,66 +684,148 @@ Gtk::Widget* Preferences::getColorManagementPanel () { Gtk::VBox* mvbcm = Gtk::manage (new Gtk::VBox ()); + mvbcm->set_spacing (4); iccDir = Gtk::manage (new Gtk::FileChooserButton (M("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + setExpandAlignProperties(iccDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties(pdlabel, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + + Gtk::Grid* iccdgrid = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties (iccdgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + iccdgrid->set_column_spacing (4); + + iccdgrid->attach (*pdlabel, 0, 0, 1, 1); + iccdgrid->attach (*iccDir, 1, 0, 1, 1); + + iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged)); + + mvbcm->pack_start(*iccdgrid, Gtk::PACK_SHRINK); + + //------------------------- MONITOR ---------------------- + + Gtk::Frame* fmonitor = Gtk::manage( new Gtk::Frame (M("PREFERENCES_MONITOR")) ); + Gtk::Grid* gmonitor = Gtk::manage( new Gtk::Grid () ); + gmonitor->set_column_spacing (4); monProfile = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties(monProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties(mplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); monIntent = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties(monIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONINTENT")+":", Gtk::ALIGN_START)); + setExpandAlignProperties(milabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); monProfile->append (M("PREFERENCES_PROFILE_NONE")); monProfile->set_active (0); - const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (true); - for (std::vector::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) - monProfile->append (*profile); + const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR); + for (const auto profile : profiles) { + monProfile->append (profile); + } // same order as the enum monIntent->append (M("PREFERENCES_INTENT_PERCEPTUAL")); monIntent->append (M("PREFERENCES_INTENT_RELATIVE")); monIntent->append (M("PREFERENCES_INTENT_ABSOLUTE")); monIntent->set_active (1); + monIntent->set_size_request(120, -1); - monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_MONBPC"))); + monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC"))); + setExpandAlignProperties(monBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); monBPC->set_active (true); - iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged)); - #if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851 cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_AUTOMONPROFILE"))); + setExpandAlignProperties(cbAutoMonProfile, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::autoMonProfileToggled)); #endif - Gtk::Table* colt = Gtk::manage (new Gtk::Table (3, 2)); int row = 0; - colt->attach (*pdlabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*iccDir, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); -#if !defined(__APPLE__) // monitor profile not supported on apple + gmonitor->attach (*mplabel, 0, row, 1, 1); +#if defined(__APPLE__) // monitor profile not supported on apple + Gtk::Label *osxwarn = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE_WARNOSX"), Gtk::ALIGN_LEFT)); + setExpandAlignProperties(osxwarn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + gmonitor->attach (*osxwarn, 1, row, 1, 1); +#else + gmonitor->attach (*monProfile, 1, row, 1, 1); +#endif ++row; - colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #if defined(WIN32) + gmonitor->attach (*cbAutoMonProfile, 1, row, 1, 1); ++row; - colt->attach (*cbAutoMonProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); -#endif #endif + gmonitor->attach (*milabel, 0, row, 1, 1); + gmonitor->attach (*monIntent, 1, row, 1, 1); ++row; - colt->attach (*milabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - mvbcm->pack_start (*colt, Gtk::PACK_SHRINK, 4); - - mvbcm->pack_start (*monBPC, Gtk::PACK_SHRINK, 4); + gmonitor->attach (*monBPC, 0, row, 2, 1); #if defined(WIN32) autoMonProfileToggled(); #endif + fmonitor->add(*gmonitor); + + mvbcm->pack_start(*fmonitor, Gtk::PACK_SHRINK); + + //------------------------- PRINTER ---------------------- + + Gtk::Frame* fprinter = Gtk::manage( new Gtk::Frame (M("PREFERENCES_PRINTER")) ); + Gtk::Grid* gprinter = Gtk::manage( new Gtk::Grid () ); + gprinter->set_column_spacing (4); + prtProfile = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties(prtProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_PRTPROFILE") + ":")); + setExpandAlignProperties(pplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + prtIntent = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties(prtIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pilabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_PRTINTENT")+":")); + setExpandAlignProperties(pilabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + prtProfile->append (M("PREFERENCES_PROFILE_NONE")); + prtProfile->set_active (0); + + const std::vector prtprofiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::PRINTER); + for (const auto prtprofile : prtprofiles) + prtProfile->append (prtprofile); + + // same order as the enum + prtIntent->append (M("PREFERENCES_INTENT_PERCEPTUAL")); + prtIntent->append (M("PREFERENCES_INTENT_RELATIVE")); + prtIntent->append (M("PREFERENCES_INTENT_ABSOLUTE")); + prtIntent->set_active (1); + + prtBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC"))); + setExpandAlignProperties(prtBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + prtBPC->set_active (true); + + row = 0; + gprinter->attach (*pplabel, 0, row, 1, 1); + gprinter->attach (*prtProfile, 1, row, 1, 1); + ++row; + gprinter->attach (*pilabel, 0, row, 1, 1); + gprinter->attach (*prtIntent, 1, row, 1, 1); + ++row; + gprinter->attach (*prtBPC, 0, row, 2, 1); + +#if defined(WIN32) + autoMonProfileToggled(); +#endif + + fprinter->add(*gprinter); + + mvbcm->pack_start(*fprinter, Gtk::PACK_SHRINK); + + //------------------------- CIECAM ---------------------- + Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_VIEW") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties(viewlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); view = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties(view, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); view->append (M("PREFERENCES_D50")); view->append (M("PREFERENCES_D55")); view->append (M("PREFERENCES_D60")); @@ -754,7 +836,9 @@ Gtk::Widget* Preferences::getColorManagementPanel () view->append (M("PREFERENCES_FLUOF11")); Gtk::Label* greylab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREY") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties(greylab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); grey = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties(grey, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); grey->append (M("PREFERENCES_GREY05")); grey->append (M("PREFERENCES_GREY10")); grey->append (M("PREFERENCES_GREY15")); @@ -764,27 +848,31 @@ Gtk::Widget* Preferences::getColorManagementPanel () grey->append (M("PREFERENCES_GREY40")); Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties(greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); greySc = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties(greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); greySc->append (M("PREFERENCES_GREYSCA")); greySc->append (M("PREFERENCES_GREYSC18")); Gtk::Frame* fcielab = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CIEART_FRAME")) ); - Gtk::VBox* vbcielab = Gtk::manage( new Gtk::VBox () ); + setExpandAlignProperties(fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Grid* colo = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties(colo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); Gtk::Label* lreloadneeded1 = Gtk::manage (new Gtk::Label (M("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); - Gtk::Table* colo = Gtk::manage (new Gtk::Table (4, 2)); - colo->attach (*viewlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colo->attach (*view, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - colo->attach (*greylab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); - colo->attach (*grey, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - colo->attach (*greySclab, 0, 1, 2, 3, Gtk::FILL, Gtk::SHRINK, 2, 2); - colo->attach (*greySc, 1, 2, 2, 3, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + setExpandAlignProperties(lreloadneeded1, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + colo->attach (*lreloadneeded1, 0, 0, 2, 1); + colo->attach (*viewlab, 0, 1, 1, 1); + colo->attach (*view, 1, 1, 1, 1); + colo->attach (*greylab, 0, 2, 1, 1); + colo->attach (*grey, 1, 2, 1, 1); + colo->attach (*greySclab, 0, 3, 1, 1); + colo->attach (*greySc, 1, 3, 1, 1); cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CIEART_LABEL"))); - colo->attach (*cbciecamfloat, 0, 1, 3, 4, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + setExpandAlignProperties(cbciecamfloat, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + colo->attach (*cbciecamfloat, 0, 4, 2, 1); cbciecamfloat->set_tooltip_markup (M("PREFERENCES_CIEART_TOOLTIP")); - vbcielab->pack_start (*lreloadneeded1, Gtk::PACK_SHRINK, 4); - vbcielab->pack_start (*colo, Gtk::PACK_EXPAND_WIDGET, 4); - fcielab->add (*vbcielab); + fcielab->add (*colo); mvbcm->pack_start (*fcielab, Gtk::PACK_SHRINK, 4); @@ -814,6 +902,9 @@ Gtk::Widget* Preferences::getGeneralPanel () editorLayout->append (M("PREFERENCES_MULTITAB")); editorLayout->append (M("PREFERENCES_MULTITABDUALMON")); editorLayout->set_active (2); + Gtk::CellRendererText* cellRenderer = dynamic_cast(editorLayout->get_first_cell()); + cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; + cellRenderer->property_ellipsize_set() = true; editorLayout->signal_changed().connect (sigc::mem_fun(*this, &Preferences::layoutComboChanged)); layoutComboChanged(); // update the tooltip Gtk::Label* lNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); @@ -1516,8 +1607,31 @@ void Preferences::storePreferences () moptions.CPBPath = txtCustProfBuilderPath->get_text(); moptions.CPBKeys = CPBKeyType(custProfBuilderLabelType->get_active_row_number()); + if (!prtProfile->get_active_row_number()) { + moptions.rtSettings.printerProfile = ""; + } else { + moptions.rtSettings.printerProfile = prtProfile->get_active_text (); + } + switch (prtIntent->get_active_row_number ()) { + default: + case 0: + moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL; + break; + case 1: + moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE; + break; + case 2: + moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE; + break; + } + moptions.rtSettings.printerBPC = prtBPC->get_active (); + #if !defined(__APPLE__) // monitor profile not supported on apple - moptions.rtSettings.monitorProfile = monProfile->get_active_text (); + if (!monProfile->get_active_row_number()) { + moptions.rtSettings.monitorProfile = ""; + } else { + moptions.rtSettings.monitorProfile = monProfile->get_active_text (); + } switch (monIntent->get_active_row_number ()) { default: case 0: @@ -1648,6 +1762,21 @@ void Preferences::fillPreferences () rememberZoomPanCheckbutton->set_active (moptions.rememberZoomAndPan); ctiffserialize->set_active(moptions.serializeTiffRead); + setActiveTextOrIndex (*prtProfile, moptions.rtSettings.printerProfile, 0); + switch (moptions.rtSettings.printerIntent) { + default: + case rtengine::RI_PERCEPTUAL: + prtIntent->set_active (0); + break; + case rtengine::RI_RELATIVE: + prtIntent->set_active (1); + break; + case rtengine::RI_ABSOLUTE: + prtIntent->set_active (2); + break; + } + prtBPC->set_active (moptions.rtSettings.printerBPC); + #if !defined(__APPLE__) // monitor profile not supported on apple setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0); switch (moptions.rtSettings.monitorIntent) { @@ -2168,6 +2297,14 @@ void Preferences::workflowUpdate () parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition); } + if( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile + ||moptions.rtSettings.printerBPC != options.rtSettings.printerBPC + ||moptions.rtSettings.printerIntent != options.rtSettings.printerIntent) + { + // Update the position of the Histogram + parent->updateProfiles(moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC); + } + } void Preferences::addExtPressed () diff --git a/rtgui/preferences.h b/rtgui/preferences.h index d014263ed..91951a2df 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -105,6 +105,9 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::CheckButton* showExpComp; Gtk::FileChooserButton* iccDir; + Gtk::ComboBoxText* prtProfile; + Gtk::ComboBoxText* prtIntent; + Gtk::CheckButton* prtBPC; Gtk::ComboBoxText* monProfile; Gtk::ComboBoxText* monIntent; Gtk::CheckButton* monBPC; diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 982282132..9fc593d22 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -790,15 +790,22 @@ void RTWindow::MoveFileBrowserToEditor() } } +void RTWindow::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) +{ + epanel->updateProfiles(printerProfile, printerIntent, printerBPC); + + for(auto panel : epanels) { + panel.second->updateProfiles(printerProfile, printerIntent, printerBPC); + } +} + void RTWindow::updateTPVScrollbar (bool hide) { fpanel->updateTPVScrollbar (hide); epanel->updateTPVScrollbar (hide); - std::map::const_iterator itr; - - for(itr = epanels.begin(); itr != epanels.end(); ++itr) { - ((*itr).second)->updateTPVScrollbar (hide); + for(auto panel : epanels) { + panel.second->updateTPVScrollbar (hide); } } @@ -807,10 +814,8 @@ void RTWindow::updateTabsUsesIcons (bool useIcons) fpanel->updateTabsUsesIcons (useIcons); epanel->updateTabsUsesIcons (useIcons); - std::map::const_iterator itr; - - for(itr = epanels.begin(); itr != epanels.end(); ++itr) { - ((*itr).second)->updateTabsUsesIcons (useIcons); + for(auto panel : epanels) { + panel.second->updateTabsUsesIcons (useIcons); } } @@ -828,10 +833,8 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) { epanel->updateHistogramPosition (oldPosition, newPosition); - std::map::const_iterator itr; - - for(itr = epanels.begin(); itr != epanels.end(); ++itr) { - ((*itr).second)->updateHistogramPosition (oldPosition, newPosition); + for(auto panel : epanels) { + panel.second->updateHistogramPosition (oldPosition, newPosition); } } diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 5ea7a7946..f3d6c5aa2 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -104,6 +104,7 @@ public: void MoveFileBrowserToEditor(); void MoveFileBrowserToMain(); + void updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC); void updateTPVScrollbar (bool hide); void updateHistogramPosition (int oldPosition, int newPosition); void updateTabsUsesIcons (bool useIcons);