From 238cac1eb8ccda081db7594be1970e1adb61222d Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Thu, 6 Feb 2014 23:49:45 +0100 Subject: [PATCH] Use new features of PyOtherSide 1.1.0 --- common/GPodderCore.qml | 13 ++++++++----- main.py | 4 +++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/common/GPodderCore.qml b/common/GPodderCore.qml index 550e77f..f0f63f2 100644 --- a/common/GPodderCore.qml +++ b/common/GPodderCore.qml @@ -40,9 +40,13 @@ Python { signal updatedPodcast(var podcast) Component.onCompleted: { - setHandler('hello', function (version, copyright) { - console.log('gPodder version ' + version + ' starting up'); - console.log('Copyright: ' + copyright); + setHandler('hello', function (version, copyright, date, url) { + console.log('gPodder ' + version + ' (' + date + ')'); + console.log(url); + console.log(copyright); + + console.log('PyOtherSide ' + py.pluginVersion()); + console.log('Python ' + py.pythonVersion()); }); setHandler('downloading', py.downloading); @@ -57,8 +61,7 @@ Python { setHandler('updated-podcast', py.updatedPodcast); setHandler('refreshing', function(v) { py.refreshing = v; }); - var path = Qt.resolvedUrl('../..').substr('file://'.length); - addImportPath(path); + addImportPath(Qt.resolvedUrl('../..')); // Load the Python side of things importModule('main', function() { diff --git a/main.py b/main.py index aa8eba7..75132ac 100644 --- a/main.py +++ b/main.py @@ -294,7 +294,9 @@ class gPotherSide: gpotherside = gPotherSide() pyotherside.atexit(gpotherside.atexit) -pyotherside.send('hello', gpodder.__version__, gpodder.__copyright__) +pyotherside.send('hello', + gpodder.__version__, gpodder.__copyright__, + gpodder.__date__, gpodder.__url__) # Exposed API Endpoints for calls from QML initialize = gpotherside.initialize