Minor tweaks to right-click handler in torrents and files lists.
This commit is contained in:
parent
72a55d4523
commit
71e3e6ea32
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue