Added support for autodetecting the system monitor color profile also on Linux
Code borrowed from Geeqie
This commit is contained in:
@@ -756,11 +756,11 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
|
||||
setExpandAlignProperties(monBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||
monBPC->set_active (true);
|
||||
|
||||
#if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851
|
||||
//#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
|
||||
//#endif
|
||||
|
||||
int row = 0;
|
||||
gmonitor->attach (*mplabel, 0, row, 1, 1);
|
||||
@@ -772,18 +772,18 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
|
||||
gmonitor->attach (*monProfile, 1, row, 1, 1);
|
||||
#endif
|
||||
++row;
|
||||
#if defined(WIN32)
|
||||
//#if defined(WIN32)
|
||||
gmonitor->attach (*cbAutoMonProfile, 1, row, 1, 1);
|
||||
++row;
|
||||
#endif
|
||||
//#endif
|
||||
gmonitor->attach (*milabel, 0, row, 1, 1);
|
||||
gmonitor->attach (*monIntent, 1, row, 1, 1);
|
||||
++row;
|
||||
gmonitor->attach (*monBPC, 0, row, 2, 1);
|
||||
|
||||
#if defined(WIN32)
|
||||
//#if defined(WIN32)
|
||||
autoMonProfileToggled();
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
fmonitor->add(*gmonitor);
|
||||
|
||||
@@ -830,9 +830,9 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
|
||||
++row;
|
||||
gprinter->attach (*prtBPC, 0, row, 2, 1);
|
||||
|
||||
#if defined(WIN32)
|
||||
//#if defined(WIN32)
|
||||
autoMonProfileToggled();
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
fprinter->add(*gprinter);
|
||||
|
||||
@@ -1677,9 +1677,9 @@ void Preferences::storePreferences ()
|
||||
break;
|
||||
}
|
||||
moptions.rtSettings.monitorBPC = monBPC->get_active ();
|
||||
#if defined(WIN32)
|
||||
//#if defined(WIN32)
|
||||
moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active ();
|
||||
#endif
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
moptions.rtSettings.iccDirectory = iccDir->get_filename ();
|
||||
@@ -1825,9 +1825,9 @@ void Preferences::fillPreferences ()
|
||||
break;
|
||||
}
|
||||
monBPC->set_active (moptions.rtSettings.monitorBPC);
|
||||
#if defined(WIN32)
|
||||
//#if defined(WIN32)
|
||||
cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile);
|
||||
#endif
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
if (Glib::file_test (moptions.rtSettings.iccDirectory, Glib::FILE_TEST_IS_DIR)) {
|
||||
@@ -2033,12 +2033,12 @@ void Preferences::savePressed () {
|
||||
}
|
||||
*/
|
||||
|
||||
#if defined(WIN32)
|
||||
//#if defined(WIN32)
|
||||
void Preferences::autoMonProfileToggled ()
|
||||
{
|
||||
monProfile->set_sensitive(!cbAutoMonProfile->get_active());
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
/*
|
||||
void Preferences::autocielabToggled () {
|
||||
// cbAutocielab->set_sensitive(cbAutocielab->get_active());
|
||||
|
Reference in New Issue
Block a user