summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Gey <denemo@nilsgey.de>2011-02-12 21:08:21 +0100
committerNils Gey <denemo@nilsgey.de>2011-02-12 21:08:21 +0100
commit36fa798ef20566a554df5c42a6890a2be6bb6e8a (patch)
treee3c0c1e51e33ea4b55da2b6b8aa9101ffa94c505
parente98ff24d925aeace31cea71aa0a47bdc374b9e35 (diff)
parent57469db7c8432a91ccbca1c4165b191eae1cc3ab (diff)
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/denemo
-rw-r--r--src/drawfigure.c2
-rw-r--r--src/exportlilypond.c32
-rw-r--r--src/keyresponses.c2
-rw-r--r--src/view.c4
4 files changed, 26 insertions, 14 deletions
diff --git a/src/drawfigure.c b/src/drawfigure.c
index 04a5be15..cd0f7ec5 100644
--- a/src/drawfigure.c
+++ b/src/drawfigure.c
@@ -40,7 +40,7 @@ draw_figure (cairo_t *cr,
}
}
- g_debug ("%s\n", text);
+ //g_debug ("%s\n", text);
drawnormaltext_cr( cr, text, xx, y + STAFF_HEIGHT + 10 );
}
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))
{
diff --git a/src/keyresponses.c b/src/keyresponses.c
index 71aee66b..343cc766 100644
--- a/src/keyresponses.c
+++ b/src/keyresponses.c
@@ -212,7 +212,7 @@ gchar * process_key_event(GdkEventKey * event, gchar* perform_command()) {
GList *g;
GString *continuations = g_string_new("");
for(g=Denemo.continuations;g;g=g->next)
- g_string_append_printf(continuations, "%s%s", ((GString *) g->data)->str, ", or ");
+ g_string_append_printf(continuations, "%s%s", (gchar *) g->data, ", or ");
g_string_printf(prefix_store, "Prefix Key %s, waiting for key %stype Esc to abort", name, continuations->str);
g_string_free(continuations, TRUE);
gtk_statusbar_pop(GTK_STATUSBAR (Denemo.statusbar), Denemo.status_context_id);
diff --git a/src/view.c b/src/view.c
index c655ba21..bd3fbe2f 100644
--- a/src/view.c
+++ b/src/view.c
@@ -2658,7 +2658,9 @@ SCM scheme_get_midi(void) {
gboolean success = intercept_midi_event(&midi);
if(!success)
midi = 0;/* scripts should detect this impossible value and take action */
- midi &=0xF0;//do not return channel info
+ gchar *buf = (gchar*)&midi;
+ *buf &=0xF0;//do not return channel info
+
SCM scm = scm_int2num (midi);
return scm;
}