← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~vthompson/music-app/prototype-page-head-sections-3 into lp:music-app

 

Victor Thompson has proposed merging lp:~vthompson/music-app/prototype-page-head-sections-3 into lp:music-app with lp:~music-app-dev/music-app/prototype-page-head-sections-2 as a prerequisite.

Commit message:
* Update for sorting Songs tab

Requested reviews:
  Music App Developers (music-app-dev)

For more details, see:
https://code.launchpad.net/~vthompson/music-app/prototype-page-head-sections-3/+merge/266827

* Update for sorting Songs tab

This is a WIP, do not merge!
-- 
Your team Music App Developers is requested to review the proposed merge of lp:~vthompson/music-app/prototype-page-head-sections-3 into lp:music-app.
=== modified file 'app/ui/Songs.qml'
--- app/ui/Songs.qml	2015-08-04 03:47:19 +0000
+++ app/ui/Songs.qml	2015-08-04 03:47:19 +0000
@@ -53,6 +53,23 @@
         }
     ]
 
+    PageHeadSections {
+        id: defaultStateSections
+        model: [i18n.tr("Title"), i18n.tr("Date added")]
+        selectedIndex: 0
+    }
+
+    head {
+        sections {
+            model: defaultStateSections.model
+            selectedIndex: defaultStateSections.selectedIndex
+            onSelectedIndexChanged: {
+                songsModelFilter.sort.property = head.sections.selectedIndex == 0 ? "title" : "eTag"
+                songsModelFilter.sort.order = head.sections.selectedIndex == 0 ? Qt.AscendingOrder : Qt.DescendingOrder
+            }
+        }
+    }
+
     // Hack for autopilot otherwise Albums appears as MusicPage
     // due to bug 1341671 it is required that there is a property so that
     // qml doesn't optimise using the parent type

=== modified file 'po/com.ubuntu.music.pot'
--- po/com.ubuntu.music.pot	2015-08-04 03:47:19 +0000
+++ po/com.ubuntu.music.pot	2015-08-04 03:47:19 +0000
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: music-app\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-08-03 22:21-0500\n"
+"POT-Creation-Date: 2015-08-03 22:25-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -385,6 +385,14 @@
 msgid "Songs"
 msgstr ""
 
+#: ../app/ui/Songs.qml:58
+msgid "Title"
+msgstr ""
+
+#: ../app/ui/Songs.qml:58
+msgid "Date added"
+msgstr ""
+
 #: com.ubuntu.music_music.desktop.in.in.h:2
 msgid "A music application for Ubuntu"
 msgstr ""


Follow ups