From ca6694616943ae550bf24c96193f628090d07963 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 8 Apr 2008 06:40:29 +0000 Subject: [PATCH] only show torrent menu if a torrent is selected --- deluge/ui/gtkui/torrentview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index aa0749b36..8473286e2 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -414,7 +414,7 @@ class TorrentView(listview.ListView, component.Component): """This is a callback for showing the right-click context menu.""" log.debug("on_button_press_event") # We only care about right-clicks - if event.button == 3: + if self.get_selected_torrents() and event.button == 3: # Show the Torrent menu from the MenuBar torrentmenu = component.get("MenuBar").torrentmenu torrentmenu.popup(None, None, None, event.button, event.time)