Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKshitij <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)
commit87421d81339730f3231edd5245a53bb6658791be (patch)
treed1c0af4b995c2f6caf955dc6c75278f3aa720b53
parente3af9847cb04b862142492594150379d7109d949 (diff)
sugar3 changes
-rwxr-xr-xactivity.py8
-rw-r--r--game.py2
-rw-r--r--olpcgames/activity.py4
-rw-r--r--olpcgames/canvas.py16
-rw-r--r--olpcgames/mesh.py10
-rw-r--r--olpcgames/util.py2
-rwxr-xr-xsetup.py2
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 _
diff --git a/game.py b/game.py
index 4f904d5..ee71f71 100644
--- a/game.py
+++ b/game.py
@@ -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()
diff --git a/setup.py b/setup.py
index ec0f64e..9a141b3 100755
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,3 @@
#!/usr/bin/env python
-from sugar.activity import bundlebuilder
+from sugar3.activity import bundlebuilder
bundlebuilder.start()