Complete paths cleanup and remove SUGAR_PREFIX and

SUGAR_PATH environment variables.
master
Marco Pesenti Gritti 16 years ago
parent aca3ae6c88
commit 44efc2a131

@ -2,9 +2,6 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = bin data lib po src service
bin_SCRIPTS = \
sugar-emulator
DISTCLEANFILES = \
intltool-extract \
intltool-merge \

499
NEWS

@ -1,499 +0,0 @@
* #3807: Use toolbuttons as scroll buttons and make them insensitive (benzea)
* #4892: Use the engine to make sugar icons insensitive (benzea)
* #4941: Add menu entry with dialog to show About this XO (erikos)
* #5089: show frame shortly when adding object to clipboard (erikos)
* #5097: Fix pasting text between activities through the clipboard. (tomeu)
* #4660: Use improved PS API which streamlines ShareActivity process (smcv)
0.70.1
* #5004 Fix race that caused multiple fake icons appear in the activity frame
after installing a bundle with Browse. (tomeu)
Snapshot 411879e9de
* #4768 Fix memory leak when switching between activities. (marco)
Snapshot 9d28557bbd
* Fix randr. (marco)
* Do not fail if there is not an activity service. (marco)
* Alert when an activity cannot be saved. (rwh)
Snapshot 47e231311b
* Get rid of sound competely to be sure we don't block the device. (marco)
Snapshot 1bf6cdaa81
* #4728, #4764: Set the correct colors for filtered out mesh view icons. (tomeu)
Snapshot d6bac927e1
* #4667 Do not display XO outside the mesh view. (marco)
* #4687 Use the right free function, fix a crash. (sjoerd)
* #4724 Display meshbox invite palette menu with colored
activity icon (erikos)
* Always checkin to the DS from a new file. (tomeu)
Snapshot c682a5e241
- #4570: Fix alt-tab and ctrl-alt-tab behavior
- #3605: Make donut activity size fixed
- #4644: Ctrl-Q does not kill Journal
- #4571: Scroll buttons should not be reversed for Arabic
Snapshot 55864fa3f6
* Support for the espeak service. (codyl)
* Fix typo in activity launching code. (marco)
Snapshot e23f012e08
* Launch a few activities outside rainbow containers. (marco)
Snapshot 3e491c2dc7
* #4715: Filter new items that appear in the mesh view. (tomeu)
* #4716: Filter correctly activity icons in the mesh view. (tomeu)
* Use HOME/.i18n in control panel and reset jabber_registered to False (erikos)
Snapshot dae3ebe8d1
Snapshot 306d32832f
* Associate ctrl+s to keep. (rwh)
Snapshot 73cae198f5
* Remove the startup sound for now, to not break audio
for all the activities. (marco)
Snapshot 0a9676171d
* #4650: Failure to write journal files. (marco)
Snapshot ee8712d1c4
* #3119: Implement some basic search capabilities in the mesh view. (tomeu)
Snapshot d456f6c633
* New experimental screenshot code. (marco)
Snapshot e748f756c0
* #4618: Make the shell service more resilient to failure. (tomeu)
Snapshot 39aca0154d
* Get bundle installation to work again. (marco)
Snapshot b6422678e6
* #1941 Call FocusSearch method for popping up the journal. (rwh)
Snapshot 2df96b9af7
* #4552 Allow to open images in Paint (marco)
* #4518: Encode nickname in UTF-8 when writing it out to .sugar/*/config (smcv)
* sugar-control: Use NM for radio on/off, check for superuser (erikos)
Snapshot b72f00e30b
* #4517 Do not require a TakeScreenshot method on the dbus service (marco)
* Add wep type combo. (dcbw)
Snapshot 8c89bfaed7
* #4503: Do some standard Tubes boilerplate in sugar.presence, so activities
don't have to (smcv)
* #4428 Revert to the trial-3 frame behavior (marco)
* Initial push for the sugar control panel (erikos)
* #4358: pydoc strings for sugar.activity.Activity
Snapshot 176262f2e9
* Added morgs NotifyAlert (timed one button alert) to the alert api (erikos)
Snapshot fdb4e49b14
* Save journal files on nand, not tmpfs (tomeu)
Snapshot 3bae39c06c
* Make <alt> keybindings work again (marco)
Snapshot 606346b18c
* #4238: Handle double BuddyLeft in handle tracking in sugar.presence (morgs)
Snapshot 57402cf309
* Add new keybindings (Ctrl+Q, Ctrl+escape) for close activity (erikos)
* Add a keybinding (alt+space) to activity window to hide/show tray (erikos)
Snapshot efd0bbd326
* Add support to be able to remove an alert which is not the top
one on the queue (erikos)
* Fullscreen support (hide toolbar and tray) and tray support in activity
window (erikos)
Snapshot b023dd17a2
* Fix a crash in the emulator (marco)
Snapshot 276e1ee517
* #4266 Avoid misleading warning every time an activity starts (smcv)
* #4027 Try to make sugar.presence log messages less misleading (smcv)
Snapshot 24fbd1ce1c
* Fix the object chooser (marco)
Snapshot 3c7578577d
* Fix the shell service (marco)
Snapshot fa55b5af09
* Changed default spacing to 15px (from 8px) (benzea)
* Correct the height of the primary palette (benzea)
* Use double leading underscores for callback names to avoid name collisions (erikos)
Snapshot 34e2271833
* Activity launching fixes (marco)
Snapshot 6d2828e54e
* Code cleanups (marco)
Snapshot 1eb9932ab3
* sugar.presence tracking handles of buddies (morgs)
* Cleanup activity destruction (marco)
* Added TimeoutAlert (erikos)
Snapshot 29bc0a8a20
* Register to the school server from XO palette (marco)
Snapshot 05668dfad7
* First implementation of the alert bar #2822 and hooked it up
to the activity window (erikos)
Snapshot 9c5755d85a
* Put toolbars into event boxes so X fills the background correctly (benzea)
Snapshot 6c7c6a503b
* Activity launching refactoring. (marco)
* Improved logs. (marco)
Snapshot 143f9ac9c6
* Save activity previews to the datastore as binary png images. (tomeu)
Snapshot acca55e861
* #3905 Wait 3 seconds, rather than 3000, if NetworkManager doesn't respond
(smcv)
* #3909 Cope with both dbus-python both before and after 0.82.2 (smcv)
* #3181 Show always myself in friendstray (erikos)
* #948 Fix passphrase encoding for some passphrases. (bertf)
* #948 Accept ascii passphrases for WEP networks. '$:1a2b3c4d' for hex keys,
's:my passphrase' for 5 or 13 characters ascii passphrases, or just the plain
key for ascii passphrases of any other length. (tomeu)
* #2477 Support dbus introspection in sugar-native-factory (bertf)
* #2674 Add arrows to hint about the frame corner activation (marco)
* #2665 Re-arrange device icons in a line at the bottom (marco)
* #3378 Support changes in activity scope (incomplete!) (smcv, marco)
* #3081, #3497, #3485 Fix palette sizing and widget placement (benzea)
* #2211 New XRestop interface style in Developer Console (edsiper)
Snapshot b8ce5083b7
* #3601 Always remove invites from the frame. (cassidy)
Snapshot b8ce5083b7
* #3560 Updated spanish translation. (marco)
Snapshot b8ce5083b7
* Handle the passing of the child of the toolitem to the WidgetInvoker in ToolInvoker, FrameWidgetInvoker (erikos)
* #3293 Fix that several palettes are not hooked up to the same button (erikos)
* #3514 Remove invite when the activiy disappear from the mesh. (cassidy)
* #3003 Make image drags on the clipboard work consistently. (marco)
Snapshot 8ef6c57f8b
* #3478 Fix handling of non-default types. (bertf)
Snapshot 0a666e23cf
* #2977 Associate activity with his journal object if there is one. (marco)
* #3045 Fix clipboard palettes behavior. (marco)
* #2739 Make frame show on corners also after showing palettes. (marco)
Snapshot 47f473189e
* Fix typo so the removal of expanded activity bundles is complete. (tomeu)
* Don't disable the clipboard icons when they are still incomplete. (tomeu)
* #3053: Fix the distance between the clustered xos and the activity. (marco)
* Make the sizes of mesh icons match Eben spec. (marco)
* #3364: When joining an activity, pick up its sharing scope, so we don't
try to re-share already shared activities in order to invite someone (smcv)
Snapshot 8b784a6223
* #3339 Add default mime types handler to the shell. (marco)
* #3143 Finish up the invite-only mode implementation. (marco)
Snapshot 79237f3114
* #2582 German translation. (fab)
* #2026 Fix the active flag when there are multiple toplevels. (marco)
* Fixed some issues with text objects in the clipboard. (tomeu)
Snapshot a1f5cece18
* Fix traceback on mesh disconnect command (dcbw)
Snapshot 6b6470ebcb
* #1260, #2664, #1542, #2985: Rework network UI bits to be more informative and
increase granularity of mesh device control (dcbw)
* #2909: Make python activities more tolerant to missing metadata properties. (tomeu)
* #2653: Add audio/wav and audio/x-wav as Audio objects. (tomeu)
* Support moving of data files written to the datastore using standard Activity
write_file() API (dcbw)
Snapshot c8700feccf
* Removing activity from donut when not the active and the last one (erikos)
* Fix when removing an item from the clipboard tray (erikos)
* #3085: Fixed XO icon in group view (erikos)
* #3856: support for content bundles (danw)
Snapshot d9a30c23ff
* #2960: Gray bottom border for Toolbox. (marco)
* #2164: Keybindings for buttons in intro sequence (erikos)
Snapshot 0ad6398cf1
* #3025: Make bundlebuilder work even if SUGAR_PREFIX is not set. (marco)
* #2896: Remove sugar.date module. (tomeu)
Snapshot 0b3f687749
* #3088: Fix style of zoom buttons palettes. (marco)
* Refactor activity share/join in Activity.__init__() to be clearer and cover
all cases (dcbw)
* #2971: Fix palette flash when the mouse pointer leave the palete and go
over the Invoker (marco)
Snapshot feb462d08d
* Don't allow removing system-installed activities. (tomeu)
* #3063: Make the 'Keep' button in the activity toolbar create a copy of the
activity in the journal. Add a copy() method for activities to use. (tomeu)
* #3045: Fix issues with the clipboard icons and palettes. (tomeu)
* Get invites back to work in the UI. (marco)
* Get the title on activity palette in the mesh to work. (marco)
Snapshot e65fef5c79
* Support mutable name/tags in sugar.presence (smcv)
* Support invitations in sugar.presence (smcv)
* Add badges to infrastructure access points in mesh view (dcbw)
* Add palette to Wireless device on Home view showing channel (dcbw)
Snapshot 23ad88db0c
* #1986: Add Reboo option in Home View (edsiper)
* Re-share an activity when it gets launched from the journal if it was
shared before (dcbw)
* Update to new tubes API (cassidy)
Snapshot 246ec1e4aa
* Update arabic translation. (khaled)
* Restore Icon's ability to load absolute file paths. (tomeu)
* #722 Show "charging" badge on battery. (danw)
* #2010 Remember state when scrubbing. (marco)
Snapshot d38cacfe2c
* Add icons to the activity ring palette. (danw)
Snapshot e83b98a8f6
* #2912: Improvements to GlibURLDownloader API (dcbw)
* #2299: Really fix buddy properties coming through as arrays of bytes (dcbw)
Snapshot b24a28a77d
* #2012: Fix palette position on the left frame panel. (marco)
* #2297: Make activity name translatable. (danw)
* #2695: Recognize text files as such. (tomeu)
* #2669: Add a border to the inner of the frame. (marco)
* #2703: Update macedonian translation. (ArangelAngov)
* #2543: Offer multiple activities for opening clipboard objects. (tomeu)
Snapshot d93122bf5e
* #2751 Add keybindings for max/min brightness/volume
Snapshot 040c94d181
* #2099 Tweak a color pair as requested by Walter. (marco)
* Draw an invoker that is connected with the palette for toolbuttons. (benzea)
* Fix traceback when reading in saved WPA2 network configs (dcbw)
* #2475 Retrieve correctly the file path for files in removable devices. (tomeu)
* #2119 If config is missing start intro. (marco)
* #2083 Fix centering of items in the spread box. (marco)
* #2486 In the intro screen name page enter goes to next page. (marco)
* #2570 Accept correctly image drops from Record.
* Add Greek translation. (simosx)
* #2564 Use the activity service name as the base name for translation files.
(tomeu)
* Add WPA support (miguel, dcbw)
* Fix clipboard support for text from Browse. (tomeu)
* #2511 Fix journal entries background in the object chooser. (tomeu)
* Activity launching now timeout after 120 seconds. (marco)
* Add timeout arg to sugar.datastore.Datastore. (tomeu)
* Presence Service monitor in dev console (smcv)
* Turn off logging by default. Logs may be re-enabled on a per-module basis
by adding environment variables like SHELL_DEBUG and RECORD_DEBUG to
the sugar environment
Snapshot 088c7612e3
* Don't follow the cursor when expanding to secondary palette. (marco)
* #2370 Update spanish translation. (marco)
* #2014 Add icons in the share dropdown in activities. (marco)
Snapshot 9ac5d38e90
* #2361 Ensure secondary palette state doesn't go out of screen. (marco)
* #2014 Use a combobox to represent activity network state. (marco)
Snapshot 4a924a8e5d
* #2399 Fix a bug which was preventing Write to start. (tomeu)
* #2052 Fix error in the developer console. (edsiper)
Snapshot 943c78ffa7
* #2323 Make combobox icons bigger when there is no text. (marco)
* Add option to GlibURLDownloader to download to specified file instead
of tempfile (dcbw)
Snapshot 8ae99aaa87
* #2268 Allow removing downloads from the clipboard while in progress. (tomeu)
* #2240 Ensure activity uniquness in the shell. (marco)
Snapshot f6f3f2b520
* #2103 Use selection grey for progress in the browser entry. (marco)
* Fix opening downloads from the clipboard. (marco)
Snapshot 6b57baa075
* #2008 Place free views palettes at cursor. (marco)
* Actually handle multiple mime types (dcbw)
* Keep owner in the center in mesh view (dcbw)
* Suppress annoying warnings about unknown activities from the PS (dcbw)
* Don't close GlibTCPServer sockets prematurely (dcbw)
Snapshot 5212790236
* Fix initialization order of buddy class '_activities' member (dcbw)
* Update brazilian translation.
* Add polish translation.
* Add french translation.
* #958, #1433 Refactor brightness and volume key handling to follow
Eben specification and the new B3 keyboard (marco)
Snapshot fd7336c2f1
* Suppress traceback when creating a new buddy object on buddy-disappeared
signal
Snapshot 9f4da4e6d1
* #775 Show the activity's creator colors in the donut. (danw)
* #2185 Do not shutdown on power button, ohm does it now. (marco)
* #1888 Choose the correct mime type when adding text from Write to the
clipboard. (tomeu)
* #2149, #2150: fixes for the clipboard palette. (tomeu)
* #2163 Arrow icons in the intro screen buttons. (marco)
Snapshot 4c352d1f83
* Adapt to the datastore API changes. (tomeu)
Snapshot ec7eb2ebbb
* Update the XO colors with a new list from walter. (marco)
* Refactored the intro screen UI to start matching the new design. (marco)
* #1720 Show the name of the wireless network to which we are connected. (tomeu)
* #1888 Fix opening items from the clipboard. (tomeu)
* #1984 Fix removing items from the clipboard. (tomeu)
Snapshot b83a9ec27d
* Fix font size on the XO. (marco)
* Make developer console work again. (marco)
* #2020 Use the new activity-stop icon. (marco)
* #2002 Tooltips for the zoom levels. (marco)
* #2018 Rename Save to Keep. (marco)
* #2020 Rename Close to Stop. (marco)
Snapshot 42f0bcc48d
* Fix broken import which was preventing startup. (marco)
Snapshot 757b2b8ce6
* #2031: Do not die if battery properties are unavailable. (marco)
* #1953: Retrieve friends' nicks from the profile. (tomeu)
* #1720: Show the owner's buddy menu in the Groups view. (tomeu)
Snapshot aa6a024368
* #1825: Fix tab label padding. (marco)
* #1823: Margin at the toolbar tabs bottom. (marco)
* #1872, #1934: Hide palettes when closing activities or switching views. (tomeu)
Snapshot f8cf7ff1ce
* Hide palettes when buttons are clicked. (edsiper)
Snapshot cebf25739b
* #1930: Only take preview before closing. (tomeu)
Snapshot 8af15d4e73
* Nicer tooltips. Improved sizing logic. (marco)
* Do not popdown the frame when palettes are active. (marco)
* Add macedonian translation. (ArangelAngov)
* Add brazilian translation. (DiegoZacarao)
* Some fixes for changing the selected clipboard object. (tomeu)
* Fix palettes around the mesh edges. (edsiper)
Snapshot de8b3b4c01
* Use HAL to get battery informations.
* Improvements in the mesh view layout.
* Hide the active palette when another popup.
* Icons in the buddy menu items

