From 94859f53f4e66a80fd5ef34e421a5f419d6e01f8 Mon Sep 17 00:00:00 2001 From: Yves Date: Sun, 16 May 2010 10:46:57 -0700 Subject: [PATCH] Added documentation.txt from Rui DaCosta --- documentation.txt | 11 +++++++++++ src/FeedingIt.py | 10 +++++----- src/feedingit_widget.py | 32 ++++++++++++++++---------------- src/update_feeds.py | 8 ++++---- 4 files changed, 36 insertions(+), 25 deletions(-) create mode 100644 documentation.txt diff --git a/documentation.txt b/documentation.txt new file mode 100644 index 0000000..0cb4eb8 --- /dev/null +++ b/documentation.txt @@ -0,0 +1,11 @@ +Preferences: +------------ +Font Size for Article Listing: The size, in points, in which the article headings in the feed article list appear +Font Size for Articles: The size, in points, in which the article text appears +Expiry for Articles: The time, in hours, from the article published time, after which it will be removed if it has been read. If it is unread, it will be removed after double this amount of time. This does not apply to articles being received for the first time +Display Orientation: The orientation, portrait or landscape, that the application windows will be oriented to. If automatic, it will be determined by the Maemo operating system +Auto-update Interval: The interval time, in hours, from the last update after which all feeds will attempt to update if Auto-update Enabled is checked +Auto-update Enabled: Enables/disables the auto-update of all feeds +Image Caching Enabled: If checked, will store images to /home/user/.feedingit +Proxy Support Enabled: If checked, will use the proxy server settings entered for the Maemo device or connection +View Known Issues and Tips: Will open a browser window to the feedingit website with version-specific information \ No newline at end of file diff --git a/src/FeedingIt.py b/src/FeedingIt.py index 56bc40e..c835909 100644 --- a/src/FeedingIt.py +++ b/src/FeedingIt.py @@ -595,7 +595,7 @@ class DisplayFeed(hildon.StackableWindow): for id in self.feed.getIds(): title = self.feed.getTitle(id) - esc_title = unescape(title).replace("","").replace("","") + esc_title = unescape(title).replace("","").replace("","").replace("","").replace("","").replace("","") #title.replace("","").replace("","").replace("&","&").replace("—", "-").replace("’", "'") button = gtk.Button(esc_title) button.set_alignment(0,0) @@ -962,10 +962,10 @@ class FeedingIt: # Need to check for internet connection # If no internet connection, try again in 10 minutes: # gobject.timeout_add(int(5*3600000), self.automaticUpdate) - file = open("/home/user/.feedingit/feedingit_widget.log", "a") - from time import localtime, strftime - file.write("App: %s\n" % strftime("%a, %d %b %Y %H:%M:%S +0000", localtime())) - file.close() + #file = open("/home/user/.feedingit/feedingit_widget.log", "a") + #from time import localtime, strftime + #file.write("App: %s\n" % strftime("%a, %d %b %Y %H:%M:%S +0000", localtime())) + #file.close() self.button_update_clicked(None, None) return True diff --git a/src/feedingit_widget.py b/src/feedingit_widget.py index 716da87..c7efb8f 100644 --- a/src/feedingit_widget.py +++ b/src/feedingit_widget.py @@ -115,16 +115,16 @@ class FeedingItHomePlugin(hildondesktop.HomePluginItem): file.close() def do_destroy(self): - file = open("/home/user/.feedingit/feedingit_widget.log", "a") - file.write("Do_destroy: ") + #file = open("/home/user/.feedingit/feedingit_widget.log", "a") + #file.write("Do_destroy: ") if (not self.autoupdateId==False): gobject.source_remove(self.autoupdateId) self.autoupdateId=False - file.write("Destroyed %s\n" %self.autoupdateId) + #file.write("Destroyed %s\n" %self.autoupdateId) remove(SOURCE) hildondesktop.HomePluginItem.do_destroy(self) - file.write("End destroy\n") - file.close() + #file.write("End destroy\n") + #file.close() def button_clicked(self, *widget): self.button.set_sensitive(False) @@ -294,11 +294,11 @@ class FeedingItHomePlugin(hildondesktop.HomePluginItem): def start_update(self): try: if self.autoupdate >0: - file = open("/home/user/.feedingit/feedingit_widget.log", "a") - from time import localtime, strftime - import os - file.write("Widget: pid:%s ppid:%s time:%s\n" % (os.getpid(), os.getppid(), strftime("%a, %d %b %Y %H:%M:%S +0000", localtime()))) - file.close() + #file = open("/home/user/.feedingit/feedingit_widget.log", "a") + #from time import localtime, strftime + #import os + #file.write("Widget: pid:%s ppid:%s time:%s\n" % (os.getpid(), os.getppid(), strftime("%a, %d %b %Y %H:%M:%S +0000", localtime()))) + #file.close() remote_object = bus.get_object("org.marcoz.feedingit", # Connection name "/org/marcoz/feedingit/update" # Object's path ) @@ -325,18 +325,18 @@ class FeedingItHomePlugin(hildondesktop.HomePluginItem): def setup_autoupdate(self): if (float(self.autoupdate) > 0): if (not self.autoupdateId==False): - file = open("/home/user/.feedingit/feedingit_widget.log", "a") - file.write("Disabling %s\n" % self.autoupdateId) - file.close() + #file = open("/home/user/.feedingit/feedingit_widget.log", "a") + #file.write("Disabling %s\n" % self.autoupdateId) + #file.close() gobject.source_remove(self.autoupdateId) remove(SOURCE) self.autoupdateId = gobject.timeout_add_seconds(int(float(self.autoupdate)*3600), self.start_update) file = open(SOURCE, "w") file.write(str(self.autoupdateId)) file.close() - file = open("/home/user/.feedingit/feedingit_widget.log", "a") - file.write("Started %s\n" % self.autoupdateId) - file.close() + #file = open("/home/user/.feedingit/feedingit_widget.log", "a") + #file.write("Started %s\n" % self.autoupdateId) + #file.close() else: if (not self.autoupdateId==False): gobject.source_remove(self.autoupdateId) diff --git a/src/update_feeds.py b/src/update_feeds.py index b04fe7c..81f14f9 100644 --- a/src/update_feeds.py +++ b/src/update_feeds.py @@ -32,7 +32,7 @@ import gobject CONFIGDIR="/home/user/.feedingit/" #DESKTOP_FILE = "/usr/share/applications/hildon-status-menu/feedingit_status.desktop" -dbug = True +dbug = False from socket import setdefaulttimeout timeout = 5 @@ -75,8 +75,8 @@ class Download(threading.Thread): traceback.print_exc(file=file) file.close() if not self.running: - self.dbug.write("received stopUpdate after %s\n" %key) - self.dbug.flush() + if dbug: + self.dbug.write("received stopUpdate after %s\n" %key) break self.dbusHandler.UpdateFinished() self.dbusHandler.ArticleCountUpdated() @@ -126,7 +126,7 @@ if app_lock != None: del app_lock except: import traceback - file = open("/home/user/.feedingit/feedingit_update.log", "a") + file = open("/home/user/.feedingit/feedingit_update.log", "w") traceback.print_exc(file=file) file.close() else: -- 1.7.9.5