prevent tracebacks

This commit is contained in:
Denis Fomin 2013-01-08 19:46:12 +04:00
parent a5b3045b8f
commit f2771f7759
2 changed files with 2 additions and 2 deletions

View File

@ -2518,7 +2518,7 @@ class GroupchatControl(ChatControlBase):
elif event.button == 2: # middle click
widget.get_selection().select_path(path)
iter_ = self.model.get_iter(path)
if len(path) == 2:
if path.get_depth() == 2:
nick = self.model[iter_][C_NICK]
self._start_private_message(nick)
return True

View File

@ -4503,7 +4503,7 @@ class RosterWindow:
return
path = list_of_paths[0]
data = ''
if len(path) >= 2:
if path.get_depth() >= 2:
data = model[path][C_JID]
selection.set(selection.target, 8, data)