Remove args from the factory interface
This commit is contained in:
parent
d919848324
commit
9274f9707f
@ -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
|
||||
@ -44,10 +39,8 @@ class BrowserActivity(Activity):
|
||||
|
||||
self.embed = geckoembed.Browser()
|
||||
self.embed.connect("title", self.__title_cb)
|
||||
vbox.pack_start(self.embed)
|
||||
|
||||
vbox.pack_start(self.embed)
|
||||
self.embed.show()
|
||||
self.embed.load_address(self.uri)
|
||||
|
||||
nav_toolbar = NavigationToolbar(self)
|
||||
vbox.pack_start(nav_toolbar, False)
|
||||
|
@ -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")
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user