1
bin/.gitignore vendored

@ -1,3 +1,4 @@
sugar-control-panel
sugar-emulator
sugar-shell
sugar-shell-service

@ -3,6 +3,7 @@ bin_SCRIPTS = \
sugar-activity \
sugar-backup \
sugar-control-panel \
sugar-emulator \
sugar-install-bundle \
sugar-launch \
sugar-shell \

@ -0,0 +1,26 @@
#!/usr/bin/env python
# Copyright (C) 2008, 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
import sys
sys.path.insert(0, '@prefix@/share/sugar/shell')
from emulator import main
main()

@ -1,7 +1,5 @@
#!/bin/sh
export SUGAR_PREFIX=@prefix@
export SUGAR_PATH=@prefix@/share/sugar
export GTK2_RC_FILES=@prefix@/share/sugar/data/sugar-xo.gtkrc
if [ -f /etc/olpc-security ] ; then
exec dbus-launch --exit-with-session --config-file=/etc/dbus-1/session-olpc.conf sugar-shell

@ -42,8 +42,10 @@ AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
AC_CONFIG_FILES([
bin/sugar
bin/sugar-control-panel
bin/sugar-emulator
bin/sugar-shell
bin/sugar-shell-service
service/config.py
src/config.py
])

@ -18,28 +18,6 @@
import os
def get_prefix_path(base, path=None):
if os.environ.has_key('SUGAR_PREFIX'):
prefix = os.environ['SUGAR_PREFIX']
else:
raise RuntimeError("The SUGAR_PREFIX environment variable is not set.")
if path:
return os.path.join(prefix, base, path)
else:
return os.path.join(prefix, base)
def _get_sugar_path(base, path=None):
if os.environ.has_key('SUGAR_PATH'):
sugar_path = os.environ['SUGAR_PATH']
else:
raise RuntimeError("The SUGAR_PATH environment variable is not set.")
if path:
return os.path.join(sugar_path, base, path)
else:
return os.path.join(sugar_path, base)
def is_emulator():
if os.environ.has_key('SUGAR_EMULATOR'):
if os.environ['SUGAR_EMULATOR'] == 'yes':
@ -76,6 +54,3 @@ def get_user_activities_path():
def get_user_library_path():
return os.path.expanduser('~/Library')
def get_data_path(path=None):
return _get_sugar_path('data', path)

