From eaa51fec106463800192924168eaf9f03f188655 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 7 Sep 2010 08:20:52 +0000 Subject: * Fix FTBFS on Slackware * Added a few Chakra project patches; more are coming shortly git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1172412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kioslave/media/mediamanager/halbackend.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'kioslave') diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp index 7b56d46ad..be5f07ccb 100644 --- a/kioslave/media/mediamanager/halbackend.cpp +++ b/kioslave/media/mediamanager/halbackend.cpp @@ -972,6 +972,13 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << tmp; } + if ( valids.contains("locale") ) + { + value = config.readBoolEntry( "locale", true ); + tmp = QString( "locale=%1" ).arg( value ? "true" : "false" ); + result << tmp; + } + if (valids.contains("utf8")) { value = config.readBoolEntry("utf8", true); @@ -1056,7 +1063,7 @@ bool HALBackend::setMountoptions(const TQString &name, const TQStringList &optio TQMap valids = MediaManagerUtils::splitOptions(options); - const char *names[] = { "ro", "quiet", "atime", "uid", "utf8", "flush", "sync", 0 }; + const char *names[] = { "ro", "quiet", "atime", "uid", "utf8", "flush", "sync", "locale", 0 }; for (int index = 0; names[index]; ++index) if (valids.contains(names[index])) config.writeEntry(names[index], valids[names[index]] == "true"); @@ -1076,6 +1083,10 @@ bool HALBackend::setMountoptions(const TQString &name, const TQStringList &optio config.writeEntry("automount", valids["automount"]); } + if (valids.contains("locale") ) { + config.writeEntry("locale", valids["locale"]); + } + return true; } @@ -1425,6 +1436,11 @@ TQString HALBackend::mount(const Medium *medium) soptions << TQString("uid=%1").arg(getuid()); } + if (valids["locale"] == "true") + { + soptions << QString("locale=%1").arg( KGlobal::locale()->language() ); + } + if (valids["ro"] == "true") soptions << "ro"; -- cgit v1.2.1