#2809: [Mac OS X] Support Ctrl-click to do right-click
-----------------------+----------------------
Reporter: singalen | Owner:
Type: bug | Status: closed
Priority: minor | Milestone: 1.3.x
Component: GTK-UI | Version: 1.3.12
Resolution: WontFix | Keywords: Mac, OSX
-----------------------+----------------------
Comment (by singalen):
I have good news :)
Mac interfaces, including Deluge, use Cmd-click for selecting list items.
Thanks for the reference, but that's all workarounds.
Ctrl-click for context menu is so traditional for Mac apps, that Deluge is
the first app I ran into that doesn't support it. Second one is a
VirtualBox guest system, but that hardly counts.
So I believe it needs to work with Ctrl-click.
I've checked the source, and only found 6 places with
if event.button == 3:
I drafted a quick hack: ui_platform.py with a wrapper class
import platform
import gtk
class MouseEvent:
""" Platform-specific workarounds. """
def __init__(self, gtk_event):
self.gtk_event = gtk_event
self.button = gtk_event.button
self.state = gtk_event.get_state()
if platform.system() == 'Darwin':
if self.button == 1 and self.state & gtk.gdk.CONTROL_MASK:
self.button = 3
self.state ^= gtk.gdk.CONTROL_MASK
def get_state(self):
return self.state
def __getattr__(self, attr):
return getattr(self.gtk_event, attr)
def event(e):
return new MouseEvent(e)
in order to test replacement code like this:
if ui_platform.event(event).button == 3:
but failed to build and run a pygtk without an X server, so I cannot
provide a reliable patch 8(
If I get to test it, will you accept the patch?
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2809#comment:4>
Deluge <http://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.