Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/htmlview.py
diff options
context:
space:
mode:
Diffstat (limited to 'htmlview.py')
-rwxr-xr-xhtmlview.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/htmlview.py b/htmlview.py
new file mode 100755
index 0000000..c14a461
--- /dev/null
+++ b/htmlview.py
@@ -0,0 +1,27 @@
+import os
+import gtk
+import hulahop
+from sugar import env
+from sugar.activity import activity
+from path import path
+hulahop.startup(os.path.join(env.get_profile_path(), 'gecko'))
+
+from hulahop.webview import WebView
+
+BUNDLEPATH = path(activity.get_bundle_path()) / 'tw'
+DATAPATH = path(activity.get_activity_root()) / 'data'
+TESTFILE = BUNDLEPATH / 'slides.html'
+WORKFILE = 'file://' + DATAPATH / 'slides.html'
+
+class Htmlview(gtk.VBox):
+ def __init__(self):
+ gtk.VBox.__init__(self)
+ #vbox = gtk.VBox(False, 8)
+ wv = WebView()
+ print 'show', WORKFILE, path(WORKFILE).exists()
+ wv.load_uri(WORKFILE)
+ wv.show()
+ self.pack_start(wv, True, True, 0)
+ #self.add(wv)
+ self.show_all()
+