Remove args from the factory interface

This commit is contained in:
Marco Pesenti Gritti 2006-08-07 16:26:54 +02:00
parent d919848324
commit 9274f9707f
3 changed files with 6 additions and 13 deletions

View File

@ -20,14 +20,9 @@ class BrowserActivity(Activity):
FOLLOWING = 2
LEADING = 3
def __init__(self, service, args):
def __init__(self, service):
Activity.__init__(self, service)
if len(args) > 0:
self.uri = args[0]
else:
self.uri = 'http://www.google.com'
self._mode = BrowserActivity.SOLO
self._share_service = None
self._model_service = None
@ -45,9 +40,7 @@ class BrowserActivity(Activity):
self.embed = geckoembed.Browser()
self.embed.connect("title", self.__title_cb)
vbox.pack_start(self.embed)
self.embed.show()
self.embed.load_address(self.uri)
nav_toolbar = NavigationToolbar(self)
vbox.pack_start(nav_toolbar, False)

View File

@ -51,7 +51,7 @@ class Terminal(gtk.HBox):
pass
class TerminalActivity(Activity):
def __init__(self, service, args):
def __init__(self, service):
Activity.__init__(self, service)
self.set_title("Terminal")

View File

@ -54,14 +54,14 @@ class ActivityFactory(dbus.service.Object):
def create_with_service(self, service_path):
pservice = PresenceService()
service = pservice.get(service_path)
activity = self._class(service, [])
activity = self._class(service)
@dbus.service.method("com.redhat.Sugar.ActivityFactory")
def create(self):
activity = self._class(None, [])
activity = self._class(None)
activity.set_default_type(self._default_type)
def create(activity_name, service = None, args = None):
def create(activity_name, service = None):
"""Create a new activity from his name."""
bus = dbus.SessionBus()