Merge lp:~vthompson/music-app/fix-1410639-edit-playlist-placeholder into lp:music-app/remix

Proposed by Victor Thompson
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 786
Merged at revision: 788
Proposed branch: lp:~vthompson/music-app/fix-1410639-edit-playlist-placeholder
Merge into: lp:music-app/remix
Diff against target: 258 lines (+51/-61)
4 files modified
Style.qml (+2/-1)
common/SongsPage.qml (+12/-14)
music-app.qml (+2/-3)
po/com.ubuntu.music.pot (+35/-43)
To merge this branch: bzr merge lp:~vthompson/music-app/fix-1410639-edit-playlist-placeholder
Reviewer Review Type Date Requested Status
Andrew Hayzen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+246388@code.launchpad.net

Commit message

Use the same placeholder text that is used in creating a playlist when editing the name

Description of the change

Use the same placeholder text that is used in creating a playlist when editing the name. Currently the app incorrectly displays the existing name as the placeholder text. It does so because it abuses the placeholder text as a property to compare the new name against.

This also adds changes to the text as per design direction.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
784. By Victor Thompson

update dialog text and button colors

785. By Victor Thompson

update pot file

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
786. By Victor Thompson

Use blank text field when changing playlist name

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

LGTM :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Style.qml'
--- Style.qml 2014-10-22 16:03:45 +0000
+++ Style.qml 2015-01-17 06:18:22 +0000
@@ -46,7 +46,8 @@
46 }46 }
4747
48 property QtObject dialog: QtObject {48 property QtObject dialog: QtObject {
49 property color confirmButtonColor: UbuntuColors.orange;49 property color confirmButtonColor: UbuntuColors.green;
50 property color confirmRemoveButtonColor: UbuntuColors.red;
50 property color cancelButtonColor: UbuntuColors.coolGrey;51 property color cancelButtonColor: UbuntuColors.coolGrey;
51 property color normalTextFieldColor: common.white52 property color normalTextFieldColor: common.white
52 }53 }
5354
=== modified file 'common/SongsPage.qml'
--- common/SongsPage.qml 2015-01-11 17:04:55 +0000
+++ common/SongsPage.qml 2015-01-17 06:18:22 +0000
@@ -495,16 +495,14 @@
495 Dialog {495 Dialog {
496 id: dialogEditPlaylist496 id: dialogEditPlaylist
497 // TRANSLATORS: this is a title of a dialog with a prompt to rename a playlist497 // TRANSLATORS: this is a title of a dialog with a prompt to rename a playlist
498 title: i18n.tr("Change name")498 title: i18n.tr("Rename playlist")
499 text: i18n.tr("Enter the new name of the playlist.")
500499
501 property alias oldPlaylistName: playlistName.placeholderText500 property string oldPlaylistName: ""
502501
503 TextField {502 TextField {
504 id: playlistName503 id: playlistName
505 inputMethodHints: Qt.ImhNoPredictiveText504 inputMethodHints: Qt.ImhNoPredictiveText
506505 placeholderText: i18n.tr("Enter playlist name")
507 onPlaceholderTextChanged: text = placeholderText
508 }506 }
509 Label {507 Label {
510 id: editplaylistoutput508 id: editplaylistoutput
@@ -519,12 +517,12 @@
519 editplaylistoutput.visible = true517 editplaylistoutput.visible = true
520518
521 if (playlistName.text.length > 0) { // make sure something is acually inputed519 if (playlistName.text.length > 0) { // make sure something is acually inputed
522 console.debug("Debug: User changed name from "+playlistName.placeholderText+" to "+playlistName.text)520 console.debug("Debug: User changed name from "+oldPlaylistName+" to "+playlistName.text)
523521
524 if (Playlists.renamePlaylist(playlistName.placeholderText, playlistName.text) === true) {522 if (Playlists.renamePlaylist(oldPlaylistName, playlistName.text) === true) {
525523
526 if (Library.recentContainsPlaylist(playlistName.placeholderText)) {524 if (Library.recentContainsPlaylist(oldPlaylistName)) {
527 Library.recentRenamePlaylist(playlistName.placeholderText, playlistName.text)525 Library.recentRenamePlaylist(oldPlaylistName, playlistName.text)
528 }526 }
529527
530 line2 = playlistName.text528 line2 = playlistName.text
@@ -556,14 +554,14 @@
556 Dialog {554 Dialog {
557 id: dialogRemovePlaylist555 id: dialogRemovePlaylist
558 // TRANSLATORS: this is a title of a dialog with a prompt to delete a playlist556 // TRANSLATORS: this is a title of a dialog with a prompt to delete a playlist
559 title: i18n.tr("Are you sure?")557 title: i18n.tr("Permanently delete playlist?")
560 text: i18n.tr("This will delete your playlist.")558 text: "("+i18n.tr("This cannot be undone")+")"
561559
562 property string oldPlaylistName560 property string oldPlaylistName
563561
564 Button {562 Button {
565 text: i18n.tr("Remove")563 text: i18n.tr("Remove")
566 color: styleMusic.dialog.confirmButtonColor564 color: styleMusic.dialog.confirmRemoveButtonColor
567 onClicked: {565 onClicked: {
568 // removing playlist566 // removing playlist
569 Playlists.removePlaylist(dialogRemovePlaylist.oldPlaylistName)567 Playlists.removePlaylist(dialogRemovePlaylist.oldPlaylistName)
570568
=== modified file 'music-app.qml'
--- music-app.qml 2015-01-12 18:50:35 +0000
+++ music-app.qml 2015-01-17 06:18:22 +0000
@@ -836,12 +836,11 @@
836 Dialog {836 Dialog {
837 id: dialogNewPlaylist837 id: dialogNewPlaylist
838 objectName: "dialogNewPlaylist"838 objectName: "dialogNewPlaylist"
839 title: i18n.tr("New Playlist")839 title: i18n.tr("New playlist")
840 text: i18n.tr("Name your playlist.")
841 TextField {840 TextField {
842 id: playlistName841 id: playlistName
843 objectName: "playlistNameTextField"842 objectName: "playlistNameTextField"
844 placeholderText: i18n.tr("Name")843 placeholderText: i18n.tr("Enter playlist name")
845 inputMethodHints: Qt.ImhNoPredictiveText844 inputMethodHints: Qt.ImhNoPredictiveText
846 }845 }
847 Label {846 Label {
848847
=== modified file 'po/com.ubuntu.music.pot'
--- po/com.ubuntu.music.pot 2015-01-11 20:22:15 +0000
+++ po/com.ubuntu.music.pot 2015-01-17 06:18:22 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: music-app\n"9"Project-Id-Version: music-app\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-01-11 20:21+0000\n"11"POT-Creation-Date: 2015-01-16 16:52-0600\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -57,13 +57,13 @@
57msgstr ""57msgstr ""
5858
59#: ../MusicNowPlaying.qml:35 ../music-app.qml:656 ../music-app.qml:68859#: ../MusicNowPlaying.qml:35 ../music-app.qml:656 ../music-app.qml:688
60#: ../music-app.qml:1048 ../music-app.qml:1060 ../music-app.qml:108860#: ../music-app.qml:1047 ../music-app.qml:1059 ../music-app.qml:1087
61#: ../music-app.qml:108961#: ../music-app.qml:1088
62msgid "Queue"62msgid "Queue"
63msgstr ""63msgstr ""
6464
65#: ../MusicNowPlaying.qml:35 ../music-app.qml:656 ../music-app.qml:89065#: ../MusicNowPlaying.qml:35 ../music-app.qml:656 ../music-app.qml:889
66#: ../music-app.qml:1047 ../music-app.qml:1088 ../music-app.qml:108966#: ../music-app.qml:1046 ../music-app.qml:1087 ../music-app.qml:1088
67msgid "Now playing"67msgid "Now playing"
68msgstr ""68msgstr ""
6969
@@ -131,7 +131,7 @@
131msgid "Add to queue"131msgid "Add to queue"
132msgstr ""132msgstr ""
133133
134#: ../MusicaddtoPlaylist.qml:42 ../music-app.qml:1144134#: ../MusicaddtoPlaylist.qml:42 ../music-app.qml:1143
135msgid "Select playlist"135msgid "Select playlist"
136msgstr ""136msgstr ""
137137
@@ -158,7 +158,7 @@
158msgid "Add to Queue"158msgid "Add to Queue"
159msgstr ""159msgstr ""
160160
161#: ../common/ListItemActions/Remove.qml:27 ../common/SongsPage.qml:565161#: ../common/ListItemActions/Remove.qml:27 ../common/SongsPage.qml:564
162msgid "Remove"162msgid "Remove"
163msgstr ""163msgstr ""
164164
@@ -176,37 +176,37 @@
176176
177#. TRANSLATORS: this is a title of a dialog with a prompt to rename a playlist177#. TRANSLATORS: this is a title of a dialog with a prompt to rename a playlist
178#: ../common/SongsPage.qml:498178#: ../common/SongsPage.qml:498
179msgid "Change name"179msgid "Rename playlist"
180msgstr ""180msgstr ""
181181
182#: ../common/SongsPage.qml:499182#: ../common/SongsPage.qml:505 ../music-app.qml:843
183msgid "Enter the new name of the playlist."183msgid "Enter playlist name"
184msgstr ""184msgstr ""
185185
186#: ../common/SongsPage.qml:516186#: ../common/SongsPage.qml:515
187msgid "Change"187msgid "Change"
188msgstr ""188msgstr ""
189189
190#: ../common/SongsPage.qml:537 ../music-app.qml:870190#: ../common/SongsPage.qml:536 ../music-app.qml:869
191msgid "Playlist already exists"191msgid "Playlist already exists"
192msgstr ""192msgstr ""
193193
194#: ../common/SongsPage.qml:541 ../music-app.qml:875194#: ../common/SongsPage.qml:540 ../music-app.qml:874
195msgid "Please type in a name."195msgid "Please type in a name."
196msgstr ""196msgstr ""
197197
198#: ../common/SongsPage.qml:546 ../common/SongsPage.qml:584198#: ../common/SongsPage.qml:545 ../common/SongsPage.qml:583
199#: ../music-app.qml:481 ../music-app.qml:881199#: ../music-app.qml:481 ../music-app.qml:880
200msgid "Cancel"200msgid "Cancel"
201msgstr ""201msgstr ""
202202
203#. TRANSLATORS: this is a title of a dialog with a prompt to delete a playlist203#. TRANSLATORS: this is a title of a dialog with a prompt to delete a playlist
204#: ../common/SongsPage.qml:558
205msgid "Permanently delete playlist?"
206msgstr ""
207
204#: ../common/SongsPage.qml:559208#: ../common/SongsPage.qml:559
205msgid "Are you sure?"209msgid "This cannot be undone"
206msgstr ""
207
208#: ../common/SongsPage.qml:560
209msgid "This will delete your playlist."
210msgstr ""210msgstr ""
211211
212#: ../music-app.qml:145212#: ../music-app.qml:145
@@ -297,7 +297,7 @@
297msgid "No songs played today"297msgid "No songs played today"
298msgstr ""298msgstr ""
299299
300#: ../music-app.qml:579 ../music-app.qml:1084300#: ../music-app.qml:579 ../music-app.qml:1083
301#: com.ubuntu.music_music.desktop.in.in.h:1301#: com.ubuntu.music_music.desktop.in.in.h:1
302msgid "Music"302msgid "Music"
303msgstr ""303msgstr ""
@@ -307,42 +307,34 @@
307msgstr ""307msgstr ""
308308
309#: ../music-app.qml:839309#: ../music-app.qml:839
310msgid "New Playlist"310msgid "New playlist"
311msgstr ""311msgstr ""
312312
313#: ../music-app.qml:840313#: ../music-app.qml:853
314msgid "Name your playlist."
315msgstr ""
316
317#: ../music-app.qml:844
318msgid "Name"
319msgstr ""
320
321#: ../music-app.qml:854
322msgid "Create"314msgid "Create"
323msgstr ""315msgstr ""
324316
325#: ../music-app.qml:1118317#: ../music-app.qml:1117
326msgid "No music found"318msgid "No music found"
327msgstr ""319msgstr ""
328320
329#: ../music-app.qml:1129321#: ../music-app.qml:1128
330msgid "Please import music"322msgid "Please import music"
331msgstr ""323msgstr ""
332324
333#: ../music-app.qml:1158325#: ../music-app.qml:1157
334msgid "No playlists found"326msgid "No playlists found"
335msgstr ""327msgstr ""
336328
337#: ../music-app.qml:1169329#: ../music-app.qml:1168
338msgid "Click the + to create a playlist"330msgid "Click the + to create a playlist"
339msgstr ""331msgstr ""
340332
341#: ../music-app.qml:1198333#: ../music-app.qml:1197
342msgid "No recent albums or playlists found"334msgid "No recent albums or playlists found"
343msgstr ""335msgstr ""
344336
345#: ../music-app.qml:1209337#: ../music-app.qml:1208
346msgid "Play some music to see your favorites"338msgid "Play some music to see your favorites"
347msgstr ""339msgstr ""
348340

Subscribers

People subscribed via source and target branches