Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webactivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'webactivity.py')
-rwxr-xr-xwebactivity.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/webactivity.py b/webactivity.py
index c0798af..1e5e8f4 100755
--- a/webactivity.py
+++ b/webactivity.py
@@ -36,7 +36,7 @@ import filepicker
import sessionhistory
import progresslistener
-_HOMEPAGE = 'http://www.google.com'
+_LIBRARY_PATH = '/home/olpc/Library/index.html'
class WebActivity(activity.Activity):
def __init__(self, handle, browser=None):
@@ -71,7 +71,13 @@ class WebActivity(activity.Activity):
elif not self._jobject.file_path and not browser:
# TODO: we need this hack until we extend the activity API for
# opening URIs and default docs.
- self._browser.load_uri(_HOMEPAGE)
+ self._load_homepage()
+
+ def _load_homepage(self):
+ if os.path.isfile(_LIBRARY_PATH):
+ self._browser.load_uri('file://' + _LIBRARY_PATH)
+ else:
+ self._browser.load_uri('about:blank')
def _title_changed_cb(self, embed, pspec):
self.set_title(embed.props.title)