Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/instance.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-10-31 16:27:45 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-10-31 16:27:45 (GMT)
commit1ab6b11c83d527bdd02f04cccc34ef00b0494912 (patch)
tree1e2f8b2046be9a64523f3aba46fb02d0d5291369 /instance.py
parent6e20a3af2331fc524f356c981e308dd1373af112 (diff)
refactoring
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@785 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'instance.py')
-rw-r--r--instance.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/instance.py b/instance.py
new file mode 100644
index 0000000..92403ab
--- /dev/null
+++ b/instance.py
@@ -0,0 +1,26 @@
+import os
+
+from sugar import profile
+from sugar import util
+from sugar.activity import activity
+
+from color import Color
+
+class Instance:
+ key = profile.get_pubkey()
+ keyHash = util._sha_data(key)
+ hashedKey = util.printable_hash(keyHash)
+ nickName = profile.get_nick_name()
+
+ colorFill = Color()
+ colorFill.init_hex( profile.get_color().get_fill_color() )
+ colorStroke = Color()
+ colorStroke.init_hex( profile.get_color().get_stroke_color() )
+
+ instanceId = None
+ tmpPath = None
+
+ def __init__( self, ca ):
+ self.__class__.instanceId = ca._activity_id
+ tmpPath = os.path.join( ca.get_activity_root(), "tmp" )
+ self.__class__.tmpPath = os.path.join( tmpPath, str(self.__class__.instanceId)) \ No newline at end of file