Remove args from the factory interface
This commit is contained in:
parent
d919848324
commit
9274f9707f
@ -20,14 +20,9 @@ class BrowserActivity(Activity):
|
|||||||
FOLLOWING = 2
|
FOLLOWING = 2
|
||||||
LEADING = 3
|
LEADING = 3
|
||||||
|
|
||||||
def __init__(self, service, args):
|
def __init__(self, service):
|
||||||
Activity.__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._mode = BrowserActivity.SOLO
|
||||||
self._share_service = None
|
self._share_service = None
|
||||||
self._model_service = None
|
self._model_service = None
|
||||||
@ -45,9 +40,7 @@ class BrowserActivity(Activity):
|
|||||||
self.embed = geckoembed.Browser()
|
self.embed = geckoembed.Browser()
|
||||||
self.embed.connect("title", self.__title_cb)
|
self.embed.connect("title", self.__title_cb)
|
||||||
vbox.pack_start(self.embed)
|
vbox.pack_start(self.embed)
|
||||||
|
|
||||||
self.embed.show()
|
self.embed.show()
|
||||||
self.embed.load_address(self.uri)
|
|
||||||
|
|
||||||
nav_toolbar = NavigationToolbar(self)
|
nav_toolbar = NavigationToolbar(self)
|
||||||
vbox.pack_start(nav_toolbar, False)
|
vbox.pack_start(nav_toolbar, False)
|
||||||
|
@ -51,7 +51,7 @@ class Terminal(gtk.HBox):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class TerminalActivity(Activity):
|
class TerminalActivity(Activity):
|
||||||
def __init__(self, service, args):
|
def __init__(self, service):
|
||||||
Activity.__init__(self, service)
|
Activity.__init__(self, service)
|
||||||
|
|
||||||
self.set_title("Terminal")
|
self.set_title("Terminal")
|
||||||
|
@ -54,14 +54,14 @@ class ActivityFactory(dbus.service.Object):
|
|||||||
def create_with_service(self, service_path):
|
def create_with_service(self, service_path):
|
||||||
pservice = PresenceService()
|
pservice = PresenceService()
|
||||||
service = pservice.get(service_path)
|
service = pservice.get(service_path)
|
||||||
activity = self._class(service, [])
|
activity = self._class(service)
|
||||||
|
|
||||||
@dbus.service.method("com.redhat.Sugar.ActivityFactory")
|
@dbus.service.method("com.redhat.Sugar.ActivityFactory")
|
||||||
def create(self):
|
def create(self):
|
||||||
activity = self._class(None, [])
|
activity = self._class(None)
|
||||||
activity.set_default_type(self._default_type)
|
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."""
|
"""Create a new activity from his name."""
|
||||||
bus = dbus.SessionBus()
|
bus = dbus.SessionBus()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user