[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] Menus for accelerator based keybindings and much more.

From: Richard Shann
Subject: [Denemo-devel] Menus for accelerator based keybindings and much more.
Date: Mon, 19 Nov 2007 08:27:18 +0000

Here is part two of the accelerator-based keybindings. The main content
of this patch is to provide menus for all actions so that they can be
assigned keybindings by right clicking on them (and correspondingly so
that the newcomer to denemo can find out what the keybinding is for any
action). Besides the object-based menu visible by default there is also
a menu arranged by actions. The object-based menus start with things
like note, staff, clef etc and then descend to the actions (insert,
delete etc) while the action based one starts with actions and descends
to objects.
The object-based menus change with the mode selected, but I have only
created one action-based menu for modeless actions. There is no
switching of accelerators between modes - the file "standard.accels" is
loaded at the outset.
Note that the old style keybindings still operate if no accelerator is
present (as before). Ironically, it is my code for creating a rhythmic
pattern that prevents this simply being dropped from the code base. I
will need to re-code the entry of the pattern - I propose to create a
rhythm pattern from the selection (which will be nice anyway).

There are quite a lot of other enhancements and bug fixes here as well:
        Mouse selection for cut and paste.
        Editing of notes in chords
        Automatic staff heights
        A new Denemo.ttf font which extends to sixtyfourth notes and improves
the highlighting.
        A no-mode mode, for those wishing to define keybindings that always do
the same thing.

Here are changelog entries. Note that the new file generate.c is *not*
part of denemo, but is a utility to generate the source code entries.h,
callbacks.h (see notes below).

        EDIT mode: The new edit the octave of the current note in CVS is not
working as expected - instead it edits to the octave of the cursor. This
is now fixed in keyresponses.c and chordops.c
        EDIT mode changing notes in chords now works for multi-note chords -
        generate.c, callbacks.h, entries.h:
        generate.c is a new file *NOT* part of the denemo executable but a
standalone utility to generate callbacks.h and entries.h. These files
are included in view.c to provide the menu_entries and callbacks for all
functions that have not been hand coded. I have not put generate.c into
the build system (it would need to be compiled and executed before the
source code of denemo has its dependencies checked), but it would be
good to use it rather than modifying callbacks.h and entries.h directly.
(To compile do gcc generate.c and execute ./a.out in the src directory.)
In particular, there are mamy tooltips to put in, and the current
callbacks could be streamlined to make the required calls directly.

        pitchentry.c name changes to menu system. Remove unused function.
        keyresponses.c prevent editing notes in presence of overlays - this is
just octave shifting, typing in notes at keyboard will still lead to
confusing result (because the edits are discarded on further pitch
        fonts/Denemo.ttf improved font
        Selecting music was not obvious, I fixed this as follows:
           mousing.c, view.c make mouse clicks cause selection, press starts,
release ends the selection. (There is no drag implemented here, so no
indicator that you are extending the selection until you release the
mouse button). You have to be actually on the note when you release.
        view.c make Entry toolbar buttons use the Denemo.ttf font instead of
icons - this means we can drop those files from the distribution.
        denemoui.xml new notes menu and code to use music symbols as labels
        draw.c,mousing.c, utils.h define LYRICS_HEIGHT, denemo_types.h add
haslyrics field to staff, so as to know whether to leave space when
mousing. Height adjusts to music - this needs to be made optional, and
provided with guards against absurd values.
        space_above,below cannot be re-set to 0 (in release and CVS).

I've put quite a few of the standard.accels in, but there may be more -
it is difficult to know which of the multiple keybindings should be the

Attachment: menus.diff
Description: Text Data

Attachment: Denemo.ttf
Description: application/font-ttf

reply via email to

[Prev in Thread] Current Thread [Next in Thread]