|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* kiosktool-kdedirs.cpp
|
|
|
|
|
* kiosktool-tdedirs.cpp
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2004 Waldo Bastian <bastian@kde.org>
|
|
|
|
|
*
|
|
|
|
@ -122,12 +122,12 @@ static KCmdLineOptions options[] = {
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
|
{
|
|
|
|
|
KLocale::setMainCatalogue("kiosktool");
|
|
|
|
|
KAboutData about("kiosktool-kdedirs", "kiosktool-kdedirs", "1.0", description, KAboutData::License_GPL, "(C) 2004 Waldo Bastian");
|
|
|
|
|
KAboutData about("kiosktool-tdedirs", "kiosktool-tdedirs", "1.0", description, KAboutData::License_GPL, "(C) 2004 Waldo Bastian");
|
|
|
|
|
KCmdLineArgs::init( argc, argv, &about);
|
|
|
|
|
KCmdLineArgs::addCmdLineOptions(options);
|
|
|
|
|
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
|
|
|
|
|
|
|
|
|
|
KInstance a("kiosktool-kdedirs");
|
|
|
|
|
KInstance a("kiosktool-tdedirs");
|
|
|
|
|
|
|
|
|
|
if (args->isSet("check"))
|
|
|
|
|
{
|
|
|
|
@ -137,21 +137,21 @@ int main(int argc, char **argv)
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQStringList kdedirList;
|
|
|
|
|
TQStringList tdedirList;
|
|
|
|
|
|
|
|
|
|
// begin TDEDIRS
|
|
|
|
|
TQString kdedirs = readEnvPath("TDEDIRS");
|
|
|
|
|
if (!kdedirs.isEmpty())
|
|
|
|
|
TQString tdedirs = readEnvPath("TDEDIRS");
|
|
|
|
|
if (!tdedirs.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
kdedirList = TQStringList::split(":", kdedirs);
|
|
|
|
|
tdedirList = TQStringList::split(":", tdedirs);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TQString kdedir = readEnvPath("TDEDIR");
|
|
|
|
|
if (!kdedir.isEmpty())
|
|
|
|
|
TQString tdedir = readEnvPath("TDEDIR");
|
|
|
|
|
if (!tdedir.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
kdedir = KShell::tildeExpand(kdedir);
|
|
|
|
|
kdedirList.append(kdedir);
|
|
|
|
|
tdedir = KShell::tildeExpand(tdedir);
|
|
|
|
|
tdedirList.append(tdedir);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -171,14 +171,14 @@ int main(int argc, char **argv)
|
|
|
|
|
TQStringList list = config->readListEntry("prefixes");
|
|
|
|
|
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); it++)
|
|
|
|
|
{
|
|
|
|
|
kdedirList.prepend(*it);
|
|
|
|
|
tdedirList.prepend(*it);
|
|
|
|
|
}
|
|
|
|
|
if (list.isEmpty() && !profile.isEmpty() && !profileDirsPrefix.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
kdedirList.prepend(profileDirsPrefix + profile);
|
|
|
|
|
tdedirList.prepend(profileDirsPrefix + profile);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
printf("%s\n", TQFile::encodeName(kdedirList.join(":")).data());
|
|
|
|
|
printf("%s\n", TQFile::encodeName(tdedirList.join(":")).data());
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|