Make refreshing a boolean property of GPodderCore
This commit is contained in:
parent
fdaa87df4c
commit
3b53c3c557
2 changed files with 4 additions and 14 deletions
|
@ -27,6 +27,7 @@ Python {
|
||||||
|
|
||||||
property string progname: 'gpodder'
|
property string progname: 'gpodder'
|
||||||
property bool ready: false
|
property bool ready: false
|
||||||
|
property bool refreshing: false
|
||||||
signal downloading(int episode_id)
|
signal downloading(int episode_id)
|
||||||
signal downloadProgress(int episode_id, real progress)
|
signal downloadProgress(int episode_id, real progress)
|
||||||
signal playbackProgress(int episode_id, real progress)
|
signal playbackProgress(int episode_id, real progress)
|
||||||
|
@ -54,6 +55,7 @@ Python {
|
||||||
setHandler('podcast-list-changed', py.podcastListChanged);
|
setHandler('podcast-list-changed', py.podcastListChanged);
|
||||||
setHandler('updating-podcast', py.updatingPodcast);
|
setHandler('updating-podcast', py.updatingPodcast);
|
||||||
setHandler('updated-podcast', py.updatedPodcast);
|
setHandler('updated-podcast', py.updatedPodcast);
|
||||||
|
setHandler('refreshing', function(v) { py.refreshing = v; });
|
||||||
|
|
||||||
var path = Qt.resolvedUrl('../..').substr('file://'.length);
|
var path = Qt.resolvedUrl('../..').substr('file://'.length);
|
||||||
addImportPath(path);
|
addImportPath(path);
|
||||||
|
|
|
@ -110,22 +110,9 @@ SlidePage {
|
||||||
StartPageButton {
|
StartPageButton {
|
||||||
id: freshEpisodesPage
|
id: freshEpisodesPage
|
||||||
|
|
||||||
title: 'Fresh episodes'
|
title: py.refreshing ? 'Refreshing feeds' : 'Fresh episodes'
|
||||||
onClicked: pgst.loadPage('FreshEpisodes.qml');
|
onClicked: pgst.loadPage('FreshEpisodes.qml');
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
py.setHandler('refreshing', function (is_refreshing) {
|
|
||||||
refresherButtonArea.visible = !is_refreshing;
|
|
||||||
if (!is_refreshing) {
|
|
||||||
freshEpisodesPage.title = 'Fresh episodes';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
py.setHandler('refresh-progress', function (pos, total) {
|
|
||||||
freshEpisodesPage.title = 'Refreshing feeds (' + pos + '/' + total + ')';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 50 * pgst.scalef
|
anchors.bottomMargin: 50 * pgst.scalef
|
||||||
|
@ -157,6 +144,7 @@ SlidePage {
|
||||||
|
|
||||||
ButtonArea {
|
ButtonArea {
|
||||||
id: refresherButtonArea
|
id: refresherButtonArea
|
||||||
|
visible: !py.refreshing
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue