From: Yves Marcoz Date: Tue, 24 Jan 2012 06:22:46 +0000 (-0800) Subject: psa: Removed some debug messages. X-Git-Url: https://vcs.maemo.org/git/?p=feedingit;a=commitdiff_plain;h=e9b6d97afa02e67a6aae080e6820685d0a513af3 psa: Removed some debug messages. Added link to Automatic update settings --- diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/changelog b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/changelog index f42025d..385afb9 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/changelog +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/changelog @@ -2,4 +2,4 @@ feedingit (0.1.0-1) unstable; urgency=low * source package automatically created by stdeb 0.6.0+git - -- Slocan Sun, 15 Jan 2012 12:25:53 -0800 + -- Slocan Mon, 23 Jan 2012 22:11:44 -0800 diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/md5sums b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/md5sums index 5156b63..89e558e 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/md5sums +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/md5sums @@ -1,14 +1,14 @@ ab6be1fce6e02f7f10857cd79755bf18 usr/bin/feedingit 1af83cdf3d338e6460a92c00537c375b usr/share/applications/feedingit.desktop eda8cc6ffe8d842d6dfe0244b01b3042 usr/share/dbus-1/services/feedingit_status.service -eda7952eb2c876abd07aae9a579d4a56 usr/share/doc/feedingit/changelog.Debian.gz +696cb64a1b4ee2b9b40fa1ef3b194b07 usr/share/doc/feedingit/changelog.Debian.gz bac2be6ae9673ee5096e20e8b714c9cd usr/share/feedingit/BeautifulSoup.py 8f6e980f2e1154103a90763be6c00dc4 usr/share/feedingit/XmlHandler.py d41d8cd98f00b204e9800998ecf8427e usr/share/feedingit/__init__.py 25d2c59c4c9db6aad90fa47da2d01ece usr/share/feedingit/config.py b4b00de5dccaf56d81a9dab1eeac63e1 usr/share/feedingit/debugging.py fae02e730b76761d43a626fe19828d5e usr/share/feedingit/download.py -bb86ed085c33da65acdb3b167bd74638 usr/share/feedingit/feedingit.py +37d8876ac21f4f71669e5fed3721176a usr/share/feedingit/feedingit.py afa4f462892136f59beaf96b6bf1cf96 usr/share/feedingit/feedparser.py c1a0c0a9ccefd64d1e27bddb817c72a3 usr/share/feedingit/httpprogresshandler.py f1e9ba0f44786f513659a7fa3111fc8a usr/share/feedingit/jobmanager.py @@ -19,14 +19,14 @@ d9c0665dfdd5cf19f1529ce88af95134 usr/share/feedingit/opml.py 538dac5d47b6d46b428d71b8c579e419 usr/share/feedingit/qml/ArticleDelegate.qml 1fcfdf2c75b378a46a4cd23bca5f7e4c usr/share/feedingit/qml/ArticleDisplay.qml 928fce93c7b4ce85f4e09862fb2018c2 usr/share/feedingit/qml/ArticleViewer.qml -adc4f778fd3dcd70f1bc4c671ce92b0a usr/share/feedingit/qml/Articles.qml +3da7c080032ca8fd3ca25b3c5764afa6 usr/share/feedingit/qml/Articles.qml 77bf6a1d2d0f265ee16c492886f96ede usr/share/feedingit/qml/AutomaticUpdate.qml bd7579a3d822222caca98684212c4f42 usr/share/feedingit/qml/Categories.qml cd30f5eaec0885358261d7a96bfaf8cd usr/share/feedingit/qml/FeedingIt.qml afdb98e07e8b5e066e745a5df9de09b9 usr/share/feedingit/qml/Feeds.qml bec5fe4599a3ad5799ed96d7ed81fb5f usr/share/feedingit/qml/MainPage.qml 75b9275e76eb840e21199592e329feb7 usr/share/feedingit/qml/Settings.qml -07b5e6c5629b43d2b20250dbb7069909 usr/share/feedingit/qml/SettingsPage.qml +72e49362fba22b639464a538070efcae usr/share/feedingit/qml/SettingsPage.qml ae761587ba98f662cfbe91ae9e23ff93 usr/share/feedingit/qml/SliderSetting.qml 8c3766da8556e32346f50795e7421a8e usr/share/feedingit/qml/SwitchSetting.qml aa3fc0a4edbd17d93a9dc5c39c433c3d usr/share/feedingit/qml/TestWebview.qml @@ -64,7 +64,7 @@ af11b73b195513d08c17723b41db0b04 usr/share/feedingit/qml/common/images/wmBackIc 7790a99425dd7c1046e6ae3b1ee72a03 usr/share/feedingit/qml/i18n/qml_en.qm 1674fcce45bcf3319e61d19a9adf4fdd usr/share/feedingit/qml/i18n/qml_en.ts 17f4f1f51d356494f17139abd703df42 usr/share/feedingit/qml/main.qml -aa4ee5956cc3e4f41137c558b04908ef usr/share/feedingit/rss_sqlite.py +786a2729020764f64d885a43b29070bc usr/share/feedingit/rss_sqlite.py 6e88950ff9c416c362c6ca17cf4317f7 usr/share/feedingit/splash.jpg 721777a26cd2a5b8466ce2aa2b99fad7 usr/share/feedingit/update_feeds.py 6ccf12dc4379e91800ae8505b2e86082 usr/share/feedingit/updatedbus.py diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/doc/feedingit/changelog.Debian.gz b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/doc/feedingit/changelog.Debian.gz index 4f9d7f2..5f0abb0 100644 Binary files a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/doc/feedingit/changelog.Debian.gz and b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/doc/feedingit/changelog.Debian.gz differ diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/feedingit.py b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/feedingit.py index 9d70a3c..a951ec9 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/feedingit.py +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/feedingit.py @@ -31,6 +31,7 @@ from cgi import escape from re import sub class Controller(QtCore.QObject): + cachedList = None def __init__(self, listing): QtCore.QObject.__init__(self) @@ -70,18 +71,30 @@ class Controller(QtCore.QObject): @QtCore.Slot(str,result=str) def getArticlesXml(self, key): + feed = listing.getFeed(key) + self.cachedList = feed.getIds(onlyUnread=True) #onlyUnread = arguments.get("onlyUnread","False") return self._handler.generateArticlesXml(key, config.getHideReadArticles()) - @QtCore.Slot(str,str,result=str) - def getNextId(self, key, articleid): - feed = listing.getFeed(key) - return feed.getNextId(articleid) + @QtCore.Slot(str,str,bool,result=str) + def getNextId(self, key, articleid, onlyUnread): + if (onlyUnread): + print self.cachedList, articleid + index = self.cachedList.index(articleid) + return self.cachedList[(index + 1) % len(self.cachedList)] + else: + feed = listing.getFeed(key) + return feed.getNextId(articleid) - @QtCore.Slot(str,str,result=str) - def getPreviousId(self, key, articleid): - feed = listing.getFeed(key) - return feed.getPreviousId(articleid) + @QtCore.Slot(str,str,bool,result=str) + def getPreviousId(self, key, articleid, onlyUnread): + if (onlyUnread): + print self.cachedList, articleid + index = self.cachedList.index(articleid) + return self.cachedList[(index - 1) % len(self.cachedList)] + else: + feed = listing.getFeed(key) + return feed.getPreviousId(articleid) @QtCore.Slot(result=str) def getCategoryXml(self): @@ -221,6 +234,13 @@ class Controller(QtCore.QObject): elif (setting == "fontSize" ): config.setFontSize(value) config.saveConfig() + + @QtCore.Slot(str, str) + def openSettings(self): + bus = dbus.SessionBus() + settingService = bus.get_object('com.nokia.DuiControlPanel', '/') + setting = shareService.get_dbus_method('appletPage', 'com.nokia.DuiControlPanelIf') + setting("feedingitsync") @QtCore.Slot(str, str) def share(self, key, articleid): diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Articles.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Articles.qml index 91248f0..25ec145 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Articles.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Articles.qml @@ -27,6 +27,14 @@ Item { } } + function setNextId() { + articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId, settings.hideReadArticles) + } + + function setPreviousId() { + articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId, settings.hideReadArticles) + } + Component.onCompleted: { webViewFront.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); } @@ -42,10 +50,11 @@ Item { //contentWidth: childrenRect.width; contentHeight: childrenRect.height //interactive: parent.vertPanningEnabled; - flickDeceleration: 2500; + flickDeceleration: 5000; //flickableDirection: Flickable.VerticalFlick property bool contentIsReady: false + property bool isSwitchable: false Rectangle { id: boundsRecFront color: "white" @@ -68,11 +77,10 @@ Item { controller.setEntryRead(articlePage.feedid, articlePage.mainArticleId) //flickable.width/2 flickableFront.contentIsReady = true + switchableTimer.start() } - } - } state: "visible" @@ -92,21 +100,40 @@ Item { transitions: [ Transition { from: "visible"; - PropertyAnimation { target: flickableFront - easing.type: Easing.InOutSine - properties: "x"; duration: 1000 } + SequentialAnimation { + ScriptAction { script: flickableFront.isSwitchable=false; } + PropertyAnimation { target: flickableFront + easing.type: Easing.InOutSine + properties: "x"; duration: 1000 } + ScriptAction { script: flickableFront.isSwitchable=true; } + } }, Transition { to: "visible"; - PropertyAnimation { target: flickableFront - easing.type: Easing.InOutSine - properties: "x"; duration: 1000 } + SequentialAnimation { + ScriptAction { script: flickableFront.isSwitchable=false; } + PropertyAnimation { target: flickableFront + easing.type: Easing.InOutSine + properties: "x"; duration: 1000 } + ScriptAction { script: flickableFront.isSwitchable=true; } + } } + ] + Timer { + // Disable animations/page shifting for 400ms, to give time to the page to setup properly + id: switchableTimer + interval: 400 + running: false + repeat: false + onTriggered: flickableFront.isSwitchable=true; + } + function moveFromLeft() { flickableFront.contentIsReady = false - articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId) + setPreviousId() + //articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId) webViewFront.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); state = "toLeft" state = "visible" @@ -115,7 +142,8 @@ Item { function moveFromRight() { flickableFront.contentIsReady = false - articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId) + setNextId() + //articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId) webViewFront.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); state = "toRight" state = "visible" @@ -128,21 +156,26 @@ Item { NumberAnimation { duration: 200 } } onMovingHorizontallyChanged: { - if (!movingHorizontally && (!atXBeginning || !atXEnd)) { - flickableFront.contentX = buffer //flickable.width/2 + if (flickableFront.isSwitchable) { + if (!movingHorizontally && (!atXBeginning || !atXEnd)) { + flickableFront.contentX = buffer //flickable.width/2 + } } } onAtXBeginningChanged: { - if (atXBeginning && contentIsReady) { - flickableBack.moveFromLeft() + if (flickableFront.isSwitchable) { + if (atXBeginning && contentIsReady) { + flickableBack.moveFromLeft() + } } } onAtXEndChanged: { - if (atXEnd && contentIsReady) { - //console.log("next") - flickableBack.moveFromRight() + if (flickableFront.isSwitchable) { + if (atXEnd && contentIsReady) { + flickableBack.moveFromRight() + } } } @@ -161,10 +194,11 @@ Item { //contentWidth: childrenRect.width; contentHeight: childrenRect.height //interactive: parent.vertPanningEnabled; - flickDeceleration: 2500; + flickDeceleration: 5000; //flickableDirection: Flickable.VerticalFlick property bool contentIsReady: false + property bool isSwitchable: false Rectangle { id: boundsRecBack color: "white" @@ -208,21 +242,30 @@ Item { transitions: [ Transition { from: "visible"; - PropertyAnimation { target: flickableBack - easing.type: Easing.InOutSine - properties: "x"; duration: 1000 } + SequentialAnimation { + ScriptAction { script: flickableBack.isSwitchable=false; } + PropertyAnimation { target: flickableBack + easing.type: Easing.InOutSine + properties: "x"; duration: 1000 } + ScriptAction { script: flickableBack.isSwitchable=true; } + } }, Transition { to: "visible"; - PropertyAnimation { target: flickableBack - easing.type: Easing.InOutSine - properties: "x"; duration: 1000 } + SequentialAnimation { + ScriptAction { script: flickableBack.isSwitchable=false; } + PropertyAnimation { target: flickableBack + easing.type: Easing.InOutSine + properties: "x"; duration: 1000 } + ScriptAction { script: flickableBack.isSwitchable=true; } + } } ] function moveFromLeft() { flickableBack.contentIsReady = false - articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId) + setPreviousId() + //articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId) webViewBack.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); state = "toLeft" state = "visible" @@ -231,7 +274,8 @@ Item { function moveFromRight() { flickableBack.contentIsReady = false - articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId) + setNextId() + //articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId) webViewBack.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); state = "toRight" state = "visible" @@ -245,20 +289,26 @@ Item { } onMovingHorizontallyChanged: { - if (!movingHorizontally && (!atXBeginning || !atXEnd)) { - flickableBack.contentX = buffer //flickable.width/2 + if (flickableBack.isSwitchable) { + if (!movingHorizontally && (!atXBeginning || !atXEnd)) { + flickableBack.contentX = buffer //flickable.width/2 + } } } onAtXBeginningChanged: { - if (atXBeginning && contentIsReady) { - flickableFront.moveFromLeft() + if (flickableBack.isSwitchable) { + if (atXBeginning && contentIsReady) { + flickableFront.moveFromLeft() + } } } onAtXEndChanged: { - if (atXEnd && contentIsReady) { - flickableFront.moveFromRight() + if (flickableBack.isSwitchable) { + if (atXEnd && contentIsReady) { + flickableFront.moveFromRight() + } } } } diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/rss_sqlite.py b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/rss_sqlite.py index ff0fcba..2fda0f5 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/rss_sqlite.py +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/rss_sqlite.py @@ -374,7 +374,8 @@ class Feed(BaseObject): def wc_success(): try: - wc().stream_register (self.key, "", 6 * 60 * 60) + if wc().available: + wc().stream_register (self.key, "", 6 * 60 * 60) except woodchuck.ObjectExistsError: pass try: diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/rules b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/rules index e51a5b1..eed2963 100755 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/rules +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # This file was automatically generated by stdeb 0.6.0+git at -# Sun, 15 Jan 2012 12:25:53 -0800 +# Mon, 23 Jan 2012 22:11:44 -0800 %: dh $@ --with python2 --buildsystem=python_distutils diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/feedingit.py b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/feedingit.py index 9d70a3c..a951ec9 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/feedingit.py +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/feedingit.py @@ -31,6 +31,7 @@ from cgi import escape from re import sub class Controller(QtCore.QObject): + cachedList = None def __init__(self, listing): QtCore.QObject.__init__(self) @@ -70,18 +71,30 @@ class Controller(QtCore.QObject): @QtCore.Slot(str,result=str) def getArticlesXml(self, key): + feed = listing.getFeed(key) + self.cachedList = feed.getIds(onlyUnread=True) #onlyUnread = arguments.get("onlyUnread","False") return self._handler.generateArticlesXml(key, config.getHideReadArticles()) - @QtCore.Slot(str,str,result=str) - def getNextId(self, key, articleid): - feed = listing.getFeed(key) - return feed.getNextId(articleid) + @QtCore.Slot(str,str,bool,result=str) + def getNextId(self, key, articleid, onlyUnread): + if (onlyUnread): + print self.cachedList, articleid + index = self.cachedList.index(articleid) + return self.cachedList[(index + 1) % len(self.cachedList)] + else: + feed = listing.getFeed(key) + return feed.getNextId(articleid) - @QtCore.Slot(str,str,result=str) - def getPreviousId(self, key, articleid): - feed = listing.getFeed(key) - return feed.getPreviousId(articleid) + @QtCore.Slot(str,str,bool,result=str) + def getPreviousId(self, key, articleid, onlyUnread): + if (onlyUnread): + print self.cachedList, articleid + index = self.cachedList.index(articleid) + return self.cachedList[(index - 1) % len(self.cachedList)] + else: + feed = listing.getFeed(key) + return feed.getPreviousId(articleid) @QtCore.Slot(result=str) def getCategoryXml(self): @@ -221,6 +234,13 @@ class Controller(QtCore.QObject): elif (setting == "fontSize" ): config.setFontSize(value) config.saveConfig() + + @QtCore.Slot(str, str) + def openSettings(self): + bus = dbus.SessionBus() + settingService = bus.get_object('com.nokia.DuiControlPanel', '/') + setting = shareService.get_dbus_method('appletPage', 'com.nokia.DuiControlPanelIf') + setting("feedingitsync") @QtCore.Slot(str, str) def share(self, key, articleid): diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/rss_sqlite.py b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/rss_sqlite.py index ff0fcba..2fda0f5 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/rss_sqlite.py +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/rss_sqlite.py @@ -374,7 +374,8 @@ class Feed(BaseObject): def wc_success(): try: - wc().stream_register (self.key, "", 6 * 60 * 60) + if wc().available: + wc().stream_register (self.key, "", 6 * 60 * 60) except woodchuck.ObjectExistsError: pass try: diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Articles.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Articles.qml index 91248f0..25ec145 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Articles.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Articles.qml @@ -27,6 +27,14 @@ Item { } } + function setNextId() { + articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId, settings.hideReadArticles) + } + + function setPreviousId() { + articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId, settings.hideReadArticles) + } + Component.onCompleted: { webViewFront.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); } @@ -42,10 +50,11 @@ Item { //contentWidth: childrenRect.width; contentHeight: childrenRect.height //interactive: parent.vertPanningEnabled; - flickDeceleration: 2500; + flickDeceleration: 5000; //flickableDirection: Flickable.VerticalFlick property bool contentIsReady: false + property bool isSwitchable: false Rectangle { id: boundsRecFront color: "white" @@ -68,11 +77,10 @@ Item { controller.setEntryRead(articlePage.feedid, articlePage.mainArticleId) //flickable.width/2 flickableFront.contentIsReady = true + switchableTimer.start() } - } - } state: "visible" @@ -92,21 +100,40 @@ Item { transitions: [ Transition { from: "visible"; - PropertyAnimation { target: flickableFront - easing.type: Easing.InOutSine - properties: "x"; duration: 1000 } + SequentialAnimation { + ScriptAction { script: flickableFront.isSwitchable=false; } + PropertyAnimation { target: flickableFront + easing.type: Easing.InOutSine + properties: "x"; duration: 1000 } + ScriptAction { script: flickableFront.isSwitchable=true; } + } }, Transition { to: "visible"; - PropertyAnimation { target: flickableFront - easing.type: Easing.InOutSine - properties: "x"; duration: 1000 } + SequentialAnimation { + ScriptAction { script: flickableFront.isSwitchable=false; } + PropertyAnimation { target: flickableFront + easing.type: Easing.InOutSine + properties: "x"; duration: 1000 } + ScriptAction { script: flickableFront.isSwitchable=true; } + } } + ] + Timer { + // Disable animations/page shifting for 400ms, to give time to the page to setup properly + id: switchableTimer + interval: 400 + running: false + repeat: false + onTriggered: flickableFront.isSwitchable=true; + } + function moveFromLeft() { flickableFront.contentIsReady = false - articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId) + setPreviousId() + //articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId) webViewFront.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); state = "toLeft" state = "visible" @@ -115,7 +142,8 @@ Item { function moveFromRight() { flickableFront.contentIsReady = false - articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId) + setNextId() + //articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId) webViewFront.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); state = "toRight" state = "visible" @@ -128,21 +156,26 @@ Item { NumberAnimation { duration: 200 } } onMovingHorizontallyChanged: { - if (!movingHorizontally && (!atXBeginning || !atXEnd)) { - flickableFront.contentX = buffer //flickable.width/2 + if (flickableFront.isSwitchable) { + if (!movingHorizontally && (!atXBeginning || !atXEnd)) { + flickableFront.contentX = buffer //flickable.width/2 + } } } onAtXBeginningChanged: { - if (atXBeginning && contentIsReady) { - flickableBack.moveFromLeft() + if (flickableFront.isSwitchable) { + if (atXBeginning && contentIsReady) { + flickableBack.moveFromLeft() + } } } onAtXEndChanged: { - if (atXEnd && contentIsReady) { - //console.log("next") - flickableBack.moveFromRight() + if (flickableFront.isSwitchable) { + if (atXEnd && contentIsReady) { + flickableBack.moveFromRight() + } } } @@ -161,10 +194,11 @@ Item { //contentWidth: childrenRect.width; contentHeight: childrenRect.height //interactive: parent.vertPanningEnabled; - flickDeceleration: 2500; + flickDeceleration: 5000; //flickableDirection: Flickable.VerticalFlick property bool contentIsReady: false + property bool isSwitchable: false Rectangle { id: boundsRecBack color: "white" @@ -208,21 +242,30 @@ Item { transitions: [ Transition { from: "visible"; - PropertyAnimation { target: flickableBack - easing.type: Easing.InOutSine - properties: "x"; duration: 1000 } + SequentialAnimation { + ScriptAction { script: flickableBack.isSwitchable=false; } + PropertyAnimation { target: flickableBack + easing.type: Easing.InOutSine + properties: "x"; duration: 1000 } + ScriptAction { script: flickableBack.isSwitchable=true; } + } }, Transition { to: "visible"; - PropertyAnimation { target: flickableBack - easing.type: Easing.InOutSine - properties: "x"; duration: 1000 } + SequentialAnimation { + ScriptAction { script: flickableBack.isSwitchable=false; } + PropertyAnimation { target: flickableBack + easing.type: Easing.InOutSine + properties: "x"; duration: 1000 } + ScriptAction { script: flickableBack.isSwitchable=true; } + } } ] function moveFromLeft() { flickableBack.contentIsReady = false - articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId) + setPreviousId() + //articlePage.mainArticleId = controller.getPreviousId(articlePage.feedid,articlePage.mainArticleId) webViewBack.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); state = "toLeft" state = "visible" @@ -231,7 +274,8 @@ Item { function moveFromRight() { flickableBack.contentIsReady = false - articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId) + setNextId() + //articlePage.mainArticleId = controller.getNextId(articlePage.feedid,articlePage.mainArticleId) webViewBack.html = controller.getArticle(articlePage.feedid, articlePage.mainArticleId); state = "toRight" state = "visible" @@ -245,20 +289,26 @@ Item { } onMovingHorizontallyChanged: { - if (!movingHorizontally && (!atXBeginning || !atXEnd)) { - flickableBack.contentX = buffer //flickable.width/2 + if (flickableBack.isSwitchable) { + if (!movingHorizontally && (!atXBeginning || !atXEnd)) { + flickableBack.contentX = buffer //flickable.width/2 + } } } onAtXBeginningChanged: { - if (atXBeginning && contentIsReady) { - flickableFront.moveFromLeft() + if (flickableBack.isSwitchable) { + if (atXBeginning && contentIsReady) { + flickableFront.moveFromLeft() + } } } onAtXEndChanged: { - if (atXEnd && contentIsReady) { - flickableFront.moveFromRight() + if (flickableBack.isSwitchable) { + if (atXEnd && contentIsReady) { + flickableFront.moveFromRight() + } } } } diff --git a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.debian.tar.gz b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.debian.tar.gz index 8db33e3..f1e23da 100644 Binary files a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.debian.tar.gz and b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.debian.tar.gz differ diff --git a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.dsc b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.dsc index 2045d25..bf0b815 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.dsc +++ b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.dsc @@ -7,11 +7,11 @@ Maintainer: Slocan Standards-Version: 3.9.1 Build-Depends: python-all (>= 2.6.6-3), debhelper (>= 7.4.3) Checksums-Sha1: - d795a1cb78e275c831eea74842574537fb69e4f9 200714 feedingit_0.1.0.orig.tar.gz - 2799695eb289f5ee7a38864c32622002e4b0bff0 889 feedingit_0.1.0-1.debian.tar.gz + db929a585c8b70cbc5c8e6b91f341b4cea66de0d 201088 feedingit_0.1.0.orig.tar.gz + 6a5e12732d01ce5606d2e8a7ea0b9f8d9ac68d99 887 feedingit_0.1.0-1.debian.tar.gz Checksums-Sha256: - 07f6b92f52bde99c639de1a0a814812201d1d6bb2a4f9d0dc54c49857d8193c2 200714 feedingit_0.1.0.orig.tar.gz - b4bac709694df947deeb708649449a71655f4f88079be65d2095c88936dc2bc2 889 feedingit_0.1.0-1.debian.tar.gz + d0dc31488af20a38fa7bdae8080bd6bb2df9cebf46f58440e194a5e69ded37a3 201088 feedingit_0.1.0.orig.tar.gz + cb984a498ae074606dbf1d139cb0286825f3c7dd8f4a075a236b005861c29de7 887 feedingit_0.1.0-1.debian.tar.gz Files: - 8d2360ef533ff170a5617f134e8a55ac 200714 feedingit_0.1.0.orig.tar.gz - 2a03c4254fd462719e7a3c23a3d7ad80 889 feedingit_0.1.0-1.debian.tar.gz + 40acf0ce3f7c2701f3b510cb039aa224 201088 feedingit_0.1.0.orig.tar.gz + 7989d159e0dadcd7c01421782d1610ce 887 feedingit_0.1.0-1.debian.tar.gz diff --git a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_all.deb b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_all.deb index 132857d..a664465 100644 Binary files a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_all.deb and b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_all.deb differ diff --git a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_i386.changes b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_i386.changes index f94d5ee..ce272fd 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_i386.changes +++ b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_i386.changes @@ -1,5 +1,5 @@ Format: 1.8 -Date: Sun, 15 Jan 2012 12:25:53 -0800 +Date: Mon, 23 Jan 2012 22:11:44 -0800 Source: feedingit Binary: feedingit Architecture: all @@ -15,8 +15,8 @@ Changes: . * source package automatically created by stdeb 0.6.0+git Checksums-Sha1: - 1c3e0eedea08a2a5ec8e6227d4782615dcb9e5b4 189310 feedingit_0.1.0-1_all.deb + ce54afcaf70d924ff15be5291747e1385e48ab07 189784 feedingit_0.1.0-1_all.deb Checksums-Sha256: - 4c8975cb001ea18d093a7e21067144e7a4d1f409b844ee710ee15764198ab794 189310 feedingit_0.1.0-1_all.deb + 684e1264d466b10a2caab7f8c3f172e825fa18695aae02735e1cea5566fc5238 189784 feedingit_0.1.0-1_all.deb Files: - e77e2be34526d585924db07424c21ce0 189310 user/network optional feedingit_0.1.0-1_all.deb + a29280f2ff7f99e0b87777cf1eba3f67 189784 user/network optional feedingit_0.1.0-1_all.deb diff --git a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0.orig.tar.gz b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0.orig.tar.gz index 68853ad..770a217 100644 Binary files a/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0.orig.tar.gz and b/psa_harmattan/feedingit/deb_dist/feedingit_0.1.0.orig.tar.gz differ diff --git a/psa_harmattan/feedingit/pysrc/XmlHandler.py b/psa_harmattan/feedingit/pysrc/XmlHandler.py index 41167cb..50cf7f0 100644 --- a/psa_harmattan/feedingit/pysrc/XmlHandler.py +++ b/psa_harmattan/feedingit/pysrc/XmlHandler.py @@ -49,7 +49,6 @@ class XmlHandler(): def generateCategoryXml(self): xml = "" for cat in self.listing.getListOfCategories(): - print cat xml += "" xml += "%s" %sanitize(self.listing.getCategoryTitle(cat)) xml += "%s" % cat diff --git a/psa_harmattan/feedingit/pysrc/feedingit.py b/psa_harmattan/feedingit/pysrc/feedingit.py index 6866f9b..93ffc6a 100644 --- a/psa_harmattan/feedingit/pysrc/feedingit.py +++ b/psa_harmattan/feedingit/pysrc/feedingit.py @@ -46,7 +46,8 @@ class Controller(QtCore.QObject): root.updateProgress(int(total), int(completed)) def articleCountUpdated(self): - print "article updated" + #print "article updated" + pass def update_started(self): root.updateStarted() @@ -79,7 +80,7 @@ class Controller(QtCore.QObject): @QtCore.Slot(str,str,bool,result=str) def getNextId(self, key, articleid, onlyUnread): if (onlyUnread): - print self.cachedList, articleid + #print self.cachedList, articleid index = self.cachedList.index(articleid) return self.cachedList[(index + 1) % len(self.cachedList)] else: @@ -89,7 +90,7 @@ class Controller(QtCore.QObject): @QtCore.Slot(str,str,bool,result=str) def getPreviousId(self, key, articleid, onlyUnread): if (onlyUnread): - print self.cachedList, articleid + #print self.cachedList, articleid index = self.cachedList.index(articleid) return self.cachedList[(index - 1) % len(self.cachedList)] else: @@ -234,6 +235,13 @@ class Controller(QtCore.QObject): elif (setting == "fontSize" ): config.setFontSize(value) config.saveConfig() + + @QtCore.Slot(str, str) + def openSettings(self): + bus = dbus.SessionBus() + settingService = bus.get_object('com.nokia.DuiControlPanel', '/') + setting = shareService.get_dbus_method('appletPage', 'com.nokia.DuiControlPanelIf') + setting("FeedingIt Updates") @QtCore.Slot(str, str) def share(self, key, articleid): diff --git a/psa_harmattan/feedingit/qml/SettingsPage.qml b/psa_harmattan/feedingit/qml/SettingsPage.qml index b97ae41..e9feae7 100644 --- a/psa_harmattan/feedingit/qml/SettingsPage.qml +++ b/psa_harmattan/feedingit/qml/SettingsPage.qml @@ -8,7 +8,7 @@ Page { Column { width: parent.width - spacing: 5 + spacing: 15 SwitchSetting { text: qsTr("Use Dark Theme") @@ -49,16 +49,22 @@ Page { } } - SwitchSetting { - text: qsTr("Auto-update every 6 hours (requires application running)") - checked: controller.getBooleanSetting("autoupdate") - - onSwitched: { - controller.setBooleanSetting("autoupdate", checked) - settings.autoUpdateEnabled = checked - } + Button { + text: "Automatic Updates" + onClicked: controller.openSettings() + anchors.horizontalCenter: parent.horizontalCenter } +// SwitchSetting { +// text: qsTr("Auto-update every 6 hours (requires application running)") +// checked: controller.getBooleanSetting("autoupdate") + +// onSwitched: { +// controller.setBooleanSetting("autoupdate", checked) +// settings.autoUpdateEnabled = checked +// } +// } + SliderSetting { text: qsTr("Article Listing Font Size") value: settings.articleListingTextSize