Move activity service registration in Activity
This commit is contained in:
parent
9274f9707f
commit
544e47cbe0
@ -1,6 +1,3 @@
|
|||||||
import logging
|
|
||||||
import xml.sax.saxutils
|
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import geckoembed
|
import geckoembed
|
||||||
|
|
||||||
@ -109,16 +106,9 @@ class BrowserActivity(Activity):
|
|||||||
return self.embed
|
return self.embed
|
||||||
|
|
||||||
def share(self):
|
def share(self):
|
||||||
escaped_title = xml.sax.saxutils.escape(self.embed.get_title())
|
Activity.share(self)
|
||||||
escaped_url = xml.sax.saxutils.escape(self.embed.get_address())
|
|
||||||
|
|
||||||
# Share this activity with others
|
self._model = LocalModel(self, self._pservice, self._service)
|
||||||
properties = {_SERVICE_URI_TAG: escaped_url, _SERVICE_TITLE_TAG: escaped_title}
|
|
||||||
self._share_service = self._pservice.share_activity(self,
|
|
||||||
stype=self._default_type, properties=properties)
|
|
||||||
|
|
||||||
# Create our activity-specific browser sharing service
|
|
||||||
self._model = LocalModel(self, self._pservice, self._share_service)
|
|
||||||
self._model.set_value('owner', self._pservice.get_owner().get_name())
|
self._model.set_value('owner', self._pservice.get_owner().get_name())
|
||||||
self._update_shared_location()
|
self._update_shared_location()
|
||||||
|
|
||||||
|
@ -209,10 +209,6 @@ class Activity(gtk.Window):
|
|||||||
def get_id(self):
|
def get_id(self):
|
||||||
return self._activity_id
|
return self._activity_id
|
||||||
|
|
||||||
#############################################################
|
|
||||||
# Pure Virtual methods that subclasses may/may not implement
|
|
||||||
#############################################################
|
|
||||||
|
|
||||||
def share(self):
|
def share(self):
|
||||||
"""Called to request the activity to share itself on the network."""
|
"""Called to request the activity to share itself on the network."""
|
||||||
pass
|
self._service = self._pservice.share_activity(self, self._default_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user