Merge lp:~nik90/podbird/new-navigation-structure into lp:podbird/devel

Proposed by Nekhelesh Ramananthan
Status: Merged
Merged at revision: 119
Proposed branch: lp:~nik90/podbird/new-navigation-structure
Merge into: lp:podbird/devel
Diff against target: 1075 lines (+304/-250)
8 files modified
app/components/TabsList.qml (+2/-10)
app/podbird.qml (+4/-17)
app/ui/EpisodesPage.qml (+7/-10)
app/ui/EpisodesTab.qml (+165/-85)
app/ui/PodcastsTab.qml (+5/-13)
app/ui/SearchPage.qml (+4/-14)
app/ui/SettingsPage.qml (+14/-0)
po/podbird.nik90.pot (+103/-101)
To merge this branch: bzr merge lp:~nik90/podbird/new-navigation-structure
Reviewer Review Type Date Requested Status
Podbird Developers Pending
Review via email: mp+288203@code.launchpad.net

Commit message

- Added new navigation structure which involves combining the SearchTab and PodcastsTab
- Moved WhatsNewTab into a bigger tab called EpisodesTab which also shows Downloaded episodes (globally)
- Added back button in search mode
- Moved podcast grid/list view option into the settings page

Description of the change

- Added new navigation structure which involves combining the SearchTab and PodcastsTab
- Moved WhatsNewTab into a bigger tab called EpisodesTab which also shows Downloaded episodes (globally)
- Added back button in search mode
- Moved podcast grid/list view option into the settings page

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/TabsList.qml'
2--- app/components/TabsList.qml 2016-03-04 10:40:54 +0000
3+++ app/components/TabsList.qml 2016-03-05 16:56:57 +0000
4@@ -26,7 +26,7 @@
5
6 children: [
7 Action {
8- text: i18n.tr("What's New")
9+ text: i18n.tr("Episodes")
10 visible: currentTab !== 0
11 onTriggered: {
12 tabs.selectedTabIndex = 0
13@@ -42,19 +42,11 @@
14 },
15
16 Action {
17- text: i18n.tr("Add New Podcasts")
18+ text: i18n.tr("Settings")
19 visible: currentTab !== 2
20 onTriggered: {
21 tabs.selectedTabIndex = 2
22 }
23- },
24-
25- Action {
26- text: i18n.tr("Settings")
27- visible: currentTab !== 3
28- onTriggered: {
29- tabs.selectedTabIndex = 3
30- }
31 }
32 ]
33 }
34
35=== modified file 'app/podbird.qml'
36--- app/podbird.qml 2016-03-04 10:40:54 +0000
37+++ app/podbird.qml 2016-03-05 16:56:57 +0000
38@@ -56,7 +56,7 @@
39 // visible on application start.
40 function refreshModels() {
41 if (tabs.selectedTabIndex === 0) {
42- whatsNewTab.refreshModel()
43+ episodesTab.refreshModel()
44 } else if (tabs.selectedTabIndex === 1) {
45 podcastPage.item.refreshModel()
46 }
47@@ -246,9 +246,9 @@
48 }
49 }
50
51- WhatsNewTab {
52- id: whatsNewTab
53- objectName: "whatsNewTab"
54+ EpisodesTab {
55+ id: episodesTab
56+ objectName: "episodesTab"
57 }
58
59 Tab {
60@@ -264,19 +264,6 @@
61 }
62
63 Tab {
64- id: searchTab
65-
66- // Dynamically load/unload the search tab as required
67- page: Loader {
68- parent: searchTab
69- anchors.left: parent.left
70- anchors.right: parent.right
71- anchors.bottom: parent.bottom
72- source: (tabs.selectedTab === searchTab) ? Qt.resolvedUrl("ui/SearchPage.qml") : ""
73- }
74- }
75-
76- Tab {
77 id: settingsTab
78
79 // Dynamically load/unload the settings tab as required
80
81=== modified file 'app/ui/EpisodesPage.qml'
82--- app/ui/EpisodesPage.qml 2016-03-04 10:40:54 +0000
83+++ app/ui/EpisodesPage.qml 2016-03-05 16:56:57 +0000
84@@ -105,17 +105,14 @@
85 name: "search"
86 head: episodesPage.head
87
88- actions: [
89- Action {
90- iconName: "edit-clear"
91- text: i18n.tr("Cancel")
92- onTriggered: {
93- episodeList.forceActiveFocus()
94- episodesPage.state = "default"
95- episodeList.positionViewAtBeginning()
96- }
97+ backAction: Action {
98+ iconName: "back"
99+ onTriggered: {
100+ episodeList.forceActiveFocus()
101+ episodesPage.state = "default"
102+ episodeList.positionViewAtBeginning()
103 }
104- ]
105+ }
106
107 contents: Loader {
108 id: searchField
109
110=== renamed file 'app/ui/WhatsNewTab.qml' => 'app/ui/EpisodesTab.qml'
111--- app/ui/WhatsNewTab.qml 2016-03-04 10:40:54 +0000
112+++ app/ui/EpisodesTab.qml 2016-03-05 16:56:57 +0000
113@@ -26,7 +26,7 @@
114 import "../components"
115
116 Tab {
117- id: whatsNewTab
118+ id: episodesTab
119
120 property var today: new Date()
121 property int dayToMs: 86400000
122@@ -38,14 +38,14 @@
123 }
124
125 page: Page {
126- id: whatsNewPage
127+ id: episodesPage
128
129 header: standardHeader
130
131 PageHeader {
132 id: standardHeader
133- visible: whatsNewPage.header === standardHeader
134- title: i18n.tr("What's New")
135+ visible: episodesPage.header === standardHeader
136+ title: i18n.tr("Episodes")
137
138 StyleHints {
139 backgroundColor: podbird.appTheme.background
140@@ -61,47 +61,87 @@
141 iconName: "search"
142 text: i18n.tr("Search Episode")
143 onTriggered: {
144- whatsNewPage.header = searchHeader
145+ episodesPage.header = searchHeader
146 searchField.item.forceActiveFocus()
147 }
148 },
149
150 Action {
151 iconName: "select"
152+ visible: episodesPageHeaderSections.selectedIndex === 0
153 text: i18n.tr("Mark all listened")
154 onTriggered: {
155 var db = Podcasts.init();
156 db.transaction(function (tx) {
157- for (var i=0; i<whatsNewModel.count; i++) {
158- tx.executeSql("UPDATE Episode SET listened=1 WHERE guid=?", [whatsNewModel.get(i).guid]);
159+ for (var i=0; i<episodesModel.count; i++) {
160+ tx.executeSql("UPDATE Episode SET listened=1 WHERE guid=?", [episodesModel.get(i).guid]);
161 }
162- whatsNewModel.clear()
163+ episodesModel.clear()
164 });
165 }
166 },
167
168 Action {
169 iconName: "save"
170+ visible: episodesPageHeaderSections.selectedIndex === 0
171 text: i18n.tr("Download all")
172 onTriggered: {
173 var db = Podcasts.init();
174 db.transaction(function (tx) {
175- for (var i=0; i<whatsNewModel.count; i++) {
176- if (!whatsNewModel.get(i).downloadedfile) {
177- whatsNewModel.setProperty(i, "queued", 1)
178- tx.executeSql("UPDATE Episode SET queued=1 WHERE guid = ?", [whatsNewModel.get(i).guid]);
179- downloader.addDownload(whatsNewModel.get(i).guid, whatsNewModel.get(i).audiourl);
180- }
181- }
182- });
183+ for (var i=0; i<episodesModel.count; i++) {
184+ if (!episodesModel.get(i).downloadedfile) {
185+ episodesModel.setProperty(i, "queued", 1)
186+ tx.executeSql("UPDATE Episode SET queued=1 WHERE guid = ?", [episodesModel.get(i).guid]);
187+ downloader.addDownload(episodesModel.get(i).guid, episodesModel.get(i).audiourl);
188+ }
189+ }
190+ });
191+ }
192+ },
193+
194+ Action {
195+ iconName: "delete"
196+ text: i18n.tr("Delete all")
197+ visible: episodesPageHeaderSections.selectedIndex === 1
198+ onTriggered: {
199+ var db = Podcasts.init();
200+ db.transaction(function (tx) {
201+ for (var i=0; i<episodesModel.count; i++) {
202+ if (episodesModel.get(i).downloadedfile) {
203+ fileManager.deleteFile(episodesModel.get(i).downloadedfile);
204+ tx.executeSql("UPDATE Episode SET downloadedfile = NULL WHERE guid = ?", [episodesModel.get(i).guid]);
205+ episodesModel.setProperty(i, "downloadedfile", "")
206+ }
207+ }
208+ });
209+ refreshModel();
210 }
211 }
212 ]
213+
214+ extension: Sections {
215+ id: episodesPageHeaderSections
216+
217+ anchors {
218+ left: parent.left
219+ leftMargin: units.gu(2)
220+ bottom: parent.bottom
221+ }
222+
223+ StyleHints {
224+ selectedSectionColor: podbird.appTheme.focusText
225+ }
226+
227+ model: [i18n.tr("What's New"), i18n.tr("Downloaded")]
228+ onSelectedIndexChanged: {
229+ refreshModel();
230+ }
231+ }
232 }
233
234 PageHeader {
235 id: searchHeader
236- visible: whatsNewPage.header === searchHeader
237+ visible: episodesPage.header === searchHeader
238
239 StyleHints {
240 backgroundColor: podbird.appTheme.background
241@@ -109,19 +149,18 @@
242
243 contents: Loader {
244 id: searchField
245- sourceComponent: whatsNewPage.header === searchHeader ? searchFieldComponent : undefined
246+ sourceComponent: episodesPage.header === searchHeader ? searchFieldComponent : undefined
247 anchors.left: parent ? parent.left : undefined
248 anchors.right: parent ? parent.right : undefined
249 anchors.verticalCenter: parent ? parent.verticalCenter : undefined
250 }
251
252- trailingActionBar.actions: [
253+ leadingActionBar.actions: [
254 Action {
255- iconName: "edit-clear"
256- text: i18n.tr("Cancel")
257+ iconName: "back"
258 onTriggered: {
259 episodeList.forceActiveFocus()
260- whatsNewPage.header = standardHeader
261+ episodesPage.header = standardHeader
262 }
263 }
264 ]
265@@ -146,28 +185,28 @@
266 verticalCenterOffset: Qt.inputMethod.visible ? units.gu(4) : 0
267 }
268
269- sourceComponent: whatsNewModel.count === 0 || sortedEpisodeModel.count === 0 ? emptyStateComponent : undefined
270+ sourceComponent: episodesModel.count === 0 || sortedEpisodeModel.count === 0 ? emptyStateComponent : undefined
271 }
272
273 Component {
274 id: emptyStateComponent
275 EmptyState {
276- icon.source: whatsNewModel.count === 0 ? Qt.resolvedUrl("../graphics/owlSearch.svg") : Qt.resolvedUrl("../graphics/notFound.svg")
277- title: whatsNewModel.count === 0 ? i18n.tr("No New Episodes") : i18n.tr("No Episodes Found")
278- subTitle: whatsNewModel.count === 0 ? i18n.tr("No more episodes to listen to!") : i18n.tr("No Episodes found matching the search term.")
279+ icon.source: episodesModel.count === 0 ? Qt.resolvedUrl("../graphics/owlSearch.svg") : Qt.resolvedUrl("../graphics/notFound.svg")
280+ title: episodesModel.count === 0 ? i18n.tr("No New Episodes") : i18n.tr("No Episodes Found")
281+ subTitle: episodesModel.count === 0 ? i18n.tr("No more episodes to listen to!") : i18n.tr("No Episodes found matching the search term.")
282 }
283 }
284
285 ListModel {
286- id: whatsNewModel
287+ id: episodesModel
288 }
289
290 SortFilterModel {
291 id: sortedEpisodeModel
292- model: whatsNewModel
293+ model: episodesModel
294 filter.property: "name"
295- filter.pattern: whatsNewPage.state === "search" && searchField.status == Loader.Ready ? RegExp(searchField.item.text, "gi")
296- : RegExp("", "gi")
297+ filter.pattern: episodesPage.header === searchHeader && searchField.status == Loader.Ready ? RegExp(searchField.item.text, "gi")
298+ : RegExp("", "gi")
299 }
300
301 onVisibleChanged: {
302@@ -176,7 +215,7 @@
303 if (downloader.downloadingGuid != "")
304 tempGuid = downloader.downloadingGuid
305 } else {
306- whatsNewPage.header = standardHeader
307+ episodesPage.header = standardHeader
308 }
309 }
310
311@@ -187,16 +226,16 @@
312 db.transaction(function (tx) {
313 /*
314 If tempGuid is NULL, then the episode currently being downloaded is not found within
315- this podcast. On the other hand, if it is within this podcast, then update the whatsNewModel
316+ this podcast. On the other hand, if it is within this podcast, then update the episodesModel
317 with the downloadedfile location we just received from the downloader.
318 */
319 if (tempGuid != "NULL") {
320 var rs2 = tx.executeSql("SELECT downloadedfile FROM Episode WHERE guid=?", [tempGuid]);
321- for (var i=0; i<whatsNewModel.count; i++) {
322- if (whatsNewModel.get(i).guid == tempGuid) {
323+ for (var i=0; i<episodesModel.count; i++) {
324+ if (episodesModel.get(i).guid == tempGuid) {
325 console.log("[LOG]: Setting episode download URL to " + rs2.rows.item(0).downloadedfile)
326- whatsNewModel.setProperty(i, "downloadedfile", rs2.rows.item(0).downloadedfile)
327- whatsNewModel.setProperty(i, "queued", 0)
328+ episodesModel.setProperty(i, "downloadedfile", rs2.rows.item(0).downloadedfile)
329+ episodesModel.setProperty(i, "queued", 0)
330 break
331 }
332 }
333@@ -252,7 +291,7 @@
334 }
335 }
336
337- UbuntuListView {
338+ ListView {
339 id: episodeList
340
341 Component.onCompleted: {
342@@ -264,23 +303,21 @@
343 }
344
345 anchors {
346- top: whatsNewPage.header.bottom
347+ top: episodesPage.header.bottom
348 left: parent.left
349 right: parent.right
350 bottom: parent.bottom
351 }
352
353 clip: true
354-
355 model: sortedEpisodeModel
356- currentIndex: -1
357 section.property: "diff"
358 section.labelPositioning: ViewSection.InlineLabels
359
360 section.delegate: Rectangle {
361 width: parent.width
362 color: "Transparent"
363- height: header.implicitHeight + units.gu(2)
364+ height: header.text !== "" ? header.implicitHeight + units.gu(2) : units.gu(0)
365 Label {
366 id: header
367 anchors {
368@@ -299,8 +336,13 @@
369 return i18n.tr("Yesterday")
370 }
371
372- else if (section === "Older")
373+ else if (section === "Older") {
374 return i18n.tr("Older")
375+ }
376+
377+ else {
378+ return ""
379+ }
380 }
381 }
382 }
383@@ -372,24 +414,36 @@
384 db.transaction(function (tx) {
385 tx.executeSql("UPDATE Episode SET downloadedfile = NULL WHERE guid = ?", [model.guid]);
386 });
387- whatsNewModel.setProperty(model.index, "downloadedfile", "")
388+ episodesModel.setProperty(model.index, "downloadedfile", "")
389+ if (episodesPageHeaderSections.selectedIndex === 1) {
390+ episodesModel.remove(model.index, 1)
391+ }
392 } else {
393 db.transaction(function (tx) {
394 tx.executeSql("UPDATE Episode SET queued=1 WHERE guid = ?", [model.guid]);
395 });
396- whatsNewModel.setProperty(model.index, "queued", 1)
397+ episodesModel.setProperty(model.index, "queued", 1)
398 downloader.addDownload(model.guid, model.audiourl);
399 }
400 }
401 },
402
403 Action {
404- iconName: "select"
405+ iconName: model.listened ? "view-collapse" : "select"
406 onTriggered: {
407 var db = Podcasts.init();
408 db.transaction(function (tx) {
409- tx.executeSql("UPDATE Episode SET listened=1 WHERE guid=?", [model.guid])
410- whatsNewModel.remove(model.index, 1)
411+ if (model.listened) {
412+ tx.executeSql("UPDATE Episode SET listened=0 WHERE guid=?", [model.guid])
413+ episodesModel.setProperty(model.index, "listened", 0)
414+ }
415+ else {
416+ tx.executeSql("UPDATE Episode SET listened=1 WHERE guid=?", [model.guid])
417+ episodesModel.setProperty(model.index, "listened", 1)
418+ if (episodesPage.head.sections.selectedIndex === 0) {
419+ episodesModel.remove(model.index, 1)
420+ }
421+ }
422 });
423 }
424 },
425@@ -397,7 +451,7 @@
426 Action {
427 iconName: "info"
428 onTriggered: {
429- var popup = PopupUtils.open(episodeDescriptionDialog, whatsNewTab);
430+ var popup = PopupUtils.open(episodeDescriptionDialog, episodesTab);
431 popup.description = model.description
432 }
433 }
434@@ -437,44 +491,70 @@
435 }
436
437 function refreshModel() {
438- var today = new Date()
439- var dayToMs = 86400000; //1 * 24 * 60 * 60 * 1000
440- var i, j, episode, diff
441- var todayCount, yesterdayCount
442-
443- whatsNewModel.clear()
444- todayCount = 0
445- yesterdayCount = 0
446-
447+ var i, j, episode
448 var db = Podcasts.init()
449- db.transaction(function (tx) {
450- var rs = tx.executeSql("SELECT rowid, * FROM Podcast ORDER BY name ASC");
451- for (i=0; i < rs.rows.length; i++) {
452- var podcast = rs.rows.item(i);
453- var rs2 = tx.executeSql("SELECT rowid, * FROM Episode WHERE podcast=? ORDER BY published DESC", [rs.rows.item(i).rowid]);
454- for (j=0; j < rs2.rows.length; j++) {
455- episode = rs2.rows.item(j)
456- diff = Math.floor((today - episode.published)/dayToMs)
457- if (diff < 7 && !episode.listened) {
458- if (diff < 1) {
459- whatsNewModel.insert(todayCount, {"guid" : episode.guid, "listened" : episode.listened, "published": episode.published, "name" : episode.name, "description" : episode.description, "duration" : episode.duration, "position" : episode.position, "downloadedfile" : episode.downloadedfile, "image" : podcast.image, "artist" : podcast.artist, "audiourl" : episode.audiourl, "queued": episode.queued, "diff": "Today"})
460- todayCount++;
461- } else if (diff < 2) {
462- whatsNewModel.insert(todayCount + yesterdayCount, {"guid" : episode.guid, "listened" : episode.listened, "published": episode.published, "name" : episode.name, "description" : episode.description, "duration" : episode.duration, "position" : episode.position, "downloadedfile" : episode.downloadedfile, "image" : podcast.image, "artist" : podcast.artist, "audiourl" : episode.audiourl, "queued": episode.queued, "diff": "Yesterday"})
463- yesterdayCount++;
464- } else {
465- whatsNewModel.append({"guid" : episode.guid, "listened" : episode.listened, "published": episode.published, "name" : episode.name, "description" : episode.description, "duration" : episode.duration, "position" : episode.position, "downloadedfile" : episode.downloadedfile, "image" : podcast.image, "artist" : podcast.artist, "audiourl" : episode.audiourl, "queued": episode.queued, "diff": "Older"})
466- }
467- } else if (diff >= 7){
468- break
469- }
470- }
471-
472- if (podcast.lastupdate === null && !episodesUpdating) {
473- updateEpisodesDatabase();
474- }
475- }
476- });
477+
478+ episodesModel.clear()
479+
480+ // Episode Model for the what's new view
481+ if (episodesPageHeaderSections.selectedIndex === 0) {
482+ var today = new Date()
483+ var dayToMs = 86400000; //1 * 24 * 60 * 60 * 1000
484+ var todayCount, yesterdayCount, diff
485+
486+ todayCount = 0
487+ yesterdayCount = 0
488+
489+ db.transaction(function (tx) {
490+ var rs = tx.executeSql("SELECT rowid, * FROM Podcast ORDER BY name ASC");
491+ for (i=0; i < rs.rows.length; i++) {
492+ var podcast = rs.rows.item(i);
493+ var rs2 = tx.executeSql("SELECT rowid, * FROM Episode WHERE podcast=? ORDER BY published DESC", [rs.rows.item(i).rowid]);
494+ for (j=0; j < rs2.rows.length; j++) {
495+ episode = rs2.rows.item(j)
496+ diff = Math.floor((today - episode.published)/dayToMs)
497+ if (diff < 7 && !episode.listened) {
498+ if (diff < 1) {
499+ episodesModel.insert(todayCount, {"guid" : episode.guid, "listened" : episode.listened, "published": episode.published, "name" : episode.name, "description" : episode.description, "duration" : episode.duration, "position" : episode.position, "downloadedfile" : episode.downloadedfile, "image" : podcast.image, "artist" : podcast.artist, "audiourl" : episode.audiourl, "queued": episode.queued, "diff": "Today"})
500+ todayCount++;
501+ } else if (diff < 2) {
502+ episodesModel.insert(todayCount + yesterdayCount, {"guid" : episode.guid, "listened" : episode.listened, "published": episode.published, "name" : episode.name, "description" : episode.description, "duration" : episode.duration, "position" : episode.position, "downloadedfile" : episode.downloadedfile, "image" : podcast.image, "artist" : podcast.artist, "audiourl" : episode.audiourl, "queued": episode.queued, "diff": "Yesterday"})
503+ yesterdayCount++;
504+ } else {
505+ episodesModel.append({"guid" : episode.guid, "listened" : episode.listened, "published": episode.published, "name" : episode.name, "description" : episode.description, "duration" : episode.duration, "position" : episode.position, "downloadedfile" : episode.downloadedfile, "image" : podcast.image, "artist" : podcast.artist, "audiourl" : episode.audiourl, "queued": episode.queued, "diff": "Older"})
506+ }
507+ } else if (diff >= 7){
508+ break
509+ }
510+ }
511+
512+ if (podcast.lastupdate === null && !episodesUpdating) {
513+ updateEpisodesDatabase();
514+ }
515+ }
516+ });
517+ }
518+
519+ // Episode Model for the downloaded view
520+ else if (episodesPageHeaderSections.selectedIndex === 1) {
521+ db.transaction(function (tx) {
522+ var rs = tx.executeSql("SELECT rowid, * FROM Podcast ORDER BY name ASC");
523+ for (i=0; i < rs.rows.length; i++) {
524+ var podcast = rs.rows.item(i);
525+ var rs2 = tx.executeSql("SELECT rowid, * FROM Episode WHERE podcast=? ORDER BY published DESC", [rs.rows.item(i).rowid]);
526+ for (j=0; j < rs2.rows.length; j++) {
527+ episode = rs2.rows.item(j)
528+ if (episode.downloadedfile) {
529+ episodesModel.append({"guid" : episode.guid, "listened" : episode.listened, "published": episode.published, "name" : episode.name, "description" : episode.description, "duration" : episode.duration, "position" : episode.position, "downloadedfile" : episode.downloadedfile, "image" : podcast.image, "artist" : podcast.artist, "audiourl" : episode.audiourl, "queued": episode.queued, "diff": "Null"})
530+ }
531+ }
532+
533+ if (podcast.lastupdate === null && !episodesUpdating) {
534+ updateEpisodesDatabase();
535+ }
536+ }
537+ });
538+ }
539
540 episodesUpdating = false;
541 }
542
543=== modified file 'app/ui/PodcastsTab.qml'
544--- app/ui/PodcastsTab.qml 2016-03-04 10:40:54 +0000
545+++ app/ui/PodcastsTab.qml 2016-03-05 16:56:57 +0000
546@@ -61,10 +61,10 @@
547 }
548 },
549 Action {
550- iconName: podbird.settings.showListView ? "view-grid-symbolic" : "view-list-symbolic"
551- text: podbird.settings.showListView ? i18n.tr("Grid View") : i18n.tr("List View")
552+ iconName: "add"
553+ text: i18n.tr("Add New Podcasts")
554 onTriggered: {
555- podbird.settings.showListView = !podbird.settings.showListView
556+ mainStack.push(Qt.resolvedUrl("SearchPage.qml"))
557 }
558 }
559 ]
560@@ -86,21 +86,13 @@
561 anchors.verticalCenter: parent.verticalCenter
562 }
563
564- trailingActionBar.actions: [
565+ leadingActionBar.actions: [
566 Action {
567- iconName: "edit-clear"
568- text: i18n.tr("Cancel")
569+ iconName: "back"
570 onTriggered: {
571 viewLoader.item.forceActiveFocus()
572 podcastPage.header = standardHeader
573 }
574- },
575- Action {
576- iconName: podbird.settings.showListView ? "view-grid-symbolic" : "view-list-symbolic"
577- text: podbird.settings.showListView ? i18n.tr("Grid View") : i18n.tr("List View")
578- onTriggered: {
579- podbird.settings.showListView = !podbird.settings.showListView
580- }
581 }
582 ]
583 }
584
585=== modified file 'app/ui/SearchPage.qml'
586--- app/ui/SearchPage.qml 2016-03-04 10:40:54 +0000
587+++ app/ui/SearchPage.qml 2016-03-05 16:56:57 +0000
588@@ -28,10 +28,6 @@
589
590 property var xhr: new XMLHttpRequest;
591
592- TabsList {
593- id: tabsList
594- }
595-
596 header: standardHeader
597
598 PageHeader {
599@@ -44,11 +40,6 @@
600 backgroundColor: podbird.appTheme.background
601 }
602
603- leadingActionBar {
604- numberOfSlots: 0
605- actions: tabsList.actions
606- }
607-
608 trailingActionBar.actions: [
609 Action {
610 iconName: "search"
611@@ -87,10 +78,9 @@
612 anchors.verticalCenter: parent.verticalCenter
613 }
614
615- trailingActionBar.actions: [
616+ leadingActionBar.actions: [
617 Action {
618- iconName: "edit-clear"
619- text: i18n.tr("Cancel")
620+ iconName: "back"
621 onTriggered: {
622 resultsView.forceActiveFocus()
623 searchResults.clear()
624@@ -294,7 +284,7 @@
625 }
626 });
627 }
628- tabs.selectedTabIndex = 1;
629+ mainStack.pop();
630 }
631 }
632 }
633@@ -443,7 +433,7 @@
634 Podcasts.subscribe(artist, name, feed, image);
635 imageDownloader.feed = feed;
636 imageDownloader.download(image);
637- tabs.selectedTabIndex = 1;
638+ mainStack.pop();
639 } else {
640 PopupUtils.open(subscribeFailedDialog);
641 searchPage.header = addHeader
642
643=== modified file 'app/ui/SettingsPage.qml'
644--- app/ui/SettingsPage.qml 2016-03-04 10:40:54 +0000
645+++ app/ui/SettingsPage.qml 2016-03-05 16:56:57 +0000
646@@ -146,6 +146,20 @@
647 onClicked: mainStack.push(Qt.resolvedUrl("../settings/ThemeSetting.qml"))
648 }
649
650+ ListItem {
651+ ListItemLayout {
652+ id: gridViewLayout
653+ title.text: i18n.tr("Displays podcasts in a list view")
654+ Switch {
655+ SlotsLayout.position: SlotsLayout.Last
656+ checked: podbird.settings.showListView
657+ onClicked: podbird.settings.showListView = checked
658+ }
659+ }
660+ divider.visible: false
661+ height: gridViewLayout.height
662+ }
663+
664 HeaderListItem {
665 title.text: i18n.tr("Playback Settings")
666 }
667
668=== modified file 'po/podbird.nik90.pot'
669--- po/podbird.nik90.pot 2016-03-04 10:40:54 +0000
670+++ po/podbird.nik90.pot 2016-03-05 16:56:57 +0000
671@@ -8,7 +8,7 @@
672 msgstr ""
673 "Project-Id-Version: \n"
674 "Report-Msgid-Bugs-To: \n"
675-"POT-Creation-Date: 2016-03-04 16:09+0530\n"
676+"POT-Creation-Date: 2016-03-05 22:22+0530\n"
677 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
678 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
679 "Language-Team: LANGUAGE <LL@li.org>\n"
680@@ -18,7 +18,7 @@
681 "Content-Transfer-Encoding: 8bit\n"
682 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
683
684-#: ../app/components/TabsList.qml:29 ../app/ui/WhatsNewTab.qml:48
685+#: ../app/components/TabsList.qml:29 ../app/ui/EpisodesTab.qml:135
686 msgid "What's New"
687 msgstr ""
688
689@@ -26,11 +26,7 @@
690 msgid "Podcasts"
691 msgstr ""
692
693-#: ../app/components/TabsList.qml:45 ../app/ui/SearchPage.qml:41
694-msgid "Add New Podcasts"
695-msgstr ""
696-
697-#: ../app/components/TabsList.qml:53 ../app/ui/SettingsPage.qml:32
698+#: ../app/components/TabsList.qml:45 ../app/ui/SettingsPage.qml:32
699 msgid "Settings"
700 msgstr ""
701
702@@ -65,7 +61,7 @@
703
704 #. TRANSLATORS: About as in information about the app
705 #: ../app/settings/About.qml:28 ../app/settings/About.qml:47
706-#: ../app/ui/SettingsPage.qml:208
707+#: ../app/ui/SettingsPage.qml:222
708 msgid "About"
709 msgstr ""
710
711@@ -143,7 +139,7 @@
712 #: ../app/settings/DownloadSetting.qml:34
713 #: ../app/settings/DownloadSetting.qml:35
714 #: ../app/settings/DownloadSetting.qml:36
715-#: ../app/settings/DownloadSetting.qml:37 ../app/ui/EpisodesPage.qml:347
716+#: ../app/settings/DownloadSetting.qml:37 ../app/ui/EpisodesPage.qml:344
717 #, qt-format
718 msgid "%1 episode"
719 msgid_plural "%1 episodes"
720@@ -168,68 +164,106 @@
721 msgid "Podcast"
722 msgstr ""
723
724-#: ../app/ui/EpisodesPage.qml:74 ../app/ui/WhatsNewTab.qml:62
725+#: ../app/ui/EpisodesPage.qml:74 ../app/ui/EpisodesTab.qml:62
726 msgid "Search Episode"
727 msgstr ""
728
729-#: ../app/ui/EpisodesPage.qml:83 ../app/ui/WhatsNewTab.qml:71
730+#: ../app/ui/EpisodesPage.qml:83 ../app/ui/EpisodesTab.qml:72
731 msgid "Mark all listened"
732 msgstr ""
733
734-#: ../app/ui/EpisodesPage.qml:94 ../app/ui/EpisodesPage.qml:188
735-#: ../app/ui/SearchPage.qml:276
736+#: ../app/ui/EpisodesPage.qml:94 ../app/ui/EpisodesPage.qml:185
737+#: ../app/ui/SearchPage.qml:266
738 msgid "Unsubscribe"
739 msgstr ""
740
741-#: ../app/ui/EpisodesPage.qml:111 ../app/ui/EpisodesPage.qml:205
742-#: ../app/ui/PodcastsTab.qml:92 ../app/ui/SearchPage.qml:93
743-#: ../app/ui/SearchPage.qml:131 ../app/ui/SettingsPage.qml:83
744-#: ../app/ui/SettingsPage.qml:118 ../app/ui/WhatsNewTab.qml:121
745-msgid "Cancel"
746-msgstr ""
747-
748-#: ../app/ui/EpisodesPage.qml:140 ../app/ui/WhatsNewTab.qml:134
749+#: ../app/ui/EpisodesPage.qml:137 ../app/ui/EpisodesTab.qml:173
750 msgid "Search episode"
751 msgstr ""
752
753-#: ../app/ui/EpisodesPage.qml:185
754+#: ../app/ui/EpisodesPage.qml:182
755 msgid "Unsubscribe Confirmation"
756 msgstr ""
757
758-#: ../app/ui/EpisodesPage.qml:186
759+#: ../app/ui/EpisodesPage.qml:183
760 #, qt-format
761 msgid "Are you sure you want to unsubscribe from <b>%1</b>?"
762 msgstr ""
763
764-#: ../app/ui/EpisodesPage.qml:227 ../app/ui/WhatsNewTab.qml:234
765+#: ../app/ui/EpisodesPage.qml:202 ../app/ui/SearchPage.qml:121
766+#: ../app/ui/SettingsPage.qml:83 ../app/ui/SettingsPage.qml:118
767+msgid "Cancel"
768+msgstr ""
769+
770+#: ../app/ui/EpisodesPage.qml:224 ../app/ui/EpisodesTab.qml:273
771 msgid "Episode Description"
772 msgstr ""
773
774-#: ../app/ui/EpisodesPage.qml:239 ../app/ui/SearchPage.qml:180
775-#: ../app/ui/WhatsNewTab.qml:246
776+#: ../app/ui/EpisodesPage.qml:236 ../app/ui/EpisodesTab.qml:285
777+#: ../app/ui/SearchPage.qml:170
778 msgid "Close"
779 msgstr ""
780
781-#: ../app/ui/EpisodesPage.qml:267
782+#: ../app/ui/EpisodesPage.qml:264
783 msgid "No episodes found"
784 msgstr ""
785
786-#: ../app/ui/EpisodesPage.qml:268
787+#: ../app/ui/EpisodesPage.qml:265
788 msgid "No episodes found matching the search term."
789 msgstr ""
790
791-#: ../app/ui/EpisodesPage.qml:364
792+#: ../app/ui/EpisodesPage.qml:361
793 msgid "Unheard"
794 msgstr ""
795
796-#: ../app/ui/EpisodesPage.qml:391
797+#: ../app/ui/EpisodesPage.qml:388
798 msgid "Listened"
799 msgstr ""
800
801-#: ../app/ui/EpisodesPage.qml:416
802+#: ../app/ui/EpisodesPage.qml:413 ../app/ui/EpisodesTab.qml:135
803 msgid "Downloaded"
804 msgstr ""
805
806+#: ../app/ui/EpisodesTab.qml:48
807+msgid "Episodes"
808+msgstr ""
809+
810+#: ../app/ui/EpisodesTab.qml:87
811+msgid "Download all"
812+msgstr ""
813+
814+#: ../app/ui/EpisodesTab.qml:104
815+msgid "Delete all"
816+msgstr ""
817+
818+#: ../app/ui/EpisodesTab.qml:195
819+msgid "No New Episodes"
820+msgstr ""
821+
822+#: ../app/ui/EpisodesTab.qml:195
823+msgid "No Episodes Found"
824+msgstr ""
825+
826+#: ../app/ui/EpisodesTab.qml:196
827+msgid "No more episodes to listen to!"
828+msgstr ""
829+
830+#: ../app/ui/EpisodesTab.qml:196
831+msgid "No Episodes found matching the search term."
832+msgstr ""
833+
834+#: ../app/ui/EpisodesTab.qml:332
835+msgid "Today"
836+msgstr ""
837+
838+#: ../app/ui/EpisodesTab.qml:336
839+msgid "Yesterday"
840+msgstr ""
841+
842+#: ../app/ui/EpisodesTab.qml:340
843+msgid "Older"
844+msgstr ""
845+
846 #: ../app/ui/NowPlayingPage.qml:29
847 msgid "Now Playing"
848 msgstr ""
849@@ -246,106 +280,102 @@
850 msgid "+%1s"
851 msgstr ""
852
853-#: ../app/ui/PodcastsTab.qml:57 ../app/ui/SearchPage.qml:55
854-#: ../app/ui/SearchPage.qml:162
855+#: ../app/ui/PodcastsTab.qml:57 ../app/ui/SearchPage.qml:46
856+#: ../app/ui/SearchPage.qml:152
857 msgid "Search Podcast"
858 msgstr ""
859
860-#: ../app/ui/PodcastsTab.qml:65 ../app/ui/PodcastsTab.qml:100
861-msgid "Grid View"
862-msgstr ""
863-
864-#: ../app/ui/PodcastsTab.qml:65 ../app/ui/PodcastsTab.qml:100
865-msgid "List View"
866-msgstr ""
867-
868-#: ../app/ui/PodcastsTab.qml:112
869+#: ../app/ui/PodcastsTab.qml:65 ../app/ui/SearchPage.qml:37
870+msgid "Add New Podcasts"
871+msgstr ""
872+
873+#: ../app/ui/PodcastsTab.qml:104
874 msgid "Search podcast"
875 msgstr ""
876
877-#: ../app/ui/PodcastsTab.qml:142
878+#: ../app/ui/PodcastsTab.qml:134
879 msgid "No Podcast Subscriptions"
880 msgstr ""
881
882-#: ../app/ui/PodcastsTab.qml:142
883+#: ../app/ui/PodcastsTab.qml:134
884 msgid "No Podcasts Found"
885 msgstr ""
886
887-#: ../app/ui/PodcastsTab.qml:143
888+#: ../app/ui/PodcastsTab.qml:135
889 msgid ""
890 "You haven't subscribed to any podcasts yet, visit the 'Find New Podcasts' "
891 "page to add some."
892 msgstr ""
893
894-#: ../app/ui/PodcastsTab.qml:144 ../app/ui/SearchPage.qml:210
895+#: ../app/ui/PodcastsTab.qml:136 ../app/ui/SearchPage.qml:200
896 msgid "No podcasts found matching the search term."
897 msgstr ""
898
899-#: ../app/ui/PodcastsTab.qml:182 ../app/ui/PodcastsTab.qml:230
900+#: ../app/ui/PodcastsTab.qml:174 ../app/ui/PodcastsTab.qml:222
901 #, qt-format
902 msgid "%1 unheard episode"
903 msgid_plural "%1 unheard episodes"
904 msgstr[0] ""
905 msgstr[1] ""
906
907-#: ../app/ui/SearchPage.qml:63
908+#: ../app/ui/SearchPage.qml:54
909 msgid "Add Podcast"
910 msgstr ""
911
912-#: ../app/ui/SearchPage.qml:123
913+#: ../app/ui/SearchPage.qml:113
914 msgid "Save Podcast"
915 msgstr ""
916
917-#: ../app/ui/SearchPage.qml:150
918+#: ../app/ui/SearchPage.qml:140
919 msgid "Feed URL"
920 msgstr ""
921
922-#: ../app/ui/SearchPage.qml:177
923+#: ../app/ui/SearchPage.qml:167
924 msgid "Unable to subscribe"
925 msgstr ""
926
927-#: ../app/ui/SearchPage.qml:178
928+#: ../app/ui/SearchPage.qml:168
929 msgid "Please check the URL and try again"
930 msgstr ""
931
932-#: ../app/ui/SearchPage.qml:208
933+#: ../app/ui/SearchPage.qml:198
934 msgid "Looking to add a new Podcast?"
935 msgstr ""
936
937-#: ../app/ui/SearchPage.qml:208
938+#: ../app/ui/SearchPage.qml:198
939 msgid "No Podcasts found"
940 msgstr ""
941
942-#: ../app/ui/SearchPage.qml:209
943+#: ../app/ui/SearchPage.qml:199
944 msgid ""
945 "Click the 'magnifier' at the top to search or the 'plus' button to add by URL"
946 msgstr ""
947
948-#: ../app/ui/SearchPage.qml:276
949+#: ../app/ui/SearchPage.qml:266
950 msgid "Subscribe"
951 msgstr ""
952
953 #. TRANSLATORS: The first argument here is the date of when the podcast was last updated followed by
954 #. the podcast description.
955-#: ../app/ui/SearchPage.qml:315
956+#: ../app/ui/SearchPage.qml:305
957 #, qt-format
958 msgid ""
959 "Last Updated: %1\n"
960 "%2"
961 msgstr ""
962
963-#: ../app/ui/SearchPage.qml:372
964+#: ../app/ui/SearchPage.qml:362
965 msgid "Not Available"
966 msgstr ""
967
968 #. TRANSLATORS: This strings refers to the seeking of the episode playback. Users can set how far they
969 #. want to seek forward when pressing on this button.
970-#: ../app/ui/SettingsPage.qml:63 ../app/ui/SettingsPage.qml:155
971+#: ../app/ui/SettingsPage.qml:63 ../app/ui/SettingsPage.qml:169
972 msgid "Skip forward"
973 msgstr ""
974
975 #: ../app/ui/SettingsPage.qml:70 ../app/ui/SettingsPage.qml:105
976-#: ../app/ui/SettingsPage.qml:156 ../app/ui/SettingsPage.qml:163
977+#: ../app/ui/SettingsPage.qml:170 ../app/ui/SettingsPage.qml:177
978 #, qt-format
979 msgid "%1 seconds"
980 msgstr ""
981@@ -356,7 +386,7 @@
982
983 #. TRANSLATORS: This strings refers to the seeking of the episode playback. Users can set how far they
984 #. want to seek backward when pressing on this button.
985-#: ../app/ui/SettingsPage.qml:98 ../app/ui/SettingsPage.qml:162
986+#: ../app/ui/SettingsPage.qml:98 ../app/ui/SettingsPage.qml:176
987 msgid "Skip back"
988 msgstr ""
989
990@@ -366,73 +396,45 @@
991 msgid "General Settings"
992 msgstr ""
993
994-#: ../app/ui/SettingsPage.qml:150
995+#: ../app/ui/SettingsPage.qml:152
996+msgid "Displays podcasts in a list view"
997+msgstr ""
998+
999+#: ../app/ui/SettingsPage.qml:164
1000 msgid "Playback Settings"
1001 msgstr ""
1002
1003-#: ../app/ui/SettingsPage.qml:168
1004+#: ../app/ui/SettingsPage.qml:182
1005 msgid "Podcast Episode Settings"
1006 msgstr ""
1007
1008-#: ../app/ui/SettingsPage.qml:174
1009+#: ../app/ui/SettingsPage.qml:188
1010 msgid "Automatically delete old episodes"
1011 msgstr ""
1012
1013-#: ../app/ui/SettingsPage.qml:176
1014+#: ../app/ui/SettingsPage.qml:190
1015 msgid ""
1016 "Delete episodes that are older than a given number of days for each podcast"
1017 msgstr ""
1018
1019-#: ../app/ui/SettingsPage.qml:188
1020+#: ../app/ui/SettingsPage.qml:202
1021 msgid "Automatically download new episodes"
1022 msgstr ""
1023
1024-#: ../app/ui/SettingsPage.qml:190
1025+#: ../app/ui/SettingsPage.qml:204
1026 msgid "Default number of new episodes to download for each podcast"
1027 msgstr ""
1028
1029 #. TRANSLATORS: Shortened form of "Miscellaneous" which is shown to denote other setting options
1030 #. that doesn't fit into any other category.
1031-#: ../app/ui/SettingsPage.qml:202
1032+#: ../app/ui/SettingsPage.qml:216
1033 msgid "Misc."
1034 msgstr ""
1035
1036-#: ../app/ui/SettingsPage.qml:218
1037+#: ../app/ui/SettingsPage.qml:232
1038 msgid "Report Bug"
1039 msgstr ""
1040
1041-#: ../app/ui/WhatsNewTab.qml:85
1042-msgid "Download all"
1043-msgstr ""
1044-
1045-#: ../app/ui/WhatsNewTab.qml:156
1046-msgid "No New Episodes"
1047-msgstr ""
1048-
1049-#: ../app/ui/WhatsNewTab.qml:156
1050-msgid "No Episodes Found"
1051-msgstr ""
1052-
1053-#: ../app/ui/WhatsNewTab.qml:157
1054-msgid "No more episodes to listen to!"
1055-msgstr ""
1056-
1057-#: ../app/ui/WhatsNewTab.qml:157
1058-msgid "No Episodes found matching the search term."
1059-msgstr ""
1060-
1061-#: ../app/ui/WhatsNewTab.qml:295
1062-msgid "Today"
1063-msgstr ""
1064-
1065-#: ../app/ui/WhatsNewTab.qml:299
1066-msgid "Yesterday"
1067-msgstr ""
1068-
1069-#: ../app/ui/WhatsNewTab.qml:303
1070-msgid "Older"
1071-msgstr ""
1072-
1073 #: ../app/welcomewizard/Slide1.qml:42
1074 msgid "Welcome to Podbird"
1075 msgstr ""

Subscribers

People subscribed via source and target branches