Rename ActivityHandle.handle_invite to ActivityHandle.invited

This commit is contained in:
Tomeu Vizoso 2010-08-16 17:27:10 +02:00
parent d66eb39c9b
commit 56679a3de6
4 changed files with 10 additions and 10 deletions

View File

@ -312,7 +312,7 @@ class Activity(Window, gtk.Container):
self.shared_activity = None self.shared_activity = None
self._join_id = None self._join_id = None
if handle.handle_invite: if handle.invited:
wait_loop = gobject.MainLoop() wait_loop = gobject.MainLoop()
self._client_handler = _ClientHandler( self._client_handler = _ClientHandler(
self.get_bundle_id(), self.get_bundle_id(),

View File

@ -220,7 +220,7 @@ class ActivityCreationHandler(gobject.GObject):
(log_path, log_file) = open_log_file(self._bundle) (log_path, log_file) = open_log_file(self._bundle)
command = get_command(self._bundle, self._handle.activity_id, command = get_command(self._bundle, self._handle.activity_id,
self._handle.object_id, self._handle.uri, self._handle.object_id, self._handle.uri,
self._handle.handle_invite) self._handle.invited)
dev_null = file('/dev/null', 'w') dev_null = file('/dev/null', 'w')
environment_dir = None environment_dir = None

View File

@ -24,7 +24,7 @@ class ActivityHandle(object):
"""Data structure storing simple activity metadata""" """Data structure storing simple activity metadata"""
def __init__(self, activity_id=None, object_id=None, uri=None, def __init__(self, activity_id=None, object_id=None, uri=None,
handle_invite=False): invited=False):
"""Initialise the handle from activity_id """Initialise the handle from activity_id
activity_id -- unique id for the activity to be activity_id -- unique id for the activity to be
@ -46,18 +46,18 @@ class ActivityHandle(object):
activity, rather than a journal object activity, rather than a journal object
(downloads stored on the file system for (downloads stored on the file system for
example or web pages) example or web pages)
handle_invite -- the activity is being launched for handling an invite invited -- the activity is being launched for handling an invite
from the network from the network
""" """
self.activity_id = activity_id self.activity_id = activity_id
self.object_id = object_id self.object_id = object_id
self.uri = uri self.uri = uri
self.handle_invite = handle_invite self.invited = invited
def get_dict(self): def get_dict(self):
"""Retrieve our settings as a dictionary""" """Retrieve our settings as a dictionary"""
result = {'activity_id': self.activity_id, result = {'activity_id': self.activity_id,
'handle_invite': self.handle_invite} 'invited': self.invited}
if self.object_id: if self.object_id:
result['object_id'] = self.object_id result['object_id'] = self.object_id
if self.uri: if self.uri:
@ -71,5 +71,5 @@ def create_from_dict(handle_dict):
result = ActivityHandle(handle_dict['activity_id'], result = ActivityHandle(handle_dict['activity_id'],
object_id = handle_dict.get('object_id'), object_id = handle_dict.get('object_id'),
uri = handle_dict.get('uri'), uri = handle_dict.get('uri'),
handle_invite = handle_dict.get('handle_invite')) invited = handle_dict.get('invited'))
return result return result

View File

@ -75,7 +75,7 @@ def main():
parser.add_option('-s', '--single-process', dest='single_process', parser.add_option('-s', '--single-process', dest='single_process',
action='store_true', action='store_true',
help='start all the instances in the same process') help='start all the instances in the same process')
parser.add_option('-i', '--handle-invite', dest='handle_invite', parser.add_option('-i', '--invited', dest='invited',
action='store_true', action='store_true',
help='the activity is being launched for handling an ' help='the activity is being launched for handling an '
'invite from the network') 'invite from the network')
@ -126,7 +126,7 @@ def main():
activity_handle = activityhandle.ActivityHandle( activity_handle = activityhandle.ActivityHandle(
activity_id=options.activity_id, activity_id=options.activity_id,
object_id=options.object_id, uri=options.uri, object_id=options.object_id, uri=options.uri,
handle_invite=options.handle_invite) invited=options.invited)
if options.single_process is True: if options.single_process is True:
sessionbus = dbus.SessionBus() sessionbus = dbus.SessionBus()