Merge lp:~nik90/podbird/reintroduce-add-podcast-tab into lp:podbird/devel
- reintroduce-add-podcast-tab
- Merge into devel
Proposed by
Nekhelesh Ramananthan
Status: | Merged |
---|---|
Merged at revision: | 137 |
Proposed branch: | lp:~nik90/podbird/reintroduce-add-podcast-tab |
Merge into: | lp:podbird/devel |
Diff against target: |
501 lines (+116/-70) 8 files modified
app/components/TabsList.qml (+13/-7) app/podbird.qml (+15/-2) app/settings/CleanSetting.qml (+9/-2) app/settings/DownloadSetting.qml (+9/-2) app/settings/ThemeSetting.qml (+9/-2) app/ui/PodcastsTab.qml (+0/-7) app/ui/SearchPage.qml (+11/-2) po/podbird.nik90.pot (+50/-46) |
To merge this branch: | bzr merge lp:~nik90/podbird/reintroduce-add-podcast-tab |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Podbird Developers | Pending | ||
Review via email: mp+289350@code.launchpad.net |
Commit message
Description of the change
- Re-added "Add New Podcasts" tab as requested by mike.
- Migrated individual settings page to PageHeader
- More reliable tab checking by checking its id rather than selectedIndex which can change in the future.
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-05 16:54:12 +0000 |
3 | +++ app/components/TabsList.qml 2016-03-17 11:41:32 +0000 |
4 | @@ -22,30 +22,36 @@ |
5 | ActionList { |
6 | id: tabsList |
7 | |
8 | - property int currentTab: tabs.selectedTabIndex |
9 | - |
10 | children: [ |
11 | Action { |
12 | text: i18n.tr("Episodes") |
13 | - visible: currentTab !== 0 |
14 | + visible: tabs.selectedTab !== episodesTab |
15 | onTriggered: { |
16 | tabs.selectedTabIndex = 0 |
17 | } |
18 | }, |
19 | |
20 | Action { |
21 | + text: i18n.tr("Add New Podcasts") |
22 | + visible: tabs.selectedTab !== searchTab |
23 | + onTriggered: { |
24 | + tabs.selectedTabIndex = 1 |
25 | + } |
26 | + }, |
27 | + |
28 | + Action { |
29 | text: i18n.tr("Podcasts") |
30 | - visible: currentTab !== 1 |
31 | + visible: tabs.selectedTab !== podcastTab |
32 | onTriggered: { |
33 | - tabs.selectedTabIndex = 1 |
34 | + tabs.selectedTabIndex = 2 |
35 | } |
36 | }, |
37 | |
38 | Action { |
39 | text: i18n.tr("Settings") |
40 | - visible: currentTab !== 2 |
41 | + visible: tabs.selectedTab !== settingsTab |
42 | onTriggered: { |
43 | - tabs.selectedTabIndex = 2 |
44 | + tabs.selectedTabIndex = 3 |
45 | } |
46 | } |
47 | ] |
48 | |
49 | === modified file 'app/podbird.qml' |
50 | --- app/podbird.qml 2016-03-16 15:30:47 +0000 |
51 | +++ app/podbird.qml 2016-03-17 11:41:32 +0000 |
52 | @@ -54,9 +54,9 @@ |
53 | // RefreshModel function to call refreshModel() function of the tab currently |
54 | // visible on application start. |
55 | function refreshModels() { |
56 | - if (tabs.selectedTabIndex === 0) { |
57 | + if (tabs.selectedTab === episodesTab) { |
58 | episodesTab.refreshModel() |
59 | - } else if (tabs.selectedTabIndex === 1) { |
60 | + } else if (tabs.selectedTab === podcastTab) { |
61 | podcastPage.item.refreshModel() |
62 | } |
63 | } |
64 | @@ -323,6 +323,19 @@ |
65 | } |
66 | |
67 | Tab { |
68 | + id: searchTab |
69 | + |
70 | + // Dynamically load/unload the search tab as required |
71 | + page: Loader { |
72 | + parent: searchTab |
73 | + anchors.left: parent.left |
74 | + anchors.right: parent.right |
75 | + anchors.bottom: parent.bottom |
76 | + source: (tabs.selectedTab === searchTab) ? Qt.resolvedUrl("ui/SearchPage.qml") : "" |
77 | + } |
78 | + } |
79 | + |
80 | + Tab { |
81 | id: podcastTab |
82 | |
83 | page: Loader { |
84 | |
85 | === modified file 'app/settings/CleanSetting.qml' |
86 | --- app/settings/CleanSetting.qml 2016-03-04 10:40:54 +0000 |
87 | +++ app/settings/CleanSetting.qml 2016-03-17 11:41:32 +0000 |
88 | @@ -24,7 +24,14 @@ |
89 | id: cleanSettingPage |
90 | |
91 | visible: false |
92 | - title: i18n.tr("Delete older than") |
93 | + |
94 | + header: PageHeader { |
95 | + title: i18n.tr("Delete older than") |
96 | + flickable: cleanup |
97 | + StyleHints { |
98 | + backgroundColor: podbird.appTheme.background |
99 | + } |
100 | + } |
101 | |
102 | ListModel { |
103 | id: cleanupModel |
104 | @@ -39,7 +46,7 @@ |
105 | } |
106 | } |
107 | |
108 | - UbuntuListView { |
109 | + ListView { |
110 | id: cleanup |
111 | |
112 | currentIndex: -1 |
113 | |
114 | === modified file 'app/settings/DownloadSetting.qml' |
115 | --- app/settings/DownloadSetting.qml 2016-03-04 10:40:54 +0000 |
116 | +++ app/settings/DownloadSetting.qml 2016-03-17 11:41:32 +0000 |
117 | @@ -24,7 +24,14 @@ |
118 | id: downloadSetting |
119 | |
120 | visible: false |
121 | - title: i18n.tr("Download at most") |
122 | + |
123 | + header: PageHeader { |
124 | + title: i18n.tr("Download at most") |
125 | + flickable: download |
126 | + StyleHints { |
127 | + backgroundColor: podbird.appTheme.background |
128 | + } |
129 | + } |
130 | |
131 | ListModel { |
132 | id: episodeDownloadNumber |
133 | @@ -38,7 +45,7 @@ |
134 | } |
135 | } |
136 | |
137 | - UbuntuListView { |
138 | + ListView { |
139 | id: download |
140 | |
141 | currentIndex: -1 |
142 | |
143 | === modified file 'app/settings/ThemeSetting.qml' |
144 | --- app/settings/ThemeSetting.qml 2016-03-04 10:40:54 +0000 |
145 | +++ app/settings/ThemeSetting.qml 2016-03-17 11:41:32 +0000 |
146 | @@ -24,7 +24,14 @@ |
147 | id: themeSettingPage |
148 | |
149 | visible: false |
150 | - title: i18n.tr("Theme") |
151 | + |
152 | + header: PageHeader { |
153 | + title: i18n.tr("Theme") |
154 | + flickable: themes |
155 | + StyleHints { |
156 | + backgroundColor: podbird.appTheme.background |
157 | + } |
158 | + } |
159 | |
160 | ListModel { |
161 | id: themeModel |
162 | @@ -37,7 +44,7 @@ |
163 | } |
164 | } |
165 | |
166 | - UbuntuListView { |
167 | + ListView { |
168 | id: themes |
169 | |
170 | currentIndex: -1 |
171 | |
172 | === modified file 'app/ui/PodcastsTab.qml' |
173 | --- app/ui/PodcastsTab.qml 2016-03-16 11:54:59 +0000 |
174 | +++ app/ui/PodcastsTab.qml 2016-03-17 11:41:32 +0000 |
175 | @@ -59,13 +59,6 @@ |
176 | podcastPage.header = searchHeader |
177 | searchField.item.forceActiveFocus() |
178 | } |
179 | - }, |
180 | - Action { |
181 | - iconName: "add" |
182 | - text: i18n.tr("Add New Podcasts") |
183 | - onTriggered: { |
184 | - mainStack.push(Qt.resolvedUrl("SearchPage.qml")) |
185 | - } |
186 | } |
187 | ] |
188 | } |
189 | |
190 | === modified file 'app/ui/SearchPage.qml' |
191 | --- app/ui/SearchPage.qml 2016-03-05 16:54:12 +0000 |
192 | +++ app/ui/SearchPage.qml 2016-03-17 11:41:32 +0000 |
193 | @@ -28,6 +28,10 @@ |
194 | |
195 | property var xhr: new XMLHttpRequest; |
196 | |
197 | + TabsList { |
198 | + id: tabsList |
199 | + } |
200 | + |
201 | header: standardHeader |
202 | |
203 | PageHeader { |
204 | @@ -40,6 +44,11 @@ |
205 | backgroundColor: podbird.appTheme.background |
206 | } |
207 | |
208 | + leadingActionBar { |
209 | + numberOfSlots: 0 |
210 | + actions: tabsList.actions |
211 | + } |
212 | + |
213 | trailingActionBar.actions: [ |
214 | Action { |
215 | iconName: "search" |
216 | @@ -284,7 +293,7 @@ |
217 | } |
218 | }); |
219 | } |
220 | - mainStack.pop(); |
221 | + tabs.selectedTabIndex = 2; |
222 | } |
223 | } |
224 | } |
225 | @@ -433,7 +442,7 @@ |
226 | Podcasts.subscribe(artist, name, feed, image); |
227 | imageDownloader.feed = feed; |
228 | imageDownloader.download(image); |
229 | - mainStack.pop(); |
230 | + tabs.selectedTabIndex = 2; |
231 | } else { |
232 | PopupUtils.open(subscribeFailedDialog); |
233 | searchPage.header = addHeader |
234 | |
235 | === modified file 'po/podbird.nik90.pot' |
236 | --- po/podbird.nik90.pot 2016-03-17 00:37:17 +0000 |
237 | +++ po/podbird.nik90.pot 2016-03-17 11:41:32 +0000 |
238 | @@ -8,7 +8,7 @@ |
239 | msgstr "" |
240 | "Project-Id-Version: \n" |
241 | "Report-Msgid-Bugs-To: \n" |
242 | -"POT-Creation-Date: 2016-03-17 06:04+0530\n" |
243 | +"POT-Creation-Date: 2016-03-17 07:43+0530\n" |
244 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
245 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
246 | "Language-Team: LANGUAGE <LL@li.org>\n" |
247 | @@ -18,15 +18,19 @@ |
248 | "Content-Transfer-Encoding: 8bit\n" |
249 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
250 | |
251 | -#: ../app/components/TabsList.qml:29 ../app/ui/EpisodesTab.qml:48 |
252 | +#: ../app/components/TabsList.qml:27 ../app/ui/EpisodesTab.qml:48 |
253 | msgid "Episodes" |
254 | msgstr "" |
255 | |
256 | -#: ../app/components/TabsList.qml:37 ../app/ui/PodcastsTab.qml:42 |
257 | +#: ../app/components/TabsList.qml:35 |
258 | +msgid "Add new podcast" |
259 | +msgstr "" |
260 | + |
261 | +#: ../app/components/TabsList.qml:43 ../app/ui/PodcastsTab.qml:42 |
262 | msgid "Podcasts" |
263 | msgstr "" |
264 | |
265 | -#: ../app/components/TabsList.qml:45 ../app/ui/SettingsPage.qml:32 |
266 | +#: ../app/components/TabsList.qml:51 ../app/ui/SettingsPage.qml:32 |
267 | msgid "Settings" |
268 | msgstr "" |
269 | |
270 | @@ -74,30 +78,30 @@ |
271 | msgid "Source code available on %1" |
272 | msgstr "" |
273 | |
274 | -#: ../app/settings/CleanSetting.qml:27 |
275 | +#: ../app/settings/CleanSetting.qml:29 |
276 | msgid "Delete older than" |
277 | msgstr "" |
278 | |
279 | -#: ../app/settings/CleanSetting.qml:33 ../app/settings/DownloadSetting.qml:33 |
280 | +#: ../app/settings/CleanSetting.qml:40 ../app/settings/DownloadSetting.qml:40 |
281 | msgid "Never" |
282 | msgstr "" |
283 | |
284 | -#: ../app/settings/CleanSetting.qml:34 |
285 | +#: ../app/settings/CleanSetting.qml:41 |
286 | #, qt-format |
287 | msgid "%1 day" |
288 | msgid_plural "%1 days" |
289 | msgstr[0] "" |
290 | msgstr[1] "" |
291 | |
292 | -#: ../app/settings/CleanSetting.qml:35 ../app/settings/CleanSetting.qml:36 |
293 | -#: ../app/settings/CleanSetting.qml:37 |
294 | +#: ../app/settings/CleanSetting.qml:42 ../app/settings/CleanSetting.qml:43 |
295 | +#: ../app/settings/CleanSetting.qml:44 |
296 | #, qt-format |
297 | msgid "%1 month" |
298 | msgid_plural "%1 months" |
299 | msgstr[0] "" |
300 | msgstr[1] "" |
301 | |
302 | -#: ../app/settings/CleanSetting.qml:38 |
303 | +#: ../app/settings/CleanSetting.qml:45 |
304 | #, qt-format |
305 | msgid "%1 year" |
306 | msgid_plural "%1 years" |
307 | @@ -122,31 +126,31 @@ |
308 | msgid "Translators" |
309 | msgstr "" |
310 | |
311 | -#: ../app/settings/DownloadSetting.qml:27 |
312 | +#: ../app/settings/DownloadSetting.qml:29 |
313 | msgid "Download at most" |
314 | msgstr "" |
315 | |
316 | -#: ../app/settings/DownloadSetting.qml:34 |
317 | -#: ../app/settings/DownloadSetting.qml:35 |
318 | -#: ../app/settings/DownloadSetting.qml:36 |
319 | -#: ../app/settings/DownloadSetting.qml:37 |
320 | +#: ../app/settings/DownloadSetting.qml:41 |
321 | +#: ../app/settings/DownloadSetting.qml:42 |
322 | +#: ../app/settings/DownloadSetting.qml:43 |
323 | +#: ../app/settings/DownloadSetting.qml:44 |
324 | #, qt-format |
325 | msgid "%1 episode" |
326 | msgid_plural "%1 episodes" |
327 | msgstr[0] "" |
328 | msgstr[1] "" |
329 | |
330 | -#: ../app/settings/ThemeSetting.qml:27 ../app/ui/SettingsPage.qml:144 |
331 | +#: ../app/settings/ThemeSetting.qml:29 ../app/ui/SettingsPage.qml:144 |
332 | msgid "Theme" |
333 | msgstr "" |
334 | |
335 | #. TRANSLATORS: Light Theme |
336 | -#: ../app/settings/ThemeSetting.qml:34 ../app/ui/SettingsPage.qml:145 |
337 | +#: ../app/settings/ThemeSetting.qml:41 ../app/ui/SettingsPage.qml:145 |
338 | msgid "Light" |
339 | msgstr "" |
340 | |
341 | #. TRANSLATORS: Dark Theme |
342 | -#: ../app/settings/ThemeSetting.qml:36 ../app/ui/SettingsPage.qml:145 |
343 | +#: ../app/settings/ThemeSetting.qml:43 ../app/ui/SettingsPage.qml:145 |
344 | msgid "Dark" |
345 | msgstr "" |
346 | |
347 | @@ -163,7 +167,7 @@ |
348 | msgstr "" |
349 | |
350 | #: ../app/ui/EpisodesPage.qml:93 ../app/ui/EpisodesPage.qml:184 |
351 | -#: ../app/ui/SearchPage.qml:266 |
352 | +#: ../app/ui/SearchPage.qml:275 |
353 | msgid "Unsubscribe" |
354 | msgstr "" |
355 | |
356 | @@ -180,7 +184,7 @@ |
357 | msgid "Are you sure you want to unsubscribe from <b>%1</b>?" |
358 | msgstr "" |
359 | |
360 | -#: ../app/ui/EpisodesPage.qml:201 ../app/ui/SearchPage.qml:121 |
361 | +#: ../app/ui/EpisodesPage.qml:201 ../app/ui/SearchPage.qml:130 |
362 | #: ../app/ui/SettingsPage.qml:83 ../app/ui/SettingsPage.qml:118 |
363 | msgid "Cancel" |
364 | msgstr "" |
365 | @@ -190,7 +194,7 @@ |
366 | msgstr "" |
367 | |
368 | #: ../app/ui/EpisodesPage.qml:235 ../app/ui/EpisodesTab.qml:417 |
369 | -#: ../app/ui/SearchPage.qml:170 |
370 | +#: ../app/ui/SearchPage.qml:179 |
371 | msgid "Close" |
372 | msgstr "" |
373 | |
374 | @@ -330,91 +334,91 @@ |
375 | msgid "Queue" |
376 | msgstr "" |
377 | |
378 | -#: ../app/ui/PodcastsTab.qml:57 ../app/ui/SearchPage.qml:46 |
379 | -#: ../app/ui/SearchPage.qml:152 |
380 | +#: ../app/ui/PodcastsTab.qml:57 ../app/ui/SearchPage.qml:55 |
381 | +#: ../app/ui/SearchPage.qml:161 |
382 | msgid "Search Podcast" |
383 | msgstr "" |
384 | |
385 | -#: ../app/ui/PodcastsTab.qml:65 ../app/ui/SearchPage.qml:37 |
386 | -msgid "Add New Podcasts" |
387 | -msgstr "" |
388 | - |
389 | -#: ../app/ui/PodcastsTab.qml:104 |
390 | +#: ../app/ui/PodcastsTab.qml:97 |
391 | msgid "Search podcast" |
392 | msgstr "" |
393 | |
394 | -#: ../app/ui/PodcastsTab.qml:134 |
395 | +#: ../app/ui/PodcastsTab.qml:127 |
396 | msgid "No Podcast Subscriptions" |
397 | msgstr "" |
398 | |
399 | -#: ../app/ui/PodcastsTab.qml:134 |
400 | +#: ../app/ui/PodcastsTab.qml:127 |
401 | msgid "No Podcasts Found" |
402 | msgstr "" |
403 | |
404 | -#: ../app/ui/PodcastsTab.qml:135 |
405 | +#: ../app/ui/PodcastsTab.qml:128 |
406 | msgid "" |
407 | "You haven't subscribed to any podcasts yet, visit the 'Find New Podcasts' " |
408 | "page to add some." |
409 | msgstr "" |
410 | |
411 | -#: ../app/ui/PodcastsTab.qml:136 ../app/ui/SearchPage.qml:200 |
412 | +#: ../app/ui/PodcastsTab.qml:129 ../app/ui/SearchPage.qml:209 |
413 | msgid "No podcasts found matching the search term." |
414 | msgstr "" |
415 | |
416 | -#: ../app/ui/PodcastsTab.qml:222 |
417 | +#: ../app/ui/PodcastsTab.qml:215 |
418 | #, qt-format |
419 | msgid "%1 unheard episode" |
420 | msgid_plural "%1 unheard episodes" |
421 | msgstr[0] "" |
422 | msgstr[1] "" |
423 | |
424 | -#: ../app/ui/SearchPage.qml:54 |
425 | +#: ../app/ui/SearchPage.qml:41 |
426 | +msgid "Add New Podcasts" |
427 | +msgstr "" |
428 | + |
429 | +#: ../app/ui/SearchPage.qml:63 |
430 | msgid "Add Podcast" |
431 | msgstr "" |
432 | |
433 | -#: ../app/ui/SearchPage.qml:113 |
434 | +#: ../app/ui/SearchPage.qml:122 |
435 | msgid "Save Podcast" |
436 | msgstr "" |
437 | |
438 | -#: ../app/ui/SearchPage.qml:140 |
439 | +#: ../app/ui/SearchPage.qml:149 |
440 | msgid "Feed URL" |
441 | msgstr "" |
442 | |
443 | -#: ../app/ui/SearchPage.qml:167 |
444 | +#: ../app/ui/SearchPage.qml:176 |
445 | msgid "Unable to subscribe" |
446 | msgstr "" |
447 | |
448 | -#: ../app/ui/SearchPage.qml:168 |
449 | +#: ../app/ui/SearchPage.qml:177 |
450 | msgid "Please check the URL and try again" |
451 | msgstr "" |
452 | |
453 | -#: ../app/ui/SearchPage.qml:198 |
454 | +#: ../app/ui/SearchPage.qml:207 |
455 | msgid "Looking to add a new Podcast?" |
456 | msgstr "" |
457 | |
458 | -#: ../app/ui/SearchPage.qml:198 |
459 | +#: ../app/ui/SearchPage.qml:207 |
460 | msgid "No Podcasts found" |
461 | msgstr "" |
462 | |
463 | -#: ../app/ui/SearchPage.qml:199 |
464 | +#: ../app/ui/SearchPage.qml:208 |
465 | msgid "" |
466 | "Click the 'magnifier' at the top to search or the 'plus' button to add by URL" |
467 | msgstr "" |
468 | |
469 | -#: ../app/ui/SearchPage.qml:266 |
470 | +#: ../app/ui/SearchPage.qml:275 |
471 | msgid "Subscribe" |
472 | msgstr "" |
473 | |
474 | #. TRANSLATORS: The first argument here is the date of when the podcast was last updated followed by |
475 | #. the podcast description. |
476 | -#: ../app/ui/SearchPage.qml:305 |
477 | +#: ../app/ui/SearchPage.qml:314 |
478 | #, qt-format |
479 | msgid "" |
480 | "Last Updated: %1\n" |
481 | "%2" |
482 | msgstr "" |
483 | |
484 | -#: ../app/ui/SearchPage.qml:362 |
485 | +#: ../app/ui/SearchPage.qml:371 |
486 | msgid "Not Available" |
487 | msgstr "" |
488 | |
489 | @@ -565,10 +569,10 @@ |
490 | msgid "Finish" |
491 | msgstr "" |
492 | |
493 | -#: /home/krnekhelesh/Development/rearrange-queue-build/po/Podbird.desktop.in.h:1 |
494 | +#: /home/krnekhelesh/Development/reintroduce-add-podcast-tab-build/po/Podbird.desktop.in.h:1 |
495 | msgid "The chirpiest podcast manager for Ubuntu" |
496 | msgstr "" |
497 | |
498 | -#: /home/krnekhelesh/Development/rearrange-queue-build/po/Podbird.desktop.in.h:2 |
499 | +#: /home/krnekhelesh/Development/reintroduce-add-podcast-tab-build/po/Podbird.desktop.in.h:2 |
500 | msgid "podcast;audio;itunes;broadcast;digital;stream;podcatcher;video;vodcast;" |
501 | msgstr "" |