[kupfer: 45/51] triggers: Implement configuration storage protocol
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer: 45/51] triggers: Implement configuration storage protocol
- Date: Sun, 10 Jan 2010 12:00:37 +0000 (UTC)
commit 614fea19c136c27a5db7d515986abc8fb7db4251
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sun Jan 10 02:48:25 2010 +0100
triggers: Implement configuration storage protocol
kupfer/plugin/triggers.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/plugin/triggers.py b/kupfer/plugin/triggers.py
index 5936885..93b59b1 100644
--- a/kupfer/plugin/triggers.py
+++ b/kupfer/plugin/triggers.py
@@ -38,6 +38,16 @@ class Triggers (Source):
def __init__(self):
Source.__init__(self, _("Triggers"))
self.trigger_table = {}
+
+ def config_save(self):
+ return {"triggers": self.trigger_table, "version": self.version}
+
+ def config_save_name(self):
+ return __name__
+
+ def config_restore(self, state):
+ self.trigger_table = state["triggers"]
+ return True
def initialize(self):
Triggers.instance = self
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]