Skip to content

Commit

Permalink
Fix GTK version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiascode committed May 20, 2024
1 parent 9ed7e67 commit 75a2650
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pynicotine/gtkgui/widgets/treeview.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def __init__(self, window, parent, columns, has_tree=False, multi_select=False,

add_css_class(self.widget, "treeview-spacing")

if GTK_API_VERSION == 4 and sys.platform == "darwin":
if GTK_API_VERSION >= 4 and sys.platform == "darwin":
# Workaround to restore Cmd-click behavior on macOS
gesture_click = Gtk.GestureClick()
gesture_click.set_propagation_phase(Gtk.PropagationPhase.CAPTURE)
Expand Down
2 changes: 1 addition & 1 deletion pynicotine/gtkgui/widgets/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, widget):

self.widget = widget

if GTK_API_VERSION == 4 and sys.platform == "darwin":
if GTK_API_VERSION >= 4 and sys.platform == "darwin":
# Workaround to restore Ctrl-click to show context menu on macOS
gesture_click = Gtk.GestureClick()
gesture_click.set_propagation_phase(Gtk.PropagationPhase.CAPTURE)
Expand Down

0 comments on commit 75a2650

Please sign in to comment.