[conduit: 128/138] Tomboy has its own note datatype
- From: John Carr <johncarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [conduit: 128/138] Tomboy has its own note datatype
- Date: Thu, 21 May 2009 03:37:40 -0400 (EDT)
commit 74e843eec85339e90f5712378e7e7687d25cc13d
Author: John Carr <john carr unrouted co uk>
Date: Wed May 6 16:00:24 2009 -0700
Tomboy has its own note datatype
---
test/soup/data/note_tomboy.py | 22 ++++++++++++++++++++++
test/soup/modules/tomboy.py | 4 ++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/test/soup/data/note_tomboy.py b/test/soup/data/note_tomboy.py
new file mode 100644
index 0000000..a5f0511
--- /dev/null
+++ b/test/soup/data/note_tomboy.py
@@ -0,0 +1,22 @@
+import soup
+
+import conduit.utils as Utils
+import conduit.modules.TomboyModule as TomboyModule
+
+import datetime
+
+class TomboyNoteWrapper(soup.data.DataWrapper):
+
+ wraps = TomboyModule.TomboyNote
+
+ def iter_samples(self):
+ #FIXME: This is not very useful
+ for f in self.get_files_from_data_dir("*"):
+ n = TomboyModule.TomboyNote(Utils.random_string(), Utils.random_string(), xml=None)
+ n.set_mtime(datetime.datetime.now())
+ n.set_UID(Utils.random_string())
+ yield n
+
+ def generate_sample(self):
+ pass
+
diff --git a/test/soup/modules/tomboy.py b/test/soup/modules/tomboy.py
index 14110ab..c91aa0a 100644
--- a/test/soup/modules/tomboy.py
+++ b/test/soup/modules/tomboy.py
@@ -1,7 +1,7 @@
import soup
-from soup.data.note import NoteWrapper
+from soup.data.note_tomboy import TomboyNoteWrapper
import conduit.modules.TomboyModule as TomboyModule
@@ -10,7 +10,7 @@ import dbus
class Tomboy(soup.modules.ModuleWrapper):
klass = TomboyModule.TomboyNoteTwoWay
- dataclass = NoteWrapper
+ dataclass = TomboyNoteWrapper
def create_dataprovider(self):
a, retval = dbus.SessionBus().start_service_by_name("org.gnome.Tomboy")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]