[kupfer: 8/20] plugin.tsclient: Use PicklingHelperMixin
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer: 8/20] plugin.tsclient: Use PicklingHelperMixin
- Date: Wed, 7 Oct 2009 11:33:29 +0000 (UTC)
commit ede3a152535515a680518ce42c76c09b8f9602d9
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Tue Oct 6 13:38:38 2009 +0200
plugin.tsclient: Use PicklingHelperMixin
PicklingHelperMixin allows the Source to perform actions after being
restored from cache and before being saved to cache. In effect,
unpickle_finish is the new __init__.
kupfer/plugin/tsclient.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/kupfer/plugin/tsclient.py b/kupfer/plugin/tsclient.py
index 0998668..a2efc57 100644
--- a/kupfer/plugin/tsclient.py
+++ b/kupfer/plugin/tsclient.py
@@ -3,8 +3,8 @@ from __future__ import with_statement
import os
-from kupfer.objects import (Leaf, Action, Source, FilesystemWatchMixin,
- AppLeafContentMixin)
+from kupfer.objects import Leaf, Action, Source, AppLeafContentMixin
+from kupfer.helplib import FilesystemWatchMixin, PicklingHelperMixin
from kupfer import utils
__kupfer_name__ = _("Terminal Server Client")
@@ -45,10 +45,12 @@ class TsclientOpenSession(Action):
return 'tsclient'
-class TsclientSessionSource(AppLeafContentMixin, Source, FilesystemWatchMixin):
+class TsclientSessionSource(AppLeafContentMixin, Source, PicklingHelperMixin,
+ FilesystemWatchMixin):
+ ''' indexes session saved in tsclient '''
+
appleaf_content_id = 'tsclient'
- ''' indexes session saved in tsclient '''
def __init__(self, name=_("TSClient sessions")):
Source.__init__(self, name)
self._sessions_dir = os.path.expanduser('~/.tsclient')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]