blob: 24fb4159fb95dfc9a850776e2567d85094381435 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
import logging
import os
import time
import gtk
from sugar.activity.Activity import Activity
class AbiWord (gtk.Socket):
def __init__ (self):
gtk.Socket.__init__ (self)
self.connect ('realize', self.realize_cb)
def realize_cb (self, event):
params = [
'abiword',
'--nosplash',
'--gtk-socket-id=' + str (self.get_id ())
]
os.spawnvp (os.P_NOWAIT, 'abiword', params)
class AbiWordActivity (Activity):
def __init__ (self):
Activity.__init__ (self)
self.set_title ("AbiWord")
abiword = AbiWord ()
self.add (abiword)
abiword.show_all ()
|