From f49f82b74596eda33ee5e2fc14e51fd67351b9ec Mon Sep 17 00:00:00 2001 From: Julien Valroff Date: Tue, 1 Jun 2010 20:31:41 +0200 Subject: Imported Upstream version 0.2.0 --- rapid/prefs.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rapid/prefs.py') 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)) + -- cgit v1.2.3