summaryrefslogtreecommitdiffstats
path: root/tdm
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2021-12-25 20:58:09 +0100
committerSlávek Banko <slavek.banko@axis.cz>2021-12-28 01:57:00 +0100
commit2caf1dfebc751722ef215f8c91977a26c2d971c6 (patch)
treea3915117f2b68faa1cf225a617d0e11bd1280794 /tdm
parentdcb4b6b7738ae14210ec3845928ea1de62d0cc83 (diff)
downloadtdebase-2caf1dfebc751722ef215f8c91977a26c2d971c6.tar.gz
tdebase-2caf1dfebc751722ef215f8c91977a26c2d971c6.zip
Add dispwin (Argyll) support to set the ICC profile.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdm')
-rw-r--r--tdm/kfrontend/kgapp.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/tdm/kfrontend/kgapp.cpp b/tdm/kfrontend/kgapp.cpp
index 6c77b444b..82630ba09 100644
--- a/tdm/kfrontend/kgapp.cpp
+++ b/tdm/kfrontend/kgapp.cpp
@@ -308,11 +308,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());
+ }
}
}