From 287749a3ecbe03010bdea9423d75b19df37551e4 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Sat, 9 Jan 2010 22:38:08 -0600 Subject: [PATCH] Bump to -13 to include fixes found through dbus-monitor to get calls to work --- src/channel/call.py | 24 +++++++++++++----------- src/channel/contact_list.py | 20 +++++++++++--------- src/channel/debug_prompt.py | 8 +++++--- src/channel/text.py | 20 +++++++++++--------- src/constants.py | 2 +- src/gvoice/state_machine.py | 4 ++-- 6 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/channel/call.py b/src/channel/call.py index ee5ba6f..b21a310 100644 --- a/src/channel/call.py +++ b/src/channel/call.py @@ -21,7 +21,7 @@ class CallChannel( try: # HACK Older python-telepathy way - telepathy.server.ChannelTypeStreamedMedia.__init__(self, connection, None) + telepathy.server.ChannelTypeStreamedMedia.__init__(self, connection, contactHandle) self._requested = props[telepathy.interfaces.CHANNEL_INTERFACE + '.Requested'] self._implement_property_get( telepathy.interfaces.CHANNEL_INTERFACE, @@ -41,9 +41,19 @@ class CallChannel( }, ) + # HACK Older python-telepathy doesn't provide this + self._immutable_properties = { + 'ChannelType': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetHandle': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'Interfaces': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetHandleType': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetID': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'Requested': telepathy.server.interfaces.CHANNEL_INTERFACE + } + self.GroupFlagsChanged(0, 0) self.MembersChanged( - '', [self._conn.GetSetHandle()], [], [], [contactHandle], + '', [self._conn.GetSelfHandle()], [], [], [contactHandle], 0, telepathy.CHANNEL_GROUP_CHANGE_REASON_NONE ) @@ -55,16 +65,8 @@ class CallChannel( def get_props(self): # HACK Older python-telepathy doesn't provide this - _immutable_properties = { - 'ChannelType': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetHandle': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'Interfaces': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetHandleType': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetID': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'Requested': telepathy.server.interfaces.CHANNEL_INTERFACE - } props = dict() - for prop, iface in _immutable_properties.items(): + for prop, iface in self._immutable_properties.items(): props[iface + '.' + prop] = \ self._prop_getters[iface][prop]() return props diff --git a/src/channel/contact_list.py b/src/channel/contact_list.py index 8f38fbd..a67fdc5 100644 --- a/src/channel/contact_list.py +++ b/src/channel/contact_list.py @@ -36,6 +36,16 @@ class AllContactsListChannel( self.__props = props self.__session = connection.session + # HACK Older python-telepathy doesn't provide this + self._immutable_properties = { + 'ChannelType': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetHandle': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'Interfaces': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetHandleType': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetID': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'Requested': telepathy.server.interfaces.CHANNEL_INTERFACE + } + self._callback = coroutines.func_sink( coroutines.expand_positional( self._on_contacts_refreshed @@ -53,16 +63,8 @@ class AllContactsListChannel( def get_props(self): # HACK Older python-telepathy doesn't provide this - _immutable_properties = { - 'ChannelType': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetHandle': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'Interfaces': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetHandleType': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetID': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'Requested': telepathy.server.interfaces.CHANNEL_INTERFACE - } props = dict() - for prop, iface in _immutable_properties.items(): + for prop, iface in self._immutable_properties.items(): props[iface + '.' + prop] = \ self._prop_getters[iface][prop]() return props diff --git a/src/channel/debug_prompt.py b/src/channel/debug_prompt.py index ed7e2e3..79b64be 100644 --- a/src/channel/debug_prompt.py +++ b/src/channel/debug_prompt.py @@ -39,9 +39,8 @@ class DebugPromptChannel(telepathy.server.ChannelTypeText, cmd.Cmd): self.__otherHandle = contactHandle - def get_props(self): # HACK Older python-telepathy doesn't provide this - _immutable_properties = { + self._immutable_properties = { 'ChannelType': telepathy.server.interfaces.CHANNEL_INTERFACE, 'TargetHandle': telepathy.server.interfaces.CHANNEL_INTERFACE, 'Interfaces': telepathy.server.interfaces.CHANNEL_INTERFACE, @@ -49,8 +48,11 @@ class DebugPromptChannel(telepathy.server.ChannelTypeText, cmd.Cmd): 'TargetID': telepathy.server.interfaces.CHANNEL_INTERFACE, 'Requested': telepathy.server.interfaces.CHANNEL_INTERFACE } + + def get_props(self): + # HACK Older python-telepathy doesn't provide this props = dict() - for prop, iface in _immutable_properties.items(): + for prop, iface in self._immutable_properties.items(): props[iface + '.' + prop] = \ self._prop_getters[iface][prop]() return props diff --git a/src/channel/text.py b/src/channel/text.py index dfc1a49..24a0687 100644 --- a/src/channel/text.py +++ b/src/channel/text.py @@ -36,6 +36,16 @@ class TextChannel(telepathy.server.ChannelTypeText): self.__otherHandle = contactHandle + # HACK Older python-telepathy doesn't provide this + self._immutable_properties = { + 'ChannelType': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetHandle': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'Interfaces': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetHandleType': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'TargetID': telepathy.server.interfaces.CHANNEL_INTERFACE, + 'Requested': telepathy.server.interfaces.CHANNEL_INTERFACE + } + self.__callback = coroutines.func_sink( coroutines.expand_positional( self._on_conversations_updated @@ -65,16 +75,8 @@ class TextChannel(telepathy.server.ChannelTypeText): def get_props(self): # HACK Older python-telepathy doesn't provide this - _immutable_properties = { - 'ChannelType': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetHandle': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'Interfaces': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetHandleType': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'TargetID': telepathy.server.interfaces.CHANNEL_INTERFACE, - 'Requested': telepathy.server.interfaces.CHANNEL_INTERFACE - } props = dict() - for prop, iface in _immutable_properties.items(): + for prop, iface in self._immutable_properties.items(): props[iface + '.' + prop] = \ self._prop_getters[iface][prop]() return props diff --git a/src/constants.py b/src/constants.py index d95726a..29b2fbd 100644 --- a/src/constants.py +++ b/src/constants.py @@ -3,7 +3,7 @@ import os __pretty_app_name__ = "Telepathy-TheOneRing" __app_name__ = "telepathy-theonering" __version__ = "0.1.0" -__build__ = 12 +__build__ = 13 __app_magic__ = 0xdeadbeef _data_path_ = os.path.join(os.path.expanduser("~"), ".telepathy-theonering") _user_settings_ = "%s/settings.ini" % _data_path_ diff --git a/src/gvoice/state_machine.py b/src/gvoice/state_machine.py index c2e43da..1895a5d 100644 --- a/src/gvoice/state_machine.py +++ b/src/gvoice/state_machine.py @@ -220,7 +220,7 @@ class UpdateStateMachine(StateMachine): nextTimeout = self._strategy.timeout if nextTimeout != self.INFINITE_PERIOD: self._timeoutId = gobject.timeout_add(nextTimeout, self._on_timeout) - _moduleLogger.info("%s Next update in %s ms" % (self._name, nextTimeout, )) + _moduleLogger.debug("%s Next update in %s ms" % (self._name, nextTimeout, )) def _stop_update(self): if self._timeoutId is None: @@ -237,7 +237,7 @@ class UpdateStateMachine(StateMachine): @gtk_toolbox.log_exception(_moduleLogger) def _on_timeout(self): - _moduleLogger.debug("%s Update" % (self._name)) + _moduleLogger.info("%s Update" % (self._name)) self._timeoutId = None self._schedule_update() for item in self._updateItems: -- 1.7.9.5