psa: made text more readable for n950
authorYves Marcoz <yves@marcoz.org>
Mon, 7 Nov 2011 05:40:48 +0000 (21:40 -0800)
committerYves Marcoz <yves@marcoz.org>
Mon, 7 Nov 2011 05:40:48 +0000 (21:40 -0800)
speed improvements

32 files changed:
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/changelog
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/control
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/DEBIAN/md5sums
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/doc/feedingit/changelog.Debian.gz
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/debugging.py
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/feedingit.py
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/ArticleViewer.qml
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Categories.qml
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/Feeds.qml
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/feedingit/usr/share/feedingit/qml/main.qml
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/debian/rules
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/feedingit.base64
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/debugging.py
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/pysrc/feedingit.py
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/ArticleViewer.qml
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Categories.qml
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/Feeds.qml
psa_harmattan/feedingit/deb_dist/feedingit-0.1.0/qml/main.qml
psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.debian.tar.gz
psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1.dsc
psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_all.deb
psa_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_i386.changes
psa_harmattan/feedingit/deb_dist/feedingit_0.1.0.orig.tar.gz
psa_harmattan/feedingit/feedingit.base64
psa_harmattan/feedingit/pysrc/feedingit.py
psa_harmattan/feedingit/pysrc/rss_sqlite.py
psa_harmattan/feedingit/qml/AddFeed.qml
psa_harmattan/feedingit/qml/ArticleViewer.qml
psa_harmattan/feedingit/qml/Categories.qml
psa_harmattan/feedingit/qml/Feeds.qml
psa_harmattan/feedingit/qml/main.qml
src/rss_sqlite.py

index de449c0..1603ef9 100644 (file)
@@ -2,4 +2,4 @@ feedingit (0.1.0-1) unstable; urgency=low
 
   * source package automatically created by stdeb 0.6.0+git
 
- -- Yves <yves@marcoz.org>  Wed, 02 Nov 2011 22:31:15 -0700
+ -- Yves <yves@marcoz.org>  Sun, 06 Nov 2011 21:13:19 -0800
index 9ab30e8..037b0fa 100644 (file)
@@ -2,7 +2,7 @@ Package: feedingit
 Version: 0.1.0-1
 Architecture: all
 Maintainer: Yves <yves@marcoz.org>
-Installed-Size: 752
+Installed-Size: 756
 Depends: python-pyside.qtgui, python-pyside.qtopengl, python-pyside.qtdeclarative, python-dbus, python-gconf
 Breaks: python (<< 2.6)
 Section: user/development
index fda0dd4..6649503 100644 (file)
@@ -1,26 +1,26 @@
 4420c31f88de68fe6e1b7637abb06196  usr/bin/feedingit
 6a42e9aebedfd157062bd5a9616dc935  usr/share/applications/feedingit.desktop
 eda8cc6ffe8d842d6dfe0244b01b3042  usr/share/dbus-1/services/feedingit_status.service
-b397375751bb545415e1f65b21c70732  usr/share/doc/feedingit/changelog.Debian.gz
+8a3883bbf4914140ca72678bfdac9230  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
+4724920e64b0f5d2828c1c245502a115  usr/share/feedingit/debugging.py
 fae02e730b76761d43a626fe19828d5e  usr/share/feedingit/download.py
-ec4243631000259fe155667d0a8b6ab0  usr/share/feedingit/feedingit.py
+b9b632032e30e584115aecab8c809f88  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
+37230c16aad0865afbec03d8105dd491  usr/share/feedingit/qml/AddFeed.qml
 af27062fdba0bc7a3df92116e8340d19  usr/share/feedingit/qml/ArticleDisplay.qml
-aa3d1cd8fc5e9b3d6d81afd4bb7fb129  usr/share/feedingit/qml/ArticleViewer.qml
+594c82729b9e53bd9ca143006e088893  usr/share/feedingit/qml/ArticleViewer.qml
 15083e9a1fac05c8efaaa085dfabcbcb  usr/share/feedingit/qml/Articles.qml
-b3866ebf5a5547fcc5fe371e91d0f25c  usr/share/feedingit/qml/Categories.qml
+555d070ba1db23b7b553628c9ae4ce72  usr/share/feedingit/qml/Categories.qml
 cd30f5eaec0885358261d7a96bfaf8cd  usr/share/feedingit/qml/FeedingIt.qml
-518f406ab7339df92119a9b3bb400c7f  usr/share/feedingit/qml/Feeds.qml
+29e9f5811d5e5bb9b4078fb2fb8d5b17  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
@@ -56,7 +56,7 @@ af11b73b195513d08c17723b41db0b04  usr/share/feedingit/qml/common/images/wmBackIc
 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
-9aca2156baa6699547938aeeec5c8cbd  usr/share/feedingit/qml/main.qml
+c94a3937f0104446e0ceed1eb4aacf78  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
index a48244b..2b6e9a9 100644 (file)
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
index 7330871..91be2b4 100644 (file)
@@ -35,6 +35,7 @@ def my_excepthook(exctype, value, tb):
     original_excepthook(exctype, value, tb)
 
 def init(dot_directory, debug=False, max_logfiles=1, program_name=None):
