Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2009-09-07 18:00:32 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2009-09-07 18:00:32 (GMT)
commit05cb08672f36f6334701ef609ab2ddab8308bd88 (patch)
tree89dd2f9ef8b82728f0c4dd5eb4ba30656b79b929
parentbf260551a1495c86a7327954ef1a27890c458eb9 (diff)
clean up
-rwxr-xr-xmeasure.py28
1 files changed, 10 insertions, 18 deletions
diff --git a/measure.py b/measure.py
index 2ee314f..04d28c7 100755
--- a/measure.py
+++ b/measure.py
@@ -41,7 +41,6 @@ import logging
from sugar.activity import activity
from sugar.datastore import datastore
-
class MeasureActivity(activity.Activity):
def __init__(self, handle):
@@ -50,7 +49,6 @@ class MeasureActivity(activity.Activity):
act_root = environ['SUGAR_ACTIVITY_ROOT']
tmp_dir = join(act_root, 'data')
-
self.active_status = True
self.ACTIVE = True
self.connect( "notify::active", self._activeCb )
@@ -65,14 +63,12 @@ class MeasureActivity(activity.Activity):
os.chmod(self._jobject.file_path, 0777)
self.existing = False
-
self.ji = JournalInteraction(self._jobject.file_path, self.existing)
self.wave = DrawWaveform()
self.audiograb = AudioGrab(self.wave.new_buffer, self.ji)
self.side_toolbar = SideToolbar(self.wave)
self.text_box = TextBox()
-
self.box3 = gtk.HBox(False, 0)
self.box3.pack_start(self.wave,True,True,0)
self.box3.pack_start(self.side_toolbar.box1,False,True,0)
@@ -83,7 +79,8 @@ class MeasureActivity(activity.Activity):
self.set_canvas(self.box1)
- toolbox = Toolbar(self, self.wave, self.audiograb, self.ji, self.text_box)
+ toolbox = Toolbar(self, self.wave, self.audiograb, self.ji, \
+ self.text_box)
self.set_toolbox(toolbox)
toolbox.show()
@@ -93,8 +90,6 @@ class MeasureActivity(activity.Activity):
gobject.timeout_add(config.REFRESH_TIME, self.waveform_refresh)
-
-
def set_show_hide_windows(self, window_id=1):
"""Shows the appropriate window identified by the window_id
1 --> sound
@@ -116,7 +111,6 @@ class MeasureActivity(activity.Activity):
self.side_toolbar.box1.hide_all()
self.active_context_status = 2
return
-
def get_show_hide_windows(self):
"""Gets which window is being shown
@@ -124,13 +118,10 @@ class MeasureActivity(activity.Activity):
If 1 is returned means camera context"""
return self.active_context_status
-
-
def waveform_refresh(self):
self.wave.queue_draw()
return self.active_status
-
def on_quit(self,data=None):
self.audiograb.on_activity_quit()
self.ji.on_quit()
@@ -149,15 +140,16 @@ class MeasureActivity(activity.Activity):
self.waveform_refresh)
self.ACTIVE = self.props.active
-
+ """
+ Write the project to the Journal
+ """
def write_file(self, file_path):
- self.metadata['fulltext'] = 'blah blah'
+ print "write file"
+ """
+ Read a project in and then run it
+ """
def read_file(self, file_path):
- pass
-
+ print "read file"
gtk.gdk.threads_init()
-
-
-