Change the Activity execute method to add a result boolean (handle/not handled).

When the camera key is pressed the Shell send and command to the active activity,
if that's not handled than it startup org.laptop.CameraActivity.
This commit is contained in:
Marco Pesenti Gritti
2006-12-21 12:37:02 +01:00
parent 1d98e5f6bf
commit 5623c8a3b1
3 changed files with 13 additions and 7 deletions
+3 -3
View File
@@ -85,9 +85,9 @@ class ActivityDbusService(dbus.service.Object):
return self._activity.get_shared()
@dbus.service.method(ACTIVITY_INTERFACE,
in_signature="sas", out_signature="")
in_signature="sas", out_signature="b")
def execute(self, command, args):
self._activity.execute(command, args)
return self._activity.execute(command, args)
class Activity(gtk.Window):
"""Base Activity class that all other Activities derive from."""
@@ -170,7 +170,7 @@ class Activity(gtk.Window):
def execute(self, command, args):
"""Execute the given command with args"""
pass
return False
def __destroy_cb(self, window):
if self._bus: