|
|
|
@ -264,17 +264,17 @@ KioskRun::setupConfigEnv()
|
|
|
|
|
hostname[0] = 0;
|
|
|
|
|
gethostname(hostname, 255);
|
|
|
|
|
|
|
|
|
|
TQString tmpDir = TQString("%1/%2-%3").tqarg(kdeHome).tqarg("tmp").tqarg(hostname);
|
|
|
|
|
TQString tmpDir = TQString("%1/%2-%3").arg(kdeHome).arg("tmp").arg(hostname);
|
|
|
|
|
deleteDir(tmpDir);
|
|
|
|
|
::mkdir(TQFile::encodeName(newTmpDir), 0700);
|
|
|
|
|
::symlink(TQFile::encodeName(newTmpDir), TQFile::encodeName(tmpDir));
|
|
|
|
|
|
|
|
|
|
TQString socketDir = TQString("%1/%2-%3").tqarg(kdeHome).tqarg("socket").tqarg(hostname);
|
|
|
|
|
TQString socketDir = TQString("%1/%2-%3").arg(kdeHome).arg("socket").arg(hostname);
|
|
|
|
|
deleteDir(socketDir);
|
|
|
|
|
::mkdir(TQFile::encodeName(newSocketDir), 0700);
|
|
|
|
|
::symlink(TQFile::encodeName(newSocketDir), TQFile::encodeName(socketDir));
|
|
|
|
|
|
|
|
|
|
m_configDir = TQString("%1/.kde/share/config/").tqarg(m_homeDir);
|
|
|
|
|
m_configDir = TQString("%1/.kde/share/config/").arg(m_homeDir);
|
|
|
|
|
|
|
|
|
|
m_instance = new KInstance("kioskrun");
|
|
|
|
|
(void) m_instance->dirs(); // Create KStandardDirs obj
|
|
|
|
@ -377,7 +377,7 @@ KioskRun::setConfigImmutable(const TQString &filename, const TQString &_group, b
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
TQString group = TQString("[%1]").tqarg(_group);
|
|
|
|
|
TQString group = TQString("[%1]").arg(_group);
|
|
|
|
|
if (status->m_lines.find(group))
|
|
|
|
|
{
|
|
|
|
|
if (!bImmutable)
|
|
|
|
@ -743,7 +743,7 @@ KioskRun::setupRuntimeEnv()
|
|
|
|
|
char hostname[256];
|
|
|
|
|
hostname[0] = 0;
|
|
|
|
|
gethostname(hostname, 255);
|
|
|
|
|
TQString cacheDir = TQString("%1/.kde/cache-%2").tqarg(m_homeDir).tqarg(hostname);
|
|
|
|
|
TQString cacheDir = TQString("%1/.kde/cache-%2").arg(m_homeDir).arg(hostname);
|
|
|
|
|
|
|
|
|
|
deleteDir(cacheDir);
|
|
|
|
|
KStandardDirs::makeDir(cacheDir);
|
|
|
|
@ -751,10 +751,10 @@ KioskRun::setupRuntimeEnv()
|
|
|
|
|
::unlink(TQFile::encodeName(m_homeDir+".kderc"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQString iceAuth = TQString("%1/.ICEauthority").tqarg(TQDir::homeDirPath());
|
|
|
|
|
TQString iceAuth = TQString("%1/.ICEauthority").arg(TQDir::homeDirPath());
|
|
|
|
|
setenv("ICEAUTHORITY", TQFile::encodeName(iceAuth), 0); // Don't overwrite existing setting
|
|
|
|
|
|
|
|
|
|
TQString xAuth = TQString("%1/.Xauthority").tqarg(TQDir::homeDirPath());
|
|
|
|
|
TQString xAuth = TQString("%1/.Xauthority").arg(TQDir::homeDirPath());
|
|
|
|
|
setenv("XAUTHORITY", TQFile::encodeName(xAuth), 0); // Don't overwrite existing setting
|
|
|
|
|
|
|
|
|
|
TQString dcopServerFile = m_homeDir+"/.kde/DCOPserver";
|
|
|
|
@ -902,11 +902,11 @@ KioskRun::createDir(const TQString &dir)
|
|
|
|
|
|
|
|
|
|
if (error.isEmpty())
|
|
|
|
|
msg = i18n("<qt>The directory <b>%1</b> could not be created because of an unspecified problem.<p>")
|
|
|
|
|
.tqarg(dir);
|
|
|
|
|
.arg(dir);
|
|
|
|
|
else
|
|
|
|
|
msg = i18n("<qt>The directory <b>%1</b> could not be created because of the following problem:"
|
|
|
|
|
"<p>%2<p>")
|
|
|
|
|
.tqarg(dir, NETACCESS::lastErrorString());
|
|
|
|
|
.arg(dir, NETACCESS::lastErrorString());
|
|
|
|
|
|
|
|
|
|
msg += i18n("Without this directory your changes can not be saved.<p>"
|
|
|
|
|
"Do you want to retry creating the directory or abort the saving of changes?</qt>");
|
|
|
|
@ -944,7 +944,7 @@ KioskRun::createRemoteDirRecursive(const KURL &dest, bool ask)
|
|
|
|
|
// Parent doesn't exist,
|
|
|
|
|
int result = KMessageBox::warningContinueCancel(kapp->mainWidget(),
|
|
|
|
|
i18n("<qt>The directory <b>%1</b> does not yet exist. "
|
|
|
|
|
"Do you want to create it?").tqarg(parent.prettyURL()), TQString(),
|
|
|
|
|
"Do you want to create it?").arg(parent.prettyURL()), TQString(),
|
|
|
|
|
i18n("Create &Dir"));
|
|
|
|
|
if (result != KMessageBox::Continue)
|
|
|
|
|
return false;
|
|
|
|
@ -984,11 +984,11 @@ KioskRun::createRemoteDir(const KURL &dest)
|
|
|
|
|
|
|
|
|
|
if (error.isEmpty())
|
|
|
|
|
msg = i18n("<qt>The directory <b>%1</b> could not be created because of an unspecified problem.<p>")
|
|
|
|
|
.tqarg(dest.prettyURL());
|
|
|
|
|
.arg(dest.prettyURL());
|
|
|
|
|
else
|
|
|
|
|
msg = i18n("<qt>The directory <b>%1</b> could not be created because of the following problem:"
|
|
|
|
|
"<p>%2<p>")
|
|
|
|
|
.tqarg(dest.prettyURL(), NETACCESS::lastErrorString());
|
|
|
|
|
.arg(dest.prettyURL(), NETACCESS::lastErrorString());
|
|
|
|
|
|
|
|
|
|
msg += i18n("Without this directory your files can not be uploaded.<p>"
|
|
|
|
|
"Do you want to retry creating the directory or abort uploading?</qt>");
|
|
|
|
@ -1034,11 +1034,11 @@ KioskRun::install(const TQString &file, const TQString &destination)
|
|
|
|
|
TQString msg;
|
|
|
|
|
if (error.isEmpty())
|
|
|
|
|
msg = i18n("<qt>The file <b>%1</b> could not be installed because of an unspecified problem.")
|
|
|
|
|
.tqarg(destination);
|
|
|
|
|
.arg(destination);
|
|
|
|
|
else
|
|
|
|
|
msg = i18n("<qt>The file <b>%1</b> could not be installed because of the following problem:"
|
|
|
|
|
"<p>%2<p>")
|
|
|
|
|
.tqarg(destination, NETACCESS::lastErrorString());
|
|
|
|
|
.arg(destination, NETACCESS::lastErrorString());
|
|
|
|
|
|
|
|
|
|
msg += i18n("Do you want to retry the installation or abort the saving of changes?</qt>");
|
|
|
|
|
|
|
|
|
@ -1068,11 +1068,11 @@ KioskRun::uploadRemote(const TQString &file, const KURL &dest)
|
|
|
|
|
TQString msg;
|
|
|
|
|
if (error.isEmpty())
|
|
|
|
|
msg = i18n("<qt>The file <b>%1</b> could not be uploaded to <b>%2</b> because of an unspecified problem.")
|
|
|
|
|
.tqarg(file, dest.prettyURL());
|
|
|
|
|
.arg(file, dest.prettyURL());
|
|
|
|
|
else
|
|
|
|
|
msg = i18n("<qt>The file <b>%1</b> could not be uploaded to <b>%2</b> because of the following problem:"
|
|
|
|
|
"<p>%3<p>")
|
|
|
|
|
.tqarg(file, dest.prettyURL(),NETACCESS::lastErrorString());
|
|
|
|
|
.arg(file, dest.prettyURL(),NETACCESS::lastErrorString());
|
|
|
|
|
|
|
|
|
|
msg += i18n("Do you want to retry or abort the uploading?</qt>");
|
|
|
|
|
|
|
|
|
@ -1156,7 +1156,7 @@ KioskRun::getProfileInfo(const TQString &profile, TQString &description, TQStrin
|
|
|
|
|
tmp.replace("/", "_");
|
|
|
|
|
defaultInstallDir += tmp+"/";
|
|
|
|
|
|
|
|
|
|
TQString group = TQString("Directories-%1").tqarg(profile);
|
|
|
|
|
TQString group = TQString("Directories-%1").arg(profile);
|
|
|
|
|
config->setGroup(group);
|
|
|
|
|
|
|
|
|
|
installDir = config->readEntry("prefixes", defaultInstallDir);
|
|
|
|
@ -1204,11 +1204,11 @@ KioskRun::openKderc()
|
|
|
|
|
TQString msg;
|
|
|
|
|
if (error.isEmpty())
|
|
|
|
|
msg = i18n("<qt>The file <b>%1</b> could not be accessed because of an unspecified problem.")
|
|
|
|
|
.tqarg(settingsUrl.path());
|
|
|
|
|
.arg(settingsUrl.path());
|
|
|
|
|
else
|
|
|
|
|
msg = i18n("<qt>The file <b>%1</b> could not be accessed because of the following problem:"
|
|
|
|
|
"<p>%2<p>")
|
|
|
|
|
.tqarg(settingsUrl.path(), error);
|
|
|
|
|
.arg(settingsUrl.path(), error);
|
|
|
|
|
|
|
|
|
|
msg += i18n("Do you want to retry the operation or abort the saving of changes?</qt>");
|
|
|
|
|
|
|
|
|
@ -1274,7 +1274,7 @@ KioskRun::setProfileInfo(const TQString &profile, const TQString &description, c
|
|
|
|
|
{
|
|
|
|
|
int msgResult = KMessageBox::warningYesNoCancelList(kapp->mainWidget(),
|
|
|
|
|
i18n("<qt>The profile directory <b>%1</b> contains the following files, "
|
|
|
|
|
"do you wish to delete these files?").tqarg(installDir),
|
|
|
|
|
"do you wish to delete these files?").arg(installDir),
|
|
|
|
|
allFiles,
|
|
|
|
|
i18n("Deleting Profile"),
|
|
|
|
|
#if KDE_IS_VERSION(3,2,91)
|
|
|
|
@ -1334,7 +1334,7 @@ KioskRun::setProfileInfo(const TQString &profile, const TQString &description, c
|
|
|
|
|
config->setGroup("Directories");
|
|
|
|
|
TQString oldAdmin = config->readEntry("kioskAdmin");
|
|
|
|
|
|
|
|
|
|
TQString group = TQString("Directories-%1").tqarg(profile);
|
|
|
|
|
TQString group = TQString("Directories-%1").arg(profile);
|
|
|
|
|
config->setGroup(group);
|
|
|
|
|
|
|
|
|
|
if ((installDir == config->readEntry("prefixes")) &&
|
|
|
|
@ -1420,8 +1420,8 @@ KioskRun::newProfile()
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
for(int p = 1; p; p++)
|
|
|
|
|
{
|
|
|
|
|
TQString profile = TQString("profile%1").tqarg(p);
|
|
|
|
|
TQString group = TQString("Directories-%1").tqarg(profile);
|
|
|
|
|
TQString profile = TQString("profile%1").arg(p);
|
|
|
|
|
TQString group = TQString("Directories-%1").arg(profile);
|
|
|
|
|
if (!config->hasGroup(group))
|
|
|
|
|
{
|
|
|
|
|
if (profilePrefix.isEmpty())
|
|
|
|
@ -1614,7 +1614,7 @@ KioskRun::setCustomRestrictionFileBrowsing(bool restrict)
|
|
|
|
|
TQStringList urlRestrictions;
|
|
|
|
|
for(int i = 0; i < count; i++)
|
|
|
|
|
{
|
|
|
|
|
TQString key = TQString("rule_%1").tqarg(i+1);
|
|
|
|
|
TQString key = TQString("rule_%1").arg(i+1);
|
|
|
|
|
if (cfg->hasKey(key))
|
|
|
|
|
urlRestrictions.append(cfg->readEntry(key));
|
|
|
|
|
}
|
|
|
|
@ -1640,7 +1640,7 @@ KioskRun::setCustomRestrictionFileBrowsing(bool restrict)
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < count; i++)
|
|
|
|
|
{
|
|
|
|
|
TQString key = TQString("rule_%1").tqarg(i+1);
|
|
|
|
|
TQString key = TQString("rule_%1").arg(i+1);
|
|
|
|
|
cfg->writeEntry(key, urlRestrictions[i]);
|
|
|
|
|
}
|
|
|
|
|
KioskRun::self()->setConfigImmutable(file, group, true);
|
|
|
|
|