Ensure the current buddy is selected in the buddy list

This commit is contained in:
Dan Williams 2006-04-25 11:57:33 -04:00
parent c6c65f3efa
commit 0aa037dbee

View File

@ -366,6 +366,10 @@ class ChatActivity(activity.Activity):
# Clear the "new message" icon when the user activates the chat # Clear the "new message" icon when the user activates the chat
aniter = self._get_iter_for_buddy(buddy) aniter = self._get_iter_for_buddy(buddy)
# Select the row in the list
if aniter:
selection = self._buddy_list_view.get_selection()
selection.select_iter(aniter)
icon = self._buddy_list_model.get_value(aniter, self._MODEL_COL_ICON) icon = self._buddy_list_model.get_value(aniter, self._MODEL_COL_ICON)
if icon == self._pixbuf_new_message: if icon == self._pixbuf_new_message:
self._buddy_list_model.set_value(aniter, self._MODEL_COL_ICON, self._pixbuf_active_chat) self._buddy_list_model.set_value(aniter, self._MODEL_COL_ICON, self._pixbuf_active_chat)