Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-03-16 15:26:32 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-03-16 15:26:32 (GMT)
commit32fb016a6ce0b8fc21f7cb2a281fa78b4c731c74 (patch)
treeec5c38ee7d6d5f6f12722041f18dda30460aa954
parent94214ba6e734c470fe59ed1c4b3614455f6b6461 (diff)
parentd196fb89a7567b34e1f8312ea17d654db2d3524b (diff)
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
-rw-r--r--services/presence2/server_plugin.py28
-rw-r--r--shell/view/frame/ZoomBox.py9
2 files changed, 28 insertions, 9 deletions
diff --git a/services/presence2/server_plugin.py b/services/presence2/server_plugin.py
index 84aa10b..e335194 100644
--- a/services/presence2/server_plugin.py
+++ b/services/presence2/server_plugin.py
@@ -378,6 +378,8 @@ class ServerPlugin(gobject.GObject):
except dbus.DBusException, e:
if str(e).startswith("org.freedesktop.DBus.Error.NoReply"):
raise InvalidBuddyError("couldn't get properties")
+ props = {}
+ logging.debug("Error getting buddy properties: %s" % e)
if not props.has_key('color'):
raise InvalidBuddyError("no color")
@@ -402,7 +404,9 @@ class ServerPlugin(gobject.GObject):
online = handle in self._online_contacts
for status, params in statuses.items():
jid = self._conn[CONN_INTERFACE].InspectHandles(CONNECTION_HANDLE_TYPE_CONTACT, [handle])[0]
- print "Handle %s (%s) was online=%s. new statuse %s" % (handle, jid, online, status)
+ olstr = "ONLINE"
+ if not online: olstr = "OFFLINE"
+ print "Handle %s (%s) was %s, status now '%s'." % (handle, jid, olstr, status)
if not online and status in ["available", "away", "brb", "busy", "dnd", "xa"]:
try:
self._contact_online(handle)
@@ -412,6 +416,11 @@ class ServerPlugin(gobject.GObject):
self._contact_offline(handle)
def _avatar_updated_cb(self, handle, new_avatar_token):
+ if handle == self._conn[CONN_INTERFACE].GetSelfHandle():
+ # ignore network events for Owner property changes since those
+ # are handled locally
+ return
+
jid = self._online_contacts[handle]
icon = self._icon_cache.get_icon(jid, new_avatar_token)
if not icon:
@@ -428,14 +437,23 @@ class ServerPlugin(gobject.GObject):
#print "Buddy %s alias changed to %s" % (handle, alias)
self._buddy_properties_changed_cb(handle, prop)
- def _buddy_properties_changed_cb(self, contact, properties):
- self.emit("buddy-properties-changed", contact, properties)
+ def _buddy_properties_changed_cb(self, handle, properties):
+ if handle == self._conn[CONN_INTERFACE].GetSelfHandle():
+ # ignore network events for Owner property changes since those
+ # are handled locally
+ return
+ self.emit("buddy-properties-changed", handle, properties)
+
+ def _buddy_activities_changed_cb(self, handle, activities):
+ if handle == self._conn[CONN_INTERFACE].GetSelfHandle():
+ # ignore network events for Owner activity changes since those
+ # are handled locally
+ return
- def _buddy_activities_changed_cb(self, contact, activities):
for act_id, act_handle in activities:
self._activities[act_id] = act_handle
activities_id = map(lambda x: x[0], activities)
- self.emit("buddy-activities-changed", contact, activities_id)
+ self.emit("buddy-activities-changed", handle, activities_id)
def _new_channel_cb(self, object_path, channel_type, handle_type, handle, suppress_handler):
if handle_type == CONNECTION_HANDLE_TYPE_ROOM and channel_type == CHANNEL_TYPE_TEXT:
diff --git a/shell/view/frame/ZoomBox.py b/shell/view/frame/ZoomBox.py
index 231f188..ecf70e2 100644
--- a/shell/view/frame/ZoomBox.py
+++ b/shell/view/frame/ZoomBox.py
@@ -31,10 +31,11 @@ class ActivityMenu(Menu):
def __init__(self, activity_model):
Menu.__init__(self, activity_model.get_title())
- if not activity_model.get_shared():
- self.add_item(MenuItem(ActivityMenu.ACTION_SHARE,
- _('Share'),
- 'theme:stock-share-mesh'))
+# FIXME: re-enable after trial1
+# if not activity_model.get_shared():
+# self.add_item(MenuItem(ActivityMenu.ACTION_SHARE,
+# _('Share'),
+# 'theme:stock-share-mesh'))
self.add_item(MenuItem(ActivityMenu.ACTION_CLOSE,
_('Close'),