[kupfer: 7/20] clawsmail, putty, tsclient: add app content



commit b267ecf1d2c582ebd2a750c05a6448c31c1b07e4
Author: KarolBedkowski <karol bedkowsk+gh gmail com>
Date:   Mon Oct 5 09:21:25 2009 +0200

    clawsmail, putty, tsclient: add app content

 kupfer/plugin/clawsmail.py |    8 ++++++--
 kupfer/plugin/putty.py     |    8 ++++++--
 kupfer/plugin/tsclient.py  |    8 ++++++--
 3 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/kupfer/plugin/clawsmail.py b/kupfer/plugin/clawsmail.py
index 89cd12d..13074d2 100644
--- a/kupfer/plugin/clawsmail.py
+++ b/kupfer/plugin/clawsmail.py
@@ -4,11 +4,13 @@ import re
 import urllib
 from xml.dom import minidom
 
-from kupfer.objects import Leaf, Action, Source, TextLeaf, UrlLeaf, RunnableLeaf, FilesystemWatchMixin
+from kupfer.objects import (Leaf, Action, Source, TextLeaf, UrlLeaf, RunnableLeaf, 
+		FilesystemWatchMixin, AppLeafContentMixin)
 from kupfer import utils
 
 __kupfer_name__ = _("Claws Mail")
 __kupfer_sources__ = ("ClawsContactsSource", )
+__kupfer_contents__ = ("ClawsContactsSource", )
 __kupfer_actions__ = ("NewMailAction", )
 __description__ = _("Claws Mail Contacts and Actions")
 __version__ = "0.2"
@@ -104,7 +106,9 @@ class NewMailAction(Action):
 		return False
 
 
-class ClawsContactsSource(Source, FilesystemWatchMixin):
+class ClawsContactsSource(AppLeafContentMixin, Source, FilesystemWatchMixin):
+	appleaf_content_id = 'claws-mail'
+
 	def __init__(self, name=_("Claws Mail Address Book")):
 		Source.__init__(self, name)
 		self._claws_addrbook_dir = os.path.expanduser('~/.claws-mail/addrbook')
diff --git a/kupfer/plugin/putty.py b/kupfer/plugin/putty.py
index d29cbdf..fbf3ccb 100644
--- a/kupfer/plugin/putty.py
+++ b/kupfer/plugin/putty.py
@@ -4,11 +4,13 @@ from __future__ import with_statement
 import os
 import urllib
 
-from kupfer.objects import Leaf, Action, Source, TextSource, FilesystemWatchMixin
+from kupfer.objects import (Leaf, Action, Source, TextSource, FilesystemWatchMixin,
+		AppLeafContentMixin)
 from kupfer import utils
 
 __kupfer_name__ = _("PuTTY Sessions")
 __kupfer_sources__ = ("PuttySessionSource", )
+__kupfer_contents__= ("PuttySessionSource", )
 __description__ = _("Quick access to PuTTY Sessions")
 __version__ = "0.2"
 __author__ = "Karol BÄ?dkowski <karol bedkowski gmail com>"
@@ -43,7 +45,9 @@ class PuttyOpenSession(Action):
 		return 'putty'
 
 
-class PuttySessionSource(Source, FilesystemWatchMixin):
+class PuttySessionSource(AppLeafContentMixin, Source, FilesystemWatchMixin):
+	appleaf_content_id = 'putty'
+
 	''' indexes session saved in putty '''
 	def __init__(self, name=_("PuTTY Sessions")):
 		super(PuttySessionSource, self).__init__(name)
diff --git a/kupfer/plugin/tsclient.py b/kupfer/plugin/tsclient.py
index c6f05d4..0998668 100644
--- a/kupfer/plugin/tsclient.py
+++ b/kupfer/plugin/tsclient.py
@@ -3,11 +3,13 @@ from __future__ import with_statement
 
 import os
 
-from kupfer.objects import Leaf, Action, Source, FilesystemWatchMixin
+from kupfer.objects import (Leaf, Action, Source, FilesystemWatchMixin, 
+		AppLeafContentMixin)
 from kupfer import utils
 
 __kupfer_name__ = _("Terminal Server Client")
 __kupfer_sources__ = ("TsclientSessionSource", )
+__kupfer_contents__ = ("TsclientSessionSource", )
 __description__ = _("Session saved in Terminal Server Client")
 __version__ = "0.2"
 __author__ = "Karol BÄ?dkowski <karol bedkowski gmail com>"
@@ -43,7 +45,9 @@ class TsclientOpenSession(Action):
 		return 'tsclient'
 
 
-class TsclientSessionSource(Source, FilesystemWatchMixin):
+class TsclientSessionSource(AppLeafContentMixin, Source, FilesystemWatchMixin):
+	appleaf_content_id = 'tsclient'
+
 	''' indexes session saved in tsclient '''
 	def __init__(self, name=_("TSClient sessions")):
 		Source.__init__(self, name)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]