Updated strings + Image preview now updates on changes in Preferences

... regarding Printer profile, intent or BPC
This commit is contained in:
Hombre
2017-01-01 02:03:44 +01:00
parent 23863aceca
commit e9df621d4b
7 changed files with 68 additions and 36 deletions

View File

@@ -44,7 +44,8 @@ private:
PopUpButton intentBox;
Gtk::ToggleButton softProof;
Gtk::ToggleButton spGamutCheck;
sigc::connection profileConn, intentConn;
sigc::connection profileConn, intentConn, softproofConn;
bool canSProof;
rtengine::StagedImageProcessor* const& processor;
@@ -89,6 +90,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"));
@@ -174,8 +176,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);
@@ -219,7 +221,14 @@ 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) {
@@ -239,6 +248,7 @@ private:
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
@@ -249,8 +259,8 @@ public:
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
@@ -267,6 +277,12 @@ public:
#endif
}
void canSoftProof(bool canSP)
{
canSProof = canSP;
updateSoftProofParameters();
}
void updateProcessor()
{
if (processor) {
@@ -2039,6 +2055,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);

View File

@@ -208,6 +208,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);

View File

@@ -728,7 +728,7 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
monIntent->set_active (1);
monIntent->set_size_request(80, -1);
monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_MONBPC")));
monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC")));
monBPC->set_active (true);
#if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851
@@ -791,7 +791,7 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
prtIntent->set_active (1);
prtIntent->set_size_request(80, -1);
prtBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_PRTBPC")));
prtBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC")));
prtBPC->set_active (true);
Gtk::Table* coltp = Gtk::manage (new Gtk::Table (2, 2));
@@ -2209,6 +2209,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::switchFontTo(Glib::ustring newFont)

View File

@@ -795,15 +795,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<Glib::ustring, EditorPanel*>::const_iterator itr;
for(itr = epanels.begin(); itr != epanels.end(); ++itr) {
((*itr).second)->updateTPVScrollbar (hide);
for(auto panel : epanels) {
panel.second->updateTPVScrollbar (hide);
}
}
@@ -812,10 +819,8 @@ void RTWindow::updateTabsUsesIcons (bool useIcons)
fpanel->updateTabsUsesIcons (useIcons);
epanel->updateTabsUsesIcons (useIcons);
std::map<Glib::ustring, EditorPanel*>::const_iterator itr;
for(itr = epanels.begin(); itr != epanels.end(); ++itr) {
((*itr).second)->updateTabsUsesIcons (useIcons);
for(auto panel : epanels) {
panel.second->updateTabsUsesIcons (useIcons);
}
}
@@ -833,10 +838,8 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition)
{
epanel->updateHistogramPosition (oldPosition, newPosition);
std::map<Glib::ustring, EditorPanel*>::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);
}
}

View File

@@ -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);