[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] Initial Clef - Transposing: How do I ... / Why does D
From: |
Jeremiah Benham |
Subject: |
Re: [Denemo-devel] Initial Clef - Transposing: How do I ... / Why does Denemo... |
Date: |
Fri, 25 Jul 2008 09:12:12 -0500 |
On Fri, 2008-07-25 at 08:14 +0100, Richard Shann wrote:
> On Thu, 2008-07-24 at 20:56 -0500, Jeremiah Benham wrote:
> > I wonder if I really should have changed it to:
> >
> > if (isnum(n = atoi (gtk_entry_get_text (GTK_ENTRY
> > (cbdata->transposeentry)))))
> this if condition will always be true since atoi returns an int.
> In fact the line
>
> if ((n = atoi (gtk_entry_get_text (GTK_ENTRY
> (cbdata->transposeentry)))))
> staffstruct->transposition = n;
>
> should be
>
> staffstruct->transposition = atoi (gtk_entry_get_text (GTK_ENTRY
> (cbdata->transposeentry))));
>
> The code as it stands has a bug, you cannot re-set transposition to 0
> once it has been set to anything else. I have pushed this change to git.
> There is another bug here - a pos_in_half_lines attribute is being set
> and has similar problems, but (worse) it actually has no function in the
> code. However, (a long-standing gripe of mine) removing it would require
> altering a whole series of numbers describing the positions of the
> elements of the GtkTable. Please agree with me that GtkTable is just the
> wrong widget for this sort of thing, hbox/vbox is for this purpose, as
> you can drop in and remove items at independently and Gtk repositions
> everything.
> And PLEASE can we agree a code freeze - only disastrous bug fixes to
> be
> checked in?
I agree on the hbox/vbox thing.
It was a bug fix because exportmidi was not transposing down. It only
transposed up. It use to go both ways. Now it does again.
Jeremiah
> Richard
>
>
>