Re: [Sugar-devel] [PATCH] Don't emit buddy-removed if we don't know yet its contact-id #2402

2010-10-05 Thread Simon Schampijer
On 10/04/2010 07:50 PM, Tomeu Vizoso wrote:
 On Mon, Oct 4, 2010 at 19:42, Tomeu Vizosotomeu.viz...@collabora.co.uk  
 wrote:
 Otherwise the owner icon is removed from the neighborhood view

 Requesting inclusion in 0.90.

 Thanks,

 Tomeu

Looks good, please go ahead.

Regards,
Simon
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [PATCH] Don't emit buddy-removed if we don't know yet its contact-id #2402

2010-10-04 Thread Tomeu Vizoso
Otherwise the owner icon is removed from the neighborhood view
---
 src/jarabe/model/neighborhood.py |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
index 478ee46..91dd059 100644
--- a/src/jarabe/model/neighborhood.py
+++ b/src/jarabe/model/neighborhood.py
@@ -283,7 +283,8 @@ class _Account(gobject.GObject):
 self.emit('connected')
 else:
 for contact_handle, contact_id in self._buddy_handles.items():
-self.emit('buddy-removed', contact_id)
+if contact_id is not None:
+self.emit('buddy-removed', contact_id)
 
 for room_handle, activity_id in self._activity_handles.items():
 self.emit('activity-removed', activity_id)
-- 
1.7.2.3

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH] Don't emit buddy-removed if we don't know yet its contact-id #2402

2010-10-04 Thread Tomeu Vizoso
On Mon, Oct 4, 2010 at 19:42, Tomeu Vizoso tomeu.viz...@collabora.co.uk wrote:
 Otherwise the owner icon is removed from the neighborhood view

Requesting inclusion in 0.90.

Thanks,

Tomeu

 ---
  src/jarabe/model/neighborhood.py |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

 diff --git a/src/jarabe/model/neighborhood.py 
 b/src/jarabe/model/neighborhood.py
 index 478ee46..91dd059 100644
 --- a/src/jarabe/model/neighborhood.py
 +++ b/src/jarabe/model/neighborhood.py
 @@ -283,7 +283,8 @@ class _Account(gobject.GObject):
             self.emit('connected')
         else:
             for contact_handle, contact_id in self._buddy_handles.items():
 -                self.emit('buddy-removed', contact_id)
 +                if contact_id is not None:
 +                    self.emit('buddy-removed', contact_id)

             for room_handle, activity_id in self._activity_handles.items():
                 self.emit('activity-removed', activity_id)
 --
 1.7.2.3

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel