Commit 38b69e7d authored by Keegi's avatar Keegi

another attempt to get popup menu for buttons on mac

parent e6f4f9df
......@@ -707,7 +707,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self.cbuttons_reload()
def editbutton(self,e):
if e.ButtonUp(wx.MOUSE_BTN_RIGHT) or (e.ButtonUp(wx.MOUSE_BTN_LEFT) and (e.AltDown() or e.ControlDown())):
if e.IsCommandEvent() or e.ButtonUp(wx.MOUSE_BTN_RIGHT):
if e.IsCommandEvent():
pos = (0,0)
else:
pos = e.GetPosition()
popupmenu = wx.Menu()
obj = e.GetEventObject()
......@@ -733,6 +736,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
def procbutton(self,e):
try:
if hasattr(e.GetEventObject(),"custombutton"):
if wx.GetKeyState(wx.WXK_CONTROL) or wx.GetkeyState(wx.WXK_ALT):
return self.editbutton(e)
self.cur_button=e.GetEventObject().custombutton
self.onecmd(e.GetEventObject().properties[1])
self.cur_button=None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment