[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: 2004-04-27 20:07:20
Message-ID: 20040427200720.93A5D9A6E () office ! kde ! org
[Download RAW message or body]
CVS commit by craig:
Don't try to configure a dir which has no Fontmap file if it doesn't conatain any GS \
useable fonts.
M +22 -2 KioFonts.cpp 1.33
--- kdebase/kcontrol/kfontinst/kio/KioFonts.cpp #1.32:1.33
@@ -96,4 +96,22 @@ int kdemain(int argc, char **argv)
}
+static bool containsGsUseableFonts(const QString &ds)
+{
+ QDir dir(ds);
+ const QFileInfoList *files=dir.entryInfoList(QDir::Files);
+
+ if(files)
+ {
+ QFileInfoListIterator it(*files);
+ QFileInfo *fInfo;
+
+ for(; NULL!=(fInfo=it.current()); ++it)
+ if("."!=fInfo->fileName() && ".."!=fInfo->fileName() &&
+ CFontEngine::hasAfmInfo(QFile::encodeName(fInfo->fileName())))
+ return true;
+ }
+ return false;
+}
+
enum ExistsType
{
@@ -1563,5 +1581,7 @@ void CKioFonts::cfgDir(const QString &ds
}
- if (!CMisc::fExists(ds+"Fontmap") || dTs!=CMisc::getTimeStamp(ds+"Fontmap"))
+ bool fmExists=CMisc::fExists(ds+"Fontmap");
+
+ if ((!fmExists && containsGsUseableFonts(ds)) || (fmExists && \
dTs!=CMisc::getTimeStamp(ds+"Fontmap"))) {
infoMessage(i18n("Configuring out of date font folder (%1).").arg(sub));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic