diff -urN denemo/include/denemo/denemo_types.h ../denemo-cvs/denemo/include/denemo/denemo_types.h
--- denemo/include/denemo/denemo_types.h 2007-10-05 07:32:20.000000000 +0100
+++ ../denemo-cvs/denemo/include/denemo/denemo_types.h 2007-10-04 19:44:40.000000000 +0100
@@ -89,15 +89,11 @@
* Enumeration for Denemo's input mode
*/
typedef enum input_mode {
-#define MODE_MASK (~(RSM_OFF|RSM_OVERLAY|RSM_RHYTHM))
- RSM_OFF = 0, /* classic mode */
- RSM_OVERLAY = 1<<0, /* edit mode */
- RSM_RHYTHM = 1<<1, /* insert mode */
-#define ENTRY_TYPE_MASK (~(INPUTNORMAL|INPUTREST|INPUTBLANK))
- INPUTNORMAL = 1<<2, /* entry type notes */
- INPUTREST = 1<<3, /* entry type rests */
- INPUTBLANK = 1<<4,/* entry type non-printing rests */
- TRAVERSE = 1<<5 /* read-only */
+ INPUTNORMAL,
+ INPUTREST,
+ INPUTBLANK,
+ REPLACE,
+ TRAVERSE
}input_mode;
/**
@@ -273,8 +269,8 @@
gboolean lilyentrystyle;
gboolean createclones;
gboolean articulation_palette; /**< This switch makes the articulation pallete visable */
- gboolean notation_palette; /**< This switch makes the duration toolbar visable */
- gboolean rhythm_palette; /**< This option makes the rhythm toolbar visable */
+ gboolean notation_palette; /**< This switch makes the notation pallete visable */
+ gboolean rhythm_palette; /**< This option makes the rhythm pallete visable */
gboolean saveparts; /**< Automatically save parts*/
gboolean autosave; /**< Auto save data */
gint autosave_timeout;
@@ -316,6 +312,13 @@
}LilypondHeaderInfo;
+typedef enum
+{
+ RSM_OFF = 0,
+ RSM_OVERLAY = 1<<0,
+ RSM_RHYTHM = 1<<1
+
+} RhythmicSubmode;
typedef enum
{
@@ -461,7 +464,8 @@
* operation */
gint curmeasure_stem_directive;
- /* support for rhythm patterns */
+ /* support for INPUTNORMAL sub mode RHYTMIC */
+ RhythmicSubmode rhythmicsubmode;
GList *rhythms;/**< list of RhythmPattern s */
GList *currhythm; /**< currently in use element of rhythms */
GList *rstep; /**< step within RhythmPattern->rsteps, the current element of the current rhythm pattern */
diff -urN denemo/src/commandfuncs.c ../denemo-cvs/denemo/src/commandfuncs.c
--- denemo/src/commandfuncs.c 2007-10-04 20:01:27.000000000 +0100
+++ ../denemo-cvs/denemo/src/commandfuncs.c 2007-10-04 19:44:40.000000000 +0100
@@ -43,7 +43,7 @@
* is easy to alternate rhythms.
*/
void nextrhythm(DenemoGUI *gui) {
- if(!(gui->mode&(RSM_RHYTHM|RSM_OVERLAY)))
+ if(!gui->si->rhythmicsubmode)
return;
if(!gui->si->rhythms)
return;
@@ -456,8 +456,7 @@
gui->si->staffletter_y = note_value;
gui->si->cursor_y = jumpcursor (gui->si->cursor_y, oldstaffletter_y,
gui->si->staffletter_y);
- /* in RSM_OVERLAY edit the current note name */
- if((gui->mode & RSM_OVERLAY) && gui->si->currentobject) {
+ if((gui->si->rhythmicsubmode & RSM_OVERLAY) && gui->si->currentobject) {
DenemoObject *theobj = (DenemoObject *)(gui->si->currentobject->data);
if(theobj->type == CHORD && ((chord*)theobj->object)->notes) {
DenemoStaff *curstaff = ((DenemoStaff*)gui->si->currentstaff->data);
@@ -469,9 +468,9 @@
gui->si->curmeasurekey, gui->si->curmeasureaccs);
}
} else
- /* in INSERT or EDIT mode we insert a note using the next step of the rhythm pattern */
+ /* in rhythmicsubmode we insert a note using the next step of the rhythm pattern */
#define g (gui->si->rstep)
- if((gui->mode&(RSM_RHYTHM|RSM_OVERLAY)) && g) {
+ if(gui->si->rhythmicsubmode && g) {
GList *start = g;
GList *h;
do {
@@ -496,23 +495,18 @@
#undef g
}
-
void
insert_rhythm_pattern(DenemoGUI *gui) {
#define g (gui->si->rstep)
- if((gui->mode&(RSM_RHYTHM|RSM_OVERLAY)) && g) {
+ if(gui->si->rhythmicsubmode && g) {
GList *start = g;
GList *h;
do {
if(g) {
for(h = ((RhythmElement*)g->data)->functions;h;h=h->next) {
nextmeasure (gui->si, TRUE);
- gui->si->cursoroffend = FALSE;
- if(!code_is_a_duration(modifier_code(h->data)))
- cursorleft(gui);
+ gui->si->cursoroffend = FALSE;
((GtkFunction)h->data)(gui);
- if(!code_is_a_duration(modifier_code(h->data)))
- cursorright(gui);
displayhelper(gui);
}
h = ((RhythmElement*)g->data)->functions;
@@ -589,12 +583,6 @@
int prognum;
DenemoStaff *curstaffstruct;
- if((mode & RSM_OVERLAY) && !si->cursor_appending) {
- changeduration(si, duration);
- return;
- }
-
-
/* First, check to see if the insertion'll cause the cursor to
* jump to the next measure. (Denemo will implicitly create it
* if it doesn't exist already.) */
@@ -606,13 +594,13 @@
/* Now actually create the chord */
mudela_obj_new = newchord (duration, 0, 0);
- if ( (mode & INPUTBLANK) && (rest != TRUE))
+ if (mode == INPUTBLANK && (rest != TRUE))
{
addtone (mudela_obj_new, si->cursor_y,
si->cursoraccs[si->staffletter_y], si->cursorclef);
mudela_obj_new->isinvisible = TRUE;
}
- else if ((mode & INPUTNORMAL) && (rest != TRUE))
+ else if (mode == INPUTNORMAL && (rest != TRUE))
addtone (mudela_obj_new, si->cursor_y, si->cursoraccs[si->staffletter_y],
si->cursorclef);
@@ -726,11 +714,11 @@
}
/**
- * If REMOVE delete the note closest to si->cursor_y in a ~si->currentobject
- * else add a tone at si->cursor_y to the ~si->currentobject
- * FIXME ~si->currentobject in this comment means the thing gotten by the macro declaremudelaobj. This macro is a horrible hack induced by trying to be clever with tuplets - enforcing pairing of begin/end. tonechange
+ * Change a tone either in a chord or individual note
+ * alternatively remove it from a chord
+ *
* @param si pointer to the scoreinfo structure
- * @param remove whether to remove note or not
+ * @param remove whether to remove tone or not
*/
void
tonechange (DenemoScore * si, gboolean remove)
diff -urN denemo/src/denemoui.xml ../denemo-cvs/denemo/src/denemoui.xml
--- denemo/src/denemoui.xml 2007-10-06 17:11:43.000000000 +0100
+++ ../denemo-cvs/denemo/src/denemoui.xml 2007-10-04 19:44:40.000000000 +0100
@@ -10,7 +10,6 @@
-
@@ -45,20 +44,17 @@
-->