summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Shann <rshann@debianrts.home>2011-02-12 17:53:40 +0000
committerRichard Shann <rshann@debianrts.home>2011-02-12 17:53:40 +0000
commit57469db7c8432a91ccbca1c4165b191eae1cc3ab (patch)
tree5cef671d7d51890bf85b25c40c64a0c520e42f56
parentdcf8f6fbdfbef8e3cb25d26378fb4bf107b30abe (diff)
Enable postfix lilypond on rests
-rw-r--r--src/exportlilypond.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/exportlilypond.c b/src/exportlilypond.c
index fc6a90d5..19630e9a 100644
--- a/src/exportlilypond.c
+++ b/src/exportlilypond.c
@@ -750,7 +750,8 @@ return g_string_free(ret, FALSE);
/* insert editable prefix string from passed directives, updating duration and open brace count */
-static void directives_insert_prefix_editable(GList *directives, gint *popen_braces, gint *pprevduration, GtkTextIter *iter, gchar* invisibility, gboolean override) {
+static void
+directives_insert_prefix_editable (GList *directives, gint *popen_braces, gint *pprevduration, GtkTextIter *iter, gchar* invisibility, gboolean override) {
DenemoGUI *gui = Denemo.gui;
GList *g = directives;
for(;g;g=g->next) {
@@ -765,6 +766,22 @@ static void directives_insert_prefix_editable(GList *directives, gint *popen_bra
}
}
+static void
+directives_insert_postfix_editable (GList *directives, gint *popen_braces, gint *pprevduration, GtkTextIter *iter, gchar *invisibility, gboolean override) {
+ DenemoGUI *gui = Denemo.gui;
+ GList *g = directives;
+ for(;g;g=g->next) {
+ DenemoDirective *directive = (DenemoDirective *)g->data;
+ if(directive->postfix && directive->postfix->len) {
+ *pprevduration = -1;
+ *popen_braces += brace_count(directive->postfix->str);
+ insert_editable(&directive->postfix, directive->postfix->str, iter, invisibility, gui);
+ }
+ }
+}
+
+
+
/* returns if there is a directive overriding the normal LilyPond output */
@@ -873,7 +890,9 @@ generate_lily_for_obj (DenemoGUI *gui, GtkTextIter *iter, gchar *invisibility, D
for (j = 0; j < numdots; j++)
g_string_append_printf (ret, ".");
}
+
outputret;
+ directives_insert_postfix_editable(pchord->directives, &open_braces, &prevduration, iter, invisibility, FALSE);
}
else /* there are notes */
{
@@ -997,16 +1016,7 @@ generate_lily_for_obj (DenemoGUI *gui, GtkTextIter *iter, gchar *invisibility, D
outputret;
}
- {GList *g = pchord->directives;
- for(;g;g=g->next) {
- DenemoDirective *directive = (DenemoDirective *)g->data;
- if(directive->postfix && directive->postfix->len) {
- prevduration = -1;
- open_braces += brace_count(directive->postfix->str);
- insert_editable(&directive->postfix, directive->postfix->str, iter, invisibility, gui);
- }
- }
- }
+ directives_insert_postfix_editable(pchord->directives, &open_braces, &prevduration, iter, invisibility, FALSE);
if (pchord->dynamics && (pchord->notes->next==NULL))
{