Mercurial > hg > Feedworm
diff Preferences.py @ 61:db35ab7753f0
add a preference to hide read feed entries
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sat, 24 Jul 2010 03:11:06 +0200 |
parents | 03358c113170 |
children | e8c2730eb444 |
line wrap: on
line diff
--- a/Preferences.py Fri Jul 23 17:41:05 2010 +0200 +++ b/Preferences.py Sat Jul 24 03:11:06 2010 +0200 @@ -3,6 +3,7 @@ import util START_MAXIMIZED = "START_MAXIMIZED" +HIDE_READ_ENTRIES = "HIDE_READ_FEED_ENTRIES" class Preferences(object): def __init__(self, session): @@ -27,3 +28,11 @@ def setStartMaximized(self, flag): pref = self._cachedPreference(START_MAXIMIZED) pref.value = util.bool2str(flag) + + def hideReadFeedEntries(self): + pref = self._cachedPreference(HIDE_READ_ENTRIES, False) + return util.str2bool(pref.value) + + def setHideReadFeedEntries(self, flag): + pref = self._cachedPreference(HIDE_READ_ENTRIES) + pref.value = util.bool2str(flag)