This would 1) prevent directories from being shown in the model, and 2) filter the files allowable to just mp3 and ogg. I think you should do #1 because a directory can never be selected. I think it would be a good idea to do #2 as an additional safe guard, but one could argue that it would add extra maintenance work if the ringtones include additional filetypes in the future. As of right now they are all ogg files.
In terms of reacting to when the ringtones folder doesn't exist, perhaps you could do the following:
bzr diff AlarmSound. qml' AlarmSound. qml 2014-06-24 20:15:38 +0000 AlarmSound. qml 2014-07-07 04:02:07 +0000
=== modified file 'app/alarm/
--- app/alarm/
+++ app/alarm/
@@ -31,6 +31,8 @@
FolderList Model { sounds/ ubuntu/ ringtones"
id: _soundModel
+ showDirs: false
+ nameFilters: [ "*.ogg", "*.mp3" ]
folder: "/usr/share/
}
This would 1) prevent directories from being shown in the model, and 2) filter the files allowable to just mp3 and ogg. I think you should do #1 because a directory can never be selected. I think it would be a good idea to do #2 as an additional safe guard, but one could argue that it would add extra maintenance work if the ringtones include additional filetypes in the future. As of right now they are all ogg files.