Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/AbiWordActivity.py
diff options
context:
space:
mode:
authorMarc Maurer <uwog@uwog.net>2006-12-01 00:37:56 (GMT)
committer Marc Maurer <uwog@uwog.net>2006-12-01 00:37:56 (GMT)
commit65971425cca59a0f246f6c6d1338c9ae6218f455 (patch)
treea723f62e8f828901cbfec1ea7ac3169e885ead15 /AbiWordActivity.py
parent88149a34f5d5328ab26505b98651b07fff9786db (diff)
The start of the new abiword activity, using the python
bindings to build the interface (patch from Tomeu Vizoso, tweaked by me)
Diffstat (limited to 'AbiWordActivity.py')
-rwxr-xr-xAbiWordActivity.py37
1 files changed, 15 insertions, 22 deletions
diff --git a/AbiWordActivity.py b/AbiWordActivity.py
index 24fb415..ebb63aa 100755
--- a/AbiWordActivity.py
+++ b/AbiWordActivity.py
@@ -1,29 +1,12 @@
-
import logging
import os
import time
import gtk
+from abiword import Canvas
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)
-
+from toolbar import Toolbar
class AbiWordActivity (Activity):
@@ -32,6 +15,16 @@ class AbiWordActivity (Activity):
self.set_title ("AbiWord")
- abiword = AbiWord ()
- self.add (abiword)
- abiword.show_all ()
+ hbox = gtk.HBox(False, 0)
+ self.add(hbox)
+ hbox.show()
+
+ abiword_canvas = Canvas()
+
+ toolbar = Toolbar(abiword_canvas)
+ hbox.pack_start(toolbar, False)
+ toolbar.show()
+
+ hbox.add(abiword_canvas)
+ abiword_canvas.set_property("load-file", "")
+ abiword_canvas.show()