@ -0,0 +1 @@
config.py

@ -25,6 +25,7 @@ sugar_PYTHON = \
bundleregistry.py \
clipboardobject.py \
clipboardservice.py \
config.py \
main.py
DISTCLEANFILES = $(service_DATA)

@ -24,6 +24,8 @@ from sugar.bundle.bundle import MalformedBundleException
from sugar import env
from sugar import util
import config
# http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
def _get_data_dirs():
if os.environ.has_key('XDG_DATA_DIRS'):
@ -34,7 +36,7 @@ def _get_data_dirs():
def _load_mime_defaults():
defaults = {}
f = open(env.get_data_path('mime.defaults'), 'r')
f = open(os.path.join(config.data_path, 'mime.defaults'), 'r')
for line in f.readlines():
line = line.strip()
if line and not line.startswith('#'):

@ -0,0 +1,17 @@
# Copyright (C) 2008 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
data_path = '@prefix@/share/sugar/data'

@ -3,6 +3,7 @@ SUBDIRS = controlpanel hardware model view intro
sugardir = $(pkgdatadir)/shell
sugar_PYTHON = \
config.py \
emulator.py \
logsmanager.py \
main.py \
shellservice.py

@ -1,20 +1,18 @@
# Copyright (C) 2008 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser 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 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 library is distributed in the hope that it will be useful,
# 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
# Lesser General Public License for more details.
# 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 Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# 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
prefix = '@prefix@'
bin_path = '@prefix@/bin'
data_path = '@prefix@/share/sugar/data'

@ -1,5 +1,3 @@
#!/usr/bin/env python
# Copyright (C) 2006, Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
@ -32,6 +30,8 @@ import gobject
from sugar import env
import config
def _get_display_number():
"""Find a free display number trying to connect to 6000+ ports"""
log.info( "Attempting to find free port for X11 (Xephyr)" )
@ -137,7 +137,8 @@ def main():
gtkrc_filename = 'sugar.gtkrc'
os.environ['SUGAR_XO_STYLE'] = 'no'
os.environ['GTK2_RC_FILES'] = env.get_data_path(gtkrc_filename)
gtkrc_path = os.path.join(config.data_path, gtkrc_filename)
os.environ['GTK2_RC_FILES'] = gtkrc_path
command = ['dbus-launch', 'dbus-launch', '--exit-with-session']
@ -153,6 +154,3 @@ def main():
log.info( "Attempting to launch sugar to replace this process: %s", " ".join(command))
os.execlp( *command )
if __name__ == "__main__":
main()

@ -102,7 +102,7 @@ def main():
hw_manager = hardwaremanager.get_manager()
hw_manager.startup()
icons_path = env.get_data_path('icons')
icons_path = os.path.join(config.data_path, 'icons')
gtk.icon_theme_get_default().append_search_path(icons_path)
# Do initial setup if needed

@ -14,9 +14,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import hippo
import os
import logging
import hippo
from sugar.graphics.tray import TrayButton
from sugar.graphics.tray import HTray
from sugar.graphics.icon import Icon
@ -26,6 +28,7 @@ from sugar import activity
from sugar import env
from activitybutton import ActivityButton
import config
class InviteButton(TrayButton):
def __init__(self, activity_model, invite):
@ -73,16 +76,16 @@ class ActivitiesTray(hippo.CanvasBox):
self._invites.connect('invite-removed', self._invite_removed_cb)
def _load_config(self):
config = []
cfg = []
f = open(env.get_data_path('activities.defaults'), 'r')
f = open(os.path.join(config.data_path, 'activities.defaults'), 'r')
for line in f.readlines():
line = line.strip()
if line and not line.startswith('#'):
config.append(line)
cfg.append(line)
f.close()
return config
return cfg
def _get_activities_cb(self, activity_list):
known_activities = []

Loading…
Cancel
Save