summaryrefslogtreecommitdiffstats
path: root/tdecore/tdeglobal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore/tdeglobal.cpp')
-rw-r--r--tdecore/tdeglobal.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/tdecore/tdeglobal.cpp b/tdecore/tdeglobal.cpp
index 09f496034..03f39ac80 100644
--- a/tdecore/tdeglobal.cpp
+++ b/tdecore/tdeglobal.cpp
@@ -33,6 +33,8 @@
#include <tdeconfig.h>
#include <tdelocale.h>
#include <kcharsets.h>
+#include <tequivchars.h>
+#include <tdestringmatcher.h>
#include <kiconloader.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tdehardwaredevices.h>
@@ -131,6 +133,32 @@ KCharsets *TDEGlobal::charsets()
return _charsets;
}
+TEquivChars *TDEGlobal::equivChars()
+{
+ if( _equivChars == 0 ) {
+ _equivChars = new TEquivChars();
+ }
+ return _equivChars;
+}
+
+TDEStringMatcher *TDEGlobal::hiddenFileMatcher()
+{
+ if( _hiddenFileMatcher == 0 ) {
+ //-Debug: TSMTRACE << "TDEGlobal::hiddenFileMatcher(): Global HFM initialization STARTED" << endl;
+ _hiddenFileMatcher = new TDEStringMatcher();
+ TDEGlobal::config()->setGroup( "General" );
+ const char* settingsDefault = "wc=\t.*"; // wildcard match of dotfiles
+ // CAUTION: for economy of expression, we are leveraging our insider knowledge
+ // that TSM::StringDivider is defined as '\t' instead of more properly doing this:
+ // char settingsDefault[5] = { 'w', TSM::StringDivider, '.', '*', 0 };
+ TQString settings = TDEGlobal::config()->readEntry( "globalHiddenFileSpec", settingsDefault );
+ //-Debug: TSMTRACE << "TDEGlobal::hiddenFileMatcher(): using retrieved patternString = '" << settings << "'" << endl;
+ _hiddenFileMatcher->setMatchSpecs( settings );
+ }
+
+ return _hiddenFileMatcher;
+}
+
void TDEGlobal::setActiveInstance(TDEInstance *i)
{
_activeInstance = i;
@@ -223,6 +251,9 @@ TDEInstance *TDEGlobal::_instance = 0;
TDEInstance *TDEGlobal::_activeInstance = 0;
TDELocale *TDEGlobal::_locale = 0;
KCharsets *TDEGlobal::_charsets = 0;
+TEquivChars *TDEGlobal::_equivChars = 0;
+TDEStringMatcher *TDEGlobal::_hiddenFileMatcher = 0;
+
KStaticDeleterList *TDEGlobal::_staticDeleters = 0;
#ifdef WIN32