[sugar] [PATCH] Push get_buddy from Connect into sugar.presence (#6473)

Guillaume Desmottes guillaume.desmottes
Wed May 14 05:17:49 EDT 2008


Le mardi 13 mai 2008 ? 17:03 +0200, Morgan Collett a ?crit :
> This subclasses TubeConnection to make a version (SugarTubeConnection)
> that can resolve a handle to a Buddy.
> 
> Patches are for sugar(.presence) and Connect.


+            handle = self._conn.GetSelfHandle()

Why call the GetSelfHandle() D-Bus method as you already have the
handle?
handle = self.self_handle
should be enough


+            # deal with failure to get the handle owner
+            if handle == 0:
+                return None
I think this should always be done, not only in the else branch.


I'm wondering if it shouldn't be better to override watch_participants
(or add a new similar mechanism) returning directly buddies instead of
handles. Would it be possible/worth to completely hide handles and
always use buddies from the activity Pov?


	G.




More information about the Sugar-devel mailing list