From: Yves Marcoz Date: Thu, 3 Nov 2011 05:37:12 +0000 (-0700) Subject: psa: Added AddFeed dialog X-Git-Url: https://vcs.maemo.org/git/?p=feedingit;a=commitdiff_plain;h=8f86c50051d4f155f32c84ab3ee3256c240a3083 psa: Added AddFeed dialog --- diff --git a/psa_harmattan/feedingit/build-deb.log b/psa_harmattan/feedingit/build-deb.log index e8b3652..71a7529 100644 --- a/psa_harmattan/feedingit/build-deb.log +++ b/psa_harmattan/feedingit/build-deb.log @@ -70,10 +70,13 @@ copying qml/Articles.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/fee copying qml/TestWebview.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml copying qml/FeedingIt.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml copying qml/Categories.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml +copying qml/TextInputClear.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml copying qml/ArticleViewer.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml copying qml/MainPage.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml copying qml/main.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml copying qml/ArticleDisplay.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml +copying qml/AddFeed.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml +copying qml/feedSearch.js -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml creating /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/common copying qml/common/AddCat.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/common copying qml/common/ConfirmationMessage.qml -> /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/common 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 4bab2ac..de449c0 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 - -- Yves Tue, 25 Oct 2011 22:22:25 -0700 + -- Yves Wed, 02 Nov 2011 22:31:15 -0700 diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/control b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/control index 6a42527..9ab30e8 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/control +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/control @@ -2,7 +2,7 @@ Package: feedingit Version: 0.1.0-1 Architecture: all Maintainer: Yves -Installed-Size: 736 +Installed-Size: 752 Depends: python-pyside.qtgui, python-pyside.qtopengl, python-pyside.qtdeclarative, python-dbus, python-gconf Breaks: python (<< 2.6) Section: user/development 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 7cf4b8d..fda0dd4 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,27 +1,29 @@ 4420c31f88de68fe6e1b7637abb06196 usr/bin/feedingit 6a42e9aebedfd157062bd5a9616dc935 usr/share/applications/feedingit.desktop eda8cc6ffe8d842d6dfe0244b01b3042 usr/share/dbus-1/services/feedingit_status.service -fbe1d0b80d7621da7ed1e07717f36981 usr/share/doc/feedingit/changelog.Debian.gz +b397375751bb545415e1f65b21c70732 usr/share/doc/feedingit/changelog.Debian.gz bac2be6ae9673ee5096e20e8b714c9cd usr/share/feedingit/BeautifulSoup.py fa5490f2022424a091b36e75f21e6596 usr/share/feedingit/XmlHandler.py d41d8cd98f00b204e9800998ecf8427e usr/share/feedingit/__init__.py 6b5296119ef6bc859c3e3a8706fa7f0d usr/share/feedingit/config.py 9cf859c8297e4b0e8466cb5861eb75e7 usr/share/feedingit/debugging.py fae02e730b76761d43a626fe19828d5e usr/share/feedingit/download.py -168f0ef91215de84afb9be6c12f27fe5 usr/share/feedingit/feedingit.py +ec4243631000259fe155667d0a8b6ab0 usr/share/feedingit/feedingit.py afa4f462892136f59beaf96b6bf1cf96 usr/share/feedingit/feedparser.py c1a0c0a9ccefd64d1e27bddb817c72a3 usr/share/feedingit/httpprogresshandler.py f1e9ba0f44786f513659a7fa3111fc8a usr/share/feedingit/jobmanager.py 0201faa30d34c58d71f36ab42a7a8233 usr/share/feedingit/mainthread.py d9c0665dfdd5cf19f1529ce88af95134 usr/share/feedingit/opml.py +2d5b38ff52f120c672c623424e28fb12 usr/share/feedingit/qml/AddFeed.qml af27062fdba0bc7a3df92116e8340d19 usr/share/feedingit/qml/ArticleDisplay.qml -94fe6391917002146bb95617b1576e90 usr/share/feedingit/qml/ArticleViewer.qml +aa3d1cd8fc5e9b3d6d81afd4bb7fb129 usr/share/feedingit/qml/ArticleViewer.qml 15083e9a1fac05c8efaaa085dfabcbcb usr/share/feedingit/qml/Articles.qml b3866ebf5a5547fcc5fe371e91d0f25c usr/share/feedingit/qml/Categories.qml cd30f5eaec0885358261d7a96bfaf8cd usr/share/feedingit/qml/FeedingIt.qml -50535c0b4869b8a71cde6d9740d21892 usr/share/feedingit/qml/Feeds.qml +518f406ab7339df92119a9b3bb400c7f usr/share/feedingit/qml/Feeds.qml bec5fe4599a3ad5799ed96d7ed81fb5f usr/share/feedingit/qml/MainPage.qml aa3fc0a4edbd17d93a9dc5c39c433c3d usr/share/feedingit/qml/TestWebview.qml +508fde19c7bb7bc4892bd6642fbcb7d3 usr/share/feedingit/qml/TextInputClear.qml cef5ae4af926a759f4a233336c00f017 usr/share/feedingit/qml/common/AddCat.qml c39cde168ef8d608670c81be7c808701 usr/share/feedingit/qml/common/AddFeed.qml ad091804747113acd2a3f0499f3beef2 usr/share/feedingit/qml/common/Button.qml @@ -50,10 +52,11 @@ af11b73b195513d08c17723b41db0b04 usr/share/feedingit/qml/common/images/wmBackIc 2d4f294f9f757f66fd219488c21530aa usr/share/feedingit/qml/common/images/wmCloseIcon.png 664477d4107d381ab078f84d198a66d0 usr/share/feedingit/qml/common/images/wmEditIcon.png 74cce780312f54e8e1eeb44ee8206022 usr/share/feedingit/qml/common/images/wmTaskLauncherIcon.png +02679cf42beb1732e13e506d127559ef usr/share/feedingit/qml/feedSearch.js 1c7751b124aa1bdf4b89ec76cdf815a2 usr/share/feedingit/qml/i18n/FeedingIt.ts 7790a99425dd7c1046e6ae3b1ee72a03 usr/share/feedingit/qml/i18n/qml_en.qm 1674fcce45bcf3319e61d19a9adf4fdd usr/share/feedingit/qml/i18n/qml_en.ts -629ac99aa342e4a501d6bab96e975196 usr/share/feedingit/qml/main.qml +9aca2156baa6699547938aeeec5c8cbd usr/share/feedingit/qml/main.qml 7def699001828ea16976de3d5835dd3c usr/share/feedingit/rss_sqlite.py 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 28c6259..a48244b 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 546d043..867a60c 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 @@ -44,7 +44,6 @@ class Controller(QtCore.QObject): @QtCore.Slot(str, result=str) def getFeedsXml(self, catid): - print self._handler.generateFeedsXml(catid) return self._handler.generateFeedsXml(catid) @QtCore.Slot(str,result=str) diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/ArticleViewer.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/ArticleViewer.qml index de9cb20..809f365 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/ArticleViewer.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/ArticleViewer.qml @@ -155,7 +155,7 @@ Item { id: articles //source: articleViewer.feedid == "" ? "" : "http://localhost:8000/articles/" + feedid + "?onlyUnread=" + hideReadArticles - //xml: articleViewer.feedid == "" ? "" : controller.getArticlesXml(articleViewer.feedid) + xml: articleViewer.feedid == "" ? "" : controller.getArticlesXml(articleViewer.feedid) query: "/xml/article" XmlRole { name: "title"; query: "title/string()" } diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Feeds.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Feeds.qml index fa6a6c0..12d1c89 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Feeds.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Feeds.qml @@ -8,12 +8,14 @@ Item { signal feedClicked(string feedid) function reload() { - feeds.xml = catid == "" ? "" : controller.getFeedsXml(catid); + feeds.xml = catid == "" ? "" : controller.getFeedsXml(catid); //feeds.reload() - console.log(feeds.xml) + //console.log(feeds.xml) } - Component.onCompleted: { console.log(catid + "/" + parent.catid) } + //Component.onCompleted: { console.log(catid + "/" + parent.catid); console.log(feeds.xml) } + + //onCatidChanged: console.log("catid changed: "+catid) ListView { id: feedList; model: feeds; delegate: feedDelegate; z: 6 @@ -27,7 +29,7 @@ Item { id: feeds //source: catid == "" ? "" : "http://localhost:8000/feeds/" + catid //+ "?onlyUnread=" + parent.hideReadArticles - xml: catid == "" ? "" : controller.getFeedsXml(catid) + xml: catid == "" ? "" : controller.getFeedsXml(catid) query: "/xml/feed" XmlRole { name: "title"; query: "feedname/string()" } @@ -44,10 +46,13 @@ Item { Item { - Component.onCompleted: console.log("item:"+feedid) - id: wrapper; width: wrapper.ListView.view.width; + //Component.onCompleted: console.log("item:"+feedid + " "+ visible + " "+ height + " " + width) + id: wrapper; + //width: wrapper.ListView.view.width; visible: (unread == "0" && feedsItem.hideReadFeeds=="True") ? false : true + //visible: true height: (visible) ? 86 : 0 + width: parent.width Item { id: moveMe @@ -68,26 +73,26 @@ Item { Text { text: updatedDate + " / " + qsTr("%1 unread items").arg(unread); color: (unread=="0") ? "white" : "#7b97fd"; width: parent.width; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" } //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } } +//// Item { +//// x: wrapper.ListView.view.width - 128; y: 12 +//// height: 58; width: 58; +//// //anchors.horizontalCenter: parent.horizontalCenter; +//// Image { source: "common/images/wmEditIcon.png" } +//// MouseArea { +//// anchors.fill: parent; onClicked: { container.feedEdit(feedname, feedid, url); } +//// } +//// visible: inEditMode +//// } // Item { -// x: wrapper.ListView.view.width - 128; y: 12 +// x: wrapper.ListView.view.width - 64; y: 12 // height: 58; width: 58; // //anchors.horizontalCenter: parent.horizontalCenter; -// Image { source: "common/images/wmEditIcon.png" } +// Image { source: "common/images/delete.png" } // MouseArea { -// anchors.fill: parent; onClicked: { container.feedEdit(feedname, feedid, url); } +// anchors.fill: parent; onClicked: { container.feedDeleted(feedid); } // } // visible: inEditMode // } - Item { - x: wrapper.ListView.view.width - 64; y: 12 - height: 58; width: 58; - //anchors.horizontalCenter: parent.horizontalCenter; - Image { source: "common/images/delete.png" } - MouseArea { - anchors.fill: parent; onClicked: { container.feedDeleted(feedid); } - } - visible: inEditMode - } } MouseArea { anchors.fill: wrapper; diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/main.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/main.qml index 5a6a117..dad5f3a 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/main.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/main.qml @@ -3,8 +3,13 @@ import com.nokia.meego 1.0 PageStackWindow { + id: window initialPage: categoryPage + signal articleClosed() + property string feedid + property string catid + ToolBarLayout { id: commonTools visible: false @@ -21,6 +26,28 @@ PageStackWindow { id: myMenu visualParent: pageStack MenuLayout { + MenuItem { text: qsTr("Settings"); onClicked: {} } + MenuItem { text: qsTr("Add Feeds"); onClicked: { pageStack.push(addFeedPage) } } + MenuItem { text: qsTr("Update All Categories"); visible: pageStack.depth==3; onClicked: controller.updateAll(); } + MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } + } + } + + Menu { + id: myFeedsMenu + visualParent: pageStack + MenuLayout { + MenuItem { text: qsTr("Update All Feeds"); onClicked: controller.updateAll(); } + MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } + } + } + + Menu { + id: myArticlesMenu + visualParent: pageStack + MenuLayout { + MenuItem { text: qsTr("Mark All As Read"); onClicked: controller.markAllAsRead(feedid); } + MenuItem { text: qsTr("Update Feed"); onClicked: controller.updateFeed(feedid); } MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } } } @@ -49,31 +76,98 @@ PageStackWindow { Page { tools: commonTools Categories { - onCategoryClicked: pageStack.push(feedsPage, {catid: cat}) + onCategoryClicked: { + window.catid = cat + pageStack.push(feedsPage) + } } } } Component { id: feedsPage + Page { - tools: commonTools - property string catid + tools: feedsTools + anchors.fill: parent + property string catid: window.catid Feeds { id: feedsItem - onFeedClicked: pageStack.push(articlesPage, {feedid: feedid}) + onFeedClicked: { + window.feedid = feedid + pageStack.push(articlesPage) + } + } + ToolBarLayout { + id: feedsTools + visible: false + ToolIcon { iconId: "toolbar-back"; + onClicked: { + myArticlesMenu.close(); + pageStack.pop(); + } + } + ToolIcon { + platformIconId: "toolbar-view-menu" + anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: (myFeedsMenu.status == DialogStatus.Closed) ? myFeedsMenu.open() : myFeedsMenu.close() + } } + Connections { + target: window + onArticleClosed: feedsItem.reload() + } } } Component { id: articlesPage Page { - tools: commonTools - property string feedid + tools: articleTools + property string feedid: window.feedid ArticleViewer { id: flipper } + + ToolBarLayout { + id: articleTools + visible: false + ToolIcon { iconId: "toolbar-back"; + onClicked: { + myArticlesMenu.close(); + if (flipper.articleShown) { + flipper.articleShown = false; + flipper.reload() + } else { + window.articleClosed(); + pageStack.pop(); + } + } + } + + ToolIcon { + platformIconId: "toolbar-prev" + //anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: flipper.prev(); + } + + ToolIcon { + platformIconId: "toolbar-next" + //anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: flipper.next() + } + + ToolIcon { + platformIconId: "toolbar-view-menu" + anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close() + } + } } } + + Component { + id: addFeedPage + AddFeed {} + } } 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 da559bb..587de56 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 -# Tue, 25 Oct 2011 22:22:25 -0700 +# Wed, 02 Nov 2011 22:31:15 -0700 %: 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 546d043..867a60c 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 @@ -44,7 +44,6 @@ class Controller(QtCore.QObject): @QtCore.Slot(str, result=str) def getFeedsXml(self, catid): - print self._handler.generateFeedsXml(catid) return self._handler.generateFeedsXml(catid) @QtCore.Slot(str,result=str) diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/ArticleViewer.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/ArticleViewer.qml index de9cb20..809f365 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/ArticleViewer.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/ArticleViewer.qml @@ -155,7 +155,7 @@ Item { id: articles //source: articleViewer.feedid == "" ? "" : "http://localhost:8000/articles/" + feedid + "?onlyUnread=" + hideReadArticles - //xml: articleViewer.feedid == "" ? "" : controller.getArticlesXml(articleViewer.feedid) + xml: articleViewer.feedid == "" ? "" : controller.getArticlesXml(articleViewer.feedid) query: "/xml/article" XmlRole { name: "title"; query: "title/string()" } diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Feeds.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Feeds.qml index fa6a6c0..12d1c89 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Feeds.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Feeds.qml @@ -8,12 +8,14 @@ Item { signal feedClicked(string feedid) function reload() { - feeds.xml = catid == "" ? "" : controller.getFeedsXml(catid); + feeds.xml = catid == "" ? "" : controller.getFeedsXml(catid); //feeds.reload() - console.log(feeds.xml) + //console.log(feeds.xml) } - Component.onCompleted: { console.log(catid + "/" + parent.catid) } + //Component.onCompleted: { console.log(catid + "/" + parent.catid); console.log(feeds.xml) } + + //onCatidChanged: console.log("catid changed: "+catid) ListView { id: feedList; model: feeds; delegate: feedDelegate; z: 6 @@ -27,7 +29,7 @@ Item { id: feeds //source: catid == "" ? "" : "http://localhost:8000/feeds/" + catid //+ "?onlyUnread=" + parent.hideReadArticles - xml: catid == "" ? "" : controller.getFeedsXml(catid) + xml: catid == "" ? "" : controller.getFeedsXml(catid) query: "/xml/feed" XmlRole { name: "title"; query: "feedname/string()" } @@ -44,10 +46,13 @@ Item { Item { - Component.onCompleted: console.log("item:"+feedid) - id: wrapper; width: wrapper.ListView.view.width; + //Component.onCompleted: console.log("item:"+feedid + " "+ visible + " "+ height + " " + width) + id: wrapper; + //width: wrapper.ListView.view.width; visible: (unread == "0" && feedsItem.hideReadFeeds=="True") ? false : true + //visible: true height: (visible) ? 86 : 0 + width: parent.width Item { id: moveMe @@ -68,26 +73,26 @@ Item { Text { text: updatedDate + " / " + qsTr("%1 unread items").arg(unread); color: (unread=="0") ? "white" : "#7b97fd"; width: parent.width; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" } //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } } +//// Item { +//// x: wrapper.ListView.view.width - 128; y: 12 +//// height: 58; width: 58; +//// //anchors.horizontalCenter: parent.horizontalCenter; +//// Image { source: "common/images/wmEditIcon.png" } +//// MouseArea { +//// anchors.fill: parent; onClicked: { container.feedEdit(feedname, feedid, url); } +//// } +//// visible: inEditMode +//// } // Item { -// x: wrapper.ListView.view.width - 128; y: 12 +// x: wrapper.ListView.view.width - 64; y: 12 // height: 58; width: 58; // //anchors.horizontalCenter: parent.horizontalCenter; -// Image { source: "common/images/wmEditIcon.png" } +// Image { source: "common/images/delete.png" } // MouseArea { -// anchors.fill: parent; onClicked: { container.feedEdit(feedname, feedid, url); } +// anchors.fill: parent; onClicked: { container.feedDeleted(feedid); } // } // visible: inEditMode // } - Item { - x: wrapper.ListView.view.width - 64; y: 12 - height: 58; width: 58; - //anchors.horizontalCenter: parent.horizontalCenter; - Image { source: "common/images/delete.png" } - MouseArea { - anchors.fill: parent; onClicked: { container.feedDeleted(feedid); } - } - visible: inEditMode - } } MouseArea { anchors.fill: wrapper; diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml index 5a6a117..dad5f3a 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml @@ -3,8 +3,13 @@ import com.nokia.meego 1.0 PageStackWindow { + id: window initialPage: categoryPage + signal articleClosed() + property string feedid + property string catid + ToolBarLayout { id: commonTools visible: false @@ -21,6 +26,28 @@ PageStackWindow { id: myMenu visualParent: pageStack MenuLayout { + MenuItem { text: qsTr("Settings"); onClicked: {} } + MenuItem { text: qsTr("Add Feeds"); onClicked: { pageStack.push(addFeedPage) } } + MenuItem { text: qsTr("Update All Categories"); visible: pageStack.depth==3; onClicked: controller.updateAll(); } + MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } + } + } + + Menu { + id: myFeedsMenu + visualParent: pageStack + MenuLayout { + MenuItem { text: qsTr("Update All Feeds"); onClicked: controller.updateAll(); } + MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } + } + } + + Menu { + id: myArticlesMenu + visualParent: pageStack + MenuLayout { + MenuItem { text: qsTr("Mark All As Read"); onClicked: controller.markAllAsRead(feedid); } + MenuItem { text: qsTr("Update Feed"); onClicked: controller.updateFeed(feedid); } MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } } } @@ -49,31 +76,98 @@ PageStackWindow { Page { tools: commonTools Categories { - onCategoryClicked: pageStack.push(feedsPage, {catid: cat}) + onCategoryClicked: { + window.catid = cat + pageStack.push(feedsPage) + } } } } Component { id: feedsPage + Page { - tools: commonTools - property string catid + tools: feedsTools + anchors.fill: parent + property string catid: window.catid Feeds { id: feedsItem - onFeedClicked: pageStack.push(articlesPage, {feedid: feedid}) + onFeedClicked: { + window.feedid = feedid + pageStack.push(articlesPage) + } + } + ToolBarLayout { + id: feedsTools + visible: false + ToolIcon { iconId: "toolbar-back"; + onClicked: { + myArticlesMenu.close(); + pageStack.pop(); + } + } + ToolIcon { + platformIconId: "toolbar-view-menu" + anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: (myFeedsMenu.status == DialogStatus.Closed) ? myFeedsMenu.open() : myFeedsMenu.close() + } } + Connections { + target: window + onArticleClosed: feedsItem.reload() + } } } Component { id: articlesPage Page { - tools: commonTools - property string feedid + tools: articleTools + property string feedid: window.feedid ArticleViewer { id: flipper } + + ToolBarLayout { + id: articleTools + visible: false + ToolIcon { iconId: "toolbar-back"; + onClicked: { + myArticlesMenu.close(); + if (flipper.articleShown) { + flipper.articleShown = false; + flipper.reload() + } else { + window.articleClosed(); + pageStack.pop(); + } + } + } + + ToolIcon { + platformIconId: "toolbar-prev" + //anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: flipper.prev(); + } + + ToolIcon { + platformIconId: "toolbar-next" + //anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: flipper.next() + } + + ToolIcon { + platformIconId: "toolbar-view-menu" + anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: (myArticlesMenu.status == DialogStatus.Closed) ? myArticlesMenu.open() : myArticlesMenu.close() + } + } } } + + Component { + id: addFeedPage + AddFeed {} + } } diff --git a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/setup.py b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/setup.py index 055ca1a..c004963 100644 --- a/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/setup.py +++ b/psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/setup.py @@ -14,6 +14,7 @@ setup(name="feedingit", data_files=[('share/applications',['feedingit.desktop']), ('share/icons/hicolor/64x64/apps', ['feedingit.png']), ('share/feedingit/qml', glob.glob('qml/*.qml')), + ('share/feedingit/qml', glob.glob('qml/*.js')), ('share/feedingit/qml/common', glob.glob('qml/common/*.qml')), ('share/feedingit/qml/common/images', glob.glob('qml/common/images/*')), ('share/feedingit/qml/i18n', glob.glob('qml/i18n/*')), 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 e56d82a..de46b75 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 e0b590e..f1bbbaa 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: Yves Standards-Version: 3.9.1 Build-Depends: python-all (>= 2.6.6-3), debhelper (>= 7.4.3) Checksums-Sha1: - 963c808a6e00b215dfe4e3762c91dca86fabf635 172056 feedingit_0.1.0.orig.tar.gz - db54f71fc8597299ed888d0d4064643e4735e365 855 feedingit_0.1.0-1.debian.tar.gz + 2f341ab99979c935d4c6bab874123e8f32e5957a 176151 feedingit_0.1.0.orig.tar.gz + a48eaf1bba284aab28af18e6b34a116bb34f3a41 858 feedingit_0.1.0-1.debian.tar.gz Checksums-Sha256: - d7d3b7c6edd9f7fdb2f072b4ec78828abbbae1200c5b3ee70425f79511eda8af 172056 feedingit_0.1.0.orig.tar.gz - 19d1417a29e97c80f378e5d89d1d2d31c64a345b37551f73a5e48c37277c9268 855 feedingit_0.1.0-1.debian.tar.gz + 903c1ce0f7d30686f75c066fb7b502ce21c4e0ad8ac5c43ea139b72a46eefde5 176151 feedingit_0.1.0.orig.tar.gz + 88993852f99c5a0dfa0aac883b3628e58941b3644088b20b7a781be70d515cec 858 feedingit_0.1.0-1.debian.tar.gz Files: - 51d85ab8e47de8d603386319ea568689 172056 feedingit_0.1.0.orig.tar.gz - 03aa23d5c3f8bf3aee194129f5b701e5 855 feedingit_0.1.0-1.debian.tar.gz + 9e3d4b56204529bdf42c76f8c7ff2eb7 176151 feedingit_0.1.0.orig.tar.gz + 0900f02698c9513ccdeed0be258e7aee 858 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 6d76854..4fc3f95 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 8c609e8..97d26d3 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: Tue, 25 Oct 2011 22:22:25 -0700 +Date: Wed, 02 Nov 2011 22:31:15 -0700 Source: feedingit Binary: feedingit Architecture: source all @@ -15,17 +15,17 @@ Changes: . * source package automatically created by stdeb 0.6.0+git Checksums-Sha1: - c6857cfe93d08c917757d5d2bb9716f857dc9b2c 753 feedingit_0.1.0-1.dsc - 963c808a6e00b215dfe4e3762c91dca86fabf635 172056 feedingit_0.1.0.orig.tar.gz - db54f71fc8597299ed888d0d4064643e4735e365 855 feedingit_0.1.0-1.debian.tar.gz - 010d01dea379e177bbbcc1c19be489c8fb9960c9 163346 feedingit_0.1.0-1_all.deb + 9c4870c375166279428d86726c2e3bb57cc4c6a1 753 feedingit_0.1.0-1.dsc + 2f341ab99979c935d4c6bab874123e8f32e5957a 176151 feedingit_0.1.0.orig.tar.gz + a48eaf1bba284aab28af18e6b34a116bb34f3a41 858 feedingit_0.1.0-1.debian.tar.gz + 9aef01f3a90fe4bd338df304efad396b5aa2d924 165680 feedingit_0.1.0-1_all.deb Checksums-Sha256: - 27187054950ef5b7cbc6de9b9bb47380b8b2b9a4b8e677ebd81772a5c48de57b 753 feedingit_0.1.0-1.dsc - d7d3b7c6edd9f7fdb2f072b4ec78828abbbae1200c5b3ee70425f79511eda8af 172056 feedingit_0.1.0.orig.tar.gz - 19d1417a29e97c80f378e5d89d1d2d31c64a345b37551f73a5e48c37277c9268 855 feedingit_0.1.0-1.debian.tar.gz - f87cfc88eb03b3f2eb8a4d66d949133ce7e32ef7d046cd27df83f8af8fb3dd8e 163346 feedingit_0.1.0-1_all.deb + 4402a7a4518a9334bc0d8a8fee87dd2ec3cffd3d8f1f923c863a014c88186495 753 feedingit_0.1.0-1.dsc + 903c1ce0f7d30686f75c066fb7b502ce21c4e0ad8ac5c43ea139b72a46eefde5 176151 feedingit_0.1.0.orig.tar.gz + 88993852f99c5a0dfa0aac883b3628e58941b3644088b20b7a781be70d515cec 858 feedingit_0.1.0-1.debian.tar.gz + c285dab3a3e7b4f7dbe187421e28a07c0caafebbc7b7f45b10cc254848769a74 165680 feedingit_0.1.0-1_all.deb Files: - c1a3f52eed4a5f5e1213dc5e50fb88a7 753 user/development optional feedingit_0.1.0-1.dsc - 51d85ab8e47de8d603386319ea568689 172056 user/development optional feedingit_0.1.0.orig.tar.gz - 03aa23d5c3f8bf3aee194129f5b701e5 855 user/development optional feedingit_0.1.0-1.debian.tar.gz - d09afd3628650ef3440d52a0966c4aa9 163346 user/development optional feedingit_0.1.0-1_all.deb + 135c4a2119a0f7f89d20509233a68076 753 user/development optional feedingit_0.1.0-1.dsc + 9e3d4b56204529bdf42c76f8c7ff2eb7 176151 user/development optional feedingit_0.1.0.orig.tar.gz + 0900f02698c9513ccdeed0be258e7aee 858 user/development optional feedingit_0.1.0-1.debian.tar.gz + 590c00ef75b8eeb69c1037338ae81069 165680 user/development 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 131e7bb..868fb65 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/qml/AddFeed.qml b/psa_harmattan/feedingit/qml/AddFeed.qml new file mode 100644 index 0000000..31e97bd --- /dev/null +++ b/psa_harmattan/feedingit/qml/AddFeed.qml @@ -0,0 +1,145 @@ +import QtQuick 1.0 +import com.nokia.meego 1.0 +import "feedSearch.js" as FeedJS + +Page { + id: addFeedPage + tools: tabTools + anchors.margins: UiConstants.DefaultMargin + anchors.fill: parent + + TabGroup { + id: tabGroup + anchors.fill: parent + currentTab: searchTab + + Item { + id: searchTab + anchors.fill: parent + + Column { + spacing: 10 + + Text { + id: searchText + font.pixelSize: 22 + color: "white" + text: "Search for feeds" + } + + TextInputClear { + id: searchInput + placeHolder: "Enter a search term" + } + + Button { + id: searchButton + text: "Search" + onClicked: FeedJS.keywordSearch(searchInput.text) + } + } + + SelectionDialog { + id: searchDialog + titleText: "Select feed:" + //model: [] + onSelectedIndexChanged: { + if (selectedIndex>=0) { + var feedTitle = searchDialog.model.get(searchDialog.selectedIndex).name; + var feedUrl = searchDialog.model.get(searchDialog.selectedIndex).url; + container.addFeed(feedTitle,feedUrl,1); + console.log("Adding feed "+feedTitle+" at " +feedUrl); + } + } + } + + } //searchTab + + Item { + id: urlTab + + Column { + Text { + id: urlText + font.pixelSize: 22 + color: "white" + text: "Enter the feed URL" + } + + TextInputClear { + id: urlInput + placeHolder: "Feed URL" + + } + + Button { + id: urlButton + text: "Add" + checkable: true + onClicked: { + console.log("Adding "+urlInput.text) + container.addFeed("",urlInput.text,1); + } + } + } + + } //searchTab + + ToolBarLayout { + id: tabTools + ToolIcon { + iconId: "toolbar-back" + onClicked: tabGroup.currentTab.depth > 1 ? tabGroup.currentTab.pop() : pageStack.pop() + } + ButtonRow { + TabButton { + text: "Search" + tab: searchTab + } + TabButton { + text: "URL" + tab: urlTab + } + } + } + } +} + + +//Dialog { +// id: myDialog + +// title: Item { +// height: myDialog.platformStyle.titleBarHeight +// width: parent.width +// Label { +// id: titleLabel +// anchors.left: supplement.right +// anchors.verticalCenter: titleField.verticalCenter +// font.capitalization: Font.MixedCase +// color: "white" +// text: "Add A Feed" +// } + +// } + +// content:Item { +// id: name +// //height: childrenRect.height + + + +// TextInputClear { +// id: urlInput +// placeHolder: "Enter a feed URL" +// } + +// } + +// buttons: ButtonRow { +// platformStyle: ButtonStyle { } +// anchors.horizontalCenter: parent.horizontalCenter +// Button {id: b1; text: "OK"; onClicked: myDialog.accept()} +// Button {id: b2; text: "Cancel"; onClicked: myDialog.reject()} +// } +//} diff --git a/psa_harmattan/feedingit/qml/TextInputClear.qml b/psa_harmattan/feedingit/qml/TextInputClear.qml new file mode 100644 index 0000000..fdc4667 --- /dev/null +++ b/psa_harmattan/feedingit/qml/TextInputClear.qml @@ -0,0 +1,48 @@ +import QtQuick 1.0 +import com.nokia.meego 1.0 + +Item { + anchors {left: parent.left; right: parent.right} + height: custom.height + property string placeHolder: "" + property alias text: custom.text + +// Rectangle { +// id: suggestionBubble +// radius: 10 +// color: "lightgrey" +// anchors {left: parent.left; right: custom.right; bottom: custom.top; bottomMargin:5} +// height: 100 + +// visible: custom.activeFocus + +// Text { +// font.pointSize: 14 +// color: "darkgrey" +// anchors {fill: parent; margins: 10} +// wrapMode: "Wrap" +// text: "Enter a URL (http:// or https://) or a search term: \n" /* + custom.text*/ +// } +// } + + TextField { + id: custom + anchors {left: parent.left; right: parent.right; rightMargin: 10} + + placeholderText: parent.placeHolder + platformStyle: TextFieldStyle { paddingRight: clearButton.width } + Image { + id: clearButton + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + source: "image://theme/icon-m-input-clear" + MouseArea { + anchors.fill: parent + onClicked: { + inputContext.reset(); + custom.text = ""; + } + } + } + } +} diff --git a/psa_harmattan/feedingit/qml/feedSearch.js b/psa_harmattan/feedingit/qml/feedSearch.js new file mode 100644 index 0000000..23ff446 --- /dev/null +++ b/psa_harmattan/feedingit/qml/feedSearch.js @@ -0,0 +1,44 @@ +function keywordSearch(keyword) { + + //https://ajax.googleapis.com/ajax/services/feed/find?v=1.0&q=Slashdot + + //console.log("Downloading "+articleUrl) + var xhr = new XMLHttpRequest; + + //var params = "apikey=" + Storage.getSetting("apikey")+"&images=1&url="+articleUrl; + var params = "v=1.0&output=xml&q=" + keyword + var url= "https://ajax.googleapis.com/ajax/services/feed/find?"+params; + xhr.open("GET", url); +// xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); +// xhr.setRequestHeader("Content-length", params.length); +// xhr.setRequestHeader("Connection", "close"); + //xhr.send(params); + //console.log(url + " " + params); + + xhr.onreadystatechange = function() { + if (xhr.readyState == XMLHttpRequest.DONE) { + //console.log(xhr.responseText) + if ( xhr.status == 200) + { + var jsonObject = eval('(' + xhr.responseText + ')'); + searchDialog.model = loaded(jsonObject); + searchDialog.open(); + } + } + } + xhr.send(params); +} + +function loaded(jsonObject) +{ + //data.responseData["entries"][0]["title"] + var listModel = Qt.createQmlObject('import QtQuick 1.0; ListModel {}', addFeedPage); + + for ( var index in jsonObject.responseData.entries ) + { + listModel.append({ + "name" : jsonObject.responseData["entries"][index]["title"], + "url" : jsonObject.responseData["entries"][index]["url"]}); + } + return listModel; +} diff --git a/psa_harmattan/feedingit/qml/main.qml b/psa_harmattan/feedingit/qml/main.qml index 731dda0..dad5f3a 100644 --- a/psa_harmattan/feedingit/qml/main.qml +++ b/psa_harmattan/feedingit/qml/main.qml @@ -27,6 +27,7 @@ PageStackWindow { visualParent: pageStack MenuLayout { MenuItem { text: qsTr("Settings"); onClicked: {} } + MenuItem { text: qsTr("Add Feeds"); onClicked: { pageStack.push(addFeedPage) } } MenuItem { text: qsTr("Update All Categories"); visible: pageStack.depth==3; onClicked: controller.updateAll(); } MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); } } @@ -164,4 +165,9 @@ PageStackWindow { } } } + + Component { + id: addFeedPage + AddFeed {} + } } diff --git a/psa_harmattan/feedingit/setup.py b/psa_harmattan/feedingit/setup.py index 055ca1a..c004963 100644 --- a/psa_harmattan/feedingit/setup.py +++ b/psa_harmattan/feedingit/setup.py @@ -14,6 +14,7 @@ setup(name="feedingit", data_files=[('share/applications',['feedingit.desktop']), ('share/icons/hicolor/64x64/apps', ['feedingit.png']), ('share/feedingit/qml', glob.glob('qml/*.qml')), + ('share/feedingit/qml', glob.glob('qml/*.js')), ('share/feedingit/qml/common', glob.glob('qml/common/*.qml')), ('share/feedingit/qml/common/images', glob.glob('qml/common/images/*')), ('share/feedingit/qml/i18n', glob.glob('qml/i18n/*')),