* [gentoo-commits] gentoo-x86 commit in media-sound/nted/files: nted-1.10.18-lilypond.patch
@ 2012-11-09 20:05 Markos Chandras (hwoarang)
0 siblings, 0 replies; only message in thread
From: Markos Chandras (hwoarang) @ 2012-11-09 20:05 UTC (permalink / raw
To: gentoo-commits
hwoarang 12/11/09 20:05:17
Added: nted-1.10.18-lilypond.patch
Log:
Add patch for fixing invalid lilypond export markup. Thanks to Christopher Harvey <chris@basementcode.com>. Bug #437540. Adding him as proxy maintainer
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key B4AFF2C2)
Revision Changes Path
1.1 media-sound/nted/files/nted-1.10.18-lilypond.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/nted/files/nted-1.10.18-lilypond.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-sound/nted/files/nted-1.10.18-lilypond.patch?rev=1.1&content-type=text/plain
Index: nted-1.10.18-lilypond.patch
===================================================================
From 54881f2bdfc3d18e1496b7739124311d8e7c394a Mon Sep 17 00:00:00 2001
From: Christopher Harvey <chris@basementcode.com>
Date: Sun, 7 Oct 2012 15:05:03 -0400
Subject: [PATCH] Fix LilyPond clef exporting
For example, sometimes NtEd would export "\clef \clef tenor" instead
of just "\clef tenor"
---
mainwindow.cpp | 4 +++-
resource.cpp | 14 +++++++-------
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 7263565..3343526 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -3902,7 +3902,9 @@ void NedMainWindow::do_lily_export(FILE *fp, bool with_break, bool *selected_sta
if (m_staff_contexts[i].m_staff_short_name != NULL && strlen(m_staff_contexts[i].m_staff_short_name->getText()) > 0) {
fprintf(fp, " \\set Staff.shortInstrumentName = \"%s \"", m_staff_contexts[i].m_staff_short_name->getText());
}
- fprintf(fp, NedResource::getLilyPondClefName(m_staff_contexts[i].m_clef_number));
+ if (m_staff_contexts[i].m_clef_number != NEUTRAL_CLEF3) {
+ fprintf(fp, "\\clef %s", NedResource::getLilyPondClefName(m_staff_contexts[i].m_clef_number));
+ }
fprintf(fp, NedResource::getLilyPondKeySigName(m_staff_contexts[i].m_key_signature_number));
fprintf(fp, " \\time %d/%d", m_numerator, m_denominator);
if (m_upbeat_inverse != 0) {
diff --git a/resource.cpp b/resource.cpp
index 11c52b4..cff080f 100644
--- a/resource.cpp
+++ b/resource.cpp
@@ -3870,16 +3870,16 @@ int NedResource::determineLastLine(int treble_line, int clef) {
const char *NedResource::getLilyPondClefName(int clef_number) {
switch (clef_number) {
- case TREBLE_CLEF: return "\\clef treble";
- case BASS_CLEF: return "\\clef bass";
- case ALTO_CLEF: return "\\clef alto";
- case SOPRAN_CLEF: return "\\clef soprano";
- case TENOR_CLEF: return "\\clef tenor";
+ case TREBLE_CLEF: return "treble";
+ case BASS_CLEF: return "bass";
+ case ALTO_CLEF: return "alto";
+ case SOPRAN_CLEF: return "soprano";
+ case TENOR_CLEF: return "tenor";
case NEUTRAL_CLEF1:
- case NEUTRAL_CLEF2: return "\\clef percussion";
+ case NEUTRAL_CLEF2: return "percussion";
case NEUTRAL_CLEF3: return "";
}
- return "\\clef treble";
+ return "treble";
}
const char *NedResource::getLilyPondKeySigName(int keysig_number) {
switch (keysig_number) {
--
1.7.8.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-09 20:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-09 20:05 [gentoo-commits] gentoo-x86 commit in media-sound/nted/files: nted-1.10.18-lilypond.patch Markos Chandras (hwoarang)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox