Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TamTam.py
diff options
context:
space:
mode:
authorJames <olpc@localhost.localdomain>2007-02-27 20:51:35 (GMT)
committer James <olpc@localhost.localdomain>2007-02-27 20:51:35 (GMT)
commitab211b6ab4a10d3840dbb33a09c58711dd12fa9e (patch)
tree7434d4d19150c1a427dbbc14c696be59c4c64c68 /TamTam.py
parentde7605b1d093b7089d7ae5ecd182b25f1f658c80 (diff)
parentefde4e823dc4418763514e0634fc3c1393ba36d8 (diff)
merge
Diffstat (limited to 'TamTam.py')
-rwxr-xr-xTamTam.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/TamTam.py b/TamTam.py
index 5c4383d..d75fc0d 100755
--- a/TamTam.py
+++ b/TamTam.py
@@ -15,8 +15,7 @@ from SynthLab.SynthLabWindow import SynthLabWindow
try :
from sugar.activity.Activity import Activity
except ImportError:
- from gtk import Window as Activity
-
+ from FActivity import FakeActivity as Activity
if not os.path.isdir(Config.PREF_DIR):
os.mkdir(Config.PREF_DIR)
@@ -34,8 +33,8 @@ class TamTam(Activity):
# - the synth lab
# - edit mode
- def __init__(self, mode='welcome'):
- Activity.__init__(self)
+ def __init__(self, handle, mode='welcome'):
+ Activity.__init__(self, handle)
color = gtk.gdk.color_parse(Config.PANEL_BCK_COLOR)
self.modify_bg(gtk.STATE_NORMAL, color)
@@ -87,7 +86,6 @@ class TamTam(Activity):
else:
self.add( self.modeList[ self.mode ] )
self.modeList[ self.mode ].onActivate(arg)
- self.show_all()
def onFocusIn(self, event, data=None):
print 'DEBUG: TamTam::onFocusOut in TamTam.py'
@@ -113,6 +111,9 @@ class TamTam(Activity):
elif key == 25: #W
self.set_mode('welcome')
return
+ elif key == 53: #X
+ self.destroy()
+ return
self.modeList[ self.mode ].onKeyPress(widget, event)
def onKeyRelease(self, widget, event):
@@ -137,9 +138,9 @@ class TamTam(Activity):
if __name__ == "__main__":
if len(sys.argv) > 1 :
- mainwin = TamTam(sys.argv[1])
+ mainwin = TamTam(None, sys.argv[1])
else:
- mainwin = TamTam('welcome')
+ mainwin = TamTam(None, 'welcome')
gtk.main()