-feedingit (0.4.5-1) unstable; urgency=low
+feedingit (0.4.5-3) unstable; urgency=low
* Fixed utf-8 support
* Fixed dbus add feed dialog
* Re-added single feed update
* Open in external browser now uses load_url dbus call
+ * Disabled rotation if keyboard is open
-- Yves <yves@marcoz.org> Sun, 31 Jan 2010 10:43:19 -0800
Package: feedingit
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, python-gtkhtml2, python, python-hildon, libgtkhtml2-0, python-dbus, python-osso
-Description: Simple RSS Reader
- Simple RSS Reader
+Depends: ${shlibs:Depends}, ${misc:Depends}, python-gtkhtml2, python, python-hildon,
+ libgtkhtml2-0, python-dbus, python-osso, python-gconf
+Description:
+ RSS Reader
Its main features are:
- Portrait mode support
- Auto-update
# ============================================================================
# Name : FeedingIt.py
# Author : Yves Marcoz
-# Version : 0.4.3
+# Version : 0.5.0
# Description : Simple RSS Reader
# ============================================================================
#self.progress = gtk.ProgressBar()
#self.waitingWindow = hildon.Note("cancel", parent, "Downloading",
# progressbar=self.progress)
- self.set_text("Downloading")
+ self.set_text("Updating...")
self.fraction = 0
self.set_fraction(self.fraction)
self.show_all()
self.images = []
# Init the article display
- if has_webkit:
+ if self.config.getWebkitSupport():
self.view = webkit.WebView()
#self.view.set_editable(False)
else:
#self.pannable_article.set_property("mov-mode", hildon.MOVEMENT_MODE_BOTH)
#self.gestureId = self.pannable_article.connect('horizontal-movement', self.gesture)
- if has_webkit:
+ if self.config.getWebkitSupport():
self.view.load_string(self.text, "text/html", "utf-8", self.link)
self.view.set_zoom_level(float(config.getArtFontSize())/10.)
else:
self.mainVbox.pack_start(self.pannableListing)
self.window.add(self.mainVbox)
self.window.show_all()
- self.config = Config(self.window, CONFIGDIR+"config.ini")
+ self.config = Config(self.window, CONFIGDIR+"config.ini", has_webkit)
gobject.idle_add(self.createWindow)
def createWindow(self):
self.listing = Listing(CONFIGDIR)
self.downloadDialog = False
- #self.orientation = FremantleRotation("FeedingIt", main_window=self.window)
- #self.orientation.set_mode(self.config.getOrientation())
+ self.orientation = FremantleRotation("FeedingIt", main_window=self.window)
+ self.orientation.set_mode(self.config.getOrientation())
menu = hildon.AppMenu()
# Create a button and add it to the menu
subtitles = {"updateInterval":"Update every %s hours", "expiry":"Delete articles after %s hours", "fontSize":"%s pixels", "orientation":"%s", "artFontSize":"%s pixels"}
class Config():
- def __init__(self, parent, configFilename):
+ def __init__(self, parent, configFilename, has_webkit):
self.configFilename = configFilename
self.parent = parent
+ self.has_webkit = has_webkit
# Load config
self.loadConfig()
vbox = gtk.VBox(False, 10)
self.buttons = {}
- for setting in ["fontSize", "artFontSize", "expiry", "orientation", "updateInterval",]:
+ if self.has_webkit:
+ settings = ["fontSize", "artFontSize", "expiry", "orientation", "updateInterval",]
+ else:
+ settings = ["fontSize", "expiry", "orientation", "updateInterval",]
+ for setting in settings:
picker = hildon.PickerButton(gtk.HILDON_SIZE_FINGER_HEIGHT, hildon.BUTTON_ARRANGEMENT_VERTICAL)
selector = self.create_selector(ranges[setting], setting)
picker.set_selector(selector)
button = hildon.CheckButton(gtk.HILDON_SIZE_FINGER_HEIGHT)
button.set_label("Auto-update Enabled")
button.set_active(self.config["autoupdate"])
- button.connect("toggled", self.button_toggled)
-
+ button.connect("toggled", self.button_toggled, "autoupdate")
vbox.pack_start(button)
+
+ if self.has_webkit:
+ button = hildon.CheckButton(gtk.HILDON_SIZE_FINGER_HEIGHT)
+ button.set_label("Webkit Articles Enabled")
+ button.set_active(self.config["webkit"])
+ button.connect("toggled", self.button_toggled, "webkit")
+ vbox.pack_start(button)
+
panArea.add_with_viewport(vbox)
self.window.vbox.add(panArea)
self.saveConfig()
self.window.destroy()
- def button_toggled(self, widget):
+ def button_toggled(self, widget, configName):
#print "widget", widget.get_active()
if (widget.get_active()):
- self.config["autoupdate"] = True
+ self.config[configName] = True
else:
- self.config["autoupdate"] = False
+ self.config[configName] = False
#print "autoup", self.autoupdate
self.saveConfig()
self.config["autoupdate"] = configParser.getboolean(section, "autoupdate")
self.config["updateInterval"] = configParser.getfloat(section, "updateInterval")
self.config["orientation"] = configParser.get(section, "orientation")
+ self.config["webkit"] = configParser.getboolean(section, "webkit")
except:
- self.config["fontSize"] = 16
- self.config["artFontSize"] = 18
+ self.config["fontSize"] = 17
+ self.config["artFontSize"] = 14
self.config["expiry"] = 24
self.config["autoupdate"] = False
self.config["updateInterval"] = 4
self.config["orientation"] = "Automatic"
+ self.config["webkit"] = self.has_webkit
def saveConfig(self):
configParser = ConfigParser.RawConfigParser()
configParser.set(section, 'autoupdate', str(self.config["autoupdate"]))
configParser.set(section, 'updateInterval', str(self.config["updateInterval"]))
configParser.set(section, 'orientation', str(self.config["orientation"]))
+ configParser.set(section, 'webkit', str(self.config["webkit"]))
# Writing our configuration file
file = open(self.configFilename, 'wb')
def getUnreadFont(self):
return "sans bold %s" % self.config["fontSize"]
def getOrientation(self):
- return ranges["orientation"].index(self.config["orientation"])
\ No newline at end of file
+ return ranges["orientation"].index(self.config["orientation"])
+ def getWebkitSupport(self):
+ if self.has_webkit:
+ return self.config["webkit"]
+ else:
+ return False
\ No newline at end of file
import hildon
import osso
+import gconf
+
class FremantleRotation(object):
"""thp's screen rotation for Maemo 5
self._orientation = orientation
- def _on_orientation_signal(self, orientation, stand, face, x, y, z):
+ def _on_orientation_signal(self, orientation, stand, face, x, y, z):
if orientation in (self._PORTRAIT, self._LANDSCAPE):
- if self._mode == self.AUTOMATIC:
- # Automatically set the rotation based on hardware orientation
+ if (self._mode == self.AUTOMATIC) and (not gconf.client_get_default().get_bool('/system/osso/af/slide-open')):
+ # Automatically set the rotation based on hardware orientation, if the keyboard is not open
self._orientation_changed(orientation)
else:
# Ignore orientation changes for non-automatic modes, but save
# ============================================================================
# Name : FeedingIt.py
# Author : Yves Marcoz
-# Version : 0.4.3
+# Version : 0.5.0
# Description : Simple RSS Reader
# ============================================================================
else:
date = ""
#text = '''<div style="color: black; background-color: white;">'''
- text = '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>'
- text += '<head><style> body {-webkit-user-select: none;} </style></head>'
+ 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 += '<style> body {-webkit-user-select: none;} </style></head>'
text += '<body><div><a href=\"' + link + '\">' + title + "</a>"
text += "<BR /><small><i>Date: " + date + "</i></small></div>"
text += "<BR /><BR />"
text += content
- text += "</body>"
+ text += "</body></html>"
return text
class ArchivedArticles(Feed):