summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r--src/gui/theme.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index 85fd215ac..3a09810d0 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -569,6 +569,25 @@ void Theme::fillFontsList(std::vector<std::string> &list)
PHYSFS_permitSymbolicLinks(0);
}
+void Theme::fillSoundsList(std::vector<std::string> &list)
+{
+ char **skins = PHYSFS_enumerateFiles(
+ branding.getStringValue("systemsounds").c_str());
+
+ for (char **i = skins; *i; i++)
+ {
+ if (!PHYSFS_isDirectory((
+ branding.getStringValue("systemsounds") + *i).c_str()))
+ {
+ std::string str = *i;
+ if (findCutLast(str, ".ogg"))
+ list.push_back(str);
+ }
+ }
+
+ PHYSFS_freeList(skins);
+}
+
void Theme::selectSkin()
{
prepareThemePath();