+    debug = True
     if not os.path.isabs(dot_directory):
         dot_directory = os.path.join(os.path.expanduser("~"), dot_directory)
 
index 867a60c..209c021 100644 (file)
@@ -67,7 +67,7 @@ class Controller(QtCore.QObject):
         
     @QtCore.Slot()
     def updateAll(self):
-        for feed in listing.getListOfFeeds("Manual"):
+        for feed in listing.getSortedListOfKeys("Manual"):
             listing.updateFeed(feed)
             
     @QtCore.Slot(str,str,str)
index 809f365..83898b4 100644 (file)
@@ -53,14 +53,19 @@ Item {
     }
 
     ListView {
-        id: articleList; model: visualModel.parts.list; z: 6
+        id: articleList; /*model: visualModel.parts.list;*/ z: 6
+        model: articles
+        delegate: listing
         width: parent.width; height: parent.height; /*x: 0;*/
         cacheBuffer: 100;
         flickDeceleration: 1500
     }
 
     ListView {
-        id: articleView; model: visualModel.parts.flip; orientation: ListView.Horizontal
+        id: articleView;
+        model: articles;
+        delegate: viewer
+        orientation: ListView.Horizontal
         width: parent.width; height: parent.height; visible: false; z:8
         //onCurrentIndexChanged: photosGridView.positionViewAtIndex(currentIndex, GridView.Contain)
         highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
@@ -99,63 +104,67 @@ Item {
         ]
     }
 
-    VisualDataModel {
-        id: visualModel;
-        delegate: Package {
-                        id: packageItem
-                        Item { id: flipItem; Package.name: 'flip';  width: articleViewer.width; height: articleViewer.height;
-
-                            property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: ""; //http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid : "";
-                            property string html: controller.getArticle(articleViewer.feedid, articleid)
-                            ArticleDisplay {
-                                zoomEnabled: articleViewer.zoomEnabled;
-                                property bool vertPanningEnabled: articleViewer.vertPanningEnabled;
-
-                                states: [ State {
-                                        name: 'articleIsRead';
-                                    when: articleView.visible && articleView.currentIndex == index;
-                                    StateChangeScript {
-                                        name: "myScript"
-                                        script: {
-                                            flipItem.url=path; //"http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid;
-                                            controller.setEntryRead(articleViewer.feedid, articleid)
-                                        }
-                                    }
-                                    }, State {
-                                        name: 'articleIsClose'; when: articleView.visible && Math.abs(articleView.currentIndex-index)<2;
-                                        StateChangeScript {
-                                            script: { flipItem.url=path; } //"http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid;}
-                                        }
-                                    }
-                                ]
-                            }
-                        }
+    Component {
+            id: listing;
+
+            Item {
+                width: articleViewer.width; height: 86
+                id: listItem
+                Rectangle { id: backRect; color: "#dddddd"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: listItem.width; y: 1 }
+                Text {
+                    anchors.fill: backRect
+                    anchors.margins: 5
+                    verticalAlignment: Text.AlignVCenter; text: title;
+                    color: (unread=="True") ? "white" : "#7b97fd";
+
+                    width: listItem.width; wrapMode: Text.WordWrap; font.bold: false;
+                    font.pointSize: 18
+                }
+                MouseArea { anchors.fill: listItem;
+                    onClicked: { articleView.positionViewAtIndex(index, ListView.Contain); articleView.visible = true; }
+                }
+            }
+
+    }
 
-                        Item { Package.name: 'list';
-                                id: wrapper; width: articleViewer.width; height: 86
-                                Item {
-                                    id: moveMe
-                                    Rectangle { id: backRect; color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
-                                    Text {
-                                        anchors.fill: backRect
-                                        anchors.margins: 5
-                                        verticalAlignment: Text.AlignVCenter; text: title; color: (unread=="True") ? "white" : "#7b97fd";
-                                        width: wrapper.width; wrapMode: Text.WordWrap; font.bold: false;
-                                    }
-                                }
-                                MouseArea { anchors.fill: wrapper;
-                                    onClicked: { articleView.positionViewAtIndex(index, ListView.Contain); articleView.visible = true; }
-                                }
+    Component {
+        id: viewer
+        Item {
+            id: flipItem;
+            width: articleViewer.width; height: articleViewer.height;
+
+            property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: "";
+            property string html: controller.getArticle(articleViewer.feedid, articleid)
+            ArticleDisplay {
+                zoomEnabled: articleViewer.zoomEnabled;
+                property bool vertPanningEnabled: articleViewer.vertPanningEnabled;
+
+                states: [ State {
+                        name: 'articleIsRead';
+                    when: articleView.visible && articleView.currentIndex == index;
+                    StateChangeScript {
+                        name: "myScript"
+                        script: {
+                            flipItem.url=path;
+                            controller.setEntryRead(articleViewer.feedid, articleid)
                         }
                     }
-        model: articles
+                    }, State {
+                        name: 'articleIsClose'; when: articleView.visible && Math.abs(articleView.currentIndex-index)<2;
+                        StateChangeScript {
+                            script: { flipItem.url=path; }
+                        }
+                    }
+                ]
+            }
+        }
     }
 
     XmlListModel {
         id: articles
 
         //source: articleViewer.feedid == "" ? "" : "http://localhost:8000/articles/" + feedid + "?onlyUnread=" + hideReadArticles
-        xml: articleViewer.feedid == "" ? "" : controller.getArticlesXml(articleViewer.feedid)
+        xml: articleViewer.feedid == "" ? "<?xml version=\"1.0\" encoding=\"utf-8\"?><xml></xml>" : controller.getArticlesXml(articleViewer.feedid)
         query: "/xml/article"
 
         XmlRole { name: "title"; query: "title/string()" }
index 03d5eda..5a97370 100644 (file)
@@ -36,14 +36,22 @@ Item {
             Item {
                 id: moveMe
                 height: parent.height
-                Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
-                Rectangle {
-                    x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
+                Rectangle { color: "#eeeeee"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
+//                Rectangle {
+//                    x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
 
-                }
+//                }
                 Column {
-                    x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2
-                    Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
+                    x: 15;
+                    width: wrapper.ListView.view.width /*- 95; y: 15*/; spacing: 2
+                    anchors.margins: 5
+                    height: parent.height
+
+                    Text { text: title; color: "white"; width: parent.width; font.bold: true;
+                        height: parent.height
+                        elide: Text.ElideRight; style: Text.Raised; styleColor: "black"; font.pointSize: 20
+                        verticalAlignment: Text.AlignVCenter;
+                    }
                     //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
                 }
                 Item {
index 12d1c89..32b5919 100644 (file)
@@ -56,7 +56,7 @@ Item {
 
             Item {
                 id: moveMe
-                Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
+                Rectangle { color: "#dddddd"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
                 Rectangle {
                     x: 3; y: 4; width: 77; height: 77; color: "#000000"; smooth: true
                     Image { width:32; height: 32; anchors.verticalCenter: parent.verticalCenter; anchors.horizontalCenter: parent.horizontalCenter;
@@ -69,8 +69,8 @@ Item {
 
                 Column {
                     x: 92; width: wrapper.ListView.view.width - 95; y: 5; spacing: 2
-                    Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
-                    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: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"; font.pointSize: 18 }
+                    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"; font.pointSize: 12 }
                     //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
                 }
 ////                Item {
index dad5f3a..e38c12a 100644 (file)
@@ -10,6 +10,8 @@ PageStackWindow {
     property string feedid
     property string catid
 
+    Component.onCompleted: theme.inverted= true
+
     ToolBarLayout {
         id: commonTools
         visible: false
@@ -28,7 +30,7 @@ PageStackWindow {
         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("Update All Categories"); onClicked: controller.updateAll(); }
             MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
         }
     }
@@ -146,13 +148,15 @@ PageStackWindow {
                 }
 
                 ToolIcon {
-                    platformIconId: "toolbar-prev"
+                    platformIconId: "toolbar-previous"
+                    visible: flipper.articleShown
                     //anchors.right: (parent === undefined) ? undefined : parent.right
                     onClicked: flipper.prev();
                 }
 
                 ToolIcon {
                     platformIconId: "toolbar-next"
+                    visible: flipper.articleShown
                     //anchors.right: (parent === undefined) ? undefined : parent.right
                     onClicked: flipper.next()
                 }
index 587de56..2b2c6df 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 # This file was automatically generated by stdeb 0.6.0+git at
-# Wed, 02 Nov 2011 22:31:15 -0700
+# Sun, 06 Nov 2011 21:13:19 -0800
 
 %:
        dh $@ --with python2 --buildsystem=python_distutils
index 9808218..8f4fc44 100644 (file)
@@ -1,4 +1,4 @@
-begin-base64 600 /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/feedingit.png
+begin-base64 644 /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/feedingit.png
 iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0
 d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEptJREFUeNrkWwl0FFXWvlW9
 pLN0kiaEEAiYsAaQNXBYZJmBYfGI/8jyH/k9uCC4/IAMjMgIDDMIItsoKKsH
index 7330871..91be2b4 100644 (file)
@@ -35,6 +35,7 @@ def my_excepthook(exctype, value, tb):
     original_excepthook(exctype, value, tb)
 
 def init(dot_directory, debug=False, max_logfiles=1, program_name=None):
+    debug = True
     if not os.path.isabs(dot_directory):
         dot_directory = os.path.join(os.path.expanduser("~"), dot_directory)
 
index 867a60c..209c021 100644 (file)
@@ -67,7 +67,7 @@ class Controller(QtCore.QObject):
         
     @QtCore.Slot()
     def updateAll(self):
-        for feed in listing.getListOfFeeds("Manual"):
+        for feed in listing.getSortedListOfKeys("Manual"):
             listing.updateFeed(feed)
             
     @QtCore.Slot(str,str,str)
index 809f365..83898b4 100644 (file)
@@ -53,14 +53,19 @@ Item {
     }
 
     ListView {
-        id: articleList; model: visualModel.parts.list; z: 6
+        id: articleList; /*model: visualModel.parts.list;*/ z: 6
+        model: articles
+        delegate: listing
         width: parent.width; height: parent.height; /*x: 0;*/
         cacheBuffer: 100;
         flickDeceleration: 1500
     }
 
     ListView {
-        id: articleView; model: visualModel.parts.flip; orientation: ListView.Horizontal
+        id: articleView;
+        model: articles;
+        delegate: viewer
+        orientation: ListView.Horizontal
         width: parent.width; height: parent.height; visible: false; z:8
         //onCurrentIndexChanged: photosGridView.positionViewAtIndex(currentIndex, GridView.Contain)
         highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
@@ -99,63 +104,67 @@ Item {
         ]
     }
 
-    VisualDataModel {
-        id: visualModel;
-        delegate: Package {
-                        id: packageItem
-                        Item { id: flipItem; Package.name: 'flip';  width: articleViewer.width; height: articleViewer.height;
-
-                            property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: ""; //http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid : "";
-                            property string html: controller.getArticle(articleViewer.feedid, articleid)
-                            ArticleDisplay {
-                                zoomEnabled: articleViewer.zoomEnabled;
-                                property bool vertPanningEnabled: articleViewer.vertPanningEnabled;
-
-                                states: [ State {
-                                        name: 'articleIsRead';
-                                    when: articleView.visible && articleView.currentIndex == index;
-                                    StateChangeScript {
-                                        name: "myScript"
-                                        script: {
-                                            flipItem.url=path; //"http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid;
-                                            controller.setEntryRead(articleViewer.feedid, articleid)
-                                        }
-                                    }
-                                    }, State {
-                                        name: 'articleIsClose'; when: articleView.visible && Math.abs(articleView.currentIndex-index)<2;
-                                        StateChangeScript {
-                                            script: { flipItem.url=path; } //"http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid;}
-                                        }
-                                    }
-                                ]
-                            }
-                        }
+    Component {
+            id: listing;
+
+            Item {
+                width: articleViewer.width; height: 86
+                id: listItem
+                Rectangle { id: backRect; color: "#dddddd"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: listItem.width; y: 1 }
+                Text {
+                    anchors.fill: backRect
+                    anchors.margins: 5
+                    verticalAlignment: Text.AlignVCenter; text: title;
+                    color: (unread=="True") ? "white" : "#7b97fd";
+
+                    width: listItem.width; wrapMode: Text.WordWrap; font.bold: false;
+                    font.pointSize: 18
+                }
+                MouseArea { anchors.fill: listItem;
+                    onClicked: { articleView.positionViewAtIndex(index, ListView.Contain); articleView.visible = true; }
+                }
+            }
+
+    }
 
-                        Item { Package.name: 'list';
-                                id: wrapper; width: articleViewer.width; height: 86
-                                Item {
-                                    id: moveMe
-                                    Rectangle { id: backRect; color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
-                                    Text {
-                                        anchors.fill: backRect
-                                        anchors.margins: 5
-                                        verticalAlignment: Text.AlignVCenter; text: title; color: (unread=="True") ? "white" : "#7b97fd";
-                                        width: wrapper.width; wrapMode: Text.WordWrap; font.bold: false;
-                                    }
-                                }
-                                MouseArea { anchors.fill: wrapper;
-                                    onClicked: { articleView.positionViewAtIndex(index, ListView.Contain); articleView.visible = true; }
-                                }
+    Component {
+        id: viewer
+        Item {
+            id: flipItem;
+            width: articleViewer.width; height: articleViewer.height;
+
+            property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: "";
+            property string html: controller.getArticle(articleViewer.feedid, articleid)
+            ArticleDisplay {
+                zoomEnabled: articleViewer.zoomEnabled;
+                property bool vertPanningEnabled: articleViewer.vertPanningEnabled;
+
+                states: [ State {
+                        name: 'articleIsRead';
+                    when: articleView.visible && articleView.currentIndex == index;
+                    StateChangeScript {
+                        name: "myScript"
+                        script: {
+                            flipItem.url=path;
+                            controller.setEntryRead(articleViewer.feedid, articleid)
                         }
                     }
-        model: articles
+                    }, State {
+                        name: 'articleIsClose'; when: articleView.visible && Math.abs(articleView.currentIndex-index)<2;
+                        StateChangeScript {
+                            script: { flipItem.url=path; }
+                        }
+                    }
+                ]
+            }
+        }
     }
 
     XmlListModel {
         id: articles
 
         //source: articleViewer.feedid == "" ? "" : "http://localhost:8000/articles/" + feedid + "?onlyUnread=" + hideReadArticles
-        xml: articleViewer.feedid == "" ? "" : controller.getArticlesXml(articleViewer.feedid)
+        xml: articleViewer.feedid == "" ? "<?xml version=\"1.0\" encoding=\"utf-8\"?><xml></xml>" : controller.getArticlesXml(articleViewer.feedid)
         query: "/xml/article"
 
         XmlRole { name: "title"; query: "title/string()" }
index 03d5eda..5a97370 100644 (file)
@@ -36,14 +36,22 @@ Item {
             Item {
                 id: moveMe
                 height: parent.height
-                Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
-                Rectangle {
-                    x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
+                Rectangle { color: "#eeeeee"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
+//                Rectangle {
+//                    x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
 
-                }
+//                }
                 Column {
-                    x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2
-                    Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
+                    x: 15;
+                    width: wrapper.ListView.view.width /*- 95; y: 15*/; spacing: 2
+                    anchors.margins: 5
+                    height: parent.height
+
+                    Text { text: title; color: "white"; width: parent.width; font.bold: true;
+                        height: parent.height
+                        elide: Text.ElideRight; style: Text.Raised; styleColor: "black"; font.pointSize: 20
+                        verticalAlignment: Text.AlignVCenter;
+                    }
                     //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
                 }
                 Item {
index 12d1c89..32b5919 100644 (file)
@@ -56,7 +56,7 @@ Item {
 
             Item {
                 id: moveMe
-                Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
+                Rectangle { color: "#dddddd"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
                 Rectangle {
                     x: 3; y: 4; width: 77; height: 77; color: "#000000"; smooth: true
                     Image { width:32; height: 32; anchors.verticalCenter: parent.verticalCenter; anchors.horizontalCenter: parent.horizontalCenter;
@@ -69,8 +69,8 @@ Item {
 
                 Column {
                     x: 92; width: wrapper.ListView.view.width - 95; y: 5; spacing: 2
-                    Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
-                    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: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"; font.pointSize: 18 }
+                    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"; font.pointSize: 12 }
                     //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
                 }
 ////                Item {
index dad5f3a..e38c12a 100644 (file)
@@ -10,6 +10,8 @@ PageStackWindow {
     property string feedid
     property string catid
 
+    Component.onCompleted: theme.inverted= true
+
     ToolBarLayout {
         id: commonTools
         visible: false
@@ -28,7 +30,7 @@ PageStackWindow {
         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("Update All Categories"); onClicked: controller.updateAll(); }
             MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
         }
     }
@@ -146,13 +148,15 @@ PageStackWindow {
                 }
 
                 ToolIcon {
-                    platformIconId: "toolbar-prev"
+                    platformIconId: "toolbar-previous"
+                    visible: flipper.articleShown
                     //anchors.right: (parent === undefined) ? undefined : parent.right
                     onClicked: flipper.prev();
                 }
 
                 ToolIcon {
                     platformIconId: "toolbar-next"
+                    visible: flipper.articleShown
                     //anchors.right: (parent === undefined) ? undefined : parent.right
                     onClicked: flipper.next()
                 }
index de46b75..9b03374 100644 (file)
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
index f1bbbaa..91c1808 100644 (file)
@@ -7,11 +7,11 @@ Maintainer: Yves <yves@marcoz.org>
 Standards-Version: 3.9.1
 Build-Depends: python-all (>= 2.6.6-3), debhelper (>= 7.4.3)
 Checksums-Sha1: 
- 2f341ab99979c935d4c6bab874123e8f32e5957a 176151 feedingit_0.1.0.orig.tar.gz
- a48eaf1bba284aab28af18e6b34a116bb34f3a41 858 feedingit_0.1.0-1.debian.tar.gz
+ 12a7cdb7b5cdb98d79bda6e6a4dc2562685423c3 176240 feedingit_0.1.0.orig.tar.gz
+ 954096a5d2fa51bb359517d7578c684e4625f237 859 feedingit_0.1.0-1.debian.tar.gz
 Checksums-Sha256: 
- 903c1ce0f7d30686f75c066fb7b502ce21c4e0ad8ac5c43ea139b72a46eefde5 176151 feedingit_0.1.0.orig.tar.gz
- 88993852f99c5a0dfa0aac883b3628e58941b3644088b20b7a781be70d515cec 858 feedingit_0.1.0-1.debian.tar.gz
+ 8421abef41b572247ce1292445c075eec032136b121e9d3bc550897881ea975a 176240 feedingit_0.1.0.orig.tar.gz
+ 229779d81f6541d46086a972ee2d93db66abd4a7adc8be746f5c97d585aa4044 859 feedingit_0.1.0-1.debian.tar.gz
 Files: 
- 9e3d4b56204529bdf42c76f8c7ff2eb7 176151 feedingit_0.1.0.orig.tar.gz
- 0900f02698c9513ccdeed0be258e7aee 858 feedingit_0.1.0-1.debian.tar.gz
+ c58fcc9048d74f69926cb53696c75c5e 176240 feedingit_0.1.0.orig.tar.gz
+ e143c5daf921dac855fb227f77646a0e 859 feedingit_0.1.0-1.debian.tar.gz
index 4fc3f95..e0cb412 100644 (file)
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
index 97d26d3..bfead88 100644 (file)
@@ -1,5 +1,5 @@
 Format: 1.8
-Date: Wed, 02 Nov 2011 22:31:15 -0700
+Date: Sun, 06 Nov 2011 21:13:19 -0800
 Source: feedingit
 Binary: feedingit
 Architecture: source all
@@ -15,17 +15,17 @@ Changes:
  .
    * source package automatically created by stdeb 0.6.0+git
 Checksums-Sha1: 
- 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
+ ec3bc8cdf6562addb5a09da997d8ebdcd8f94b51 753 feedingit_0.1.0-1.dsc
+ 12a7cdb7b5cdb98d79bda6e6a4dc2562685423c3 176240 feedingit_0.1.0.orig.tar.gz
+ 954096a5d2fa51bb359517d7578c684e4625f237 859 feedingit_0.1.0-1.debian.tar.gz
+ 6edf2daadc2cc46ce0a0733ac666207db8ca12b7 165780 feedingit_0.1.0-1_all.deb
 Checksums-Sha256: 
- 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
+ 5b4b10db2bd978e8b26dbda2533912d30a484ce10427ead1667517896f0f4c6c 753 feedingit_0.1.0-1.dsc
+ 8421abef41b572247ce1292445c075eec032136b121e9d3bc550897881ea975a 176240 feedingit_0.1.0.orig.tar.gz
+ 229779d81f6541d46086a972ee2d93db66abd4a7adc8be746f5c97d585aa4044 859 feedingit_0.1.0-1.debian.tar.gz
+ 9e5238dfd7dded6daa107482e4a205442c57042a39e273c740ae8328e65a08b7 165780 feedingit_0.1.0-1_all.deb
 Files: 
- 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
+ 87eb4279d8f3744a01cf5de3ee7f87fe 753 user/development optional feedingit_0.1.0-1.dsc
+ c58fcc9048d74f69926cb53696c75c5e 176240 user/development optional feedingit_0.1.0.orig.tar.gz
+ e143c5daf921dac855fb227f77646a0e 859 user/development optional feedingit_0.1.0-1.debian.tar.gz
+ 308928231246478c11cd5078aba9b193 165780 user/development optional feedingit_0.1.0-1_all.deb
index 868fb65..a9857d9 100644 (file)
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
index 9808218..8f4fc44 100644 (file)
@@ -1,4 +1,4 @@
-begin-base64 600 /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/feedingit.png
+begin-base64 644 /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit/psa_harmattan/feedingit/feedingit.png
 iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0
 d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEptJREFUeNrkWwl0FFXWvlW9
 pLN0kiaEEAiYsAaQNXBYZJmBYfGI/8jyH/k9uCC4/IAMjMgIDDMIItsoKKsH
index 867a60c..209c021 100644 (file)
@@ -67,7 +67,7 @@ class Controller(QtCore.QObject):
         
     @QtCore.Slot()
     def updateAll(self):
-        for feed in listing.getListOfFeeds("Manual"):
+        for feed in listing.getSortedListOfKeys("Manual"):
             listing.updateFeed(feed)
             
     @QtCore.Slot(str,str,str)
index 4b4d276..f90ffc3 100644 (file)
@@ -809,7 +809,7 @@ class Feed(BaseObject):
         #text = '''<div style="color: black; background-color: white;">'''
         text = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
         text += "<html><head><title>" + title + "</title>"
-        text += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\n'
+        text += '<meta http-equiv="Content-Type" content="text/html; charset="UTF-8"/>\n'
         #text += '<style> body {-webkit-user-select: none;} </style>'
         text += '</head><body bgcolor=\"#ffffff\"><div><a href=\"' + link + '\">' + title + "</a>"
         if author != None:
index 31e97bd..6b25fd9 100644 (file)
@@ -47,7 +47,8 @@ Page {
                          if (selectedIndex>=0) {
                              var feedTitle = searchDialog.model.get(searchDialog.selectedIndex).name;
                              var feedUrl = searchDialog.model.get(searchDialog.selectedIndex).url;
-                             container.addFeed(feedTitle,feedUrl,1);
+                             //controller.addFeed(feedTitle,feedUrl,1);
+                             categoryDialog.confirmCategory(feedTitle, feedUrl);
                              console.log("Adding feed "+feedTitle+" at " +feedUrl);
                          }
                      }
@@ -75,10 +76,10 @@ Page {
                 Button {
                     id: urlButton
                     text: "Add"
-                    checkable: true
                     onClicked: {
                         console.log("Adding "+urlInput.text)
-                        container.addFeed("",urlInput.text,1);
+                        //controller.addFeed("",urlInput.text,1);
+                        categoryDialog.confirmCategory("", urlInput.text);
                     }
                 }
             }
@@ -103,43 +104,49 @@ Page {
             }
         }
     }
-}
-
-
-//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()}
-//                }
-//}
+    SelectionDialog {
+             id: categoryDialog
+             titleText: "Select category:"
+             property string feedTitle
+             property string feedUrl
+
+             //property variant listModel: ListModel {}
+
+             function createListModel() {
+                 var listModel = Qt.createQmlObject('import QtQuick 1.0; ListModel {}', categoryDialog);
+                 for (var i=0;i<categories.count;i++) {
+                     listModel.append({"name": categories.get(i).title, "catid": categories.get(i).catid });
+                 }
+                 model = listModel
+                 //console.log(listModel.count)
+             }
+
+             function confirmCategory(title, url) {
+                 //categoryDialog.selectedIndex = -1;
+                 createListModel();
+                 feedTitle = title
+                 feedUrl = url
+                 open();
+             }
+
+             //model: []
+             //model: categories
+
+             XmlListModel {
+                 id: categories
+                 xml: controller.getCategoryXml()
+                 query: "/xml/category"
+                 XmlRole { name: "title"; query: "catname/string()" }
+                 XmlRole { name: "catid"; query: "catid/string()"; isKey: true }
+             }
+
+             onSelectedIndexChanged: {
+                 if (selectedIndex>=0) {
+                     controller.addFeed(feedTitle,feedUrl,categoryDialog.model.get(categoryDialog.selectedIndex).catid);
+                     console.log("Adding feed "+feedTitle+" at " +feedUrl + " in " + categoryDialog.model.get(categoryDialog.selectedIndex).catid);
+                 }
+                 categoryDialog.selectedIndex = -1;
+             }
+    }
+}
index 809f365..83898b4 100644 (file)
@@ -53,14 +53,19 @@ Item {
     }
 
     ListView {
-        id: articleList; model: visualModel.parts.list; z: 6
+        id: articleList; /*model: visualModel.parts.list;*/ z: 6
+        model: articles
+        delegate: listing
         width: parent.width; height: parent.height; /*x: 0;*/
         cacheBuffer: 100;
         flickDeceleration: 1500
     }
 
     ListView {
-        id: articleView; model: visualModel.parts.flip; orientation: ListView.Horizontal
+        id: articleView;
+        model: articles;
+        delegate: viewer
+        orientation: ListView.Horizontal
         width: parent.width; height: parent.height; visible: false; z:8
         //onCurrentIndexChanged: photosGridView.positionViewAtIndex(currentIndex, GridView.Contain)
         highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem
@@ -99,63 +104,67 @@ Item {
         ]
     }
 
-    VisualDataModel {
-        id: visualModel;
-        delegate: Package {
-                        id: packageItem
-                        Item { id: flipItem; Package.name: 'flip';  width: articleViewer.width; height: articleViewer.height;
-
-                            property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: ""; //http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid : "";
-                            property string html: controller.getArticle(articleViewer.feedid, articleid)
-                            ArticleDisplay {
-                                zoomEnabled: articleViewer.zoomEnabled;
-                                property bool vertPanningEnabled: articleViewer.vertPanningEnabled;
-
-                                states: [ State {
-                                        name: 'articleIsRead';
-                                    when: articleView.visible && articleView.currentIndex == index;
-                                    StateChangeScript {
-                                        name: "myScript"
-                                        script: {
-                                            flipItem.url=path; //"http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid;
-                                            controller.setEntryRead(articleViewer.feedid, articleid)
-                                        }
-                                    }
-                                    }, State {
-                                        name: 'articleIsClose'; when: articleView.visible && Math.abs(articleView.currentIndex-index)<2;
-                                        StateChangeScript {
-                                            script: { flipItem.url=path; } //"http://localhost:8000/html/" + articleViewer.feedid + "/" + articleid;}
-                                        }
-                                    }
-                                ]
-                            }
-                        }
+    Component {
+            id: listing;
+
+            Item {
+                width: articleViewer.width; height: 86
+                id: listItem
+                Rectangle { id: backRect; color: "#dddddd"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: listItem.width; y: 1 }
+                Text {
+                    anchors.fill: backRect
+                    anchors.margins: 5
+                    verticalAlignment: Text.AlignVCenter; text: title;
+                    color: (unread=="True") ? "white" : "#7b97fd";
+
+                    width: listItem.width; wrapMode: Text.WordWrap; font.bold: false;
+                    font.pointSize: 18
+                }
+                MouseArea { anchors.fill: listItem;
+                    onClicked: { articleView.positionViewAtIndex(index, ListView.Contain); articleView.visible = true; }
+                }
+            }
+
+    }
 
-                        Item { Package.name: 'list';
-                                id: wrapper; width: articleViewer.width; height: 86
-                                Item {
-                                    id: moveMe
-                                    Rectangle { id: backRect; color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
-                                    Text {
-                                        anchors.fill: backRect
-                                        anchors.margins: 5
-                                        verticalAlignment: Text.AlignVCenter; text: title; color: (unread=="True") ? "white" : "#7b97fd";
-                                        width: wrapper.width; wrapMode: Text.WordWrap; font.bold: false;
-                                    }
-                                }
-                                MouseArea { anchors.fill: wrapper;
-                                    onClicked: { articleView.positionViewAtIndex(index, ListView.Contain); articleView.visible = true; }
-                                }
+    Component {
+        id: viewer
+        Item {
+            id: flipItem;
+            width: articleViewer.width; height: articleViewer.height;
+
+            property string url: (articleView.visible && Math.abs(articleView.currentIndex-index)<2) ? path: "";
+            property string html: controller.getArticle(articleViewer.feedid, articleid)
+            ArticleDisplay {
+                zoomEnabled: articleViewer.zoomEnabled;
+                property bool vertPanningEnabled: articleViewer.vertPanningEnabled;
+
+                states: [ State {
+                        name: 'articleIsRead';
+                    when: articleView.visible && articleView.currentIndex == index;
+                    StateChangeScript {
+                        name: "myScript"
+                        script: {
+                            flipItem.url=path;
+                            controller.setEntryRead(articleViewer.feedid, articleid)
                         }
                     }
-        model: articles
+                    }, State {
+                        name: 'articleIsClose'; when: articleView.visible && Math.abs(articleView.currentIndex-index)<2;
+                        StateChangeScript {
+                            script: { flipItem.url=path; }
+                        }
+                    }
+                ]
+            }
+        }
     }
 
     XmlListModel {
         id: articles
 
         //source: articleViewer.feedid == "" ? "" : "http://localhost:8000/articles/" + feedid + "?onlyUnread=" + hideReadArticles
-        xml: articleViewer.feedid == "" ? "" : controller.getArticlesXml(articleViewer.feedid)
+        xml: articleViewer.feedid == "" ? "<?xml version=\"1.0\" encoding=\"utf-8\"?><xml></xml>" : controller.getArticlesXml(articleViewer.feedid)
         query: "/xml/article"
 
         XmlRole { name: "title"; query: "title/string()" }
index 03d5eda..5a97370 100644 (file)
@@ -36,14 +36,22 @@ Item {
             Item {
                 id: moveMe
                 height: parent.height
-                Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
-                Rectangle {
-                    x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
+                Rectangle { color: "#eeeeee"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
+//                Rectangle {
+//                    x: 6; y: 4; width: 77; height: parent.height - 9; color: "white"; smooth: true
 
-                }
+//                }
                 Column {
-                    x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2
-                    Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
+                    x: 15;
+                    width: wrapper.ListView.view.width /*- 95; y: 15*/; spacing: 2
+                    anchors.margins: 5
+                    height: parent.height
+
+                    Text { text: title; color: "white"; width: parent.width; font.bold: true;
+                        height: parent.height
+                        elide: Text.ElideRight; style: Text.Raised; styleColor: "black"; font.pointSize: 20
+                        verticalAlignment: Text.AlignVCenter;
+                    }
                     //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
                 }
                 Item {
index 12d1c89..32b5919 100644 (file)
@@ -56,7 +56,7 @@ Item {
 
             Item {
                 id: moveMe
-                Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
+                Rectangle { color: "#dddddd"; opacity: index % 2 ? 0.2 : 0.4; height: 84; width: wrapper.width; y: 1 }
                 Rectangle {
                     x: 3; y: 4; width: 77; height: 77; color: "#000000"; smooth: true
                     Image { width:32; height: 32; anchors.verticalCenter: parent.verticalCenter; anchors.horizontalCenter: parent.horizontalCenter;
@@ -69,8 +69,8 @@ Item {
 
                 Column {
                     x: 92; width: wrapper.ListView.view.width - 95; y: 5; spacing: 2
-                    Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
-                    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: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"; font.pointSize: 18 }
+                    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"; font.pointSize: 12 }
                     //Text { text: feedname; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
                 }
 ////                Item {
index dad5f3a..e38c12a 100644 (file)
@@ -10,6 +10,8 @@ PageStackWindow {
     property string feedid
     property string catid
 
+    Component.onCompleted: theme.inverted= true
+
     ToolBarLayout {
         id: commonTools
         visible: false
@@ -28,7 +30,7 @@ PageStackWindow {
         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("Update All Categories"); onClicked: controller.updateAll(); }
             MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
         }
     }
@@ -146,13 +148,15 @@ PageStackWindow {
                 }
 
                 ToolIcon {
-                    platformIconId: "toolbar-prev"
+                    platformIconId: "toolbar-previous"
+                    visible: flipper.articleShown
                     //anchors.right: (parent === undefined) ? undefined : parent.right
                     onClicked: flipper.prev();
                 }
 
                 ToolIcon {
                     platformIconId: "toolbar-next"
+                    visible: flipper.articleShown
                     //anchors.right: (parent === undefined) ? undefined : parent.right
                     onClicked: flipper.next()
                 }
index 129f500..d243933 100644 (file)
@@ -803,7 +803,7 @@ class Feed(BaseObject):
         #text = '''<div style="color: black; background-color: white;">'''
         text = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
         text += "<html><head><title>" + title + "</title>"
-        text += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\n'
+        text += '<meta http-equiv="Content-Type" content="text/html; charset="UTF-8"/>\n'
         #text += '<style> body {-webkit-user-select: none;} </style>'
         text += '</head><body bgcolor=\"#ffffff\"><div><a href=\"' + link + '\">' + title + "</a>"
         if author != None: