diff options
author | Kshitij <Kshitij@Kshitijs-MacBook-Pro.local> | 2012-12-25 14:22:17 (GMT) |
---|---|---|
committer | Kshitij <Kshitij@Kshitijs-MacBook-Pro.local> | 2012-12-25 14:22:17 (GMT) |
commit | 87421d81339730f3231edd5245a53bb6658791be (patch) | |
tree | d1c0af4b995c2f6caf955dc6c75278f3aa720b53 | |
parent | e3af9847cb04b862142492594150379d7109d949 (diff) |
sugar3 changes
-rwxr-xr-x | activity.py | 8 | ||||
-rw-r--r-- | game.py | 2 | ||||
-rw-r--r-- | olpcgames/activity.py | 4 | ||||
-rw-r--r-- | olpcgames/canvas.py | 16 | ||||
-rw-r--r-- | olpcgames/mesh.py | 10 | ||||
-rw-r--r-- | olpcgames/util.py | 2 | ||||
-rwxr-xr-x | setup.py | 2 |
7 files changed, 22 insertions, 22 deletions
diff --git a/activity.py b/activity.py index 127e73f..3190496 100755 --- a/activity.py +++ b/activity.py @@ -8,10 +8,10 @@ import gtk from olpcgames import mesh from olpcgames import util -from sugar.activity.widgets import ActivityToolbarButton -from sugar.activity.widgets import StopButton -from sugar.graphics.toolbarbox import ToolbarBox -from sugar.graphics.toolbutton import ToolButton +from sugar3.activity.widgets import ActivityToolbarButton +from sugar3.activity.widgets import StopButton +from sugar3.graphics.toolbarbox import ToolbarBox +from sugar3.graphics.toolbutton import ToolButton from gettext import gettext as _ @@ -40,7 +40,7 @@ log.setLevel(logging.DEBUG) import olpcgames.pausescreen as pausescreen import olpcgames.mesh as mesh from olpcgames.util import get_bundle_path -from sugar.presence import presenceservice +from sugar3.presence import presenceservice bundlepath = get_bundle_path() presenceService = presenceservice.get_instance() diff --git a/olpcgames/activity.py b/olpcgames/activity.py index ddd9a85..1304551 100644 --- a/olpcgames/activity.py +++ b/olpcgames/activity.py @@ -33,8 +33,8 @@ import gtk import gtk.gdk import os -from sugar.activity import activity -from sugar.graphics import style +from sugar3.activity import activity +from sugar3.graphics import style from olpcgames.canvas import PygameCanvas from olpcgames import mesh, util diff --git a/olpcgames/canvas.py b/olpcgames/canvas.py index 2583827..588682c 100644 --- a/olpcgames/canvas.py +++ b/olpcgames/canvas.py @@ -106,12 +106,12 @@ class PygameCanvas(gtk.Layout): import olpcgames olpcgames.widget = olpcgames.WIDGET = self try: - import sugar.activity.activity,os + import sugar3.activity.activity,os except ImportError, err: log.info( """Running outside Sugar""" ) else: try: - os.chdir(sugar.activity.activity.get_bundle_path()) + os.chdir(sugar3.activity.activity.get_bundle_path()) except KeyError, err: pass @@ -141,9 +141,9 @@ class PygameCanvas(gtk.Layout): """Implement the 'view source' key by saving datastore, and then telling the Journal to view it.""" if self.source_object_id is None: - from sugar import profile - from sugar.datastore import datastore - from sugar.activity.activity import get_bundle_name, get_bundle_path + from sugar3 import profile + from sugar3.datastore import datastore + from sugar3.activity.activity import get_bundle_name, get_bundle_path from gettext import gettext as _ import os.path jobject = datastore.create() @@ -162,10 +162,10 @@ class PygameCanvas(gtk.Layout): jobject.destroy() self.journal_show_object(self.__source_object_id) def journal_show_object(self, object_id): - """Invoke journal_show_object from sugar.activity.activity if it + """Invoke journal_show_object from sugar3.activity.activity if it exists.""" try: - from sugar.activity.activity import show_object_in_journal + from sugar3.activity.activity import show_object_in_journal show_object_in_journal(object_id) except ImportError: - pass # no love from sugar. + pass # no love from sugar3. diff --git a/olpcgames/mesh.py b/olpcgames/mesh.py index 1818214..d947a8b 100644 --- a/olpcgames/mesh.py +++ b/olpcgames/mesh.py @@ -121,7 +121,7 @@ log = logging.getLogger( 'olpcgames.mesh' ) import olpcgames from olpcgames.util import get_traceback try: - from sugar.presence.tubeconn import TubeConnection + from sugar3.presence.tubeconn import TubeConnection except ImportError, err: TubeConnection = object try: @@ -136,7 +136,7 @@ except ImportError, err: telepathy = None try: - import sugar.presence.presenceservice + import sugar3.presence.presenceservice except Exception, err: pass import pygame.event as PEvent @@ -258,7 +258,7 @@ def _setup(activity): '''Determines text and tube channels for the current Activity. If no tube channel present, creates one. Updates text_chan and tubes_chan. -setup(sugar.activity.Activity, telepathy.client.Connection)''' +setup(sugar3.activity.Activity, telepathy.client.Connection)''' global text_chan, tubes_chan, DBUS_SERVICE log.info( 'Setup for %s', activity ) if not DBUS_SERVICE: @@ -413,10 +413,10 @@ def _get_presence_service( ): The presence service, when offline, has no preferred connection type, so we check that before returning the object... """ - log.debug( """About to import sugar.presence.presenceservice""" ) + log.debug( """About to import sugar3.presence.presenceservice""" ) try: log.debug( 'About to retrieve presence service instance' ) - pservice = sugar.presence.presenceservice.get_instance() + pservice = sugar3.presence.presenceservice.get_instance() try: log.debug( ' Retrieved presence service instance: %s', pservice ) name, path = pservice.get_preferred_connection() diff --git a/olpcgames/util.py b/olpcgames/util.py index 49a23b0..a9c7289 100644 --- a/olpcgames/util.py +++ b/olpcgames/util.py @@ -8,7 +8,7 @@ import os.path NON_SUGAR_ROOT = '~/.sugar/default/olpcgames' try: - from sugar.activity.activity import get_bundle_path as _get_bundle_path + from sugar3.activity.activity import get_bundle_path as _get_bundle_path def get_bundle_path( ): """Retrieve bundle path from activity with fix for silly registration bug""" path = _get_bundle_path() @@ -1,3 +1,3 @@ #!/usr/bin/env python -from sugar.activity import bundlebuilder +from sugar3.activity import bundlebuilder bundlebuilder.start() |