Comment non working callback, but still keep it for reference.

This commit is contained in:
Stephan Erb 2008-06-11 21:44:04 +00:00
parent d5bbc403c9
commit f4a10ad5a9

View file

@ -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):
'''Called when selection in TreeView has changed.
Redraw unselected rows to make status message readable
on all possible backgrounds.
'''
# Selection can change when the model is filtered # Selection can change when the model is filtered
# Only write to the model when filtering is finished! # Only write to the model when filtering is finished!
#
# FIXME: When we are filtering our custom colors are somehow lost # FIXME: When we are filtering our custom colors are somehow lost
#
model, list_of_paths = selection.get_selected_rows() # def on_treeview_selection_changed(self, selection):
if len(self._last_selected_contact): # '''Called when selection in TreeView has changed.
# update unselected rows #
for (jid, account) in self._last_selected_contact: # Redraw unselected rows to make status message readable
gobject.idle_add(self.draw_contact, jid, account) # on all possible backgrounds.
self._last_selected_contact = [] # '''
if len(list_of_paths) == 0: # model, list_of_paths = selection.get_selected_rows()
return # if len(self._last_selected_contact):
for path in list_of_paths: # # update unselected rows
row = model[path] # for (jid, account) in self._last_selected_contact:
if row[C_TYPE] != 'contact': # gobject.idle_add(self.draw_contact, jid, account)
self._last_selected_contact = [] # self._last_selected_contact = []
return # if len(list_of_paths) == 0:
jid = row[C_JID].decode('utf-8') # return
account = row[C_ACCOUNT].decode('utf-8') # for path in list_of_paths:
self._last_selected_contact.append((jid, account)) # row = model[path]
gobject.idle_add(self.draw_contact, jid, account, True) # if row[C_TYPE] != 'contact':
# self._last_selected_contact = []
# return
# jid = row[C_JID].decode('utf-8')
# account = row[C_ACCOUNT].decode('utf-8')
# self._last_selected_contact.append((jid, account))
# 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')