[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kcontrol/kfontinst/kio
From: Craig Drummond <craig () kde ! org>
Date: 2003-10-15 21:55:41
[Download RAW message or body]
CVS commit by craig:
Hide "kde-override" from users
M +15 -10 KioFonts.cpp 1.9
--- kdebase/kcontrol/kfontinst/kio/KioFonts.cpp #1.8:1.9
@@ -97,7 +97,10 @@ int kdemain(int argc, char **argv)
}
-inline bool isSpecialDir(const QString &sub)
+static bool isSpecialDir(const QString &sub, bool sys)
{
+ if(sys || CMisc::root())
return "CID"==sub || "encodings"==sub;
+ else
+ return "kde-override"==sub;
}
@@ -386,5 +389,5 @@ void CKioFonts::listDir(const QString &t
//
// Ensure this dir is in fontpath - if it exists, and it contains fonts!
- if(sub.isNull() || (!name.isNull() && !sys && QChar('.')!=name[0] && \
!isSpecialDir(name))) + if(sub.isNull() || (!name.isNull() && !sys && \
QChar('.')!=name[0] && !isSpecialDir(name, sys))) {
addDir(dPath);
@@ -401,5 +404,5 @@ void CKioFonts::listDir(const QString &t
if(fInfo->isDir())
{
- if(!((CMisc::root()||sys) && isSpecialDir(fInfo->fileName()))) \
// Don't handle CID fonts... + if(!isSpecialDir(fInfo->fileName(), \
sys)) {
QString ds(CMisc::dirSyntax(fInfo->filePath()));
@@ -480,5 +483,5 @@ bool CKioFonts::createStatEntry(KIO::UDS
QString name(CMisc::getName(url.path()));
- if(!((CMisc::root()||sys) && isSpecialDir(name))) // Don't handle CID \
fonts... + if(!isSpecialDir(name, sys))
{
CXConfig xcfg=sys ? CGlobal::sysXcfg() : CGlobal::userXcfg();
@@ -1046,8 +1049,10 @@ void CKioFonts::mkdir(const KURL &url, i
otherHidden;
- if((CMisc::root()||sys) && isSpecialDir(CMisc::getName(url.path()))) // Don't \
handle CID fonts...
- error(KIO::ERR_SLAVE_DEFINED, i18n("Sorry, you cannot create a folder named \
\"CID\" or \"encodings\", as these are special " + \
if(isSpecialDir(CMisc::getName(url.path()), sys)) + \
error(KIO::ERR_SLAVE_DEFINED, + sys ? i18n("Sorry, you cannot create \
a folder named either \"CID\" or \"encodings\", as these are special \
"
"system folders. (\"CID\"is for \"CID\" \
fonts - these are <b>not</b> handled - and "
- "\"encodings\" is for X11 encoding \
files.)")); + "\"encodings\" is for X11 encoding \
files.)") + : i18n("Sorry, you cannot create a folder named \
\"kde-override\", as this is a special KDE folder.")); else
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic