Add dispwin (Argyll) support to set the ICC profile.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/248/head
Slávek Banko 2 years ago
parent dcb4b6b773
commit 2caf1dfebc
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -308,11 +308,22 @@ kg_main( const char *argv0 )
iccConfigFile += "/kicc/kiccconfigrc"; iccConfigFile += "/kicc/kiccconfigrc";
KSimpleConfig iccconfig(iccConfigFile, true); KSimpleConfig iccconfig(iccConfigFile, true);
if (iccconfig.readBoolEntry("EnableICC", false) == true) { if (iccconfig.readBoolEntry("EnableICC", false) == true) {
TQString iccCommand = TQString("/usr/bin/xcalib "); TQString iccCommand = TDEGlobal::dirs()->findExe("dispwin");
iccCommand += iccconfig.readEntry("ICCFile"); if (iccCommand.isEmpty())
iccCommand += TQString(" &"); {
if (system(iccCommand.ascii()) < 0) { iccCommand = TDEGlobal::dirs()->findExe("xcalib");
printf("WARNING: Unable to execute command \"%s\"\n", iccCommand.ascii()); }
if (iccCommand.isEmpty())
{
printf("WARNING: Unable to find command to set ICC profile - dispwin or xcalib\n");
}
else
{
iccCommand += TQString(" %1 &").arg(iccconfig.readEntry("ICCFile"));
if (system(iccCommand.local8Bit()) < 0)
{
printf("WARNING: Unable to execute command \"%s\"\n", iccCommand.local8Bit());
}
} }
} }

Loading…
Cancel
Save