Comment non working callback, but still keep it for reference.
This commit is contained in:
parent
d5bbc403c9
commit
f4a10ad5a9
1 changed files with 28 additions and 28 deletions
|
@ -3403,34 +3403,34 @@ class RosterWindow:
|
||||||
elif type_ == 'account':
|
elif type_ == 'account':
|
||||||
self._adjust_account_expand_collapse_state(account)
|
self._adjust_account_expand_collapse_state(account)
|
||||||
|
|
||||||
def on_treeview_selection_changed(self, selection):
|
# Selection can change when the model is filtered
|
||||||
'''Called when selection in TreeView has changed.
|
# Only write to the model when filtering is finished!
|
||||||
|
#
|
||||||
Redraw unselected rows to make status message readable
|
# FIXME: When we are filtering our custom colors are somehow lost
|
||||||
on all possible backgrounds.
|
#
|
||||||
'''
|
# def on_treeview_selection_changed(self, selection):
|
||||||
# Selection can change when the model is filtered
|
# '''Called when selection in TreeView has changed.
|
||||||
# Only write to the model when filtering is finished!
|
#
|
||||||
|
# Redraw unselected rows to make status message readable
|
||||||
# FIXME: When we are filtering our custom colors are somehow lost
|
# on all possible backgrounds.
|
||||||
|
# '''
|
||||||
model, list_of_paths = selection.get_selected_rows()
|
# model, list_of_paths = selection.get_selected_rows()
|
||||||
if len(self._last_selected_contact):
|
# if len(self._last_selected_contact):
|
||||||
# update unselected rows
|
# # update unselected rows
|
||||||
for (jid, account) in self._last_selected_contact:
|
# for (jid, account) in self._last_selected_contact:
|
||||||
gobject.idle_add(self.draw_contact, jid, account)
|
# gobject.idle_add(self.draw_contact, jid, account)
|
||||||
self._last_selected_contact = []
|
# self._last_selected_contact = []
|
||||||
if len(list_of_paths) == 0:
|
# if len(list_of_paths) == 0:
|
||||||
return
|
# return
|
||||||
for path in list_of_paths:
|
# for path in list_of_paths:
|
||||||
row = model[path]
|
# row = model[path]
|
||||||
if row[C_TYPE] != 'contact':
|
# if row[C_TYPE] != 'contact':
|
||||||
self._last_selected_contact = []
|
# self._last_selected_contact = []
|
||||||
return
|
# return
|
||||||
jid = row[C_JID].decode('utf-8')
|
# jid = row[C_JID].decode('utf-8')
|
||||||
account = row[C_ACCOUNT].decode('utf-8')
|
# account = row[C_ACCOUNT].decode('utf-8')
|
||||||
self._last_selected_contact.append((jid, account))
|
# self._last_selected_contact.append((jid, account))
|
||||||
gobject.idle_add(self.draw_contact, jid, account, True)
|
# gobject.idle_add(self.draw_contact, jid, account, True)
|
||||||
|
|
||||||
def on_service_disco_menuitem_activate(self, widget, account):
|
def on_service_disco_menuitem_activate(self, widget, account):
|
||||||
server_jid = gajim.config.get_per('accounts', account, 'hostname')
|
server_jid = gajim.config.get_per('accounts', account, 'hostname')
|
||||||
|
|
Loading…
Add table
Reference in a new issue