Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4042)

Issue 4254055: Implements the 2nd of 5 legs of getting footnotes up and running. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by MikeSol
Modified:
13 years ago
Reviewers:
mike, Neil Puttock, hanwenn
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Implements the 2nd of 5 legs of getting footnotes up and running. Gets the annotations to print next to the footnoted grobs. The 3rd leg will be merging Balloon and FootnoteItem into one grob that is responsible for annotations. The 4th will be implementing endnotes. The 5th will be automatic numbering.

Patch Set 1 #

Total comments: 16

Patch Set 2 : Changes based on Neil's comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -13 lines) Patch
M lily/balloon.cc View 1 4 chunks +61 lines, -4 lines 1 comment Download
M lily/system.cc View 1 1 chunk +3 lines, -5 lines 0 comments Download
M scm/define-grob-properties.scm View 1 1 chunk +3 lines, -0 lines 0 comments Download
M scm/define-grobs.scm View 1 3 chunks +10 lines, -4 lines 0 comments Download

Messages

Total messages: 7
Neil Puttock
Hi Mike, Just a few minor nitpicks for you. Cheers, Neil http://codereview.appspot.com/4254055/diff/1/lily/balloon.cc File lily/balloon.cc (right): ...
13 years, 1 month ago (2011-03-06 23:35:28 UTC) #1
Neil Puttock
http://codereview.appspot.com/4254055/diff/1/scm/define-grobs.scm File scm/define-grobs.scm (right): http://codereview.appspot.com/4254055/diff/1/scm/define-grobs.scm#newcode180 scm/define-grobs.scm:180: (annotation-balloon . #f) On 2011/03/06 23:35:28, Neil Puttock wrote: ...
13 years, 1 month ago (2011-03-06 23:37:55 UTC) #2
MikeSol
Thanks Neil! New patch set uploaded. Cheers, Mike http://codereview.appspot.com/4254055/diff/1/lily/balloon.cc File lily/balloon.cc (right): http://codereview.appspot.com/4254055/diff/1/lily/balloon.cc#newcode38 lily/balloon.cc:38: static ...
13 years, 1 month ago (2011-03-06 23:46:56 UTC) #3
Neil Puttock
LGTM. http://codereview.appspot.com/4254055/diff/6001/lily/balloon.cc File lily/balloon.cc (right): http://codereview.appspot.com/4254055/diff/6001/lily/balloon.cc#newcode47 lily/balloon.cc:47: if (Item *item = dynamic_cast<Item *>(me)) dynamic_cast<Item *> ...
13 years, 1 month ago (2011-03-07 22:27:00 UTC) #4
mike_apollinemike.com
On Mar 7, 2011, at 11:27 PM, n.puttock@gmail.com wrote: > LGTM. > > > http://codereview.appspot.com/4254055/diff/6001/lily/balloon.cc ...
13 years, 1 month ago (2011-03-09 08:21:11 UTC) #5
hanwenn
Hi Mike, can fix the below points before continuing with pushing stuff for this patch ...
13 years, 1 month ago (2011-03-11 13:44:21 UTC) #6
mike_apollinemike.com
13 years, 1 month ago (2011-03-11 17:00:40 UTC) #7
On Mar 11, 2011, at 2:44 PM, Han-Wen Nienhuys wrote:

> Hi Mike,
> 
> can fix the below points before continuing with pushing stuff for this
> patch series?
> 
> On Sun, Mar 6, 2011 at 8:46 PM,  <mtsolo@gmail.com> wrote:
>> +// ugh...code dup...hopefully can be consolidated w/ above one day
> 
> can you make a priority to do this right now?  If it's not done
> directly, 'one day' usually does not happen at all.

Sorry - the consolidation already happened in the internal print function.  I
forgot
to remove the comment.

> 
>> +      int pos = orig->spanned_rank_interval ()[LEFT];
>> +      Real spanner_placement = min (1.0,
>> +                                    max (robust_scm2double
>> (me->get_property ("spanner-placement"), -1.0),
>> +                                         -1.0));
>> +
>> +      spanner_placement = (spanner_placement + 1.0) / 2.0;
>> +      int rpos = orig->spanned_rank_interval ()[RIGHT];
>> +      pos = (int)((rpos - pos) * spanner_placement + pos + 0.5);
>> +
>> +      if (pos < me->spanned_rank_interval () [LEFT])
>> +        return SCM_EOL;
> 
> Can you rethink this? The rank numbers are not good measures of
> anything.  In particular, adding a new voice/staff with different
> rhythmic texture will cause these numbers to fluctuate, and mess up
> your positioning.  I still think this is a overall bad idea, and would
> love to see examples where users need placement of footnotes, but
> placement so inexact that they do not want to use per-item
> positioning.  One possibility is to use column->when() as a measure,
> as it is least somewhat invariant, but preferably I'd like to scrap
> this (especially given the code dup and overall ugliness) until we
> have proof that it's really needed.

Done.

http://codereview.appspot.com/4286042/

Cheers,
MS
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b