Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@localhost.localdomain>2006-08-10 18:26:40 (GMT)
committer Dan Williams <dcbw@localhost.localdomain>2006-08-10 18:26:40 (GMT)
commit394c41f4b7cfed4158da9e46351d780f8dcd2ebc (patch)
treedca5c7de92e3095e72f270cd7060cc8bbec69e68
parent1ed27c4fe795ab4b5222cba5d2c8ea0ce20dd36f (diff)
Make stuff work with latest sugar, joining now happens later
-rw-r--r--com.erikos.MemoryGame.service4
-rwxr-xr-xmemory.py12
-rw-r--r--memorygame.activity4
3 files changed, 12 insertions, 8 deletions
diff --git a/com.erikos.MemoryGame.service b/com.erikos.MemoryGame.service
new file mode 100644
index 0000000..63d6015
--- /dev/null
+++ b/com.erikos.MemoryGame.service
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name = com.erikos.MemoryGameActivity.Factory
+Exec = /home/dcbw/Development/olpc/sugar-jhbuild/build/bin/sugar-activity-factory com.erikos.MemoryGameActivity memorygame.memory.MemoryGameActivity
+
diff --git a/memory.py b/memory.py
index 36e626b..1c0d96a 100755
--- a/memory.py
+++ b/memory.py
@@ -223,9 +223,9 @@ class Gui:
_GAME_TYPE_EYE = "eye"
_GAME_TYPE_EAREYE = "eareye"
- def __init__(self, service):
+ def __init__(self):
self.started = False
- self._service = service
+ self._service = None
if self._service:
# If we are given a service, we are _joining_ an existing game
self.seed = service.get_published_value("seed")
@@ -575,12 +575,12 @@ class Gui:
return False
-class MemoryActivity(Activity):
- def __init__(self, service, args):
- Activity.__init__(self, service)
+class MemoryGameActivity(Activity):
+ def __init__(self):
+ Activity.__init__(self)
self.set_title("Memory Game")
# setup the gui
- self.guiObject = Gui(service)
+ self.guiObject = Gui()
def share(self):
self.guiObject.share(self)
diff --git a/memorygame.activity b/memorygame.activity
index 3e0e835..7e1a3b8 100644
--- a/memorygame.activity
+++ b/memorygame.activity
@@ -1,6 +1,6 @@
[Activity]
name = Memory Game
-id = com.erikos.MemoryActivity
-python_module = memorygame.memory.MemoryActivity
+id = com.erikos.MemoryGameActivity
+python_module = memorygame.memory.MemoryGameActivity
default_type = _memorygame_olpc._udp
show_launcher = yes