Dominic Mazzoni
2003-04-15 00:30:02 UTC
Here are the problems with the current system:
1. It requires the ability to create a file (currently
called audacity-commands.xml) in order for Audacity to
launch. This can be a small annoyance because it's
not obvious where to put the file, and it "clutters"
the system for the 90% of users who will not ever
modify the file.
2. Currently every time we add a new menu command, the
audacity-commands.xml file is invalidated. That
limits its usefulness because users would have to
start from scratch every time they get a new
version.
3. The Keyboard pane in the Preferences is unfinished.
Here are the benefits of the current system that we would
like to keep:
1. The menus are created dynamically and can be changed
or rebuilt while the program is running. (Even if it
doesn't work perfectly now, most of the infrastructure
is there.)
2. The dispatching of commands / the CommandsCallback
system is very nice and in the future could be leveraged
to allow scriptability, etc.
3. Power users have a really nice way to add or change
keyboard shortcuts using their favorite text editor or
XML editor, without having to deal with any interface
that we would need to create.
4. People can share XML files with each other.
Primary goal of this proposal:
- I want to fix this situation without rewriting all of the
code involved. I like 90% of how Brian implemented the
menus/commands, and I don't want to toss it. I also don't
want to spend too much time on it; I want to focus on
usability and getting 1.2.0 finished within months, not
years.
My proposal:
1. In a nutshell, hardcode the menus and default keyboard
shortcuts into the program, but allow the user to load
keyboard shortcuts only from an XML file.
2. The menus could still be loaded from XML, but we would
just load directly from the hardcoded string.
3. If the user wants to modify the keyboard shortcuts, they
go to the Prefs and Save the current shortcuts. From
this panel they can also Load another existing set, or
click another button to Use Defaults. All of these
buttons should be written to take effect immediately
(or just after the Preferences dialog closes).
4. When you upgrade to a new version of Audacity, it starts
with the new Audacity menus. Then if the user had a
keyboard shortcuts file, it loads it and applies all of
the shortcuts that still make sense. It would be neat
if it "stole" shortcuts away from other menus.
5. As much as possible, let's try to make every action that
can be triggered in Audacity, with the exception of things
where the location of the mouse is significant (like
selecting, dragging) to be commands in CommandsCallback.
That way users can configure the key to press for Play,
Stop, Pause, ExtendSelectionRight, etc.
I hope that this is a reasonable compromise that will allow
version 1.2.0 to be complete and consistent, even if it
doesn't have every feature we ever dreamed of (like letting
users completely customize the menu layout).
I'd like to hear your thoughts, especially from Brian, since
he wrote most of this code. Also, Markus, if you're able to
work on this effort, that'd be great. I'll definitely do it
if nobody else does, over the next few weeks. Right now I'm
focusing on loading legacy project files.
- Dominic
1. It requires the ability to create a file (currently
called audacity-commands.xml) in order for Audacity to
launch. This can be a small annoyance because it's
not obvious where to put the file, and it "clutters"
the system for the 90% of users who will not ever
modify the file.
2. Currently every time we add a new menu command, the
audacity-commands.xml file is invalidated. That
limits its usefulness because users would have to
start from scratch every time they get a new
version.
3. The Keyboard pane in the Preferences is unfinished.
Here are the benefits of the current system that we would
like to keep:
1. The menus are created dynamically and can be changed
or rebuilt while the program is running. (Even if it
doesn't work perfectly now, most of the infrastructure
is there.)
2. The dispatching of commands / the CommandsCallback
system is very nice and in the future could be leveraged
to allow scriptability, etc.
3. Power users have a really nice way to add or change
keyboard shortcuts using their favorite text editor or
XML editor, without having to deal with any interface
that we would need to create.
4. People can share XML files with each other.
Primary goal of this proposal:
- I want to fix this situation without rewriting all of the
code involved. I like 90% of how Brian implemented the
menus/commands, and I don't want to toss it. I also don't
want to spend too much time on it; I want to focus on
usability and getting 1.2.0 finished within months, not
years.
My proposal:
1. In a nutshell, hardcode the menus and default keyboard
shortcuts into the program, but allow the user to load
keyboard shortcuts only from an XML file.
2. The menus could still be loaded from XML, but we would
just load directly from the hardcoded string.
3. If the user wants to modify the keyboard shortcuts, they
go to the Prefs and Save the current shortcuts. From
this panel they can also Load another existing set, or
click another button to Use Defaults. All of these
buttons should be written to take effect immediately
(or just after the Preferences dialog closes).
4. When you upgrade to a new version of Audacity, it starts
with the new Audacity menus. Then if the user had a
keyboard shortcuts file, it loads it and applies all of
the shortcuts that still make sense. It would be neat
if it "stole" shortcuts away from other menus.
5. As much as possible, let's try to make every action that
can be triggered in Audacity, with the exception of things
where the location of the mouse is significant (like
selecting, dragging) to be commands in CommandsCallback.
That way users can configure the key to press for Play,
Stop, Pause, ExtendSelectionRight, etc.
I hope that this is a reasonable compromise that will allow
version 1.2.0 to be complete and consistent, even if it
doesn't have every feature we ever dreamed of (like letting
users completely customize the menu layout).
I'd like to hear your thoughts, especially from Brian, since
he wrote most of this code. Also, Markus, if you're able to
work on this effort, that'd be great. I'll definitely do it
if nobody else does, over the next few weeks. Right now I'm
focusing on loading legacy project files.
- Dominic