mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 12:34:43 +00:00
Prevent selecting filter view category labels
This commit is contained in:
parent
2d26005dcf
commit
1747bd9894
@ -202,7 +202,25 @@ class FilterTreeView(component.Component):
|
||||
"""This is a callback for showing the right-click context menu.
|
||||
NOT YET!
|
||||
"""
|
||||
x, y = event.get_coords()
|
||||
path = self.label_view.get_path_at_pos(int(x), int(y))
|
||||
if not path:
|
||||
return
|
||||
path = path[0]
|
||||
cat = self.model_filter[path][0]
|
||||
|
||||
if event.button == 1:
|
||||
# Prevent selecting a category label
|
||||
if cat == "cat":
|
||||
return True
|
||||
|
||||
elif event.button == 3:
|
||||
if cat == "cat":
|
||||
# XXX: Show the pop-up menu
|
||||
# Do not select the row
|
||||
return True
|
||||
"""
|
||||
|
||||
# We only care about right-clicks
|
||||
if event.button == 3:
|
||||
x, y = event.get_coords()
|
||||
|
Loading…
x
Reference in New Issue
Block a user