+++ /dev/null
-psa build-deb
-#scp /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit_harmattan/feedingit/deb_dist/feedingit_0.1.0-1_all.deb root@192.168.1.136:
-scp /scratchbox/users/ymarcoz/home/ymarcoz/workspace/feedingit-pyside/psa/feedingit/deb_dist/feedingit_0.1.0-1_all.deb root@192.168.1.136:
-ssh root@192.168.1.136 "dpkg -i --force-depends-version feedingit_0.1.0-1_all.deb"
self.serial_execution_lock.release ()
have_serial_execution_lock = False
for img in images:
+ if not 'src' in img:
+ continue
+
filename = self.addImage(
configdir, self.key, baseurl, img['src'],
opener=opener)
# Check that Woodchuck's state is up to date with respect our
# state.
- updater = os.path.basename(sys.argv[0]) == 'update_feeds.py'
- wc_init (self, True if updater else False)
- if wc().available() and updater:
- # The list of known streams.
- streams = wc().streams_list ()
- stream_ids = [s.identifier for s in streams]
-
- # Register any unknown streams. Remove known streams from
- # STREAMS_IDS.
- for key in self.getListOfFeeds():
- title = self.getFeedTitle(key)
- # XXX: We should also check whether the list of
- # articles/objects in each feed/stream is up to date.
- if key not in stream_ids:
- logger.debug(
- "Registering previously unknown channel: %s (%s)"
- % (key, title,))
- # Use a default refresh interval of 6 hours.
- wc().stream_register (key, title, 6 * 60 * 60)
- else:
- # Make sure the human readable name is up to date.
- if wc()[key].human_readable_name != title:
- wc()[key].human_readable_name = title
- stream_ids.remove (key)
-
-
- # Unregister any streams that are no longer subscribed to.
- for id in stream_ids:
- logger.debug("Unregistering %s" % (id,))
- w.stream_unregister (id)
+ try:
+ updater = os.path.basename(sys.argv[0]) == 'update_feeds.py'
+ wc_init (self, True if updater else False)
+ if wc().available() and updater:
+ # The list of known streams.
+ streams = wc().streams_list ()
+ stream_ids = [s.identifier for s in streams]
+
+ # Register any unknown streams. Remove known streams from
+ # STREAMS_IDS.
+ for key in self.getListOfFeeds():
+ title = self.getFeedTitle(key)
+ # XXX: We should also check whether the list of
+ # articles/objects in each feed/stream is up to date.
+ if key not in stream_ids:
+ logger.debug(
+ "Registering previously unknown channel: %s (%s)"
+ % (key, title,))
+ # Use a default refresh interval of 6 hours.
+ wc().stream_register (key, title, 6 * 60 * 60)
+ else:
+ # Make sure the human readable name is up to date.
+ if wc()[key].human_readable_name != title:
+ wc()[key].human_readable_name = title
+ stream_ids.remove (key)
+
+
+ # Unregister any streams that are no longer subscribed to.
+ for id in stream_ids:
+ logger.debug("Unregistering %s" % (id,))
+ w.stream_unregister (id)
+ except Exception:
+ logger.exception("Registering streams with Woodchuck")
def importOldFormatFeeds(self):
"""This function loads feeds that are saved in an outdated format, and converts them to sqlite"""
return self.lookup('categories', 'title', id)
def getSortedListOfKeys(self, order, onlyUnread=False, category=1):
- if order == "Most unread":
+ if order == "Most unread":
tmp = "ORDER BY unread DESC"
#keyorder = sorted(feedInfo, key = lambda k: feedInfo[k][1], reverse=True)
elif order == "Least unread":
return False
# Woodchuck upcalls.
- def stream_update_cb(self, stream):
+ def stream_update_cb(self, stream, *args, **kwargs):
logger.debug("stream update called on %s (%s)"
% (stream.human_readable_name, stream.identifier,))
% (stream.identifier, traceback.format_exc ()))
def object_transfer_cb(self, stream, object,
- version, filename, quality):
- log ("object transfer called on %s (%s) in stream %s (%s)"
- % (object.human_readable_name, object.identifier,
- stream.human_readable_name, stream.identifier))
+ version, filename, quality,
+ *args, **kwargs):
+ logger.debug ("object transfer called on %s (%s) in stream %s (%s)"
+ % (object.human_readable_name, object.identifier,
+ stream.human_readable_name, stream.identifier))
+ try:
+ self[stream.identifier][object.identifier].dont_transfer = True
+ except Exception, e:
+ logger.warn("Setting '%s'(%s).'%s'(%s).DontTransfer: %s"
+ % (stream.human_readable_name, stream.identifier,
+ object.human_readable_name, object.identifier,
+ str(e)))
_w = None
def wc_init(listing, request_feedback=False):
width: parent.width; height: parent.height;
//anchors.top: parent.top; anchors.bottom: parent.bottom
property bool inEditMode: true
+ signal categoryClicked(string cat)
function reload() {
categories.reload();
visible: inEditMode
}
}
- MouseArea { enabled: !inEditMode; anchors.fill: wrapper; onClicked: { container.categoryClicked(catid); } }
+ MouseArea { enabled: !inEditMode; anchors.fill: wrapper; onClicked: { categoryClicked(catid); } }
}
}
}
x: parent.width; height: parent.height;
anchors.top: parent.top; anchors.bottom: parent.bottom
+ signal feedClicked(string feedid)
+
function reload() {
feeds.xml = catid == "" ? "" : controller.getFeedsXml(catid);
//feeds.reload()
MouseArea {
anchors.fill: wrapper;
onClicked: {
- controller.feedClicked(model.feed)
- container.feedClicked(feedid, updating=="True")
+ //controller.feedClicked(model.feed)
+ feedClicked(feedid)
}
}
PageStackWindow {
- initialPage: mainPage
+ initialPage: categoryPage
- Page{
- id: mainPage
- Component.onCompleted: {
- var main = Qt.createComponent("FeedingIt.qml");
- main.createObject(mainPage);
+ ToolBarLayout {
+ id: commonTools
+ visible: false
+ ToolIcon { iconId: "toolbar-back"; onClicked: { myMenu.close(); pageStack.pop(); }
+ visible: pageStack.depth>1 }
+ ToolIcon {
+ platformIconId: "toolbar-view-menu"
+ anchors.right: (parent === undefined) ? undefined : parent.right
+ onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
+ }
+ }
+
+ Menu {
+ id: myMenu
+ visualParent: pageStack
+ MenuLayout {
+ MenuItem { text: qsTr("About FeedingIt"); onClicked: query.open(); }
+ }
+ }
+
+ QueryDialog {
+ id: query
+ icon: "common/images/feedingit.png"
+ titleText: "Feedingit RSS Reader"
+ message: "Version: 0.0.9"
+ +"<br><br>FeedingIt RSS Reader.<br>"
+ +"<br>© 2011 feedingit.marcoz.org"
+ +"<br>http://feedingit.marcoz.org"
+ acceptButtonText: "OK"
+ }
+
+// Page{
+// id: mainPage
+// Component.onCompleted: {
+// var main = Qt.createComponent("FeedingIt.qml");
+// main.createObject(mainPage);
+// }
+// }
+
+ Component {
+ id: categoryPage
+ Page {
+ tools: commonTools
+ Categories {
+ onCategoryClicked: pageStack.push(feedsPage, {catid: catid})
+ }
+ }
+ }
+
+ Component {
+ id: feedsPage
+ Page {
+ tools: commonTools
+ Feeds {
+ id: feedsItem
+
+ onFeedClicked: pageStack.push(articlesPage, {feedid: feedid})
+ }
+ }
+ }
+
+ Component {
+ id: articlesPage
+ Page {
+ tools: commonTools
+ ArticleViewer {
+ id: flipper
+ }
}
}
}
--- /dev/null
+/* File generated by Qt Creator, version 2.2.1 */
+
+import QmlProject 1.1
+
+Project {
+ mainFile: "main.qml"
+
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: "."
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ "../exampleplugin" ]
+}