build a context menu


I am a student in the third year i.e. the bachelor’s degree in computer science at the Science Faculty of Angers in France and for part of year I have take part in an open source project.
As a user of Audacity, I am interested in this project, so I want to participate by adding a context menu with functionnality such as copy, paste, save, save as, export, import, read, read loop, pause, mute, undo, redo …
If you have some suggestions , please don’t hesitate to let me know …
So if you are interested, I wish to programme the menu and send you my modifications as patches.

Thank you in advance,

Hi Quentin,

You may be interested in the proposals for menu reorganisation that are discussed here: as these proposals may impact on the new features that you are proposing.

Also, if you are considering a “right click” context menu, be aware that:

  • Some Mac users still have one button mice
  • Where possible features should be accessible to visually impaired and other non-mouse users.
  • When the zoom tool is selected (F4 key), right click performs “zoom out”.

If you wish to contact the Audacity developers directly, there is a developers mailing list which you can subscribe to here:

All development should be against the current svn head code.
You will find additional information for developers in these links:

Hi Steve,

thank you for this quick reply, I’ll carefully study this link.
I thought for zoom:
By defaul the menu is active and if you press F4 you turn on the zoom and turn off the menu and if you press again F4 you turn off the zoom and turn on the menu.
Thank you again.

I finished the context menu and then if you want me to add some functionalities, please let me know.
And thank you again for the advice, Quentin

Are your patches publicly available?

I do my last test, and I think publishing the patch this weekend.

Hi Steve,

I published my patch, but i have no automatic response. I know that they have many mail and it’s difficult to them to read all. Have you a possibility to see if you have recieved my mail the topic is : [audacity] [TrackPanel] New Patch for popupmenu .

Thanks per advance,

Is that this one:

The last is :

Thanks for the link.

Thanks Quentin. I’m not a programmer, but I can try your patch and I’ll post feedback when I’ve had chance to try it.

Thanks per advance !

Very interesting.
The pop-up menu on Right Click works some of the time.

It builds OK but there’s a warning during “make”:

TrackPanel.cpp: In member function ‘virtual bool TrackPanel::HandleTrackLocationMouseEvent(WaveTrack*, wxRect&, wxMouseEvent&)’:
TrackPanel.cpp:5018: warning: unused variable ‘bResult’

A couple of small issues:

  1. For English keyboards the shortcut for “Redo” should be shift + Ctrl +Z
  2. The keyboard shortcut for Play and Stop is the spacebar (Space), but as shown in the screenshot these are not listed.
  3. Sometimes the pop-up does not pop-up (though if I use “left click” and then re-try the right-click it may pop up).

A more serious problem is that sometimes mouse clicks stops working altogether (left click and right click). I can’t help with that one.

I’d imagine that some users would find this feature useful, though personally I don’t think that I would use it as all of the actions are easily accomplished from the keyboard.

Making use of right click is quite a common request, but I don’t think that everyone agrees about what right click should be used for.
As a “proof of concept” this certainly works.

Thanks for spending times to try my patch, and your comments. it will help me.