From 69e3dcefb882c743b136df8e5c81b4182b135f6b Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sat, 10 Oct 2015 19:09:36 -0500 Subject: Progress on the lexicon dialog. Now prints better stats. Now loads the dictionary you're editing. Now disables the Delete button at appropriate times. --- datamanager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'datamanager.cpp') diff --git a/datamanager.cpp b/datamanager.cpp index eb65afd..916610a 100644 --- a/datamanager.cpp +++ b/datamanager.cpp @@ -156,6 +156,12 @@ string DataManager::findDataFile(const string &subDirectory, const string &file) return fname; } +bool DataManager::hasUserDataFile(const string &subDirectory, const string &file) +{ + string fname = makeDataFilename(subDirectory, file, true); + return fileExists(fname); +} + string DataManager::makeDataFilename(const string &subDirectory, const string &lexicon, const string &file, bool user) { return (user ? m_userDataDirectory : m_appDataDirectory) + "/" + subDirectory + "/" + lexicon + "/" + file; -- cgit v1.2.3