#10 Patch: Allow cross window copy and paste

open
nobody
None
5
2014-10-17
2010-09-14
bobbysmith007
No

I'm not sure how to go about opening communication about this other than opening a ticket so sorry if I did this incorrectly (I couldnt find a mailing list). I am interested in assisting development of this project by providing occasional patches. I just started using it but am already loving TuxGuitar. Please advise if there is a better way to communicate.

I'm sure what I have will need to be improved a bit for inclusion, but I wanted to at least get comments on it if possible, so that I can better help get these changes in. The first feature I was really missing was a way to copy an paste between windows. I figured that would be a small change that would help introduce me to the project and allow me to contribute in a way that hopefully doesn't get in anyones way. I have also seen this feature requested a couple times.

http://tuxguitar.herac.com.ar/forum/3/1504/copying-a-track-from-one-tux-project-to-another%3F%3F%3F/
https://sourceforge.net/tracker/?func=detail&aid=2880744&group_id=155855&atid=797449

I have a git hub branch of my local development at the following url which should allow you to view my patch online and download udiffs. (I checked out from the svn branch pretty recently).

http://github.com/bobbysmith007/TuxGuitar/commit/f5dd0be3b9bf6112377145397b4fc4812258c74b

Thanks,
Russ

Discussion

  • Vadim R. Kotov
    Vadim R. Kotov
    2014-10-15

    Great to know this problem is being taken care of! Did you test the patch with the recent svn builds?
    If the code of Tuxguitar did not significantly change since 2010, I'll try the patch myself, although I have no experience with Java.

     
  • Vadim R. Kotov
    Vadim R. Kotov
    2014-10-17

    OK, so I tried to apply the patch to a recent svn commit and it wasn't too difficult. Some files were relocated from Tuxguitar/ to Tuxguitar-lib/, and I also had to remove annotations @Override from MeasureTransferable.java, because before that compiler gave an error: 'annotations are not supported in -source 1.4'. There was also a new class file TGChannelParameter.java that had to be edited (remove 'abstract' from class definition).

    The good news is that I can now copy measures between windows (everything gets copied except for the instrument, but it can be edited later). You cannot copy multiple tracks, but this is not a big deal. Also, when you have two Tuxguitar windows open and press 'Play' both windows start playing.

    Anyway, it's a great addition to tuxguitar, thank you for your contribution!