mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
Modify files tab right-click menu behaviour to that of torrentviews
This commit is contained in:
parent
4abb436e34
commit
e481be0ccd
2 changed files with 15 additions and 3 deletions
|
@ -3,8 +3,7 @@ Deluge 0.9.04 - "1.0.0_RC4" (In Development)
|
||||||
* Fix building with gcc 4.3
|
* Fix building with gcc 4.3
|
||||||
|
|
||||||
GtkUI:
|
GtkUI:
|
||||||
* Fix selecting torrents when right-clicking on them, behaviour is now similar
|
* Fix selecting torrents when right-clicking on them in torrentview and filestab
|
||||||
to Nautilus
|
|
||||||
* Fix new release check
|
* Fix new release check
|
||||||
* Display 'total_wanted' instead of 'total_size' in Size column
|
* Display 'total_wanted' instead of 'total_size' in Size column
|
||||||
|
|
||||||
|
|
|
@ -377,7 +377,20 @@ class FilesTab(Tab):
|
||||||
"""This is a callback for showing the right-click context menu."""
|
"""This is a callback for showing the right-click context menu."""
|
||||||
log.debug("on_button_press_event")
|
log.debug("on_button_press_event")
|
||||||
# We only care about right-clicks
|
# We only care about right-clicks
|
||||||
if self.get_selected_files() and event.button == 3:
|
if event.button == 3:
|
||||||
|
x, y = event.get_coords()
|
||||||
|
path = self.listview.get_path_at_pos(int(x), int(y))
|
||||||
|
if not path:
|
||||||
|
return
|
||||||
|
row = self.treestore.get_iter(path[0])
|
||||||
|
|
||||||
|
if self.get_selected_files():
|
||||||
|
if self.treestore.get_value(row, 5) not in self.get_selected_files():
|
||||||
|
self.listview.get_selection().unselect_all()
|
||||||
|
self.listview.get_selection().select_iter(row)
|
||||||
|
else:
|
||||||
|
self.listview.get_selection().select_iter(row)
|
||||||
|
|
||||||
self.file_menu.popup(None, None, None, event.button, event.time)
|
self.file_menu.popup(None, None, None, event.button, event.time)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue