diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-06-05 17:48:06 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-06-05 17:48:06 (GMT) |
commit | 099e5043a5bf25ba4bb33184922b1ed9c9d9412a (patch) | |
tree | 3a56bb085e69458899e7d139b86af36139527756 | |
parent | b44b18ba82aa2d6301b21c6cae9ef305a348b6c8 (diff) |
Get it to start again
-rw-r--r-- | XbookActivity.py | 14 | ||||
-rwxr-xr-x | setup.py | 18 |
2 files changed, 14 insertions, 18 deletions
diff --git a/XbookActivity.py b/XbookActivity.py index b85fc99..61efce0 100644 --- a/XbookActivity.py +++ b/XbookActivity.py @@ -23,7 +23,7 @@ import hippo import os from sugar.activity import activity -from sugar.p2p import network +from sugar import network from xbooktoolbar import XbookToolbar @@ -82,14 +82,10 @@ class XbookActivity(activity.Activity): else: # Wait for a successful join before trying to get the document self.connect("joined", self._joined_cb) - else: - # FIXME: this should be called by activity.Activity on realize - self.read_file() - - def read_file(self): - logging.debug('XbookActivity.read_file: ' + self.jobject.file_path) - if self.jobject.file_path: - self._load_document('file://' + self.jobject.file_path) + + def read_file(self, file_path): + logging.debug('XbookActivity.read_file: ' + file_path) + self._load_document('file://' + file_path) def _download_result_cb(self, getter, tempfile, suggested_name, buddy): del self._tried_buddies @@ -1,21 +1,21 @@ -#!/usr/bin/python -
+#!/usr/bin/env python + # Copyright (C) 2006, Red Hat, Inc.
-#
+# # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+# # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+# # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-from sugar.activity import bundlebuilder
-
-bundlebuilder.start()
+ +from sugar.activity import bundlebuilder + +bundlebuilder.start() |