This commit is contained in:
Nikos Kouremenos 2005-05-18 00:44:39 +00:00
parent d8c07c5d57
commit 1c25e7a930
1 changed files with 6 additions and 7 deletions

View File

@ -695,6 +695,7 @@ class Roster_window:
except TypeError: except TypeError:
self.tree.get_selection().unselect_all() self.tree.get_selection().unselect_all()
return return
self.tree.get_selection().select_path(path)
model = self.tree.get_model() model = self.tree.get_model()
iter = model.get_iter(path) iter = model.get_iter(path)
type = model.get_value(iter, 2) type = model.get_value(iter, 2)
@ -706,12 +707,11 @@ class Roster_window:
self.mk_menu_user(event, iter) self.mk_menu_user(event, iter)
elif type == 'account': elif type == 'account':
self.mk_menu_account(event, iter) self.mk_menu_account(event, iter)
#return True return True
return False
if event.button == 1: # Left click if event.button == 1: # Left click
try: try:
path, column, x, y = self.tree.get_path_at_pos(int(event.x), path, column, x, y = self.tree.get_path_at_pos(int(event.x),
int(event.y)) nt(event.y))
except TypeError: except TypeError:
self.tree.get_selection().unselect_all() self.tree.get_selection().unselect_all()
return False return False
@ -724,7 +724,6 @@ class Roster_window:
self.tree.collapse_row(path) self.tree.collapse_row(path)
else: else:
self.tree.expand_row(path, False) self.tree.expand_row(path, False)
return False
def on_req_usub(self, widget, user, account): def on_req_usub(self, widget, user, account):
'''Remove a user''' '''Remove a user'''
@ -1496,7 +1495,7 @@ class Roster_window:
render_text.connect('editing-canceled', self.on_editing_canceled) render_text.connect('editing-canceled', self.on_editing_canceled)
col.pack_start(render_text, expand = True) col.pack_start(render_text, expand = True)
col.add_attribute(render_text, 'text', 1) col.add_attribute(render_text, 'text', 1)
col.add_attribute(render_text, 'editable', 5) #5th column?? I don't understand :( col.add_attribute(render_text, 'editable', 5)
col.set_cell_data_func(render_text, self.nameCellDataFunc, None) col.set_cell_data_func(render_text, self.nameCellDataFunc, None)
self.tree.append_column(col) self.tree.append_column(col)