Minor tweaks to right-click handler in torrents and files lists.

This commit is contained in:
Alex Dedul 2007-08-07 19:06:39 +00:00
parent 72a55d4523
commit 71e3e6ea32
2 changed files with 5 additions and 4 deletions

View File

@ -122,11 +122,11 @@ class FilesBaseManager(object):
if data is None:
return True
path, col, cellx, celly = data
path = data[0]
is_selected = self.file_view.get_selection().path_is_selected(path)
if not is_selected:
self.file_view.grab_focus()
self.file_view.set_cursor(path, col, 0)
self.file_view.set_cursor(path)
self.file_menu.popup(None, None, None, event.button, event.time)
return is_selected

View File

@ -632,11 +632,12 @@ class DelugeGTK:
int(event.y))
if data is None:
return True
path, col, cellx, celly = data
path = data[0]
is_selected = self.torrent_view.get_selection().path_is_selected(path)
if not is_selected:
self.torrent_view.grab_focus()
self.torrent_view.set_cursor(path, col, 0)
self.torrent_view.set_cursor(path)
self.torrent_menu.popup(None, None, None, event.button,
event.time)