diff options
author | Slávek Banko <[email protected]> | 2021-12-25 20:58:09 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2021-12-28 02:01:25 +0100 |
commit | 39c2dea65f3e7763148d7fef6490369da5eddc7c (patch) | |
tree | 927053ce99a26cc1a9bfdcade721c5b073c3863b | |
parent | dfe419d541717ef5453fdf0234982c3f982fa1d1 (diff) | |
download | tdebase-39c2dea65f3e7763148d7fef6490369da5eddc7c.tar.gz tdebase-39c2dea65f3e7763148d7fef6490369da5eddc7c.zip |
Add dispwin (Argyll) support to set the ICC profile.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 2caf1dfebc751722ef215f8c91977a26c2d971c6)
-rw-r--r-- | tdm/kfrontend/kgapp.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp index 9e6fccfdd..8ad1abba2 100644 --- a/tdm/kfrontend/kgapp.cpp +++ b/tdm/kfrontend/kgapp.cpp @@ -299,11 +299,22 @@ kg_main( const char *argv0 ) iccConfigFile += "/kicc/kiccconfigrc"; KSimpleConfig iccconfig(iccConfigFile, true); if (iccconfig.readBoolEntry("EnableICC", false) == true) { - TQString iccCommand = TQString("/usr/bin/xcalib "); - iccCommand += iccconfig.readEntry("ICCFile"); - iccCommand += TQString(" &"); - if (system(iccCommand.ascii()) < 0) { - printf("WARNING: Unable to execute command \"%s\"\n", iccCommand.ascii()); + TQString iccCommand = TDEGlobal::dirs()->findExe("dispwin"); + if (iccCommand.isEmpty()) + { + iccCommand = TDEGlobal::dirs()->findExe("xcalib"); + } + 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()); + } } } |