Merge lp:~nik90/podbird/downloaded-view-devel into lp:podbird/devel

Proposed by Nekhelesh Ramananthan
Status: Merged
Merged at revision: 107
Proposed branch: lp:~nik90/podbird/downloaded-view-devel
Merge into: lp:podbird/devel
Diff against target: 507 lines (+184/-104)
5 files modified
app/podbird.qml (+3/-19)
app/ui/EpisodesTab.qml (+149/-75)
app/ui/PodcastsTab.qml (+3/-3)
app/ui/SearchPage.qml (+4/-2)
app/ui/SettingsPage.qml (+25/-5)
To merge this branch: bzr merge lp:~nik90/podbird/downloaded-view-devel
Reviewer Review Type Date Requested Status
Podbird Developers Pending
Review via email: mp+258989@code.launchpad.net

Description of the change

This MP implements the following,
- Moved the settings option to set podcasts list/grid view to the settings page
- Added back the add new podcasts option as a header button rather than a dedicated tab since it rarely used once the user has added all podcasts he needs.
- Replaced What's New Tab with the Episodes Tab and then adds What's New view and Downloaded View as header sections.

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
=== modified file 'app/podbird.qml'
--- app/podbird.qml 2015-05-12 21:35:11 +0000
+++ app/podbird.qml 2015-05-13 11:43:12 +0000
@@ -55,7 +55,7 @@
55 // visible on application start.55 // visible on application start.
56 function refreshModels() {56 function refreshModels() {
57 if (tabs.selectedTabIndex === 0) {57 if (tabs.selectedTabIndex === 0) {
58 whatsNewTab.refreshModel()58 episodesTab.refreshModel()
59 } else if (tabs.selectedTabIndex === 1) {59 } else if (tabs.selectedTabIndex === 1) {
60 podcastPage.item.refreshModel()60 podcastPage.item.refreshModel()
61 }61 }
@@ -239,9 +239,8 @@
239 }239 }
240 }240 }
241241
242 WhatsNewTab {242 EpisodesTab {
243 id: whatsNewTab243 id: episodesTab
244 objectName: "whatsNewTab"
245 }244 }
246245
247 Tab {246 Tab {
@@ -259,21 +258,6 @@
259 }258 }
260259
261 Tab {260 Tab {
262 id: searchTab
263
264 title: i18n.tr("Add New Podcasts")
265
266 // Dynamically load/unload the search tab as required
267 page: Loader {
268 parent: searchTab
269 anchors.left: parent.left
270 anchors.right: parent.right
271 anchors.bottom: parent.bottom
272 source: (tabs.selectedTab === searchTab) ? Qt.resolvedUrl("ui/SearchPage.qml") : ""
273 }
274 }
275
276 Tab {
277 id: settingsTab261 id: settingsTab
278262
279 title: i18n.tr("Settings")263 title: i18n.tr("Settings")
280264
=== renamed file 'app/ui/WhatsNewTab.qml' => 'app/ui/EpisodesTab.qml'
--- app/ui/WhatsNewTab.qml 2015-05-02 09:24:19 +0000
+++ app/ui/EpisodesTab.qml 2015-05-13 11:43:12 +0000
@@ -12,7 +12,7 @@
12Tab {12Tab {
13 id: whatsNewTab13 id: whatsNewTab
1414
15 title: i18n.tr("What's New")15 title: i18n.tr("Episodes")
1616
17 property var today: new Date()17 property var today: new Date()
18 property int dayToMs: 8640000018 property int dayToMs: 86400000
@@ -20,33 +20,45 @@
20 property bool episodesUpdating: false20 property bool episodesUpdating: false
2121
22 page: Page {22 page: Page {
23 id: whatsNewPage23 id: episodesPage
24
25 flickable: null
26
27 head {
28 sections {
29 model: [i18n.tr("What's New"), i18n.tr("Downloaded")]
30 onSelectedIndexChanged: {
31 refreshModel();
32 }
33 }
34 }
2435
25 state: "default"36 state: "default"
26 states: [37 states: [
27 PageHeadState {38 PageHeadState {
28 name: "default"39 name: "default"
29 head: whatsNewPage.head40 head: episodesPage.head
30 actions: [41 actions: [
31 Action {42 Action {
32 iconName: "search"43 iconName: "search"
33 text: i18n.tr("Search Episode")44 text: i18n.tr("Search Episode")
34 onTriggered: {45 onTriggered: {
35 whatsNewPage.state = "search"46 episodesPage.state = "search"
36 searchField.item.forceActiveFocus()47 searchField.item.forceActiveFocus()
37 }48 }
38 },49 },
3950
40 Action {51 Action {
41 iconName: "select"52 iconName: "select"
53 visible: episodesPage.head.sections.selectedIndex === 0
42 text: i18n.tr("Mark all listened")54 text: i18n.tr("Mark all listened")
43 onTriggered: {55 onTriggered: {
44 var db = Podcasts.init();56 var db = Podcasts.init();
45 db.transaction(function (tx) {57 db.transaction(function (tx) {
46 for (var i=0; i<whatsNewModel.count; i++) {58 for (var i=0; i<episodesModel.count; i++) {
47 tx.executeSql("UPDATE Episode SET listened=1 WHERE guid=?", [whatsNewModel.get(i).guid]);59 tx.executeSql("UPDATE Episode SET listened=1 WHERE guid=?", [episodesModel.get(i).guid]);
48 }60 }
49 whatsNewModel.clear()61 episodesModel.clear()
50 });62 });
51 }63 }
52 },64 },
@@ -54,17 +66,37 @@
54 Action {66 Action {
55 iconName: "save"67 iconName: "save"
56 text: i18n.tr("Download all")68 text: i18n.tr("Download all")
57 onTriggered: {69 visible: episodesPage.head.sections.selectedIndex === 0
58 var db = Podcasts.init();70 onTriggered: {
59 db.transaction(function (tx) {71 var db = Podcasts.init();
60 for (var i=0; i<whatsNewModel.count; i++) {72 db.transaction(function (tx) {
61 if (!whatsNewModel.get(i).downloadedfile) {73 for (var i=0; i<episodesModel.count; i++) {
62 whatsNewModel.setProperty(i, "queued", 1)74 if (!episodesModel.get(i).downloadedfile) {
63 tx.executeSql("UPDATE Episode SET queued=1 WHERE guid = ?", [whatsNewModel.get(i).guid]);75 episodesModel.setProperty(i, "queued", 1)
64 downloader.addDownload(whatsNewModel.get(i).guid, whatsNewModel.get(i).audiourl);76 tx.executeSql("UPDATE Episode SET queued=1 WHERE guid = ?", [episodesModel.get(i).guid]);
65 }77 downloader.addDownload(episodesModel.get(i).guid, episodesModel.get(i).audiourl);
66 }78 }
67 });79 }
80 });
81 }
82 },
83
84 Action {
85 iconName: "delete"
86 text: i18n.tr("Delete all")
87 visible: episodesPage.head.sections.selectedIndex === 1
88 onTriggered: {
89 var db = Podcasts.init();
90 db.transaction(function (tx) {
91 for (var i=0; i<episodesModel.count; i++) {
92 if (episodesModel.get(i).downloadedfile) {
93 fileManager.deleteFile(episodesModel.get(i).downloadedfile);
94 tx.executeSql("UPDATE Episode SET downloadedfile = NULL WHERE guid = ?", [episodesModel.get(i).guid]);
95 episodesModel.setProperty(i, "downloadedfile", "")
96 }
97 }
98 });
99 refreshModel();
68 }100 }
69 }101 }
70 ]102 ]
@@ -72,19 +104,19 @@
72104
73 PageHeadState {105 PageHeadState {
74 name: "search"106 name: "search"
75 head: whatsNewPage.head107 head: episodesPage.head
76 backAction: Action {108 backAction: Action {
77 iconName: "back"109 iconName: "back"
78 text: i18n.tr("Back")110 text: i18n.tr("Back")
79 onTriggered: {111 onTriggered: {
80 episodeList.forceActiveFocus()112 episodeList.forceActiveFocus()
81 whatsNewPage.state = "default"113 episodesPage.state = "default"
82 }114 }
83 }115 }
84116
85 contents: Loader {117 contents: Loader {
86 id: searchField118 id: searchField
87 sourceComponent: whatsNewPage.state === "search" ? searchFieldComponent : undefined119 sourceComponent: episodesPage.state === "search" ? searchFieldComponent : undefined
88 anchors.left: parent ? parent.left : undefined120 anchors.left: parent ? parent.left : undefined
89 anchors.right: parent ? parent.right : undefined121 anchors.right: parent ? parent.right : undefined
90 anchors.rightMargin: units.gu(2)122 anchors.rightMargin: units.gu(2)
@@ -111,7 +143,7 @@
111 verticalCenterOffset: Qt.inputMethod.visible ? units.gu(4) : 0143 verticalCenterOffset: Qt.inputMethod.visible ? units.gu(4) : 0
112 }144 }
113145
114 sourceComponent: whatsNewModel.count === 0 || sortedEpisodeModel.count === 0 ? emptyStateComponent : undefined146 sourceComponent: episodesModel.count === 0 || sortedEpisodeModel.count === 0 ? emptyStateComponent : undefined
115 }147 }
116148
117 Component {149 Component {
@@ -119,21 +151,21 @@
119 EmptyState {151 EmptyState {
120 iconHeight: units.gu(12)152 iconHeight: units.gu(12)
121 iconWidth: units.gu(22)153 iconWidth: units.gu(22)
122 iconSource: whatsNewModel.count === 0 ? Qt.resolvedUrl("../graphics/owlSearch.svg") : Qt.resolvedUrl("../graphics/notFound.svg")154 iconSource: episodesModel.count === 0 ? Qt.resolvedUrl("../graphics/owlSearch.svg") : Qt.resolvedUrl("../graphics/notFound.svg")
123 title: whatsNewModel.count === 0 ? i18n.tr("No New Episodes") : i18n.tr("No Episodes Found")155 title: episodesModel.count === 0 ? episodesPage.head.sections.selectedIndex === 0 ? i18n.tr("No New Episodes") : i18n.tr("No Downloaded Episodes") : i18n.tr("No Episodes Found")
124 subTitle: whatsNewModel.count === 0 ? i18n.tr("No more episodes to listen to!") : i18n.tr("No Episodes found matching the search term.")156 subTitle: episodesModel.count === 0 ? episodesPage.head.sections.selectedIndex === 0 ? i18n.tr("No more episodes to listen to!") : i18n.tr("No episodes have been downloaded") : i18n.tr("No Episodes found matching the search term.")
125 }157 }
126 }158 }
127159
128 ListModel {160 ListModel {
129 id: whatsNewModel161 id: episodesModel
130 }162 }
131163
132 SortFilterModel {164 SortFilterModel {
133 id: sortedEpisodeModel165 id: sortedEpisodeModel
134 model: whatsNewModel166 model: episodesModel
135 filter.property: "name"167 filter.property: "name"
136 filter.pattern: whatsNewPage.state === "search" && searchField.status == Loader.Ready ? RegExp(searchField.item.text, "gi")168 filter.pattern: episodesPage.state === "search" && searchField.status == Loader.Ready ? RegExp(searchField.item.text, "gi")
137 : RegExp("", "gi")169 : RegExp("", "gi")
138 }170 }
139171
@@ -152,15 +184,15 @@
152 db.transaction(function (tx) {184 db.transaction(function (tx) {
153 /*185 /*
154 If tempGuid is NULL, then the episode currently being downloaded is not found within186 If tempGuid is NULL, then the episode currently being downloaded is not found within
155 this podcast. On the other hand, if it is within this podcast, then update the whatsNewModel187 this podcast. On the other hand, if it is within this podcast, then update the episodesModel
156 with the downloadedfile location we just received from the downloader.188 with the downloadedfile location we just received from the downloader.
157 */189 */
158 if (tempGuid != "NULL") {190 if (tempGuid != "NULL") {
159 var rs2 = tx.executeSql("SELECT downloadedfile FROM Episode WHERE guid=?", [tempGuid]);191 var rs2 = tx.executeSql("SELECT downloadedfile FROM Episode WHERE guid=?", [tempGuid]);
160 for (var i=0; i<whatsNewModel.count; i++) {192 for (var i=0; i<episodesModel.count; i++) {
161 if (whatsNewModel.get(i).guid == tempGuid) {193 if (episodesModel.get(i).guid == tempGuid) {
162 console.log("[LOG]: Setting episode download URL to " + rs2.rows.item(0).downloadedfile)194 console.log("[LOG]: Setting episode download URL to " + rs2.rows.item(0).downloadedfile)
163 whatsNewModel.setProperty(i, "downloadedfile", rs2.rows.item(0).downloadedfile)195 episodesModel.setProperty(i, "downloadedfile", rs2.rows.item(0).downloadedfile)
164 break196 break
165 }197 }
166 }198 }
@@ -192,6 +224,7 @@
192 flickDeceleration = flickDeceleration * scaleFactor;224 flickDeceleration = flickDeceleration * scaleFactor;
193 }225 }
194226
227 clip: true
195 anchors.fill: parent228 anchors.fill: parent
196 model: sortedEpisodeModel229 model: sortedEpisodeModel
197230
@@ -201,7 +234,7 @@
201 section.delegate: Rectangle {234 section.delegate: Rectangle {
202 width: parent.width235 width: parent.width
203 color: "Transparent"236 color: "Transparent"
204 height: header.implicitHeight + units.gu(2)237 height: header.text !== "" ? header.implicitHeight + units.gu(2) : units.gu(0)
205 Label {238 Label {
206 id: header239 id: header
207 anchors {240 anchors {
@@ -222,6 +255,9 @@
222255
223 else if (section === "Older")256 else if (section === "Older")
224 return i18n.tr("Older")257 return i18n.tr("Older")
258
259 else
260 return ""
225 }261 }
226 }262 }
227 }263 }
@@ -262,24 +298,36 @@
262 db.transaction(function (tx) {298 db.transaction(function (tx) {
263 tx.executeSql("UPDATE Episode SET downloadedfile = NULL WHERE guid = ?", [model.guid]);299 tx.executeSql("UPDATE Episode SET downloadedfile = NULL WHERE guid = ?", [model.guid]);
264 });300 });
265 whatsNewModel.setProperty(model.index, "downloadedfile", "")301 episodesModel.setProperty(model.index, "downloadedfile", "")
302 if (episodesPage.head.sections.selectedIndex === 1) {
303 episodesModel.remove(model.index, 1)
304 }
266 } else {305 } else {
267 db.transaction(function (tx) {306 db.transaction(function (tx) {
268 tx.executeSql("UPDATE Episode SET queued=1 WHERE guid = ?", [model.guid]);307 tx.executeSql("UPDATE Episode SET queued=1 WHERE guid = ?", [model.guid]);
269 });308 });
270 whatsNewModel.setProperty(model.index, "queued", 1)309 episodesModel.setProperty(model.index, "queued", 1)
271 downloader.addDownload(model.guid, model.audiourl);310 downloader.addDownload(model.guid, model.audiourl);
272 }311 }
273 }312 }
274 },313 },
275314
276 Action {315 Action {
277 iconName: "select"316 iconName: model.listened ? "view-collapse" : "select"
278 onTriggered: {317 onTriggered: {
279 var db = Podcasts.init();318 var db = Podcasts.init();
280 db.transaction(function (tx) {319 db.transaction(function (tx) {
281 tx.executeSql("UPDATE Episode SET listened=1 WHERE guid=?", [model.guid])320 if (model.listened) {
282 whatsNewModel.remove(model.index, 1)321 tx.executeSql("UPDATE Episode SET listened=0 WHERE guid=?", [model.guid])
322 episodesModel.setProperty(model.index, "listened", 0)
323 }
324 else {
325 tx.executeSql("UPDATE Episode SET listened=1 WHERE guid=?", [model.guid])
326 episodesModel.setProperty(model.index, "listened", 1)
327 if (episodesPage.head.sections.selectedIndex === 0) {
328 episodesModel.remove(model.index, 1)
329 }
330 }
283 });331 });
284 }332 }
285 },333 },
@@ -331,44 +379,70 @@
331 }379 }
332380
333 function refreshModel() {381 function refreshModel() {
334 var today = new Date()382 var i, j, episode
335 var dayToMs = 86400000; //1 * 24 * 60 * 60 * 1000
336 var i, j, episode, diff
337 var todayCount, yesterdayCount
338
339 whatsNewModel.clear()
340 todayCount = 0
341 yesterdayCount = 0
342
343 var db = Podcasts.init()383 var db = Podcasts.init()
344 db.transaction(function (tx) {384
345 var rs = tx.executeSql("SELECT rowid, * FROM Podcast ORDER BY name ASC");385 episodesModel.clear()
346 for (i=0; i < rs.rows.length; i++) {386
347 var podcast = rs.rows.item(i);387 // Episode Model for the what's new view
348 var rs2 = tx.executeSql("SELECT rowid, * FROM Episode WHERE podcast=? ORDER BY published DESC", [rs.rows.item(i).rowid]);388 if (episodesPage.head.sections.selectedIndex === 0) {
349 for (j=0; j < rs2.rows.length; j++) {389 var today = new Date()
350 episode = rs2.rows.item(j)390 var dayToMs = 86400000; //1 * 24 * 60 * 60 * 1000
351 diff = Math.floor((today - episode.published)/dayToMs)391 var todayCount, yesterdayCount, diff
352 if (diff < 7 && !episode.listened) {392
353 if (diff < 1) {393 todayCount = 0
354 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"})394 yesterdayCount = 0
355 todayCount++;395
356 } else if (diff < 2) {396 db.transaction(function (tx) {
357 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"})397 var rs = tx.executeSql("SELECT rowid, * FROM Podcast ORDER BY name ASC");
358 yesterdayCount++;398 for (i=0; i < rs.rows.length; i++) {
359 } else {399 var podcast = rs.rows.item(i);
360 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"})400 var rs2 = tx.executeSql("SELECT rowid, * FROM Episode WHERE podcast=? ORDER BY published DESC", [rs.rows.item(i).rowid]);
361 }401 for (j=0; j < rs2.rows.length; j++) {
362 } else if (diff >= 7){402 episode = rs2.rows.item(j)
363 break403 diff = Math.floor((today - episode.published)/dayToMs)
364 }404 if (diff < 7 && !episode.listened) {
365 }405 if (diff < 1) {
366406 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"})
367 if (podcast.lastupdate === null && !episodesUpdating) {407 todayCount++;
368 updateEpisodesDatabase();408 } else if (diff < 2) {
369 }409 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"})
370 }410 yesterdayCount++;
371 });411 } else {
412 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"})
413 }
414 } else if (diff >= 7){
415 break
416 }
417 }
418
419 if (podcast.lastupdate === null && !episodesUpdating) {
420 updateEpisodesDatabase();
421 }
422 }
423 });
424 }
425
426 // Episode Model for the downloaded view
427 else if (episodesPage.head.sections.selectedIndex === 1) {
428 db.transaction(function (tx) {
429 var rs = tx.executeSql("SELECT rowid, * FROM Podcast ORDER BY name ASC");
430 for (i=0; i < rs.rows.length; i++) {
431 var podcast = rs.rows.item(i);
432 var rs2 = tx.executeSql("SELECT rowid, * FROM Episode WHERE podcast=? ORDER BY published DESC", [rs.rows.item(i).rowid]);
433 for (j=0; j < rs2.rows.length; j++) {
434 episode = rs2.rows.item(j)
435 if (episode.downloadedfile) {
436 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"})
437 }
438 }
439
440 if (podcast.lastupdate === null && !episodesUpdating) {
441 updateEpisodesDatabase();
442 }
443 }
444 });
445 }
372446
373 episodesUpdating = false;447 episodesUpdating = false;
374 }448 }
375449
=== modified file 'app/ui/PodcastsTab.qml'
--- app/ui/PodcastsTab.qml 2015-05-02 08:51:10 +0000
+++ app/ui/PodcastsTab.qml 2015-05-13 11:43:12 +0000
@@ -71,10 +71,10 @@
71 },71 },
7272
73 Action {73 Action {
74 iconName: podbird.settings.showListView ? "view-grid-symbolic" : "view-list-symbolic"74 iconName: "add"
75 text: podbird.settings.showListView ? i18n.tr("Grid View") : i18n.tr("List View")75 text: i18n.tr("Add New Podcasts")
76 onTriggered: {76 onTriggered: {
77 podbird.settings.showListView = !podbird.settings.showListView77 mainStack.push(Qt.resolvedUrl("SearchPage.qml"))
78 }78 }
79 }79 }
80 ]80 ]
8181
=== modified file 'app/ui/SearchPage.qml'
--- app/ui/SearchPage.qml 2015-05-02 08:51:10 +0000
+++ app/ui/SearchPage.qml 2015-05-13 11:43:12 +0000
@@ -46,6 +46,8 @@
46 }46 }
47 }47 }
4848
49 title: i18n.tr("Add New Podcasts")
50
49 state: "default"51 state: "default"
50 states: [52 states: [
51 PageHeadState {53 PageHeadState {
@@ -266,7 +268,7 @@
266 }268 }
267 });269 });
268 }270 }
269 tabs.selectedTabIndex = 1;271 mainStack.pop();
270 }272 }
271 }273 }
272 ]274 ]
@@ -393,7 +395,7 @@
393 Podcasts.subscribe(artist, name, feed, image);395 Podcasts.subscribe(artist, name, feed, image);
394 imageDownloader.feed = feed;396 imageDownloader.feed = feed;
395 imageDownloader.download(image);397 imageDownloader.download(image);
396 tabs.selectedTabIndex = 1;398 mainStack.pop()
397 } else {399 } else {
398 PopupUtils.open(subscribeFailedDialog);400 PopupUtils.open(subscribeFailedDialog);
399 searchPage.state = "add"401 searchPage.state = "add"
400402
=== modified file 'app/ui/SettingsPage.qml'
--- app/ui/SettingsPage.qml 2015-05-12 21:35:11 +0000
+++ app/ui/SettingsPage.qml 2015-05-13 11:43:12 +0000
@@ -105,11 +105,31 @@
105 right: parent.right105 right: parent.right
106 }106 }
107107
108// HeaderListItem {108 HeaderListItem {
109// // TRANSLATORS: Shortened form of "Miscellaneous" which is shown to denote other setting options109 // TRANSLATORS: Shortened form of "Miscellaneous" which is shown to denote other setting options
110// // that doesn't fit into any other category.110 // that doesn't fit into any other category.
111// title: i18n.tr("General Settings")111 title: i18n.tr("General Settings")
112// }112 }
113
114 ListItem {
115 height: control.implicitHeight + units.gu(2)
116 divider.visible: false
117
118 Label {
119 id: contentLabel2
120 anchors { left: parent.left; leftMargin: units.gu(2); right: control2.left; rightMargin: units.gu(1); verticalCenter: parent.verticalCenter }
121 text: i18n.tr("Displays podcasts in a list view")
122 }
123
124 Switch {
125 id: control2
126 anchors { right: parent.right; rightMargin: units.gu(2); verticalCenter: parent.verticalCenter }
127 checked: podbird.settings.showListView
128 onClicked: podbird.settings.showListView = checked
129 }
130
131 onClicked: podbird.settings.showListView = !podbird.settings.showListView
132 }
113133
114// ListItems.SingleValue {134// ListItems.SingleValue {
115// progression: true135// progression: true

Subscribers

People subscribed via source and target branches