summaryrefslogtreecommitdiffstats
path: root/tdefilereplace/tdefilereplacepart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdefilereplace/tdefilereplacepart.cpp')
-rw-r--r--tdefilereplace/tdefilereplacepart.cpp45
1 files changed, 26 insertions, 19 deletions
diff --git a/tdefilereplace/tdefilereplacepart.cpp b/tdefilereplace/tdefilereplacepart.cpp
index f9aec23..69aee28 100644
--- a/tdefilereplace/tdefilereplacepart.cpp
+++ b/tdefilereplace/tdefilereplacepart.cpp
@@ -679,7 +679,7 @@ void TDEFileReplacePart::loadOptionsFromRC()
loadFileSizeOptions();
loadDateAccessOptions();
loadOwnerOptions();
- loadLocationsList();
+ loadCBLists();
loadFiltersList();
loadBackupExtensionOptions();
}
@@ -764,20 +764,21 @@ void TDEFileReplacePart::loadOwnerOptions()
m_option->m_ownerGroupValue = ownerList[3];
}
-void TDEFileReplacePart::loadLocationsList()
+void TDEFileReplacePart::loadCBLists()
{
+ // Search list
+ m_config->setGroup("Search strings");
+ m_option->m_searchStrings = m_config->readPathListEntry(rcSearchStringsList);
+
+ // Replace list
+ m_config->setGroup("Replace strings");
+ m_option->m_replaceStrings = m_config->readPathListEntry(rcReplaceStringsList);
+
+ // Location list
m_config->setGroup("Directories");
- TQStringList locationsEntryList;
- #if KDE_IS_VERSION(3,1,3)
- locationsEntryList = m_config->readPathListEntry(rcDirectoriesList);
- #else
- locationsEntryList = m_config->readListEntry(rcDirectoriesList);
- #endif
-
- if(locationsEntryList.isEmpty())
- locationsEntryList.append(TQDir::current().path());
-
- m_option->m_directories = locationsEntryList;
+ m_option->m_directories = m_config->readPathListEntry(rcDirectoriesList);
+ if (m_option->m_directories.isEmpty())
+ m_option->m_directories.append(TQDir::current().path());
}
void TDEFileReplacePart::loadFiltersList()
@@ -817,7 +818,7 @@ void TDEFileReplacePart::saveOptionsToRC()
saveFileSizeOptions();
saveDateAccessOptions();
saveOwnerOptions();
- saveLocationsList();
+ saveCBLists();
saveFiltersList();
saveBackupExtensionOptions();
}
@@ -909,14 +910,20 @@ void TDEFileReplacePart::saveOwnerOptions()
m_config->sync();
}
-void TDEFileReplacePart::saveLocationsList()
+void TDEFileReplacePart::saveCBLists()
{
+ // Search list
+ m_config->setGroup("Search strings");
+ m_config->writePathEntry(rcSearchStringsList, m_option->m_searchStrings);
+
+ // Replace list
+ m_config->setGroup("Replace strings");
+ m_config->writePathEntry(rcReplaceStringsList, m_option->m_replaceStrings);
+
+ // Location list
m_config->setGroup("Directories");
- #if KDE_IS_VERSION(3,1,3)
m_config->writePathEntry(rcDirectoriesList, m_option->m_directories);
- #else
- m_config->writeEntry(rcDirectoriesList, m_option->m_directories);
- #endif
+
m_config->sync();
}