mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 07:28:39 +00:00
Fix right-click selecting torrents. Behaviour is now similar to Nautilus.
This commit is contained in:
parent
ca7ad6daf3
commit
bbee37f54f
2 changed files with 18 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
||||||
Deluge 0.9.04 - "1.0.0_RC4" (In Development)
|
Deluge 0.9.04 - "1.0.0_RC4" (In Development)
|
||||||
|
GtkUI:
|
||||||
|
* Fix selecting torrents when right-clicking on them, behaviour is now similar
|
||||||
|
to Nautilus
|
||||||
|
* Fix new release check
|
||||||
|
|
||||||
Deluge 0.9.03 - "1.0.0_RC3" (21 July 2008)
|
Deluge 0.9.03 - "1.0.0_RC3" (21 July 2008)
|
||||||
Core:
|
Core:
|
||||||
|
|
|
@ -443,8 +443,19 @@ class TorrentView(listview.ListView, component.Component):
|
||||||
"""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_torrents() and event.button == 3:
|
if event.button == 3:
|
||||||
# Show the Torrent menu from the MenuBar
|
x, y = event.get_coords()
|
||||||
|
path = self.treeview.get_path_at_pos(int(x), int(y))
|
||||||
|
if not path:
|
||||||
|
return
|
||||||
|
row = self.model_filter.get_iter(path[0])
|
||||||
|
|
||||||
|
if self.get_selected_torrents():
|
||||||
|
if self.model_filter.get_value(row, 0) not in self.get_selected_torrents():
|
||||||
|
self.treeview.get_selection().unselect_all()
|
||||||
|
self.treeview.get_selection().select_iter(row)
|
||||||
|
else:
|
||||||
|
self.treeview.get_selection().select_iter(row)
|
||||||
torrentmenu = component.get("MenuBar").torrentmenu
|
torrentmenu = component.get("MenuBar").torrentmenu
|
||||||
torrentmenu.popup(None, None, None, event.button, event.time)
|
torrentmenu.popup(None, None, None, event.button, event.time)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue