Commit c2f2ba97 authored by Philipp Hörist's avatar Philipp Hörist

Dont draw contact after selection change

This seems to be an old codepath, currently there is no need to redraw a contact on selection change

Fixes #9496
parent c25e3756
......@@ -366,8 +366,6 @@ class GroupchatControl(ChatControlBase):
self.widget_set_visible(self.xml.get_object('banner_eventbox'),
app.config.get('hide_groupchat_banner'))
self._last_selected_contact = None # None or holds jid, account tuple
# muc attention flag (when we are mentioned in a muc)
# if True, the room has mentioned us
self.attention_flag = False
......@@ -389,12 +387,8 @@ class GroupchatControl(ChatControlBase):
self.event_box = self.xml.get_object('banner_eventbox')
self.list_treeview = self.xml.get_object('list_treeview')
selection = self.list_treeview.get_selection()
id_ = selection.connect('changed',
self.on_list_treeview_selection_changed)
self.handlers[id_] = selection
id_ = self.list_treeview.connect('style-set',
self.on_list_treeview_style_set)
self.on_list_treeview_style_set)
self.handlers[id_] = self.list_treeview
# flag that stops hpaned position event
......@@ -1038,21 +1032,6 @@ class GroupchatControl(ChatControlBase):
nick = contact[Column.NICK]
self.draw_contact(nick)
def on_list_treeview_selection_changed(self, selection):
model, selected_iter = selection.get_selected()
self.draw_contact(self.nick)
if self._last_selected_contact is not None:
self.draw_contact(self._last_selected_contact)
if selected_iter is None:
self._last_selected_contact = None
return
contact = model[selected_iter]
nick = contact[Column.NICK]
self._last_selected_contact = nick
if contact[Column.TYPE] != 'contact':
return
self.draw_contact(nick, selected=True, focus=True)
def get_tab_label(self, chatstate):
"""
Markup the label if necessary. Returns a tuple such as: (new_label_str,
......@@ -1755,7 +1734,7 @@ class GroupchatControl(ChatControlBase):
if ctrl and msg:
ctrl.send_message(msg)
def draw_contact(self, nick, selected=False, focus=False):
def draw_contact(self, nick):
iter_ = self.get_contact_iter(nick)
if not iter_:
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment