X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=psa_harmattan%2Ffeedingit%2Fpysrc%2Fconfig.py;h=47ceaca70f93089fc8bafe915ef972470441742f;hb=cf8d6d3e3e5671a06954a3a5a580972a5b1d1072;hp=9f7ec81f0f6d5014ea4ee877ce4462b7f43782db;hpb=a86afb9523055d76c6315e5802be8257f9c96130;p=feedingit diff --git a/psa_harmattan/feedingit/pysrc/config.py b/psa_harmattan/feedingit/pysrc/config.py index 9f7ec81..47ceaca 100644 --- a/psa_harmattan/feedingit/pysrc/config.py +++ b/psa_harmattan/feedingit/pysrc/config.py @@ -226,6 +226,10 @@ class Config(): self.config["feedsort"] = configParser.get(section, "feedsort") except: self.config["feedsort"] = "Manual" + try: + self.config["theme"] = configParser.get(section, "theme") + except: + self.config["theme"] = True def saveConfig(self): configParser = RawConfigParser() @@ -242,6 +246,7 @@ class Config(): configParser.set(section, 'hidereadarticles', str(self.config["hidereadarticles"])) configParser.set(section, 'extBrowser', str(self.config["extBrowser"])) configParser.set(section, 'feedsort', str(self.config["feedsort"])) + configParser.set(section, 'theme', str(self.config["theme"])) # Writing our configuration file file = open(self.configFilename, 'wb') @@ -271,6 +276,8 @@ class Config(): return self.config["artFontSize"] def getExpiry(self): return self.config["expiry"] + def setExpiry(self, expiry): + self.config["expiry"] = expiry def isAutoUpdateEnabled(self): return self.config["autoupdate"] def getUpdateInterval(self): @@ -279,10 +286,16 @@ class Config(): return "sans italic %s" % self.config["fontSize"] def getUnreadFont(self): return "sans %s" % self.config["fontSize"] - def getOrientation(self): + def getOrientation(self, index): return ranges["orientation"].index(self.config["orientation"]) + def getOrientationChoices(self): + return ranges["orientation"] + def setOrientation(self, choice): + self.config["orientation"] = index def getImageCache(self): return self.config["imageCache"] + def setImageCache(self, cache): + self.config["imageCache"] = bool(cache) @mainthread def getProxy(self): if self.config["proxy"] == False: @@ -295,9 +308,21 @@ class Config(): return (False, None) def getHideReadFeeds(self): return self.config["hidereadfeeds"] + def setHideReadFeeds(self, setting): + self.config["hidereadfeeds"] = bool(setting) def getHideReadArticles(self): return self.config["hidereadarticles"] + def setHideReadArticles(self, setting): + self.config["hidereadarticles"] = bool(setting) def getOpenInExternalBrowser(self): return self.config["extBrowser"] def getFeedSortOrder(self): return self.config["feedsort"] + def getFeedSortOrderChoices(self): + return ranges["feedsort"] + def setFeedSortOrder(self, setting): + self.config["feedsort"] = setting + def getTheme(self): + return self.config["theme"] + def setTheme(self, theme): + self.config["theme"] = bool(theme)