diff options
author | Julien Valroff <julien@kirya.net> | 2010-06-01 20:31:41 +0200 |
---|---|---|
committer | Julien Valroff <julien@kirya.net> | 2010-06-01 20:31:41 +0200 |
commit | f49f82b74596eda33ee5e2fc14e51fd67351b9ec (patch) | |
tree | 2f51420987e62598195b7c506affc7c9bf82d65f /rapid/prefs.py | |
parent | 8da29fc89cbcfb22cfff90d7f045552514e4f92b (diff) |
Imported Upstream version 0.2.0upstream/0.2.0
Diffstat (limited to 'rapid/prefs.py')
-rw-r--r-- | rapid/prefs.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rapid/prefs.py b/rapid/prefs.py index 6912138..2f7d771 100644 --- a/rapid/prefs.py +++ b/rapid/prefs.py @@ -15,6 +15,7 @@ ### Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ### Modified August 2007 by Damon Lynch to allow use of list value preferences +### Modified May 2010 by Damon Lynch to allow preferences to be reset """Module to help implement 'instant-apply' preferences. @@ -179,4 +180,13 @@ class Preferences(object): """ for k,v in self._prefs.items(): print k, v.type, v.current + + def reset(self): + """ + reset all preferences to defaults + """ + + for key in self._prefs: + self.__setattr__(key, self.get_default(key)) + |