Merge lp:~seb128/ubuntu-system-settings/sound-improve-display-name into lp:ubuntu-system-settings

Proposed by Sebastien Bacher
Status: Merged
Approved by: Ken VanDine
Approved revision: 230
Merged at revision: 235
Proposed branch: lp:~seb128/ubuntu-system-settings/sound-improve-display-name
Merge into: lp:ubuntu-system-settings
Diff against target: 14 lines (+3/-1)
1 file modified
plugins/sound/utilities.js (+3/-1)
To merge this branch: bzr merge lp:~seb128/ubuntu-system-settings/sound-improve-display-name
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+178587@code.launchpad.net

Commit message

sound: improve display's name

Description of the change

sound: improve display's name

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/sound/utilities.js'
2--- plugins/sound/utilities.js 2013-08-02 15:41:59 +0000
3+++ plugins/sound/utilities.js 2013-08-05 15:33:26 +0000
4@@ -19,7 +19,9 @@
5 */
6
7 function buildDisplayName(sound) {
8- return sound.split('/').pop().split('.').slice(0,-1).join(" ")
9+ /* The display name starts with an uppercase char, and replace special chars with spaces */
10+ var title = sound.split('/').pop().split('.').slice(0,-1).join(" ").replace(/[._-]/g, " ")
11+ return title[0].toUpperCase() + title.slice(1)
12 }
13
14 function buildSoundValues(sounds) {

Subscribers

People subscribed via source and target branches