diff --git a/ChangeLog b/ChangeLog index a4ab465..8959e22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,114 @@ +2008-04-24 Matthias Neeracher + + * .gitignore, VocalEasel.xcodeproj/.gitignore: Added git ignore + files + +2008-04-22 neeri + + * Filters/VLLilypondType.reader: handle \breve git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@294 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-04-17 neeri + + * Sources/VLSheetView.h, Sources/VLSheetView.mm, + Sources/VLSheetViewNotes.mm: Fixed accidental handling in songs with + key changes git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@293 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-04-12 neeri + + * Sources/VLSheetView.mm: Fix responder on backward tabbing + git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@292 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-04-12 neeri + + * English.lproj/MainMenu.xib, Sources/VLDocument.h, + Sources/VLDocument.mm, Sources/VLModel.cpp, Sources/VLModel.h, + Sources/VLSheetView.h, Sources/VLSheetView.mm: Add Octave + Transpositions git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@291 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-04-06 neeri + + * Sources/VLLilypondWriter.cpp, Sources/VLSheetView.mm: Use flats in + C major git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@290 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-04-05 neeri + + * English.lproj/VLDocument.xib: Add missing keys git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@289 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-04-05 neeri + + * Sources/VLLilypondWriter.cpp: Draw ending bar line before coda + git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@288 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-04-05 neeri + + * Sources/VLModel.cpp: Fix coda handling git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@287 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-04-05 neeri + + * Filters/VLBIABType.reader: Fix rounding git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@286 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-03-30 neeri + + * English.lproj/VLDocument.xib, Sources/VLSheetView.mm: Fix + responder handling in field editor git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@285 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-03-30 neeri + + * Sources/VLModel.cpp: Handle clicks on tied notes git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@284 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-03-30 neeri + + * Sources/VLModel.cpp: Still need to skip tied notes git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@283 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-03-30 neeri + + * Sources/VLDocument.mm: Synchronize window titles git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@282 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-03-29 neeri + + * Sources/VLModel.cpp: Always edit whole words git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@281 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-03-29 neeri + + * Sources/VLModel.cpp: Show empty word when clicking in gaps + git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@280 + 6297c069-241d-0410-966f-f05c6a69f112 + +2008-03-25 neeri + + * Bump version number / Copyright dates git-svn-id: + https://vocaleasel.svn.sourceforge.net/svnroot/vocaleasel/trunk@279 + 6297c069-241d-0410-966f-f05c6a69f112 + 2008-03-24 22:57 +0000 [r276] Matthias Neeracher * Sources/VLSheetViewSelection.mm: Don't crash in selection diff --git a/Filters/vl.rb b/Filters/vl.rb index 30abb39..16224aa 100644 --- a/Filters/vl.rb +++ b/Filters/vl.rb @@ -1,5 +1,5 @@ # -# vl - VocalEasel +# vl - VocalEasel common filter infrastructure # class VL diff --git a/NEWS b/NEWS index 5fc6762..ffb0214 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +10May08 VocalEasel 1.0b3 + + - Probably the last beta release + - Fixed numerous bugs + - Added octave transposition commands + 25Mar08 VocalEasel 1.0b2 - Fixed numerous bugs. @@ -5,7 +11,7 @@ 27Jan08 VocalEasel 1.0b1 - Feature complete for Release 1.0 - - Fixed numberous bugs + - Fixed numerous bugs - Added sections to allow changing key, meter, divisions, or groove, within a song. - Added manual line/page breaks. - Added support for fine tuning font and music sizes. diff --git a/scripts/git2cl b/scripts/git2cl new file mode 100755 index 0000000..aa1e8c1 --- /dev/null +++ b/scripts/git2cl @@ -0,0 +1,308 @@ +#!/usr/bin/perl + +# Copyright (C) 2007 Simon Josefsson. +# +# The functions mywrap, last_line_len, wrap_log_entry are derived from +# the cvs2cl tool, see : +# Copyright (C) 2001,2002,2003,2004 Martyn J. Pearce +# Copyright (C) 1999 Karl Fogel +# +# git2cl is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# git2cl is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with git2cl; see the file COPYING. If not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +use strict; +use Date::Parse qw(strptime); +use POSIX qw(strftime); +use Text::Wrap qw(wrap); + +use constant EMPTY_LOG_MESSAGE => '*** empty log message ***'; + +sub mywrap { + my ($indent1, $indent2, @text) = @_; + # If incoming text looks preformatted, don't get clever + my $text = Text::Wrap::wrap($indent1, $indent2, @text); + if ( grep /^\s+/m, @text ) { + return $text; + } + my @lines = split /\n/, $text; + $indent2 =~ s!^((?: {8})+)!"\t" x (length($1)/8)!e; + $lines[0] =~ s/^$indent1\s+/$indent1/; + s/^$indent2\s+/$indent2/ + for @lines[1..$#lines]; + my $newtext = join "\n", @lines; + $newtext .= "\n" + if substr($text, -1) eq "\n"; + return $newtext; +} + +sub last_line_len { + my $files_list = shift; + my @lines = split (/\n/, $files_list); + my $last_line = pop (@lines); + return length ($last_line); +} + +# A custom wrap function, sensitive to some common constructs used in +# log entries. +sub wrap_log_entry { + my $text = shift; # The text to wrap. + my $left_pad_str = shift; # String to pad with on the left. + + # These do NOT take left_pad_str into account: + my $length_remaining = shift; # Amount left on current line. + my $max_line_length = shift; # Amount left for a blank line. + + my $wrapped_text = ''; # The accumulating wrapped entry. + my $user_indent = ''; # Inherited user_indent from prev line. + + my $first_time = 1; # First iteration of the loop? + my $suppress_line_start_match = 0; # Set to disable line start checks. + + my @lines = split (/\n/, $text); + while (@lines) # Don't use `foreach' here, it won't work. + { + my $this_line = shift (@lines); + chomp $this_line; + + if ($this_line =~ /^(\s+)/) { + $user_indent = $1; + } + else { + $user_indent = ''; + } + + # If it matches any of the line-start regexps, print a newline now... + if ($suppress_line_start_match) + { + $suppress_line_start_match = 0; + } + elsif (($this_line =~ /^(\s*)\*\s+[a-zA-Z0-9]/) + || ($this_line =~ /^(\s*)\* [a-zA-Z0-9_\.\/\+-]+/) + || ($this_line =~ /^(\s*)\([a-zA-Z0-9_\.\/\+-]+(\)|,\s*)/) + || ($this_line =~ /^(\s+)(\S+)/) + || ($this_line =~ /^(\s*)- +/) + || ($this_line =~ /^()\s*$/) + || ($this_line =~ /^(\s*)\*\) +/) + || ($this_line =~ /^(\s*)[a-zA-Z0-9](\)|\.|\:) +/)) + { + $length_remaining = $max_line_length - (length ($user_indent)); + } + + # Now that any user_indent has been preserved, strip off leading + # whitespace, so up-folding has no ugly side-effects. + $this_line =~ s/^\s*//; + + # Accumulate the line, and adjust parameters for next line. + my $this_len = length ($this_line); + if ($this_len == 0) + { + # Blank lines should cancel any user_indent level. + $user_indent = ''; + $length_remaining = $max_line_length; + } + elsif ($this_len >= $length_remaining) # Line too long, try breaking it. + { + # Walk backwards from the end. At first acceptable spot, break + # a new line. + my $idx = $length_remaining - 1; + if ($idx < 0) { $idx = 0 }; + while ($idx > 0) + { + if (substr ($this_line, $idx, 1) =~ /\s/) + { + my $line_now = substr ($this_line, 0, $idx); + my $next_line = substr ($this_line, $idx); + $this_line = $line_now; + + # Clean whitespace off the end. + chomp $this_line; + + # The current line is ready to be printed. + $this_line .= "\n${left_pad_str}"; + + # Make sure the next line is allowed full room. + $length_remaining = $max_line_length - (length ($user_indent)); + + # Strip next_line, but then preserve any user_indent. + $next_line =~ s/^\s*//; + + # Sneak a peek at the user_indent of the upcoming line, so + # $next_line (which will now precede it) can inherit that + # indent level. Otherwise, use whatever user_indent level + # we currently have, which might be none. + my $next_next_line = shift (@lines); + if ((defined ($next_next_line)) && ($next_next_line =~ /^(\s+)/)) { + $next_line = $1 . $next_line if (defined ($1)); + # $length_remaining = $max_line_length - (length ($1)); + $next_next_line =~ s/^\s*//; + } + else { + $next_line = $user_indent . $next_line; + } + if (defined ($next_next_line)) { + unshift (@lines, $next_next_line); + } + unshift (@lines, $next_line); + + # Our new next line might, coincidentally, begin with one of + # the line-start regexps, so we temporarily turn off + # sensitivity to that until we're past the line. + $suppress_line_start_match = 1; + + last; + } + else + { + $idx--; + } + } + + if ($idx == 0) + { + # We bottomed out because the line is longer than the + # available space. But that could be because the space is + # small, or because the line is longer than even the maximum + # possible space. Handle both cases below. + + if ($length_remaining == ($max_line_length - (length ($user_indent)))) + { + # The line is simply too long -- there is no hope of ever + # breaking it nicely, so just insert it verbatim, with + # appropriate padding. + $this_line = "\n${left_pad_str}${this_line}"; + } + else + { + # Can't break it here, but may be able to on the next round... + unshift (@lines, $this_line); + $length_remaining = $max_line_length - (length ($user_indent)); + $this_line = "\n${left_pad_str}"; + } + } + } + else # $this_len < $length_remaining, so tack on what we can. + { + # Leave a note for the next iteration. + $length_remaining = $length_remaining - $this_len; + + if ($this_line =~ /\.$/) + { + $this_line .= " "; + $length_remaining -= 2; + } + else # not a sentence end + { + $this_line .= " "; + $length_remaining -= 1; + } + } + + # Unconditionally indicate that loop has run at least once. + $first_time = 0; + + $wrapped_text .= "${user_indent}${this_line}"; + } + + # One last bit of padding. + $wrapped_text .= "\n"; + + return $wrapped_text; +} + +# main + +my @date; +my $author; +my @files; +my $comment; +my $merge; + +my $state; # 0-header 1-comment 2-files +my $done = 0; + +$state = 0; + +while (<>) { + #print STDERR "debug ($state, " . (@date ? (strftime "%Y-%m-%d", @date) : "") . "): `$_'\n"; + + if ($state == 0) { + if (m,^Author: (.*),) { + $author = $1; + } + if (m,^Date: (.*),) { + @date = strptime($1); + } + if (m,^Merge: (.*),) { + $merge = 1; + } + $state = 1 if (m,^$,); + } elsif ($state == 1) { + $state = 2 if (m,^$,); + s/^ //g; + s/\n/ /g; + $comment = $comment . $_; + } elsif ($state == 2 && $merge) { + $done = 1; + } elsif ($state == 2) { + if (m,^([-0-9]+)\t([-0-9]+)\t(.*)$,) { + push @files, $3; + } elsif (m,^[^ ],) { + # No file changes. + $done = 1; + } + $done = 1 if (m,^$,); + } + + if ($done && @date == ()) { + print STDERR "warning: could not parse entry\n"; + } elsif ($done) { + print (strftime "%Y-%m-%d $author\n\n", @date); + + my $files = join (", ", @files); + $files = mywrap ("\t", "\t", "* $files"), ": "; + + if (index($comment, EMPTY_LOG_MESSAGE) > -1 ) { + $comment = "[no log message]\n"; + } + + my $files_last_line_len = 0; + $files_last_line_len = last_line_len($files) + 1; + my $msg = wrap_log_entry($comment, "\t", 69-$files_last_line_len, 69); + + $msg =~ s/[ \t]+\n/\n/g; + + if ($merge) { + print "\t$msg\n"; + } else { + print "$files: $msg\n"; + } + + @date = (); + $author = ""; + @files = (); + $comment = ""; + $merge = 0; + + $state = 0; + $done = 0; + } +} + +if (@files) { + print (strftime "%Y-%m-%d $author\n\n", @date); + my $msg = wrap_log_entry($comment, "\t", 69, 69); + $msg =~ s/[ \t]+\n/\n/g; + print "\t* $msg\n"; +}