Get it to start again
Marco Pesenti Gritti
16 years ago
22 | 22 |
import os
|
23 | 23 |
|
24 | 24 |
from sugar.activity import activity
|
25 | |
from sugar.p2p import network
|
|
25 |
from sugar import network
|
26 | 26 |
|
27 | 27 |
from xbooktoolbar import XbookToolbar
|
28 | 28 |
|
|
81 | 81 |
else:
|
82 | 82 |
# Wait for a successful join before trying to get the document
|
83 | 83 |
self.connect("joined", self._joined_cb)
|
84 | |
else:
|
85 | |
# FIXME: this should be called by activity.Activity on realize
|
86 | |
self.read_file()
|
87 | 84 |
|
88 | |
def read_file(self):
|
89 | |
logging.debug('XbookActivity.read_file: ' + self.jobject.file_path)
|
90 | |
if self.jobject.file_path:
|
91 | |
self._load_document('file://' + self.jobject.file_path)
|
|
85 |
def read_file(self, file_path):
|
|
86 |
logging.debug('XbookActivity.read_file: ' + file_path)
|
|
87 |
self._load_document('file://' + file_path)
|
92 | 88 |
|
93 | 89 |
def _download_result_cb(self, getter, tempfile, suggested_name, buddy):
|
94 | 90 |
del self._tried_buddies
|
0 | |
#!/usr/bin/python
|
1 | |
|
|
0 |
#!/usr/bin/env python
|
|
1 |
|
2 | 2 |
# Copyright (C) 2006, Red Hat, Inc.
|
3 | |
#
|
|
3 |
#
|
4 | 4 |
# This program is free software; you can redistribute it and/or modify
|
5 | 5 |
# it under the terms of the GNU General Public License as published by
|
6 | 6 |
# the Free Software Foundation; either version 2 of the License, or
|
7 | 7 |
# (at your option) any later version.
|
8 | |
#
|
|
8 |
#
|
9 | 9 |
# This program is distributed in the hope that it will be useful,
|
10 | 10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 | 11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 | 12 |
# GNU General Public License for more details.
|
13 | |
#
|
|
13 |
#
|
14 | 14 |
# You should have received a copy of the GNU General Public License
|
15 | 15 |
# along with this program; if not, write to the Free Software
|
16 | 16 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 | |
|
18 | |
from sugar.activity import bundlebuilder
|
19 | |
|
20 | |
bundlebuilder.start()
|
|
17 |
|
|
18 |
from sugar.activity import bundlebuilder
|
|
19 |
|
|
20 |
bundlebuilder.start()
|