|
|
|
@ -45,7 +45,7 @@
|
|
|
|
|
#include "kiosksync.h"
|
|
|
|
|
|
|
|
|
|
#include <kio/netaccess.h>
|
|
|
|
|
#define NETACCESS KIO::NetAccess
|
|
|
|
|
#define NETACCESS TDEIO::NetAccess
|
|
|
|
|
|
|
|
|
|
#undef DEBUG_ENTRIES
|
|
|
|
|
|
|
|
|
@ -620,9 +620,9 @@ KioskRun::flushConfigCache()
|
|
|
|
|
{
|
|
|
|
|
while ( !m_saveConfigCache.isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
TQDictIterator<KConfig> it( m_saveConfigCache );
|
|
|
|
|
TQDictIterator<TDEConfig> it( m_saveConfigCache );
|
|
|
|
|
TQString file = it.currentKey();
|
|
|
|
|
KConfig *config = it.current();
|
|
|
|
|
TDEConfig *config = it.current();
|
|
|
|
|
bool dirty = config->isDirty();
|
|
|
|
|
config->sync(); // Save
|
|
|
|
|
if (!restoreImmutableStatus(file, dirty))
|
|
|
|
@ -635,10 +635,10 @@ KioskRun::flushConfigCache()
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KConfig *
|
|
|
|
|
TDEConfig *
|
|
|
|
|
KioskRun::configFile(const TQString &filename)
|
|
|
|
|
{
|
|
|
|
|
KConfig *config = m_saveConfigCache.find(filename);
|
|
|
|
|
TDEConfig *config = m_saveConfigCache.find(filename);
|
|
|
|
|
if (config)
|
|
|
|
|
return config;
|
|
|
|
|
|
|
|
|
@ -656,7 +656,7 @@ KioskRun::configFile(const TQString &filename)
|
|
|
|
|
void
|
|
|
|
|
KioskRun::makeMutable(bool bMutable)
|
|
|
|
|
{
|
|
|
|
|
KConfig *config = configFile("kdeglobals");
|
|
|
|
|
TDEConfig *config = configFile("kdeglobals");
|
|
|
|
|
|
|
|
|
|
m_noRestrictions = bMutable;
|
|
|
|
|
if (KDE::version() < TDE_MAKE_VERSION(3,2,4))
|
|
|
|
@ -709,7 +709,7 @@ KioskRun::newConfigFiles()
|
|
|
|
|
void
|
|
|
|
|
KioskRun::mergeConfigFile(const TQString &filename)
|
|
|
|
|
{
|
|
|
|
|
KConfig *saveCfg = configFile(filename);
|
|
|
|
|
TDEConfig *saveCfg = configFile(filename);
|
|
|
|
|
|
|
|
|
|
kdDebug() << "KioskRun::mergeConfigFile(" << (m_configDir + filename) << ")" << endl;
|
|
|
|
|
KSimpleConfig newCfg(m_configDir + filename);
|
|
|
|
@ -840,7 +840,7 @@ KioskRun::dcopRef(const TQCString &appId, const TQCString &objId)
|
|
|
|
|
bool
|
|
|
|
|
KioskRun::lookupCustomAction(const TQString &action)
|
|
|
|
|
{
|
|
|
|
|
KConfig *cfg = KioskRun::self()->configFile("kdeglobals");
|
|
|
|
|
TDEConfig *cfg = KioskRun::self()->configFile("kdeglobals");
|
|
|
|
|
cfg->setGroup("KDE Custom Restrictions");
|
|
|
|
|
return cfg->readBoolEntry(action, false);
|
|
|
|
|
}
|
|
|
|
@ -849,7 +849,7 @@ KioskRun::lookupCustomAction(const TQString &action)
|
|
|
|
|
void
|
|
|
|
|
KioskRun::setCustomAction(const TQString &action, bool checked)
|
|
|
|
|
{
|
|
|
|
|
KConfig *cfg = KioskRun::self()->configFile("kdeglobals");
|
|
|
|
|
TDEConfig *cfg = KioskRun::self()->configFile("kdeglobals");
|
|
|
|
|
cfg->setGroup("KDE Custom Restrictions");
|
|
|
|
|
if (cfg->readBoolEntry(action, false) != checked)
|
|
|
|
|
{
|
|
|
|
@ -974,7 +974,7 @@ KioskRun::createRemoteDir(const KURL &dest)
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
#if KDE_IS_VERSION(3,2,91)
|
|
|
|
|
if (NETACCESS::lastError() == KIO::ERR_DIR_ALREADY_EXIST)
|
|
|
|
|
if (NETACCESS::lastError() == TDEIO::ERR_DIR_ALREADY_EXIST)
|
|
|
|
|
return true;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -1141,7 +1141,7 @@ kdDebug() << "Moving " << src << " --> " << dest << endl;
|
|
|
|
|
void
|
|
|
|
|
KioskRun::getProfileInfo(const TQString &profile, TQString &description, TQString &installDir, TQString &installUser)
|
|
|
|
|
{
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
TDEConfig *config = kapp->config();
|
|
|
|
|
|
|
|
|
|
TQString defaultInstallDir = getProfilePrefix();
|
|
|
|
|
if (defaultInstallDir.isEmpty())
|
|
|
|
@ -1329,7 +1329,7 @@ KioskRun::setProfileInfo(const TQString &profile, const TQString &description, c
|
|
|
|
|
KUser thisUser;
|
|
|
|
|
TQString newAdmin = thisUser.loginName()+":"; // This user, all hosts
|
|
|
|
|
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
TDEConfig *config = kapp->config();
|
|
|
|
|
|
|
|
|
|
config->setGroup("Directories");
|
|
|
|
|
TQString oldAdmin = config->readEntry("kioskAdmin");
|
|
|
|
@ -1378,7 +1378,7 @@ KioskRun::deleteProfile(const TQString &profile, bool deleteFiles)
|
|
|
|
|
TQString
|
|
|
|
|
KioskRun::getProfilePrefix()
|
|
|
|
|
{
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
TDEConfig *config = kapp->config();
|
|
|
|
|
|
|
|
|
|
config->setGroup("Directories");
|
|
|
|
|
|
|
|
|
@ -1417,7 +1417,7 @@ KioskRun::newProfile()
|
|
|
|
|
{
|
|
|
|
|
TQString profilePrefix = getProfilePrefix();
|
|
|
|
|
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
TDEConfig *config = kapp->config();
|
|
|
|
|
for(int p = 1; p; p++)
|
|
|
|
|
{
|
|
|
|
|
TQString profile = TQString("profile%1").arg(p);
|
|
|
|
@ -1440,7 +1440,7 @@ KioskRun::newProfile()
|
|
|
|
|
TQStringList
|
|
|
|
|
KioskRun::allProfiles()
|
|
|
|
|
{
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
TDEConfig *config = kapp->config();
|
|
|
|
|
TQStringList groups = config->groupList();
|
|
|
|
|
TQStringList profiles;
|
|
|
|
|
TQStringList directories;
|
|
|
|
@ -1501,7 +1501,7 @@ KioskRun::getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users,
|
|
|
|
|
groups.clear();
|
|
|
|
|
users.clear();
|
|
|
|
|
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
TDEConfig *config = kapp->config();
|
|
|
|
|
config->setGroup("Directories");
|
|
|
|
|
TQString mapFile = config->readEntry("userProfileMapFile");
|
|
|
|
|
|
|
|
|
@ -1537,7 +1537,7 @@ KioskRun::getUserProfileMappings( ProfileMapping &groups, ProfileMapping &users,
|
|
|
|
|
bool
|
|
|
|
|
KioskRun::setUserProfileMappings( const ProfileMapping &groups, const ProfileMapping &users, const TQStringList &groupOrder)
|
|
|
|
|
{
|
|
|
|
|
KConfig *config = kapp->config();
|
|
|
|
|
TDEConfig *config = kapp->config();
|
|
|
|
|
config->setGroup("Directories");
|
|
|
|
|
TQString mapFile = config->readEntry("userProfileMapFile");
|
|
|
|
|
if (mapFile.isEmpty())
|
|
|
|
@ -1608,7 +1608,7 @@ KioskRun::setCustomRestrictionFileBrowsing(bool restrict)
|
|
|
|
|
{
|
|
|
|
|
TQString file = "kdeglobals";
|
|
|
|
|
TQString group = "KDE URL Restrictions";
|
|
|
|
|
KConfig *cfg = KioskRun::self()->configFile(file);
|
|
|
|
|
TDEConfig *cfg = KioskRun::self()->configFile(file);
|
|
|
|
|
cfg->setGroup(group);
|
|
|
|
|
int count = cfg->readNumEntry("rule_count");
|
|
|
|
|
TQStringList urlRestrictions;
|
|
|
|
|